]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(ocpp2): consolidate dual-path request architecture into single path
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 18 Mar 2026 14:16:54 +0000 (15:16 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 18 Mar 2026 14:16:54 +0000 (15:16 +0100)
commita91da1dbeab41c25b6d08569e29d6b07ea54771b
tree6175ade11b652f4ab0ba932117399cb83f2534bb
parent285b9a3b2ca05509483c9ca9a21c2c1ed389b597
refactor(ocpp2): consolidate dual-path request architecture into single path

Remove 8 unused dedicated request methods (requestFirmwareStatusNotification,
requestGet15118EVCertificate, requestGetCertificateStatus, etc.) that bypassed
buildRequestPayload via direct sendMessage calls. All production callers
already used requestHandler exclusively, making these methods dead code.

Move SignCertificate CSR generation logic into buildRequestPayload, making
it the authoritative payload construction layer — symmetric with OCPP 1.6.
This also adds isRequestCommandSupported check and AJV schema validation
to the SignCertificate flow that the dedicated method bypassed.

Refactor 6 test files to test through requestHandler (production path)
instead of the removed dedicated methods.
src/charging-station/ocpp/2.0/OCPP20RequestService.ts
src/charging-station/ocpp/2.0/__testable__/OCPP20RequestServiceTestable.ts
tests/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-FirmwareStatusNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-ISO15118.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-LogStatusNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-MeterValues.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-SecurityEventNotification.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestService-SignCertificate.test.ts