type StopTransactionResponse,
SupervisionUrlDistribution,
SupportedFeatureProfiles,
- VendorDefaultParametersKey,
+ VendorParametersKey,
type WSError,
WebSocketCloseEventStatusCode,
type WsOptions,
}
private getSupervisionUrlOcppKey(): string {
- return this.stationInfo.supervisionUrlOcppKey ?? VendorDefaultParametersKey.ConnectionUrl;
+ return this.stationInfo.supervisionUrlOcppKey ?? VendorParametersKey.ConnectionUrl;
}
private getTemplateFromFile(): ChargingStationTemplate | undefined {
import type { ChargingStation } from './internal';
-import type { ConfigurationKey, StandardParametersKey } from '../types';
+import type { ConfigurationKey, ConfigurationKeyType, StandardParametersKey } from '../types';
import { logger } from '../utils';
type ConfigurationKeyOptions = { readonly?: boolean; visible?: boolean; reboot?: boolean };
public static getConfigurationKey(
chargingStation: ChargingStation,
- key: string | StandardParametersKey,
+ key: ConfigurationKeyType,
caseInsensitive = false
): ConfigurationKey | undefined {
return chargingStation.ocppConfiguration?.configurationKey?.find((configElement) => {
public static addConfigurationKey(
chargingStation: ChargingStation,
- key: string | StandardParametersKey,
+ key: ConfigurationKeyType,
value: string,
options: ConfigurationKeyOptions = {
readonly: false,
public static setConfigurationKeyValue(
chargingStation: ChargingStation,
- key: string | StandardParametersKey,
+ key: ConfigurationKeyType,
value: string,
caseInsensitive = false
): void {
public static deleteConfigurationKey(
chargingStation: ChargingStation,
- key: string | StandardParametersKey,
+ key: ConfigurationKeyType,
params: DeleteConfigurationKeyParams = { save: true, caseInsensitive: false }
): ConfigurationKey[] | undefined {
const keyFound = ChargingStationConfigurationUtils.getConfigurationKey(
ClearChargingProfileStatus,
type ConfigurationData,
type ConfigurationKey,
+ type ConfigurationKeyType,
ConfigurationStatus,
ConnectorPhaseRotation,
ConnectorStatus,
type UnlockConnectorRequest,
type UnlockConnectorResponse,
UnlockStatus,
- VendorDefaultParametersKey,
+ VendorParametersKey,
Voltage,
type WSError,
WebSocketCloseEventStatusCode,
MaxChargingProfilesInstalled = 'MaxChargingProfilesInstalled',
}
-export enum OCPP16VendorDefaultParametersKey {
+export enum OCPP16VendorParametersKey {
ConnectionUrl = 'ConnectionUrl',
}
OCPP16ChargingProfilePurposeType,
OCPP16DiagnosticsStatus,
OCPP16StandardParametersKey,
+ OCPP16VendorParametersKey,
} from '../../internal';
export enum OCPP16RequestCommand {
export type OCPP16ClearCacheRequest = EmptyObject;
+type OCPP16ConfigurationKey = string | OCPP16StandardParametersKey | OCPP16VendorParametersKey;
+
export interface ChangeConfigurationRequest extends JsonObject {
- key: string | OCPP16StandardParametersKey;
+ key: OCPP16ConfigurationKey;
value: string;
}
}
export interface GetConfigurationRequest extends JsonObject {
- key?: (string | OCPP16StandardParametersKey)[];
+ key?: OCPP16ConfigurationKey[];
}
enum ResetType {
evse?: EVSEType;
} & JsonObject;
+type VariableName =
+ | string
+ | OCPP20RequiredVariableName
+ | OCPP20OptionalVariableName
+ | OCPP20VendorVariableName;
+
type VariableType = {
- name: string | OCPP20RequiredVariableName | OCPP20OptionalVariableName | OCPP20VendorVariableName;
+ name: VariableName;
instance?: string;
} & JsonObject;
type JsonObject,
OCPP16StandardParametersKey,
OCPP16SupportedFeatureProfiles,
- OCPP16VendorDefaultParametersKey,
+ OCPP16VendorParametersKey,
OCPP20OptionalVariableName,
OCPP20RequiredVariableName,
OCPP20VendorVariableName,
} as const;
export type StandardParametersKey = OCPP16StandardParametersKey;
-export const VendorDefaultParametersKey = {
- ...OCPP16VendorDefaultParametersKey,
+export const VendorParametersKey = {
+ ...OCPP16VendorParametersKey,
...OCPP20VendorVariableName,
} as const;
-export type VendorDefaultParametersKey = OCPP16VendorDefaultParametersKey;
+export type VendorParametersKey = OCPP16VendorParametersKey;
export const SupportedFeatureProfiles = {
...OCPP16SupportedFeatureProfiles,
TSR = 'TSR',
}
+export type ConfigurationKeyType = string | StandardParametersKey | VendorParametersKey;
+
export type OCPPConfigurationKey = {
- key: string | StandardParametersKey;
+ key: ConfigurationKeyType;
readonly: boolean;
value?: string;
} & JsonObject;