X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStation.ts;h=a425d865651ead0c168a714b163705255f5b3434;hb=53ac516c575adaacd199a68d39b5ace22876ee83;hp=65ea08736287d65bb7137bfa236402b8a1c801a7;hpb=5a2a53cfa256a32aa342d4dee48492118065e84a;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 65ea0873..a425d865 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -170,7 +170,7 @@ export default class ChargingStation { }; public hasAuthorizedTags(): boolean { - return !Utils.isEmptyArray( + return Utils.isNotEmptyArray( this.authorizedTagsCache.getAuthorizedTags( ChargingStationUtils.getAuthorizationFile(this.stationInfo) ) @@ -713,7 +713,7 @@ export default class ChargingStation { this.getAutomaticTransactionGeneratorConfigurationFromTemplate(), this ); - if (!Utils.isEmptyArray(connectorIds)) { + if (Utils.isNotEmptyArray(connectorIds)) { for (const connectorId of connectorIds) { this.automaticTransactionGenerator?.startConnector(connectorId); } @@ -724,7 +724,7 @@ export default class ChargingStation { } public stopAutomaticTransactionGenerator(connectorIds?: number[]): void { - if (!Utils.isEmptyArray(connectorIds)) { + if (Utils.isNotEmptyArray(connectorIds)) { for (const connectorId of connectorIds) { this.automaticTransactionGenerator?.stopConnector(connectorId); } @@ -865,7 +865,7 @@ export default class ChargingStation { ); stationInfo.ocppVersion = stationTemplate?.ocppVersion ?? OCPPVersion.VERSION_16; ChargingStationUtils.createSerialNumber(stationTemplate, stationInfo); - if (!Utils.isEmptyArray(stationTemplate?.power)) { + if (Utils.isNotEmptyArray(stationTemplate?.power)) { stationTemplate.power = stationTemplate.power as number[]; const powerArrayRandomIndex = Math.floor(Utils.secureRandom() * stationTemplate.power.length); stationInfo.maximumPower = @@ -1928,7 +1928,7 @@ export default class ChargingStation { private getConfiguredSupervisionUrl(): URL { const supervisionUrls = this.stationInfo?.supervisionUrls ?? Configuration.getSupervisionUrls(); - if (!Utils.isEmptyArray(supervisionUrls)) { + if (Utils.isNotEmptyArray(supervisionUrls)) { switch (Configuration.getSupervisionUrlDistribution()) { case SupervisionUrlDistribution.ROUND_ROBIN: // FIXME