]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(ocpp2): centralize payload construction and eliminate duplication
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 18 Mar 2026 13:44:59 +0000 (14:44 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 18 Mar 2026 13:44:59 +0000 (14:44 +0100)
commit285b9a3b2ca05509483c9ca9a21c2c1ed389b597
treeeda65134a0f2ce01e3d68258f553bdb22a351d1a
parent4aeb171dbb5cd2f9122452c1e45759e843d6ddb1
refactor(ocpp2): centralize payload construction and eliminate duplication

Remove redundant timestamp injection from buildRequestPayload() for
StatusNotification and TransactionEvent — centralized builders already
provide timestamps and AJV schema validation catches any omission.

Extract buildStationInfoReportData() helper to deduplicate station info
report data construction between FullInventory and SummaryInventory in
buildReportData().

Normalize TriggerMessage Heartbeat to use OCPP20Constants.OCPP_RESPONSE_EMPTY
for consistency with buildRequestPayload().
.serena/memories/suggested_commands.md
.serena/memories/task_completion_checklist.md
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20RequestService.ts