From: Jérôme Benoit Date: Sun, 13 Mar 2022 18:31:03 +0000 (+0100) Subject: Ensure the boot notification response is updated at boot notification X-Git-Tag: v1.1.55~11 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ae711c83a337c84226f8b7533f054dd74359a759;p=e-mobility-charging-stations-simulator.git Ensure the boot notification response is updated at boot notification message trigger Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index bd355771..09cfa74f 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -80,10 +80,10 @@ export default class ChargingStation { public performanceStatistics!: PerformanceStatistics; public heartbeatSetInterval!: NodeJS.Timeout; public ocppRequestService!: OCPPRequestService; + public bootNotificationResponse!: BootNotificationResponse | null; private readonly index: number; private configurationFile!: string; private bootNotificationRequest!: BootNotificationRequest; - private bootNotificationResponse!: BootNotificationResponse | null; private connectorsConfigurationHash!: string; private ocppIncomingRequestService!: OCPPIncomingRequestService; private readonly messageBuffer: Set; diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index 6e66807d..38907105 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -919,6 +919,9 @@ export default class OCPP16IncomingRequestService extends OCPPIncomingRequestSer }, { skipBufferingOnError: true, triggerMessage: true } ) + .then((value) => { + this.chargingStation.bootNotificationResponse = value; + }) .catch(() => { /* This is intentional */ });