public startMeterValues(connectorId: number, interval: number): void {
if (connectorId === 0) {
logger.error(
- `${this.logPrefix()} Trying to start MeterValues on connector id ${connectorId.toString()}`,
+ `${this.logPrefix()} Trying to start MeterValues on connector id ${connectorId}`,
);
return;
}
if (!this.getConnectorStatus(connectorId)) {
logger.error(
`${this.logPrefix()} Trying to start MeterValues on non existing connector id
- ${connectorId.toString()}`,
+ ${connectorId}`,
);
return;
}
public startReservationExpirationSetInterval(customInterval?: number): void {
const interval =
customInterval ?? Constants.DEFAULT_RESERVATION_EXPIRATION_OBSERVATION_INTERVAL;
- logger.info(
- `${this.logPrefix()} Reservation expiration date interval is set to ${interval}
- and starts on charging station now`,
- );
if (interval > 0) {
+ logger.info(
+ `${this.logPrefix()} Reservation expiration date checks started every ${formatDurationMilliSeconds(
+ interval,
+ )}`,
+ );
this.reservationExpirationSetInterval = setInterval((): void => {
const currentDate = new Date();
if (this.hasEvses) {
DCElectricUtils,
convertToFloat,
convertToInt,
- formatDurationMilliSeconds,
getRandomFloatFluctuatedRounded,
getRandomFloatRounded,
getRandomInteger,
`${chargingStation.logPrefix()} MeterValues measurand ${
meterValue.sampledValue[sampledValuesIndex].measurand ??
OCPP16MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
- }: connector id ${connectorId}, transaction id ${connector?.transactionId}, value: ${energyValueRounded}/${connectorMaximumEnergyRounded}, duration: ${formatDurationMilliSeconds(
- interval,
- )}(${roundTo(interval, 4)}ms)`,
+ }: connector id ${connectorId}, transaction id ${connector?.transactionId}, value: ${energyValueRounded}/${connectorMaximumEnergyRounded}, duration: ${interval}ms`,
);
}
}
);
} else if (logConfiguration.enabled) {
logger.info(
- `${this.logPrefix()} log interval is set to ${logStatisticsInterval?.toString()}. Not logging statistics`,
+ `${this.logPrefix()} log interval is set to ${logStatisticsInterval}. Not logging statistics`,
);
}
}