+ public static checkFeatureProfile(
+ chargingStation: ChargingStation,
+ featureProfile: OCPP16SupportedFeatureProfiles,
+ command: OCPP16RequestCommand | OCPP16IncomingRequestCommand
+ ): boolean {
+ if (!chargingStation.hasFeatureProfile(featureProfile)) {
+ logger.warn(
+ `${chargingStation.logPrefix()} Trying to '${command}' without '${featureProfile}' feature enabled in ${
+ OCPP16StandardParametersKey.SupportedFeatureProfiles
+ } in configuration`
+ );
+ return false;
+ }
+ return true;
+ }
+