+ private initOCPPParameters(): void {
+ if (!this.getConfigurationKey(StandardParametersKey.SupportedFeatureProfiles)) {
+ this.addConfigurationKey(StandardParametersKey.SupportedFeatureProfiles, `${SupportedFeatureProfiles.Core},${SupportedFeatureProfiles.Local_Auth_List_Management},${SupportedFeatureProfiles.Smart_Charging}`);
+ }
+ this.addConfigurationKey(StandardParametersKey.NumberOfConnectors, this.getNumberOfConnectors().toString(), true);
+ if (!this.getConfigurationKey(StandardParametersKey.MeterValuesSampledData)) {
+ this.addConfigurationKey(StandardParametersKey.MeterValuesSampledData, MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER);
+ }
+ if (!this.getConfigurationKey(StandardParametersKey.ConnectorPhaseRotation)) {
+ const connectorPhaseRotation = [];
+ for (const connector in this.connectors) {
+ // AC/DC
+ if (Utils.convertToInt(connector) === 0 && this.getNumberOfPhases() === 0) {
+ connectorPhaseRotation.push(`${connector}.${ConnectorPhaseRotation.RST}`);
+ } else if (Utils.convertToInt(connector) > 0 && this.getNumberOfPhases() === 0) {
+ connectorPhaseRotation.push(`${connector}.${ConnectorPhaseRotation.NotApplicable}`);
+ // AC
+ } else if (Utils.convertToInt(connector) > 0 && this.getNumberOfPhases() === 1) {
+ connectorPhaseRotation.push(`${connector}.${ConnectorPhaseRotation.NotApplicable}`);
+ } else if (Utils.convertToInt(connector) > 0 && this.getNumberOfPhases() === 3) {
+ connectorPhaseRotation.push(`${connector}.${ConnectorPhaseRotation.RST}`);
+ }
+ }
+ this.addConfigurationKey(StandardParametersKey.ConnectorPhaseRotation, connectorPhaseRotation.toString());
+ }
+ if (!this.getConfigurationKey(StandardParametersKey.AuthorizeRemoteTxRequests)) {
+ this.addConfigurationKey(StandardParametersKey.AuthorizeRemoteTxRequests, 'true');
+ }
+ if (!this.getConfigurationKey(StandardParametersKey.LocalAuthListEnabled)
+ && this.getConfigurationKey(StandardParametersKey.SupportedFeatureProfiles).value.includes(SupportedFeatureProfiles.Local_Auth_List_Management)) {
+ this.addConfigurationKey(StandardParametersKey.LocalAuthListEnabled, 'false');
+ }
+ if (!this.getConfigurationKey(StandardParametersKey.ConnectionTimeOut)) {
+ this.addConfigurationKey(StandardParametersKey.ConnectionTimeOut, Constants.DEFAULT_CONNECTION_TIMEOUT.toString());
+ }
+ }
+