X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStation.ts;h=5b5ac56e4d79e8ced4d3e15758f7b554f331550e;hb=9c7195b209ec5072ba96581f7c2a30314c59fb76;hp=be94daddfe0fadeaf61c6b5778d13e0a947a6d1b;hpb=85d206672d2dc688827177e4de87a069c4b2cdc1;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index be94dadd..5b5ac56e 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -84,7 +84,7 @@ export default class ChargingStation { return this.bootNotificationRequest; } - public getRandomTagId(): string { + public getRandomIdTag(): string { const index = Math.floor(Utils.secureRandom() * this.authorizedTags.length); return this.authorizedTags[index]; } @@ -525,7 +525,7 @@ export default class ChargingStation { // Generate all connectors if ((this.stationInfo.Connectors[0] ? templateMaxConnectors - 1 : templateMaxConnectors) > 0) { for (let index = 1; index <= maxConnectors; index++) { - const randConnectorId = this.stationInfo.randomConnectors ? Utils.getRandomInt(Utils.convertToInt(lastConnector), 1) : index; + const randConnectorId = this.stationInfo.randomConnectors ? Utils.getRandomInteger(Utils.convertToInt(lastConnector), 1) : index; this.connectors[index] = Utils.cloneObject(this.stationInfo.Connectors[randConnectorId]); this.connectors[index].availability = AvailabilityType.OPERATIVE; if (Utils.isUndefined(this.connectors[lastConnector]?.chargingProfiles)) { @@ -1003,7 +1003,7 @@ export default class ChargingStation { private startStationTemplateFileMonitoring(): void { try { - fs.watch(this.stationTemplateFile, async (event, filename): Promise => { + fs.watch(this.stationTemplateFile, (event, filename): void => { if (filename && event === 'change') { try { logger.debug(this.logPrefix() + ' Template file ' + this.stationTemplateFile + ' have changed, reload');