]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix: align ConnectionTimeOut semantics with OCPP spec
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 14:36:18 +0000 (15:36 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 14:36:18 +0000 (15:36 +0100)
commit97cb0e121af25342787fbd18d966ff47ff5e2b5c
treefeb17105287f904019ecaa26e1894d68ae393cab
parent1d0814fe5443c3be0322127397ba0a9b09b15042
fix: align ConnectionTimeOut semantics with OCPP spec

ConnectionTimeOut/EVConnectionTimeOut is the EV cable insertion timeout
per OCPP 1.6 §9.1.6 and OCPP 2.0.1 TxCtrlr spec, not a WebSocket
timeout. Split DEFAULT_CONNECTION_TIMEOUT into three purpose-specific
constants:
- DEFAULT_EV_CONNECTION_TIMEOUT (180s): OCPP cable insertion timeout
- DEFAULT_WS_HANDSHAKE_TIMEOUT (30s): WebSocket handshake timeout
- DEFAULT_WS_RECONNECT_DELAY (30s): WebSocket reconnection delay
- DEFAULT_MESSAGE_TIMEOUT (30s): OCPP 2.0 MessageTimeout default

Dissociate WebSocket handshake/reconnect from OCPP ConnectionTimeOut
configuration. Initialize ConnectionTimeOut with 180s per spec.
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/utils/Constants.ts
tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts