]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(ocpp): support TriggerMessage(TransactionEvent) per F06.FR.07 (#2013)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 16 Jul 2026 11:23:56 +0000 (13:23 +0200)
committerGitHub <noreply@github.com>
Thu, 16 Jul 2026 11:23:56 +0000 (13:23 +0200)
commit22dcb31b29975667e0b94020e144cf15033a509a
tree90d8810e42788d5ee3c715433c17e7409031e34e
parent0fdfaddffd571d4110849029cdf97bbf1d0309cf
fix(ocpp): support TriggerMessage(TransactionEvent) per F06.FR.07 (#2013)

TriggerMessage(requestedMessage=TransactionEvent) returned NotImplemented
although TransactionEvent is a fully implemented outgoing message, violating
OCPP 2.0.1 F06.FR.07/08.

Wire the trigger to the existing TransactionEvent send path across the two
touchpoints:
- handleRequestTriggerMessage: add a TransactionEvent case that validates the
  evse, returns Accepted when an ongoing transaction exists in scope, else
  Rejected (F06.FR.05); it no longer falls through to NotImplemented.
- TRIGGER_MESSAGE dispatch listener: add a TransactionEvent case that sends a
  TransactionEventRequest(eventType=Updated, triggerReason=Trigger) with the
  TxUpdatedMeasurands meterValue for each active transaction in scope; when the
  evse field is absent it fans out to all EVSEs (F06.FR.11).

Reuses sendTransactionEvent and the TxUpdatedMeasurands meter-value builder;
chargingState is populated by buildTransactionEvent for Updated events. The 6
existing trigger cases are unchanged.

Closes #2012
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-TriggerMessage.test.ts