public performanceStatistics!: PerformanceStatistics;
public heartbeatSetInterval!: NodeJS.Timeout;
public ocppRequestService!: OCPPRequestService;
+ public bootNotificationRequest!: BootNotificationRequest;
public bootNotificationResponse!: BootNotificationResponse | null;
public powerDivider!: number;
private readonly index: number;
private configurationFile!: string;
private configurationFileHash!: string;
- private bootNotificationRequest!: BootNotificationRequest;
private connectorsConfigurationHash!: string;
private ocppIncomingRequestService!: OCPPIncomingRequestService;
private readonly messageBuffer: Set<string>;
);
}
- public getBootNotificationRequest(): BootNotificationRequest {
- return this.bootNotificationRequest;
- }
-
public getRandomIdTag(): string {
const authorizationFile = ChargingStationUtils.getAuthorizationFile(this.stationInfo);
const index = Math.floor(
break;
}
+ if (this.isWebSocketConnectionOpened()) {
+ logger.warn(
+ `${this.logPrefix()} OCPP connection to URL ${this.wsConnectionUrl.toString()} is already opened`
+ );
+ return;
+ }
+
logger.info(
- this.logPrefix() + ' Open OCPP connection to URL ' + this.wsConnectionUrl.toString()
+ `${this.logPrefix()} Open OCPP connection to URL ${this.wsConnectionUrl.toString()}`
);
this.wsConnection = new WebSocket(this.wsConnectionUrl, protocol, options);
chargingStation,
OCPP16RequestCommand.BOOT_NOTIFICATION,
{
- chargePointModel: chargingStation.getBootNotificationRequest().chargePointModel,
- chargePointVendor: chargingStation.getBootNotificationRequest().chargePointVendor,
+ chargePointModel: chargingStation.bootNotificationRequest.chargePointModel,
+ chargePointVendor: chargingStation.bootNotificationRequest.chargePointVendor,
chargeBoxSerialNumber:
- chargingStation.getBootNotificationRequest().chargeBoxSerialNumber,
- firmwareVersion: chargingStation.getBootNotificationRequest().firmwareVersion,
+ chargingStation.bootNotificationRequest.chargeBoxSerialNumber,
+ firmwareVersion: chargingStation.bootNotificationRequest.firmwareVersion,
chargePointSerialNumber:
- chargingStation.getBootNotificationRequest().chargePointSerialNumber,
- iccid: chargingStation.getBootNotificationRequest().iccid,
- imsi: chargingStation.getBootNotificationRequest().imsi,
- meterSerialNumber: chargingStation.getBootNotificationRequest().meterSerialNumber,
- meterType: chargingStation.getBootNotificationRequest().meterType,
+ chargingStation.bootNotificationRequest.chargePointSerialNumber,
+ iccid: chargingStation.bootNotificationRequest.iccid,
+ imsi: chargingStation.bootNotificationRequest.imsi,
+ meterSerialNumber: chargingStation.bootNotificationRequest.meterSerialNumber,
+ meterType: chargingStation.bootNotificationRequest.meterType,
},
{ skipBufferingOnError: true, triggerMessage: true }
)