From: Jérôme Benoit Date: Thu, 19 Mar 2026 11:29:15 +0000 (+0100) Subject: refactor(ocpp2): harmonize and condense audit comments to match existing FR style X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fe485a8a839bd82c3aaa45cdc45b7144aa715906;p=e-mobility-charging-stations-simulator.git refactor(ocpp2): harmonize and condense audit comments to match existing FR style --- diff --git a/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts b/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts index 6b6bcf2f..9810439b 100644 --- a/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts +++ b/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts @@ -306,8 +306,7 @@ export class OCPP20ResponseService extends OCPPResponseService { switch (requestPayload.eventType) { case OCPP20TransactionEventEnumType.Ended: - // Cleanup (stopTxUpdatedInterval, resetConnectorStatus, StatusNotification) is owned by - // the caller that sends TransactionEvent(Ended) — see requestStopTransaction in OCPP20ServiceUtils. + // Cleanup owned by caller (see requestStopTransaction/requestDeauthorizeTransaction) if (connectorId != null) { logger.info( `${chargingStation.logPrefix()} ${moduleName}.handleResponseTransactionEvent: Transaction ${requestPayload.transactionInfo.transactionId} ENDED on connector ${connectorId.toString()}` diff --git a/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts b/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts index c22147d0..866a36b5 100644 --- a/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts +++ b/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts @@ -292,9 +292,7 @@ export class OCPP20ServiceUtils extends OCPPServiceUtils { return { bytesLimit, itemsLimit } } - // E05.FR.09/FR.10 + E06.FR.04: Deauthorization flow when CSMS rejects idToken. - // Assumes StopTxOnInvalidId=true (simulator default). Sends Updated(Deauthorized, SuspendedEVSE) - // then Ended(Deauthorized, DeAuthorized) then cleanup. + // E05.FR.09/FR.10 + E06.FR.04: Updated(Deauthorized) → Ended(DeAuthorized). Assumes StopTxOnInvalidId=true. public static async requestDeauthorizeTransaction ( chargingStation: ChargingStation, connectorId: number, diff --git a/src/types/ConnectorStatus.ts b/src/types/ConnectorStatus.ts index c6b407c1..f6f40ec1 100644 --- a/src/types/ConnectorStatus.ts +++ b/src/types/ConnectorStatus.ts @@ -44,9 +44,8 @@ export interface ConnectorStatus { */ transactionIdTokenSent?: boolean /** - * OCPP 2.0.1: Transaction is pending CSMS acknowledgment via TransactionEvent response. - * Set by RequestStartTransaction handler to block duplicate starts before the response - * handler finalizes the transaction state with transactionStarted = true. + * OCPP 2.0.1 E02 compliance: Transaction pending CSMS acknowledgment. + * Blocks duplicate RequestStartTransaction until response handler sets transactionStarted. */ transactionPending?: boolean transactionRemoteStarted?: boolean