X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2FOCPPServiceUtils.ts;h=ad78d347b965ddef05d06777388461cce61e6a2c;hb=684bad51d3298b7bf2cc55463e1f05c1ce45e41f;hp=c524d45485692e8e079ba61caedfdd0dfc5e6d0a;hpb=884a6fdf01f5afe1185c330ded18fc64cc0a3075;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPServiceUtils.ts b/src/charging-station/ocpp/OCPPServiceUtils.ts index c524d454..ad78d347 100644 --- a/src/charging-station/ocpp/OCPPServiceUtils.ts +++ b/src/charging-station/ocpp/OCPPServiceUtils.ts @@ -34,8 +34,8 @@ export class OCPPServiceUtils { } public static isRequestCommandSupported( - command: RequestCommand, - chargingStation: ChargingStation + chargingStation: ChargingStation, + command: RequestCommand ): boolean { const isRequestCommand = Object.values(RequestCommand).includes(command); if ( @@ -54,8 +54,8 @@ export class OCPPServiceUtils { } public static isIncomingRequestCommandSupported( - command: IncomingRequestCommand, - chargingStation: ChargingStation + chargingStation: ChargingStation, + command: IncomingRequestCommand ): boolean { const isIncomingRequestCommand = Object.values(IncomingRequestCommand).includes(command); if ( @@ -88,10 +88,10 @@ export class OCPPServiceUtils { } if ( measurand !== MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER && - !ChargingStationConfigurationUtils.getConfigurationKey( + ChargingStationConfigurationUtils.getConfigurationKey( chargingStation, StandardParametersKey.MeterValuesSampledData - )?.value.includes(measurand) + )?.value.includes(measurand) === false ) { logger.debug( `${chargingStation.logPrefix()} Trying to get MeterValues measurand '${measurand}' ${onPhaseStr}in template on connectorId ${connectorId} not found in '${ @@ -104,7 +104,7 @@ export class OCPPServiceUtils { chargingStation.getConnectorStatus(connectorId).MeterValues; for ( let index = 0; - !Utils.isEmptyArray(sampledValueTemplates) && index < sampledValueTemplates.length; + Utils.isEmptyArray(sampledValueTemplates) === false && index < sampledValueTemplates.length; index++ ) { if (