Automatic reconnection and concurrency improvements
Pre-release
Pre-release
Breaking changes
The following interfaces in the ocppj package changed slightly, affecting existing custom implementations:
- ClientDispatcher
- ServerDispatcher
PendingRequestStatewas split intoClientStateandServerStateocppj.NewClientandocppj.NewServernow accept the respective state interface
Websocket clients now include the following new methods:
SetDisconnectedHandlerSetReconnectedHandlerIsConnected
Additions & improvements
- Client websockets automatically reconnect to server after connection loss
- Added network tests for re-connection and timeouts
- Added full support for concurrent requests in ocpp16 and ocpp2
- Automatically clear all callbacks when a charge point/central system is stopped
- Improved test coverage for websockets
- Improved test coverage for ocpp-j layer
- Added logger interface for getting library debug logs
- Added TLS connection state accessor to websocket
Channelstruct - Use slices instead of linked lists in FIFO queues
Bugfixes
- Fixed concurrency issues in websockets
- Fixed concurrency and state management issues in ocpp-j dispatchers
- Fixed concurrency issues in ocpp16 package
- Fixed several nil panics in websockets, ocppj and dispatcher
- Don't set
clientReadyMapstatus in request dispatcher if not ready - Notify charge point of failed requests with
onRequestTimeoutcallbacks