import type { JSONSchemaType } from 'ajv';
-import { type ChargingStation, getIdTagsFile } from '../../../charging-station';
+import { type ChargingStation, getIdTagsFile, hasFeatureProfile } from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
type ClearChargingProfileRequest,
DCElectricUtils,
convertToFloat,
convertToInt,
- formatDurationMilliSeconds,
getRandomFloatFluctuatedRounded,
getRandomFloatRounded,
getRandomInteger,
featureProfile: OCPP16SupportedFeatureProfiles,
command: OCPP16RequestCommand | OCPP16IncomingRequestCommand,
): boolean {
- if (!chargingStation.hasFeatureProfile(featureProfile)) {
+ if (!hasFeatureProfile(chargingStation, featureProfile)) {
logger.warn(
`${chargingStation.logPrefix()} Trying to '${command}' without '${featureProfile}' feature enabled in ${
OCPP16StandardParametersKey.SupportedFeatureProfiles
`${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`,
);
}
}