From: Jérôme Benoit Date: Mon, 29 Jan 2024 20:34:36 +0000 (+0100) Subject: docs: add few comments to incoming request handling code X-Git-Tag: v1.2.33~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=868c68301968f5c1dec21e9cd6333c2e04566e30;p=e-mobility-charging-stations-simulator.git docs: add few comments to incoming request handling code Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index 53f87ab2..fca1f1cd 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -405,6 +405,7 @@ export class OCPP16IncomingRequestService extends OCPPIncomingRequestService { .bind(this) ] ]) + // Handle incoming request events this.on( OCPP16IncomingRequestCommand.REMOTE_START_TRANSACTION, ( @@ -635,6 +636,7 @@ export class OCPP16IncomingRequestService extends OCPPIncomingRequestService { response, commandName ) + // Emit command name event to allow delayed handling this.emit(commandName, chargingStation, commandPayload, response) } diff --git a/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts b/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts index 98436cfd..67f3a61b 100644 --- a/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts +++ b/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts @@ -135,6 +135,7 @@ export class OCPP20IncomingRequestService extends OCPPIncomingRequestService { response, commandName ) + // Emit command name event to allow delayed handling this.emit(commandName, chargingStation, commandPayload, response) }