Skip to content

Automatic reconnection and concurrency improvements

Pre-release
Pre-release
Compare
Choose a tag to compare
@lorenzodonini lorenzodonini released this 02 May 14:01
· 243 commits to master since this release

Breaking changes

The following interfaces in the ocppj package changed slightly, affecting existing custom implementations:

  • ClientDispatcher
  • ServerDispatcher
  • PendingRequestState was split into ClientState and ServerState
  • ocppj.NewClient and ocppj.NewServer now accept the respective state interface

Websocket clients now include the following new methods:

  • SetDisconnectedHandler
  • SetReconnectedHandler
  • IsConnected

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 Channel struct
  • 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 clientReadyMap status in request dispatcher if not ready
  • Notify charge point of failed requests with onRequestTimeout callbacks