]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix: use Component.Variable[.Instance] key format for OCPP 2.0 variable persistence
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Mar 2026 11:31:06 +0000 (12:31 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Mar 2026 11:31:06 +0000 (12:31 +0100)
commitf7e682fd3a4cf972957a9dffb6cbc85da855a628
tree3d3d3c6fcb03be27b1034610bbd8bfb0bad1400f
parentd2ee9aa01c0eba5d06c4934b7d432da26d68f5bc
fix: use Component.Variable[.Instance] key format for OCPP 2.0 variable persistence

The previous format used bare variable names (e.g., 'Enabled'), causing
collisions across components (9 components define Enabled, 8+ define
Available, etc.). Now uses the spec's (Component, Variable, Instance)
triplet as the persisted configuration key.

- Rewrite computeConfigurationKeyName to return Component.Variable format
- Remove shouldFlattenInstance (no longer needed)
- Extract buildConfigKey helper in ConfigurationKeyUtils, export via barrel
- Add MaxCertificateChainSize to OCPP20OptionalVariableName enum
- Update all direct config key lookups with component prefix
- Update keba-ocpp2 template keys to new format
- Update OCPP2_PARAMETER_KEY_MAP resolved values
- Replace all enum string literals in log messages with enum references
- Update all tests to use new key format
16 files changed:
src/assets/station-templates/keba-ocpp2.station-template.json
src/charging-station/ConfigurationKeyUtils.ts
src/charging-station/index.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
src/charging-station/ocpp/2.0/OCPP20VariableManager.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/types/ocpp/2.0/Variables.ts
tests/charging-station/ConfigurationKeyUtils.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CertificateSigned.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetVariables.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-BootNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts
tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts