import { AutomaticTransactionGenerator } from './AutomaticTransactionGenerator';
import { ChargingStationWorkerBroadcastChannel } from './broadcast-channel/ChargingStationWorkerBroadcastChannel';
-import { ChargingStationConfigurationUtils } from './ChargingStationConfigurationUtils';
+import {
+ addConfigurationKey,
+ deleteConfigurationKey,
+ getConfigurationKey,
+ setConfigurationKeyValue,
+} from './ChargingStationConfigurationUtils';
import {
buildConnectorsMap,
checkConnectorsConfiguration,
`${
this.getSupervisionUrlOcppConfiguration() &&
isNotEmptyString(this.getSupervisionUrlOcppKey()) &&
- isNotEmptyString(
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- this.getSupervisionUrlOcppKey(),
- )?.value,
- )
- ? ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- this.getSupervisionUrlOcppKey(),
- )!.value
+ isNotEmptyString(getConfigurationKey(this, this.getSupervisionUrlOcppKey())?.value)
+ ? getConfigurationKey(this, this.getSupervisionUrlOcppKey())!.value
: this.configuredSupervisionUrl.href
}/${this.stationInfo.chargingStationId}`,
);
}
public getAuthorizeRemoteTxRequests(): boolean {
- const authorizeRemoteTxRequests = ChargingStationConfigurationUtils.getConfigurationKey(
+ const authorizeRemoteTxRequests = getConfigurationKey(
this,
StandardParametersKey.AuthorizeRemoteTxRequests,
);
}
public getLocalAuthListEnabled(): boolean {
- const localAuthListEnabled = ChargingStationConfigurationUtils.getConfigurationKey(
+ const localAuthListEnabled = getConfigurationKey(
this,
StandardParametersKey.LocalAuthListEnabled,
);
}
public getHeartbeatInterval(): number {
- const HeartbeatInterval = ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.HeartbeatInterval,
- );
+ const HeartbeatInterval = getConfigurationKey(this, StandardParametersKey.HeartbeatInterval);
if (HeartbeatInterval) {
return convertToInt(HeartbeatInterval.value) * 1000;
}
- const HeartBeatInterval = ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.HeartBeatInterval,
- );
+ const HeartBeatInterval = getConfigurationKey(this, StandardParametersKey.HeartBeatInterval);
if (HeartBeatInterval) {
return convertToInt(HeartBeatInterval.value) * 1000;
}
this.getSupervisionUrlOcppConfiguration() &&
isNotEmptyString(this.getSupervisionUrlOcppKey())
) {
- ChargingStationConfigurationUtils.setConfigurationKeyValue(
- this,
- this.getSupervisionUrlOcppKey(),
- url,
- );
+ setConfigurationKeyValue(this, this.getSupervisionUrlOcppKey(), url);
} else {
this.stationInfo.supervisionUrls = url;
this.saveStationInfo();
}
public hasFeatureProfile(featureProfile: SupportedFeatureProfiles): boolean | undefined {
- return ChargingStationConfigurationUtils.getConfigurationKey(
+ return getConfigurationKey(
this,
StandardParametersKey.SupportedFeatureProfiles,
)?.value?.includes(featureProfile);
public getReservationOnConnectorId0Enabled(): boolean {
return convertToBoolean(
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.ReserveConnectorZeroSupported,
- )!.value,
+ getConfigurationKey(this, StandardParametersKey.ReserveConnectorZeroSupported)!.value,
);
}
}
private initializeOcppConfiguration(): void {
- if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.HeartbeatInterval,
- )
- ) {
- ChargingStationConfigurationUtils.addConfigurationKey(
- this,
- StandardParametersKey.HeartbeatInterval,
- '0',
- );
+ if (!getConfigurationKey(this, StandardParametersKey.HeartbeatInterval)) {
+ addConfigurationKey(this, StandardParametersKey.HeartbeatInterval, '0');
}
- if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.HeartBeatInterval,
- )
- ) {
- ChargingStationConfigurationUtils.addConfigurationKey(
- this,
- StandardParametersKey.HeartBeatInterval,
- '0',
- { visible: false },
- );
+ if (!getConfigurationKey(this, StandardParametersKey.HeartBeatInterval)) {
+ addConfigurationKey(this, StandardParametersKey.HeartBeatInterval, '0', { visible: false });
}
if (
this.getSupervisionUrlOcppConfiguration() &&
isNotEmptyString(this.getSupervisionUrlOcppKey()) &&
- !ChargingStationConfigurationUtils.getConfigurationKey(this, this.getSupervisionUrlOcppKey())
+ !getConfigurationKey(this, this.getSupervisionUrlOcppKey())
) {
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(
this,
this.getSupervisionUrlOcppKey(),
this.configuredSupervisionUrl.href,
} else if (
!this.getSupervisionUrlOcppConfiguration() &&
isNotEmptyString(this.getSupervisionUrlOcppKey()) &&
- ChargingStationConfigurationUtils.getConfigurationKey(this, this.getSupervisionUrlOcppKey())
+ getConfigurationKey(this, this.getSupervisionUrlOcppKey())
) {
- ChargingStationConfigurationUtils.deleteConfigurationKey(
- this,
- this.getSupervisionUrlOcppKey(),
- { save: false },
- );
+ deleteConfigurationKey(this, this.getSupervisionUrlOcppKey(), { save: false });
}
if (
isNotEmptyString(this.stationInfo?.amperageLimitationOcppKey) &&
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- this.stationInfo.amperageLimitationOcppKey!,
- )
+ !getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey!)
) {
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(
this,
this.stationInfo.amperageLimitationOcppKey!,
(
).toString(),
);
}
- if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.SupportedFeatureProfiles,
- )
- ) {
- ChargingStationConfigurationUtils.addConfigurationKey(
+ if (!getConfigurationKey(this, StandardParametersKey.SupportedFeatureProfiles)) {
+ addConfigurationKey(
this,
StandardParametersKey.SupportedFeatureProfiles,
`${SupportedFeatureProfiles.Core},${SupportedFeatureProfiles.FirmwareManagement},${SupportedFeatureProfiles.LocalAuthListManagement},${SupportedFeatureProfiles.SmartCharging},${SupportedFeatureProfiles.RemoteTrigger}`,
);
}
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(
this,
StandardParametersKey.NumberOfConnectors,
this.getNumberOfConnectors().toString(),
{ readonly: true },
{ overwrite: true },
);
- if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.MeterValuesSampledData,
- )
- ) {
- ChargingStationConfigurationUtils.addConfigurationKey(
+ if (!getConfigurationKey(this, StandardParametersKey.MeterValuesSampledData)) {
+ addConfigurationKey(
this,
StandardParametersKey.MeterValuesSampledData,
MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER,
);
}
- if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.ConnectorPhaseRotation,
- )
- ) {
+ if (!getConfigurationKey(this, StandardParametersKey.ConnectorPhaseRotation)) {
const connectorsPhaseRotation: string[] = [];
if (this.hasEvses) {
for (const evseStatus of this.evses.values()) {
);
}
}
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(
this,
StandardParametersKey.ConnectorPhaseRotation,
connectorsPhaseRotation.toString(),
);
}
- if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.AuthorizeRemoteTxRequests,
- )
- ) {
- ChargingStationConfigurationUtils.addConfigurationKey(
- this,
- StandardParametersKey.AuthorizeRemoteTxRequests,
- 'true',
- );
+ if (!getConfigurationKey(this, StandardParametersKey.AuthorizeRemoteTxRequests)) {
+ addConfigurationKey(this, StandardParametersKey.AuthorizeRemoteTxRequests, 'true');
}
if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.LocalAuthListEnabled,
- ) &&
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.SupportedFeatureProfiles,
- )?.value?.includes(SupportedFeatureProfiles.LocalAuthListManagement)
- ) {
- ChargingStationConfigurationUtils.addConfigurationKey(
- this,
- StandardParametersKey.LocalAuthListEnabled,
- 'false',
- );
- }
- if (
- !ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.ConnectionTimeOut,
+ !getConfigurationKey(this, StandardParametersKey.LocalAuthListEnabled) &&
+ getConfigurationKey(this, StandardParametersKey.SupportedFeatureProfiles)?.value?.includes(
+ SupportedFeatureProfiles.LocalAuthListManagement,
)
) {
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(this, StandardParametersKey.LocalAuthListEnabled, 'false');
+ }
+ if (!getConfigurationKey(this, StandardParametersKey.ConnectionTimeOut)) {
+ addConfigurationKey(
this,
StandardParametersKey.ConnectionTimeOut,
Constants.DEFAULT_CONNECTION_TIMEOUT.toString(),
// 0 for disabling
private getConnectionTimeout(): number {
- if (
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.ConnectionTimeOut,
- )
- ) {
+ if (getConfigurationKey(this, StandardParametersKey.ConnectionTimeOut)) {
return (
- parseInt(
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.ConnectionTimeOut,
- )!.value!,
- ) ?? Constants.DEFAULT_CONNECTION_TIMEOUT
+ parseInt(getConfigurationKey(this, StandardParametersKey.ConnectionTimeOut)!.value!) ??
+ Constants.DEFAULT_CONNECTION_TIMEOUT
);
}
return Constants.DEFAULT_CONNECTION_TIMEOUT;
private getAmperageLimitation(): number | undefined {
if (
isNotEmptyString(this.stationInfo?.amperageLimitationOcppKey) &&
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- this.stationInfo.amperageLimitationOcppKey!,
- )
+ getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey!)
) {
return (
convertToInt(
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- this.stationInfo.amperageLimitationOcppKey!,
- )?.value,
+ getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey!)?.value,
) / getAmperageLimitationUnitDivider(this.stationInfo)
);
}
}
private startWebSocketPing(): void {
- const webSocketPingInterval: number = ChargingStationConfigurationUtils.getConfigurationKey(
+ const webSocketPingInterval: number = getConfigurationKey(
this,
StandardParametersKey.WebSocketPingInterval,
)
- ? convertToInt(
- ChargingStationConfigurationUtils.getConfigurationKey(
- this,
- StandardParametersKey.WebSocketPingInterval,
- )?.value,
- )
+ ? convertToInt(getConfigurationKey(this, StandardParametersKey.WebSocketPingInterval)?.value)
: 0;
if (webSocketPingInterval > 0 && !this.webSocketPingSetInterval) {
this.webSocketPingSetInterval = setInterval(() => {
save?: boolean;
}
-export class ChargingStationConfigurationUtils {
- private constructor() {
- // This is intentional
- }
-
- public static getConfigurationKey(
- chargingStation: ChargingStation,
- key: ConfigurationKeyType,
- caseInsensitive = false,
- ): ConfigurationKey | undefined {
- return chargingStation.ocppConfiguration?.configurationKey?.find((configElement) => {
- if (caseInsensitive) {
- return configElement.key.toLowerCase() === key.toLowerCase();
- }
- return configElement.key === key;
- });
- }
+export const getConfigurationKey = (
+ chargingStation: ChargingStation,
+ key: ConfigurationKeyType,
+ caseInsensitive = false,
+): ConfigurationKey | undefined => {
+ return chargingStation.ocppConfiguration?.configurationKey?.find((configElement) => {
+ if (caseInsensitive) {
+ return configElement.key.toLowerCase() === key.toLowerCase();
+ }
+ return configElement.key === key;
+ });
+};
- public static addConfigurationKey(
- chargingStation: ChargingStation,
- key: ConfigurationKeyType,
- value: string,
- options: ConfigurationKeyOptions = {
+export const addConfigurationKey = (
+ chargingStation: ChargingStation,
+ key: ConfigurationKeyType,
+ value: string,
+ options: ConfigurationKeyOptions = {
+ readonly: false,
+ visible: true,
+ reboot: false,
+ },
+ params: AddConfigurationKeyParams = { overwrite: false, save: false },
+): void => {
+ options = {
+ ...{
readonly: false,
visible: true,
reboot: false,
},
- params: AddConfigurationKeyParams = { overwrite: false, save: false },
- ): void {
- options = {
- ...{
- readonly: false,
- visible: true,
- reboot: false,
- },
- ...options,
- };
- params = { ...{ overwrite: false, save: false }, ...params };
- let keyFound = ChargingStationConfigurationUtils.getConfigurationKey(chargingStation, key);
- if (keyFound && params?.overwrite) {
- ChargingStationConfigurationUtils.deleteConfigurationKey(chargingStation, keyFound.key, {
- save: false,
- });
- keyFound = undefined;
- }
- if (!keyFound) {
- chargingStation.ocppConfiguration?.configurationKey?.push({
- key,
- readonly: options.readonly!,
- value,
- visible: options.visible,
- reboot: options.reboot,
- });
- params?.save && chargingStation.saveOcppConfiguration();
- } else {
- logger.error(
- `${chargingStation.logPrefix()} Trying to add an already existing configuration key: %j`,
- keyFound,
- );
- }
+ ...options,
+ };
+ params = { ...{ overwrite: false, save: false }, ...params };
+ let keyFound = getConfigurationKey(chargingStation, key);
+ if (keyFound && params?.overwrite) {
+ deleteConfigurationKey(chargingStation, keyFound.key, {
+ save: false,
+ });
+ keyFound = undefined;
}
-
- public static setConfigurationKeyValue(
- chargingStation: ChargingStation,
- key: ConfigurationKeyType,
- value: string,
- caseInsensitive = false,
- ): void {
- const keyFound = ChargingStationConfigurationUtils.getConfigurationKey(
- chargingStation,
+ if (!keyFound) {
+ chargingStation.ocppConfiguration?.configurationKey?.push({
key,
- caseInsensitive,
+ readonly: options.readonly!,
+ value,
+ visible: options.visible,
+ reboot: options.reboot,
+ });
+ params?.save && chargingStation.saveOcppConfiguration();
+ } else {
+ logger.error(
+ `${chargingStation.logPrefix()} Trying to add an already existing configuration key: %j`,
+ keyFound,
);
- if (keyFound) {
- chargingStation.ocppConfiguration!.configurationKey![
- chargingStation.ocppConfiguration!.configurationKey!.indexOf(keyFound)
- ].value = value;
- chargingStation.saveOcppConfiguration();
- } else {
- logger.error(
- `${chargingStation.logPrefix()} Trying to set a value on a non existing configuration key: %j`,
- { key, value },
- );
- }
}
+};
- public static deleteConfigurationKey(
- chargingStation: ChargingStation,
- key: ConfigurationKeyType,
- params: DeleteConfigurationKeyParams = { save: true, caseInsensitive: false },
- ): ConfigurationKey[] | undefined {
- params = { ...{ save: true, caseInsensitive: false }, ...params };
- const keyFound = ChargingStationConfigurationUtils.getConfigurationKey(
- chargingStation,
- key,
- params?.caseInsensitive,
+export const setConfigurationKeyValue = (
+ chargingStation: ChargingStation,
+ key: ConfigurationKeyType,
+ value: string,
+ caseInsensitive = false,
+): void => {
+ const keyFound = getConfigurationKey(chargingStation, key, caseInsensitive);
+ if (keyFound) {
+ chargingStation.ocppConfiguration!.configurationKey![
+ chargingStation.ocppConfiguration!.configurationKey!.indexOf(keyFound)
+ ].value = value;
+ chargingStation.saveOcppConfiguration();
+ } else {
+ logger.error(
+ `${chargingStation.logPrefix()} Trying to set a value on a non existing configuration key: %j`,
+ { key, value },
);
- if (keyFound) {
- const deletedConfigurationKey = chargingStation.ocppConfiguration?.configurationKey?.splice(
- chargingStation.ocppConfiguration.configurationKey.indexOf(keyFound),
- 1,
- );
- params?.save && chargingStation.saveOcppConfiguration();
- return deletedConfigurationKey;
- }
}
-}
+};
+
+export const deleteConfigurationKey = (
+ chargingStation: ChargingStation,
+ key: ConfigurationKeyType,
+ params: DeleteConfigurationKeyParams = { save: true, caseInsensitive: false },
+): ConfigurationKey[] | undefined => {
+ params = { ...{ save: true, caseInsensitive: false }, ...params };
+ const keyFound = getConfigurationKey(chargingStation, key, params?.caseInsensitive);
+ if (keyFound) {
+ const deletedConfigurationKey = chargingStation.ocppConfiguration?.configurationKey?.splice(
+ chargingStation.ocppConfiguration.configurationKey.indexOf(keyFound),
+ 1,
+ );
+ params?.save && chargingStation.saveOcppConfiguration();
+ return deletedConfigurationKey;
+ }
+};
} from '../../types';
import { Constants, convertToInt, isEmptyObject, isNullOrUndefined, logger } from '../../utils';
import type { ChargingStation } from '../ChargingStation';
-import { ChargingStationConfigurationUtils } from '../ChargingStationConfigurationUtils';
+import { getConfigurationKey } from '../ChargingStationConfigurationUtils';
import { OCPP16ServiceUtils } from '../ocpp';
const moduleName = 'ChargingStationWorkerBroadcastChannel';
[
BroadcastChannelProcedureName.METER_VALUES,
async (requestPayload?: BroadcastChannelRequestPayload) => {
- const configuredMeterValueSampleInterval =
- ChargingStationConfigurationUtils.getConfigurationKey(
- chargingStation,
- StandardParametersKey.MeterValueSampleInterval,
- );
+ const configuredMeterValueSampleInterval = getConfigurationKey(
+ chargingStation,
+ StandardParametersKey.MeterValueSampleInterval,
+ );
return this.chargingStation.ocppRequestService.requestHandler<
MeterValuesRequest,
MeterValuesResponse
export { Bootstrap } from './Bootstrap';
export type { ChargingStation } from './ChargingStation';
-export { ChargingStationConfigurationUtils } from './ChargingStationConfigurationUtils';
+export {
+ addConfigurationKey,
+ getConfigurationKey,
+ setConfigurationKeyValue,
+} from './ChargingStationConfigurationUtils';
export { getIdTagsFile, checkChargingStation, resetConnectorStatus } from './ChargingStationUtils';
import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
import {
type ChargingStation,
- ChargingStationConfigurationUtils,
checkChargingStation,
+ getConfigurationKey,
+ setConfigurationKeyValue,
} from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
}
} else if (isNotEmptyArray(commandPayload.key) === true) {
for (const key of commandPayload.key!) {
- const keyFound = ChargingStationConfigurationUtils.getConfigurationKey(
- chargingStation,
- key,
- true,
- );
+ const keyFound = getConfigurationKey(chargingStation, key, true);
if (keyFound) {
if (isUndefined(keyFound.visible) === true) {
keyFound.visible = true;
chargingStation: ChargingStation,
commandPayload: ChangeConfigurationRequest,
): ChangeConfigurationResponse {
- const keyToChange = ChargingStationConfigurationUtils.getConfigurationKey(
- chargingStation,
- commandPayload.key,
- true,
- );
+ const keyToChange = getConfigurationKey(chargingStation, commandPayload.key, true);
if (keyToChange?.readonly === true) {
return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_REJECTED;
} else if (keyToChange?.readonly === false) {
let valueChanged = false;
if (keyToChange.value !== commandPayload.value) {
- ChargingStationConfigurationUtils.setConfigurationKeyValue(
- chargingStation,
- commandPayload.key,
- commandPayload.value,
- true,
- );
+ setConfigurationKeyValue(chargingStation, commandPayload.key, commandPayload.value, true);
valueChanged = true;
}
let triggerHeartbeatRestart = false;
OCPP16StandardParametersKey.HeartBeatInterval &&
valueChanged
) {
- ChargingStationConfigurationUtils.setConfigurationKeyValue(
+ setConfigurationKeyValue(
chargingStation,
OCPP16StandardParametersKey.HeartbeatInterval,
commandPayload.value,
OCPP16StandardParametersKey.HeartbeatInterval &&
valueChanged
) {
- ChargingStationConfigurationUtils.setConfigurationKeyValue(
+ setConfigurationKeyValue(
chargingStation,
OCPP16StandardParametersKey.HeartBeatInterval,
commandPayload.value,
import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
import {
type ChargingStation,
- ChargingStationConfigurationUtils,
+ addConfigurationKey,
+ getConfigurationKey,
resetConnectorStatus,
} from '../../../charging-station';
import { OCPPError } from '../../../exception';
payload: OCPP16BootNotificationResponse,
): void {
if (payload.status === RegistrationStatusEnumType.ACCEPTED) {
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(
chargingStation,
OCPP16StandardParametersKey.HeartbeatInterval,
payload.interval.toString(),
{},
{ overwrite: true, save: true },
);
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(
chargingStation,
OCPP16StandardParametersKey.HeartBeatInterval,
payload.interval.toString(),
if (chargingStation.stationInfo.powerSharedByConnectors) {
++chargingStation.powerDivider;
}
- const configuredMeterValueSampleInterval =
- ChargingStationConfigurationUtils.getConfigurationKey(
- chargingStation,
- OCPP16StandardParametersKey.MeterValueSampleInterval,
- );
+ const configuredMeterValueSampleInterval = getConfigurationKey(
+ chargingStation,
+ OCPP16StandardParametersKey.MeterValueSampleInterval,
+ );
chargingStation.startMeterValues(
transactionConnectorId,
configuredMeterValueSampleInterval
import type { JSONSchemaType } from 'ajv';
import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
-import { type ChargingStation, ChargingStationConfigurationUtils } from '../../../charging-station';
+import { type ChargingStation, addConfigurationKey } from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
ErrorType,
payload: OCPP20BootNotificationResponse,
): void {
if (payload.status === RegistrationStatusEnumType.ACCEPTED) {
- ChargingStationConfigurationUtils.addConfigurationKey(
+ addConfigurationKey(
chargingStation,
OCPP20OptionalVariableName.HeartbeatInterval,
payload.interval.toString(),
import { OCPP16Constants } from './1.6/OCPP16Constants';
import { OCPP20Constants } from './2.0/OCPP20Constants';
import { OCPPConstants } from './OCPPConstants';
-import { type ChargingStation, ChargingStationConfigurationUtils } from '../../charging-station';
+import { type ChargingStation, getConfigurationKey } from '../../charging-station';
import { BaseError } from '../../exception';
import {
ChargePointErrorCode,
}
if (
measurand !== MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER &&
- ChargingStationConfigurationUtils.getConfigurationKey(
+ getConfigurationKey(
chargingStation,
StandardParametersKey.MeterValuesSampledData,
)?.value?.includes(measurand) === false
phase &&
sampledValueTemplates[index]?.phase === phase &&
sampledValueTemplates[index]?.measurand === measurand &&
- ChargingStationConfigurationUtils.getConfigurationKey(
+ getConfigurationKey(
chargingStation,
StandardParametersKey.MeterValuesSampledData,
)?.value?.includes(measurand) === true
!phase &&
!sampledValueTemplates[index].phase &&
sampledValueTemplates[index]?.measurand === measurand &&
- ChargingStationConfigurationUtils.getConfigurationKey(
+ getConfigurationKey(
chargingStation,
StandardParametersKey.MeterValuesSampledData,
)?.value?.includes(measurand) === true