]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(ocpp2): audit TransactionEvent — state ownership, deauthorization, meter values
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 19 Mar 2026 11:17:44 +0000 (12:17 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 19 Mar 2026 11:17:44 +0000 (12:17 +0100)
commit710db15c07aeed99831aff3663176eba177fc12d
tree7c3124529b60f614a49c69cf6900a64c543122d4
parent5fa8ac1c507ef95f9deb6a9b8b93905147b6bae1
fix(ocpp2): audit TransactionEvent — state ownership, deauthorization, meter values

- Fix periodic TransactionEvent(Updated) to include meter values via buildMeterValue
- Replace non-UUID temp transactionId with generateUUID in OCPP20AuthAdapter
- Refactor state ownership: response handler is sole authority for transactionStarted,
  StatusNotification(Occupied), and TxUpdatedInterval start
- Add transactionPending flag to prevent duplicate RequestStartTransaction race conditions
- Add requestDeauthorizeTransaction per E05.FR.09/FR.10/E06.FR.04: sends
  Updated(Deauthorized, SuspendedEVSE) then Ended(Deauthorized, DeAuthorized)
- Fix rejection check to cover all non-Accepted idTokenInfo statuses
- Extract buildFinalMeterValues helper to eliminate DRY violation
- Skip Occupied/TxUpdatedInterval setup when idToken is rejected in same response
- Remove cleanup from Ended response handler (owned by caller)
- Add tests for getTxUpdatedInterval, requestDeauthorizeTransaction, Updated-failure path
src/charging-station/ChargingStation.ts
src/charging-station/Helpers.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/auth/adapters/OCPP20AuthAdapter.ts
src/types/ConnectorStatus.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GroupIdStop.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts