From 868c68301968f5c1dec21e9cd6333c2e04566e30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 29 Jan 2024 21:34:36 +0100 Subject: [PATCH] docs: add few comments to incoming request handling code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts | 2 ++ src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts | 1 + 2 files changed, 3 insertions(+) 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) } -- 2.34.1