]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor: move constants to domain-appropriate locations
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 31 Mar 2026 23:15:35 +0000 (01:15 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 31 Mar 2026 23:15:35 +0000 (01:15 +0200)
commitff1696ba516778bb03912ce8a48ba56d911e8350
treefdfa4355ab1394d3319bcec5d779eb52a729922a
parent86cfcbc873252fc3521844427f782bd600229f46
refactor: move constants to domain-appropriate locations

Move UNKNOWN_OCPP_COMMAND to OCPPConstants (cross-OCPP), DEFAULT_IDTAG
to OCPP16Constants (OCPP 1.6 only), OCPP_VALUE_ABSOLUTE_MAX_LENGTH to
OCPP20Constants renamed as MAX_VARIABLE_VALUE_LENGTH (OCPP 2.0 only).
Extract magic numbers: SECURITY_EVENT_RETRY_DELAY_MS in OCPP20Constants,
CLIENT_NOTIFICATION_DEBOUNCE_MS in AbstractUIServer,
DEFAULT_WS_RECONNECT_TIMEOUT_OFFSET in Constants.
16 files changed:
src/charging-station/ChargingStation.ts
src/charging-station/ocpp/1.6/OCPP16Constants.ts
src/charging-station/ocpp/1.6/OCPP16RequestService.ts
src/charging-station/ocpp/2.0/OCPP20Constants.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20VariableManager.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/charging-station/ocpp/OCPPConstants.ts
src/charging-station/ocpp/index.ts
src/charging-station/ui-server/AbstractUIServer.ts
src/exception/OCPPError.ts
src/utils/Constants.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts
tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts
tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts
tests/exception/OCPPError.test.ts