docs: add few comments to incoming request handling code
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 29 Jan 2024 20:34:36 +0000 (21:34 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 29 Jan 2024 20:34:36 +0000 (21:34 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts

index 53f87ab2667e089824c84632654dbbc413444492..fca1f1cd3b2bca101b48907c7aeee726538f8123 100644 (file)
@@ -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)
   }
 
index 98436cfd704ac74feed48c86a5b443e3ae49631f..67f3a61b492529ca0a2ae2bb487200035ff59569 100644 (file)
@@ -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)
   }