]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
feat: implement TxEnded meter value accumulator per OCPP 2.0.1 spec §2.1
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 16:06:49 +0000 (17:06 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 28 Mar 2026 16:06:49 +0000 (17:06 +0100)
commit4ca2e99eddcfbebf0ec9bd7608cbf73ed3581eb5
tree6ad06930430beac4d950a1c2ea46940f7677ac92
parent744a27b2f2e598e4c0c33906b5e5902f015b0a35
feat: implement TxEnded meter value accumulator per OCPP 2.0.1 spec §2.1

Per E06.FR.11 and J02.FR.10, TransactionEvent(Ended) must contain meter
values sampled every TxEndedInterval from transaction start, with the
final sample marked as Transaction.End context.

- Add TxEndedInterval to OCPP20RequiredVariableName enum
- Add start/stopEndedMeterValues and getTxEndedInterval
- Accumulate periodic samples during transaction, flush in Ended event
- Harmonize Updated/Ended naming across API, variables, and log messages
- Exclude transactionEndedMeterValues from serialized configuration
- Fix stopEndedMeterValues incorrectly called in startUpdatedMeterValues
- Restore JSDoc-free ConnectorStatus fields
- Fix DEFAULT_WS_PING_INTERVAL constant reference
- Update test fixtures and assertions for serialization coverage
19 files changed:
src/charging-station/Helpers.ts
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.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/OCPP20VariableRegistry.ts
src/charging-station/ocpp/OCPPServiceUtils.ts
src/types/ConnectorStatus.ts
src/types/ocpp/2.0/Variables.ts
src/utils/ChargingStationConfigurationUtils.ts
tests/charging-station/ChargingStation-Transactions.test.ts
tests/charging-station/helpers/StationHelpers.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts
tests/charging-station/ocpp/1.6/OCPP16ResponseService-Transactions.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts
tests/helpers/TestLifecycleHelpers.ts
tests/utils/ChargingStationConfigurationUtils.test.ts