]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(ocpp2): extract buildTransactionEvent as standalone function, remove dead...
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 18 Mar 2026 18:32:25 +0000 (19:32 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 18 Mar 2026 18:32:25 +0000 (19:32 +0100)
commit0d25748bfdc427e530144246bf60e92d3abaea6d
treefc6ce7eb61c8bc5c732995eaed243a252eff4e21
parent0d54c7212b5448e2bb749b4ac029ec528fd8a5b0
refactor(ocpp2): extract buildTransactionEvent as standalone function, remove dead context code

Extract buildTransactionEvent from OCPP20ServiceUtils static method to
exported standalone function, consistent with buildStatusNotificationRequest
and buildMeterValue.

Remove unused context overload from buildTransactionEvent and
sendTransactionEvent — all production callers pass triggerReason directly.

Remove dead code: OCPP20TransactionContext interface (not in OCPP 2.0.1
specs), selectTriggerReason method, TransactionContextFixtures, and
associated tests.
src/charging-station/ocpp/2.0/OCPP20RequestService.ts
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
src/charging-station/ocpp/index.ts
src/types/ocpp/2.0/Transaction.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts
tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts