Skip to content

Generic improvements and bugfixes

Pre-release
Pre-release
Compare
Choose a tag to compare
@lorenzodonini lorenzodonini released this 23 Jul 13:44
· 135 commits to master since this release

Additions and Improvements

v1.6

  • Changed the StopTransactionRequest.MeterStop field to allow negative values

OCPP-J

  • Added a onDisconnectedHandler callback to the Client struct, which allows to be notified if a connection is interrupted and the dispatcher paused
  • Added a onReconnectedHandler callback to the Client struct, which allows to be notified when a connection is re-established and the dispatcher resumed
  • Added a timeout option for outgoing server requests: if a response is not received within the configured timeframe, the request is discarded and an error is returned to the sender. The feature is available by invoking the SetTimeout method on a ServerDispatcher
  • Added support for disabling message validation entirely, via the SetMessageValidation package function
  • Added support for verbose logging (using an optional logging.Logger)

Websockets

  • Added a RemoteAddr function to websockets for retrieving the address of the remote host
  • Added support for disabling ping/pong mechanism, by setting PingWait = 0 within the timeout configuration
  • Added support for verbose logging (using an optional logging.Logger)

Generic

  • Moved logging interfaces to a dedicated ocpp-go/logging package

Bugfixes

  • Fixed a bug that occurred when sending messages over a closed websocket channel
  • Fixed a bug that would deadlock a newly created websocket, if the NewClientHandler callback contained blocking code
  • Fixed several other race conditions in the ocpp-j layer
  • Fixed a crash caused by incoming empty json requests/responses
  • Fixed a crash caused by incoming OCCP errors not containing a description field
  • Fixed the default subprotocol for v2 to be ocpp2.0.1