getIdTagsFile,
getMaxNumberOfEvses,
getPhaseRotationValue,
+ hasFeatureProfile,
initializeConnectorsMapStatus,
propagateSerialNumber,
stationTemplateToStationInfo,
if (this.getEnableStatistics() === true) {
this.performanceStatistics?.start();
}
- if (this.hasFeatureProfile(SupportedFeatureProfiles.Reservation)) {
+ if (hasFeatureProfile(this, SupportedFeatureProfiles.Reservation)) {
this.startReservationExpirationSetInterval();
}
this.openWSConnection();
if (this.getEnableStatistics() === true) {
this.performanceStatistics?.stop();
}
- if (this.hasFeatureProfile(SupportedFeatureProfiles.Reservation)) {
+ if (hasFeatureProfile(this, SupportedFeatureProfiles.Reservation)) {
this.stopReservationExpirationSetInterval();
}
this.sharedLRUCache.deleteChargingStationConfiguration(this.configurationFileHash);
}
}
- public hasFeatureProfile(featureProfile: SupportedFeatureProfiles): boolean | undefined {
- return getConfigurationKey(
- this,
- StandardParametersKey.SupportedFeatureProfiles,
- )?.value?.includes(featureProfile);
- }
-
public bufferMessage(message: string): void {
this.messageBuffer.add(message);
}
const connector = this.getConnectorStatus(reservation.connectorId)!;
switch (reason) {
case ReservationTerminationReason.CONNECTOR_STATE_CHANGED:
- delete connector.reservation;
- break;
case ReservationTerminationReason.TRANSACTION_STARTED:
delete connector.reservation;
break;
} from 'date-fns';
import type { ChargingStation } from './ChargingStation';
+import { getConfigurationKey } from './ChargingStationConfigurationUtils';
import { BaseError } from '../exception';
import {
AmpereUnits,
type OCPP20BootNotificationRequest,
OCPPVersion,
RecurrencyKindType,
+ StandardParametersKey,
+ SupportedFeatureProfiles,
Voltage,
} from '../types';
import {
: stationInfoDst?.meterSerialNumber && delete stationInfoDst.meterSerialNumber;
};
+export const hasFeatureProfile = (
+ chargingStation: ChargingStation,
+ featureProfile: SupportedFeatureProfiles,
+): boolean | undefined => {
+ return getConfigurationKey(
+ chargingStation,
+ StandardParametersKey.SupportedFeatureProfiles,
+ )?.value?.includes(featureProfile);
+};
+
export const getAmperageLimitationUnitDivider = (stationInfo: ChargingStationInfo): number => {
let unitDivider = 1;
switch (stationInfo.amperageLimitationUnit) {
getConfigurationKey,
setConfigurationKeyValue,
} from './ChargingStationConfigurationUtils';
-export { getIdTagsFile, checkChargingStation, resetConnectorStatus } from './ChargingStationUtils';
+export {
+ getIdTagsFile,
+ checkChargingStation,
+ resetConnectorStatus,
+ hasFeatureProfile,
+} from './ChargingStationUtils';
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,
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