From 436d8efe769f00427d41c553150fb9aff18d76be Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 27 Mar 2026 14:39:32 +0100 Subject: [PATCH] refactor: accept enum types in registry/manager signatures, remove 429 redundant as-string casts Widen buildRegistryKey, buildCaseInsensitiveCompositeKey, and VariableMetadata.component to accept OCPP20ComponentName and VariableName enums directly, eliminating 429 as-string casts across the registry and variable manager. 8 casts retained on enum comparison lines required by no-unsafe-enum-comparison lint rule. --- .../ocpp/2.0/OCPP20VariableManager.ts | 16 +- .../ocpp/2.0/OCPP20VariableRegistry.ts | 1160 ++++++++--------- 2 files changed, 543 insertions(+), 633 deletions(-) diff --git a/src/charging-station/ocpp/2.0/OCPP20VariableManager.ts b/src/charging-station/ocpp/2.0/OCPP20VariableManager.ts index b42fa61f..3acba831 100644 --- a/src/charging-station/ocpp/2.0/OCPP20VariableManager.ts +++ b/src/charging-station/ocpp/2.0/OCPP20VariableManager.ts @@ -504,15 +504,15 @@ export class OCPP20VariableManager { // ReportingValueSize truncation (DeviceDataCtrlr authoritative) const reportingValueSizeKey = buildCaseInsensitiveCompositeKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, undefined, - OCPP20RequiredVariableName.ReportingValueSize as string + OCPP20RequiredVariableName.ReportingValueSize ) // ValueSize truncation applied before ReportingValueSize if present const valueSizeKey = buildCaseInsensitiveCompositeKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, undefined, - OCPP20RequiredVariableName.ValueSize as string + OCPP20RequiredVariableName.ValueSize ) let valueSize: string | undefined let reportingValueSize: string | undefined @@ -877,14 +877,14 @@ export class OCPP20VariableManager { // 6. Reject with TooLargeElement when attributeValue length strictly exceeds effectiveLimit. if (resolvedAttributeType === AttributeEnumType.Actual) { const configurationValueSizeKey = buildCaseInsensitiveCompositeKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, undefined, - OCPP20RequiredVariableName.ConfigurationValueSize as string + OCPP20RequiredVariableName.ConfigurationValueSize ) const valueSizeKey = buildCaseInsensitiveCompositeKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, undefined, - OCPP20RequiredVariableName.ValueSize as string + OCPP20RequiredVariableName.ValueSize ) let configurationValueSizeRaw: string | undefined let valueSizeRaw: string | undefined diff --git a/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts b/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts index 3a70bb4e..bbacb655 100644 --- a/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts +++ b/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts @@ -56,7 +56,7 @@ import { OCPP20Constants } from './OCPP20Constants.js' export interface VariableMetadata { allowZero?: boolean characteristics?: { maxLimit?: number; minLimit?: number; supportsMonitoring?: boolean } - component: string + component: OCPP20ComponentName | string dataType: DataEnumType defaultValue?: string description?: string @@ -98,7 +98,11 @@ export interface VariableMetadata { * @param instance - Optional instance qualifier. * @returns Primary registry key string. */ -function buildRegistryKey (component: string, variable: string, instance?: string): string { +function buildRegistryKey ( + component: OCPP20ComponentName | string, + variable: string, + instance?: string +): string { return `${component}${instance ? '.' + instance : ''}::${variable}` } @@ -113,8 +117,8 @@ const DECIMAL_ONLY_PATTERN = /^-?\d+\.\d+$/ // - Avoid verbose line or row numbers; keep comments concise. export const VARIABLE_REGISTRY: Record = { // AlignedDataCtrlr Component - [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr as string, 'Available')]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr, 'Available')]: { + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'If this variable reports a value of true, Clock-Aligned Data is supported.', @@ -123,8 +127,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr as string, 'Measurands')]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr, 'Measurands')]: { + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.MemberList, defaultValue: OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_REGISTER, description: @@ -157,8 +161,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Measurands', }, - [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr as string, 'SendDuringIdle')]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr, 'SendDuringIdle')]: { + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -168,8 +172,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'SendDuringIdle', }, - [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr as string, 'SignReadings')]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr, 'SignReadings')]: { + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -179,8 +183,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'SignReadings', }, - [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr as string, 'TxEndedInterval')]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr, 'TxEndedInterval')]: { + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.integer, defaultValue: '900', description: @@ -194,10 +198,10 @@ export const VARIABLE_REGISTRY: Record = { variable: 'TxEndedInterval', }, [buildRegistryKey( - OCPP20ComponentName.AlignedDataCtrlr as string, - OCPP20RequiredVariableName.AlignedDataInterval as string + OCPP20ComponentName.AlignedDataCtrlr, + OCPP20RequiredVariableName.AlignedDataInterval )]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.integer, defaultValue: '900', description: @@ -208,26 +212,23 @@ export const VARIABLE_REGISTRY: Record = { required: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20RequiredVariableName.AlignedDataInterval as string, + variable: OCPP20RequiredVariableName.AlignedDataInterval, }, - [buildRegistryKey( - OCPP20ComponentName.AlignedDataCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AlignedDataCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'If this variable reports a value of true, Clock-Aligned Data is enabled', mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, [buildRegistryKey( - OCPP20ComponentName.AlignedDataCtrlr as string, - OCPP20RequiredVariableName.TxEndedMeasurands as string + OCPP20ComponentName.AlignedDataCtrlr, + OCPP20RequiredVariableName.TxEndedMeasurands )]: { - component: OCPP20ComponentName.AlignedDataCtrlr as string, + component: OCPP20ComponentName.AlignedDataCtrlr, dataType: DataEnumType.MemberList, defaultValue: `${OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_REGISTER},${OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_INTERVAL},${OCPP20MeasurandEnumType.VOLTAGE}`, description: @@ -262,8 +263,8 @@ export const VARIABLE_REGISTRY: Record = { }, // AuthCacheCtrlr Component - [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr as string, 'Available')]: { - component: OCPP20ComponentName.AuthCacheCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr, 'Available')]: { + component: OCPP20ComponentName.AuthCacheCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Authorization caching is available, but not necessarily enabled.', @@ -272,8 +273,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr as string, 'DisablePostAuthorize')]: { - component: OCPP20ComponentName.AuthCacheCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr, 'DisablePostAuthorize')]: { + component: OCPP20ComponentName.AuthCacheCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -283,8 +284,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'DisablePostAuthorize', }, - [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr as string, 'LifeTime')]: { - component: OCPP20ComponentName.AuthCacheCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr, 'LifeTime')]: { + component: OCPP20ComponentName.AuthCacheCtrlr, dataType: DataEnumType.integer, defaultValue: '86400', description: @@ -295,8 +296,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'LifeTime', }, - [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr as string, 'Policy')]: { - component: OCPP20ComponentName.AuthCacheCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr, 'Policy')]: { + component: OCPP20ComponentName.AuthCacheCtrlr, dataType: DataEnumType.OptionList, defaultValue: 'LRU', description: @@ -307,11 +308,11 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Policy', }, - [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr as string, 'Storage')]: { + [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr, 'Storage')]: { characteristics: { maxLimit: 1048576, // 1MB default }, - component: OCPP20ComponentName.AuthCacheCtrlr as string, + component: OCPP20ComponentName.AuthCacheCtrlr, dataType: DataEnumType.integer, defaultValue: '0', description: @@ -323,23 +324,20 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.BYTES, variable: 'Storage', }, - [buildRegistryKey( - OCPP20ComponentName.AuthCacheCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.AuthCacheCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCacheCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.AuthCacheCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'If set to true, Authorization caching is enabled.', mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, // AuthCtrlr Component - [buildRegistryKey(OCPP20ComponentName.AuthCtrlr as string, 'AdditionalInfoItemsPerMessage')]: { - component: OCPP20ComponentName.AuthCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCtrlr, 'AdditionalInfoItemsPerMessage')]: { + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.integer, defaultValue: '10', description: 'Maximum number of AdditionalInfo items that can be sent in one message.', @@ -351,8 +349,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'AdditionalInfoItemsPerMessage', }, - [buildRegistryKey(OCPP20ComponentName.AuthCtrlr as string, 'DisableRemoteAuthorization')]: { - component: OCPP20ComponentName.AuthCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCtrlr, 'DisableRemoteAuthorization')]: { + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -363,8 +361,8 @@ export const VARIABLE_REGISTRY: Record = { variable: 'DisableRemoteAuthorization', }, - [buildRegistryKey(OCPP20ComponentName.AuthCtrlr as string, 'MasterPassGroupId')]: { - component: OCPP20ComponentName.AuthCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCtrlr, 'MasterPassGroupId')]: { + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.string, description: 'IdTokens that have this id as groupId belong to the Master Pass Group. They can stop any ongoing transaction but cannot start transactions.', @@ -374,8 +372,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'MasterPassGroupId', }, - [buildRegistryKey(OCPP20ComponentName.AuthCtrlr as string, 'OfflineTxForUnknownIdEnabled')]: { - component: OCPP20ComponentName.AuthCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCtrlr, 'OfflineTxForUnknownIdEnabled')]: { + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Support for unknown offline transactions.', @@ -385,10 +383,10 @@ export const VARIABLE_REGISTRY: Record = { variable: 'OfflineTxForUnknownIdEnabled', }, [buildRegistryKey( - OCPP20ComponentName.AuthCtrlr as string, + OCPP20ComponentName.AuthCtrlr, OCPP20RequiredVariableName.AuthorizeRemoteStart )]: { - component: OCPP20ComponentName.AuthCtrlr as string, + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Whether remote start requires authorization.', @@ -396,13 +394,10 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Volatile, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.AuthorizeRemoteStart as string, + variable: OCPP20RequiredVariableName.AuthorizeRemoteStart, }, - [buildRegistryKey( - OCPP20ComponentName.AuthCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.AuthCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.AuthCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: @@ -410,13 +405,13 @@ export const VARIABLE_REGISTRY: Record = { mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, [buildRegistryKey( - OCPP20ComponentName.AuthCtrlr as string, + OCPP20ComponentName.AuthCtrlr, OCPP20RequiredVariableName.LocalAuthorizationOffline )]: { - component: OCPP20ComponentName.AuthCtrlr as string, + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Start transaction offline for locally authorized identifiers.', @@ -424,13 +419,13 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.LocalAuthorizationOffline as string, + variable: OCPP20RequiredVariableName.LocalAuthorizationOffline, }, [buildRegistryKey( - OCPP20ComponentName.AuthCtrlr as string, + OCPP20ComponentName.AuthCtrlr, OCPP20RequiredVariableName.LocalPreAuthorization )]: { - component: OCPP20ComponentName.AuthCtrlr as string, + component: OCPP20ComponentName.AuthCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Start transaction locally without waiting for CSMS authorization.', @@ -438,12 +433,12 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.LocalPreAuthorization as string, + variable: OCPP20RequiredVariableName.LocalPreAuthorization, }, // CHAdeMOCtrlr Component - [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr as string, 'AutoManufacturerCode')]: { - component: OCPP20ComponentName.CHAdeMOCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr, 'AutoManufacturerCode')]: { + component: OCPP20ComponentName.CHAdeMOCtrlr, dataType: DataEnumType.integer, defaultValue: '0', description: "Auto manufacturer code (H'700.0)", @@ -453,8 +448,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'AutoManufacturerCode', }, - [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr as string, 'CHAdeMOProtocolNumber')]: { - component: OCPP20ComponentName.CHAdeMOCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr, 'CHAdeMOProtocolNumber')]: { + component: OCPP20ComponentName.CHAdeMOCtrlr, dataType: DataEnumType.integer, defaultValue: '66048', description: "CHAdeMO protocol number (H'102.0)", @@ -463,8 +458,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'CHAdeMOProtocolNumber', }, - [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr as string, 'DynamicControl')]: { - component: OCPP20ComponentName.CHAdeMOCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr, 'DynamicControl')]: { + component: OCPP20ComponentName.CHAdeMOCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: "Vehicle is compatible with dynamic control (H'110.0.0)", @@ -473,8 +468,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'DynamicControl', }, - [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr as string, 'HighCurrentControl')]: { - component: OCPP20ComponentName.CHAdeMOCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr, 'HighCurrentControl')]: { + component: OCPP20ComponentName.CHAdeMOCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: "Vehicle is compatible with high current control (H'110.0.1)", @@ -483,8 +478,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'HighCurrentControl', }, - [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr as string, 'HighVoltageControl')]: { - component: OCPP20ComponentName.CHAdeMOCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr, 'HighVoltageControl')]: { + component: OCPP20ComponentName.CHAdeMOCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: "Vehicle is compatible with high voltage control (H'110.1.2)", @@ -493,8 +488,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'HighVoltageControl', }, - [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr as string, 'SelftestActive')]: { - component: OCPP20ComponentName.CHAdeMOCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr, 'SelftestActive')]: { + component: OCPP20ComponentName.CHAdeMOCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Self-test is active or self-test is started by setting to true.', @@ -503,8 +498,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'SelftestActive', }, - [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr as string, 'VehicleStatus')]: { - component: OCPP20ComponentName.CHAdeMOCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.CHAdeMOCtrlr, 'VehicleStatus')]: { + component: OCPP20ComponentName.CHAdeMOCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: "Vehicle status (H'102.5.3)", @@ -515,22 +510,20 @@ export const VARIABLE_REGISTRY: Record = { }, // ChargingStation Component - [buildRegistryKey( - OCPP20ComponentName.ChargingStation as string, - 'AllowNewSessionsPendingFirmwareUpdate' - )]: { - component: OCPP20ComponentName.ChargingStation as string, - dataType: DataEnumType.boolean, - defaultValue: 'false', - description: - 'Indicates whether new sessions can be started on EVSEs while Charging Station is waiting for all EVSEs to become Available in order to start a pending firmware update.', - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: 'AllowNewSessionsPendingFirmwareUpdate', - }, - [buildRegistryKey(OCPP20ComponentName.ChargingStation as string, 'Available')]: { - component: OCPP20ComponentName.ChargingStation as string, + [buildRegistryKey(OCPP20ComponentName.ChargingStation, 'AllowNewSessionsPendingFirmwareUpdate')]: + { + component: OCPP20ComponentName.ChargingStation, + dataType: DataEnumType.boolean, + defaultValue: 'false', + description: + 'Indicates whether new sessions can be started on EVSEs while Charging Station is waiting for all EVSEs to become Available in order to start a pending firmware update.', + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'AllowNewSessionsPendingFirmwareUpdate', + }, + [buildRegistryKey(OCPP20ComponentName.ChargingStation, 'Available')]: { + component: OCPP20ComponentName.ChargingStation, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Component exists (ChargingStation level).', @@ -540,8 +533,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.ChargingStation as string, 'SupplyPhases')]: { - component: OCPP20ComponentName.ChargingStation as string, + [buildRegistryKey(OCPP20ComponentName.ChargingStation, 'SupplyPhases')]: { + component: OCPP20ComponentName.ChargingStation, dataType: DataEnumType.integer, defaultValue: '3', description: 'Number of alternating current phases connected/available.', @@ -554,10 +547,10 @@ export const VARIABLE_REGISTRY: Record = { variable: 'SupplyPhases', }, [buildRegistryKey( - OCPP20ComponentName.ChargingStation as string, + OCPP20ComponentName.ChargingStation, OCPP20DeviceInfoVariableName.AvailabilityState )]: { - component: OCPP20ComponentName.ChargingStation as string, + component: OCPP20ComponentName.ChargingStation, dataType: DataEnumType.OptionList, defaultValue: OCPP20OperationalStatusEnumType.Operative, description: 'Current availability state for the ChargingStation.', @@ -569,13 +562,10 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20DeviceInfoVariableName.AvailabilityState as string, + variable: OCPP20DeviceInfoVariableName.AvailabilityState, }, - [buildRegistryKey( - OCPP20ComponentName.ChargingStation as string, - OCPP20DeviceInfoVariableName.Model as string - )]: { - component: OCPP20ComponentName.ChargingStation as string, + [buildRegistryKey(OCPP20ComponentName.ChargingStation, OCPP20DeviceInfoVariableName.Model)]: { + component: OCPP20ComponentName.ChargingStation, dataType: DataEnumType.string, description: 'Charging station model as reported in BootNotification.', maxLength: 50, @@ -584,25 +574,23 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: OCPP20DeviceInfoVariableName.Model, }, + [buildRegistryKey(OCPP20ComponentName.ChargingStation, OCPP20DeviceInfoVariableName.VendorName)]: + { + component: OCPP20ComponentName.ChargingStation, + dataType: DataEnumType.string, + description: 'Charging station vendor name as reported in BootNotification.', + maxLength: 50, + mutability: MutabilityEnumType.ReadOnly, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: OCPP20DeviceInfoVariableName.VendorName, + }, [buildRegistryKey( - OCPP20ComponentName.ChargingStation as string, - OCPP20DeviceInfoVariableName.VendorName as string - )]: { - component: OCPP20ComponentName.ChargingStation as string, - dataType: DataEnumType.string, - description: 'Charging station vendor name as reported in BootNotification.', - maxLength: 50, - mutability: MutabilityEnumType.ReadOnly, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20DeviceInfoVariableName.VendorName, - }, - [buildRegistryKey( - OCPP20ComponentName.ChargingStation as string, + OCPP20ComponentName.ChargingStation, OCPP20OptionalVariableName.WebSocketPingInterval )]: { allowZero: true, - component: OCPP20ComponentName.ChargingStation as string, + component: OCPP20ComponentName.ChargingStation, dataType: DataEnumType.integer, defaultValue: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL.toString(), description: @@ -614,14 +602,11 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20OptionalVariableName.WebSocketPingInterval as string, + variable: OCPP20OptionalVariableName.WebSocketPingInterval, vendorSpecific: true, }, - [buildRegistryKey( - OCPP20ComponentName.ChargingStation as string, - OCPP20VendorVariableName.ConnectionUrl - )]: { - component: OCPP20ComponentName.ChargingStation as string, + [buildRegistryKey(OCPP20ComponentName.ChargingStation, OCPP20VendorVariableName.ConnectionUrl)]: { + component: OCPP20ComponentName.ChargingStation, dataType: DataEnumType.string, defaultValue: OCPP20Constants.DEFAULT_CONNECTION_URL, description: 'Central system connection URL.', @@ -630,23 +615,22 @@ export const VARIABLE_REGISTRY: Record = { mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20VendorVariableName.ConnectionUrl as string, + variable: OCPP20VendorVariableName.ConnectionUrl, vendorSpecific: true, }, // ClockCtrlr Component - [buildRegistryKey(OCPP20ComponentName.ClockCtrlr as string, 'NextTimeOffsetTransitionDateTime')]: - { - component: OCPP20ComponentName.ClockCtrlr as string, - dataType: DataEnumType.dateTime, - description: 'Date time of the next time offset transition.', - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: 'NextTimeOffsetTransitionDateTime', - }, - [buildRegistryKey(OCPP20ComponentName.ClockCtrlr as string, 'NtpServerUri')]: { - component: OCPP20ComponentName.ClockCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, 'NextTimeOffsetTransitionDateTime')]: { + component: OCPP20ComponentName.ClockCtrlr, + dataType: DataEnumType.dateTime, + description: 'Date time of the next time offset transition.', + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'NextTimeOffsetTransitionDateTime', + }, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, 'NtpServerUri')]: { + component: OCPP20ComponentName.ClockCtrlr, dataType: DataEnumType.string, description: 'This contains the address of the NTP server.', mutability: MutabilityEnumType.ReadWrite, @@ -654,8 +638,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'NtpServerUri', }, - [buildRegistryKey(OCPP20ComponentName.ClockCtrlr as string, 'NtpSource')]: { - component: OCPP20ComponentName.ClockCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, 'NtpSource')]: { + component: OCPP20ComponentName.ClockCtrlr, dataType: DataEnumType.OptionList, description: 'When an NTP client is implemented, this variable can be used to configure the client', @@ -664,19 +648,18 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'NtpSource', }, - [buildRegistryKey(OCPP20ComponentName.ClockCtrlr as string, 'TimeAdjustmentReportingThreshold')]: - { - component: OCPP20ComponentName.ClockCtrlr as string, - dataType: DataEnumType.integer, - description: - 'If set, then time adjustments with an absolute value in seconds larger than this need to be reported as a security event SettingSystemTime', - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: 'TimeAdjustmentReportingThreshold', - }, - [buildRegistryKey(OCPP20ComponentName.ClockCtrlr as string, 'TimeOffset')]: { - component: OCPP20ComponentName.ClockCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, 'TimeAdjustmentReportingThreshold')]: { + component: OCPP20ComponentName.ClockCtrlr, + dataType: DataEnumType.integer, + description: + 'If set, then time adjustments with an absolute value in seconds larger than this need to be reported as a security event SettingSystemTime', + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'TimeAdjustmentReportingThreshold', + }, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, 'TimeOffset')]: { + component: OCPP20ComponentName.ClockCtrlr, dataType: DataEnumType.string, description: 'A Time Offset with respect to Coordinated Universal Time (aka UTC or Greenwich Mean Time) in the form of an [RFC3339] time (zone) offset suffix, including the mandatory "+" or "-" prefix.', @@ -685,8 +668,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'TimeOffset', }, - [buildRegistryKey(OCPP20ComponentName.ClockCtrlr as string, 'TimeZone')]: { - component: OCPP20ComponentName.ClockCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, 'TimeZone')]: { + component: OCPP20ComponentName.ClockCtrlr, dataType: DataEnumType.string, description: 'Configured current local time zone in the format: "Europe/Oslo", "Asia/Singapore" etc. For display purposes.', @@ -695,23 +678,19 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'TimeZone', }, - [buildRegistryKey(OCPP20ComponentName.ClockCtrlr as string, OCPP20RequiredVariableName.DateTime)]: - { - component: OCPP20ComponentName.ClockCtrlr as string, - dataType: DataEnumType.dateTime, - description: 'Contains the current date and time (ClockCtrlr).', - dynamicValueResolver: () => new Date().toISOString(), - mutability: MutabilityEnumType.ReadOnly, - persistence: PersistenceEnumType.Volatile, - required: true, - supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.DateTime as string, - }, - [buildRegistryKey( - OCPP20ComponentName.ClockCtrlr as string, - OCPP20RequiredVariableName.TimeSource - )]: { - component: OCPP20ComponentName.ClockCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, OCPP20RequiredVariableName.DateTime)]: { + component: OCPP20ComponentName.ClockCtrlr, + dataType: DataEnumType.dateTime, + description: 'Contains the current date and time (ClockCtrlr).', + dynamicValueResolver: () => new Date().toISOString(), + mutability: MutabilityEnumType.ReadOnly, + persistence: PersistenceEnumType.Volatile, + required: true, + supportedAttributes: [AttributeEnumType.Actual], + variable: OCPP20RequiredVariableName.DateTime, + }, + [buildRegistryKey(OCPP20ComponentName.ClockCtrlr, OCPP20RequiredVariableName.TimeSource)]: { + component: OCPP20ComponentName.ClockCtrlr, dataType: DataEnumType.SequenceList, defaultValue: 'NTP,GPS,RealTimeClock,Heartbeat', description: 'Ordered list of clock sources by preference.', @@ -727,15 +706,15 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.TimeSource as string, + variable: OCPP20RequiredVariableName.TimeSource, }, // DeviceDataCtrlr Component [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.BytesPerMessage )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: '8192', description: 'Maximum number of bytes in a message.', @@ -745,15 +724,15 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, positive: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.BytesPerMessage as string, + variable: OCPP20RequiredVariableName.BytesPerMessage, vendorSpecific: true, }, [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.BytesPerMessage, 'GetReport' )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: '8192', description: 'Maximum number of bytes in a GetReport message.', @@ -765,18 +744,18 @@ export const VARIABLE_REGISTRY: Record = { positive: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.BytesPerMessage as string, + variable: OCPP20RequiredVariableName.BytesPerMessage, }, [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.BytesPerMessage, - OCPP20IncomingRequestCommand.GET_VARIABLES as string + OCPP20IncomingRequestCommand.GET_VARIABLES )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: '8192', description: 'Maximum number of bytes in a GetVariables message.', - instance: OCPP20IncomingRequestCommand.GET_VARIABLES as string, + instance: OCPP20IncomingRequestCommand.GET_VARIABLES, max: 65535, min: 1, mutability: MutabilityEnumType.ReadOnly, @@ -784,18 +763,18 @@ export const VARIABLE_REGISTRY: Record = { positive: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.BytesPerMessage as string, + variable: OCPP20RequiredVariableName.BytesPerMessage, }, [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.BytesPerMessage, - OCPP20IncomingRequestCommand.SET_VARIABLES as string + OCPP20IncomingRequestCommand.SET_VARIABLES )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: '8192', description: 'Maximum number of bytes in a SetVariables message.', - instance: OCPP20IncomingRequestCommand.SET_VARIABLES as string, + instance: OCPP20IncomingRequestCommand.SET_VARIABLES, max: 65535, min: 1, mutability: MutabilityEnumType.ReadOnly, @@ -803,14 +782,14 @@ export const VARIABLE_REGISTRY: Record = { positive: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.BytesPerMessage as string, + variable: OCPP20RequiredVariableName.BytesPerMessage, }, // Value size family: ValueSize (broadest), ConfigurationValueSize (affects setting), ReportingValueSize (affects reporting). Simulator sets same absolute cap; truncate occurs at reporting step. [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.ConfigurationValueSize )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: Constants.OCPP_VALUE_ABSOLUTE_MAX_LENGTH.toString(), description: 'Maximum size allowed for configuration values when setting.', @@ -822,14 +801,14 @@ export const VARIABLE_REGISTRY: Record = { positive: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.CHARS, - variable: OCPP20RequiredVariableName.ConfigurationValueSize as string, + variable: OCPP20RequiredVariableName.ConfigurationValueSize, }, [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.ItemsPerMessage, 'GetReport' )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: '32', description: 'Maximum ComponentVariable entries in a GetReport message.', @@ -841,18 +820,18 @@ export const VARIABLE_REGISTRY: Record = { positive: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.ItemsPerMessage as string, + variable: OCPP20RequiredVariableName.ItemsPerMessage, }, [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.ItemsPerMessage, - OCPP20IncomingRequestCommand.GET_VARIABLES as string + OCPP20IncomingRequestCommand.GET_VARIABLES )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: '32', description: 'Maximum ComponentVariable entries in a GetVariables message.', - instance: OCPP20IncomingRequestCommand.GET_VARIABLES as string, + instance: OCPP20IncomingRequestCommand.GET_VARIABLES, max: 256, min: 1, mutability: MutabilityEnumType.ReadOnly, @@ -860,18 +839,18 @@ export const VARIABLE_REGISTRY: Record = { positive: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.ItemsPerMessage as string, + variable: OCPP20RequiredVariableName.ItemsPerMessage, }, [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.ItemsPerMessage, - OCPP20IncomingRequestCommand.SET_VARIABLES as string + OCPP20IncomingRequestCommand.SET_VARIABLES )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: '32', description: 'Maximum ComponentVariable entries in a SetVariables message.', - instance: OCPP20IncomingRequestCommand.SET_VARIABLES as string, + instance: OCPP20IncomingRequestCommand.SET_VARIABLES, max: 256, min: 1, mutability: MutabilityEnumType.ReadOnly, @@ -879,13 +858,13 @@ export const VARIABLE_REGISTRY: Record = { positive: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.ItemsPerMessage as string, + variable: OCPP20RequiredVariableName.ItemsPerMessage, }, [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, + OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.ReportingValueSize )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: Constants.OCPP_VALUE_ABSOLUTE_MAX_LENGTH.toString(), description: 'Maximum size of reported values.', @@ -897,13 +876,10 @@ export const VARIABLE_REGISTRY: Record = { positive: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.CHARS, - variable: OCPP20RequiredVariableName.ReportingValueSize as string, + variable: OCPP20RequiredVariableName.ReportingValueSize, }, - [buildRegistryKey( - OCPP20ComponentName.DeviceDataCtrlr as string, - OCPP20RequiredVariableName.ValueSize - )]: { - component: OCPP20ComponentName.DeviceDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.ValueSize)]: { + component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, defaultValue: Constants.OCPP_VALUE_ABSOLUTE_MAX_LENGTH.toString(), description: 'Unified maximum size for any stored or reported value.', @@ -915,12 +891,12 @@ export const VARIABLE_REGISTRY: Record = { positive: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.CHARS, - variable: OCPP20RequiredVariableName.ValueSize as string, + variable: OCPP20RequiredVariableName.ValueSize, }, // EVSE Component - [buildRegistryKey(OCPP20ComponentName.EVSE as string, 'AllowReset')]: { - component: OCPP20ComponentName.EVSE as string, + [buildRegistryKey(OCPP20ComponentName.EVSE, 'AllowReset')]: { + component: OCPP20ComponentName.EVSE, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Can be used to announce that an EVSE can be reset individually', @@ -929,8 +905,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'AllowReset', }, - [buildRegistryKey(OCPP20ComponentName.EVSE as string, 'Available')]: { - component: OCPP20ComponentName.EVSE as string, + [buildRegistryKey(OCPP20ComponentName.EVSE, 'Available')]: { + component: OCPP20ComponentName.EVSE, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Component exists', @@ -940,8 +916,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.EVSE as string, 'EvseId')]: { - component: OCPP20ComponentName.EVSE as string, + [buildRegistryKey(OCPP20ComponentName.EVSE, 'EvseId')]: { + component: OCPP20ComponentName.EVSE, dataType: DataEnumType.string, defaultValue: '1', description: @@ -951,8 +927,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'EvseId', }, - [buildRegistryKey(OCPP20ComponentName.EVSE as string, 'ISO15118EvseId')]: { - component: OCPP20ComponentName.EVSE as string, + [buildRegistryKey(OCPP20ComponentName.EVSE, 'ISO15118EvseId')]: { + component: OCPP20ComponentName.EVSE, dataType: DataEnumType.string, defaultValue: 'DE*ICE*E*1234567890*1', description: @@ -962,11 +938,11 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ISO15118EvseId', }, - [buildRegistryKey(OCPP20ComponentName.EVSE as string, 'Power')]: { + [buildRegistryKey(OCPP20ComponentName.EVSE, 'Power')]: { characteristics: { maxLimit: 22000, // 22kW default }, - component: OCPP20ComponentName.EVSE as string, + component: OCPP20ComponentName.EVSE, dataType: DataEnumType.decimal, defaultValue: '0', description: 'The maximum power that this EVSE can provide and instantaneous power', @@ -978,8 +954,8 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.WATT, variable: 'Power', }, - [buildRegistryKey(OCPP20ComponentName.EVSE as string, 'SupplyPhases')]: { - component: OCPP20ComponentName.EVSE as string, + [buildRegistryKey(OCPP20ComponentName.EVSE, 'SupplyPhases')]: { + component: OCPP20ComponentName.EVSE, dataType: DataEnumType.integer, defaultValue: '3', description: 'Number of alternating current phases connected/available.', @@ -991,11 +967,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'SupplyPhases', }, - [buildRegistryKey( - OCPP20ComponentName.EVSE as string, - OCPP20DeviceInfoVariableName.AvailabilityState as string - )]: { - component: OCPP20ComponentName.EVSE as string, + [buildRegistryKey(OCPP20ComponentName.EVSE, OCPP20DeviceInfoVariableName.AvailabilityState)]: { + component: OCPP20ComponentName.EVSE, dataType: DataEnumType.OptionList, defaultValue: OCPP20OperationalStatusEnumType.Operative, description: 'This variable reports current availability state for the EVSE', @@ -1011,11 +984,8 @@ export const VARIABLE_REGISTRY: Record = { }, // FirmwareCtrlr Component - [buildRegistryKey( - OCPP20ComponentName.FirmwareCtrlr as string, - 'SimulateSignatureVerificationFailure' - )]: { - component: OCPP20ComponentName.FirmwareCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.FirmwareCtrlr, 'SimulateSignatureVerificationFailure')]: { + component: OCPP20ComponentName.FirmwareCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1028,11 +998,8 @@ export const VARIABLE_REGISTRY: Record = { }, // ISO15118Ctrlr Component - [buildRegistryKey( - OCPP20ComponentName.ISO15118Ctrlr as string, - 'CentralContractValidationAllowed' - )]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'CentralContractValidationAllowed')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1042,11 +1009,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'CentralContractValidationAllowed', }, - [buildRegistryKey( - OCPP20ComponentName.ISO15118Ctrlr as string, - 'ContractCertificateInstallationEnabled' - )]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'ContractCertificateInstallationEnabled')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1056,8 +1020,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ContractCertificateInstallationEnabled', }, - [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr as string, 'ContractValidationOffline')]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'ContractValidationOffline')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1068,8 +1032,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ContractValidationOffline', }, - [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr as string, 'CountryName')]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'CountryName')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.string, defaultValue: 'DE', description: @@ -1080,8 +1044,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'CountryName', }, - [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr as string, 'MaxScheduleEntries')]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'MaxScheduleEntries')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.integer, defaultValue: '24', description: 'Maximum number of allowed schedule periods.', @@ -1091,8 +1055,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'MaxScheduleEntries', }, - [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr as string, 'PnCEnabled')]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'PnCEnabled')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1102,8 +1066,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'PnCEnabled', }, - [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr as string, 'RequestedEnergyTransferMode')]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'RequestedEnergyTransferMode')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.OptionList, defaultValue: 'DC_extended', description: 'The requested energy transfer mode.', @@ -1120,8 +1084,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'RequestedEnergyTransferMode', }, - [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr as string, 'RequestMeteringReceipt')]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'RequestMeteringReceipt')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'If true, then Charging Station shall request a metering receipt from EV.', @@ -1130,8 +1094,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'RequestMeteringReceipt', }, - [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr as string, 'SeccId')]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'SeccId')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.string, defaultValue: 'DE*ICE*E*1234567890', description: 'The ID of the SECC in string format as defined by ISO15118.', @@ -1140,11 +1104,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'SeccId', }, - [buildRegistryKey( - OCPP20ComponentName.ISO15118Ctrlr as string, - 'V2GCertificateInstallationEnabled' - )]: { - component: OCPP20ComponentName.ISO15118Ctrlr as string, + [buildRegistryKey(OCPP20ComponentName.ISO15118Ctrlr, 'V2GCertificateInstallationEnabled')]: { + component: OCPP20ComponentName.ISO15118Ctrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1156,8 +1117,8 @@ export const VARIABLE_REGISTRY: Record = { }, // LocalAuthListCtrlr Component - [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr as string, 'Available')]: { - component: OCPP20ComponentName.LocalAuthListCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr, 'Available')]: { + component: OCPP20ComponentName.LocalAuthListCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Local Authorization List is available.', @@ -1166,8 +1127,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr as string, 'DisablePostAuthorize')]: { - component: OCPP20ComponentName.LocalAuthListCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr, 'DisablePostAuthorize')]: { + component: OCPP20ComponentName.LocalAuthListCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1177,8 +1138,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'DisablePostAuthorize', }, - [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr as string, 'Entries')]: { - component: OCPP20ComponentName.LocalAuthListCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr, 'Entries')]: { + component: OCPP20ComponentName.LocalAuthListCtrlr, dataType: DataEnumType.integer, defaultValue: '0', description: 'Amount of IdTokens currently in the Local Authorization List', @@ -1189,11 +1150,11 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Entries', }, - [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr as string, 'Storage')]: { + [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr, 'Storage')]: { characteristics: { maxLimit: 1048576, // 1MB default }, - component: OCPP20ComponentName.LocalAuthListCtrlr as string, + component: OCPP20ComponentName.LocalAuthListCtrlr, dataType: DataEnumType.integer, defaultValue: '0', description: @@ -1206,10 +1167,10 @@ export const VARIABLE_REGISTRY: Record = { variable: 'Storage', }, [buildRegistryKey( - OCPP20ComponentName.LocalAuthListCtrlr as string, - OCPP20RequiredVariableName.BytesPerMessage as string + OCPP20ComponentName.LocalAuthListCtrlr, + OCPP20RequiredVariableName.BytesPerMessage )]: { - component: OCPP20ComponentName.LocalAuthListCtrlr as string, + component: OCPP20ComponentName.LocalAuthListCtrlr, dataType: DataEnumType.integer, defaultValue: '8192', description: 'Maximum number of bytes in a SendLocalList message.', @@ -1220,11 +1181,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: OCPP20RequiredVariableName.BytesPerMessage, }, - [buildRegistryKey( - OCPP20ComponentName.LocalAuthListCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.LocalAuthListCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.LocalAuthListCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.LocalAuthListCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1232,13 +1190,13 @@ export const VARIABLE_REGISTRY: Record = { mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, [buildRegistryKey( - OCPP20ComponentName.LocalAuthListCtrlr as string, - OCPP20RequiredVariableName.ItemsPerMessage as string + OCPP20ComponentName.LocalAuthListCtrlr, + OCPP20RequiredVariableName.ItemsPerMessage )]: { - component: OCPP20ComponentName.LocalAuthListCtrlr as string, + component: OCPP20ComponentName.LocalAuthListCtrlr, dataType: DataEnumType.integer, defaultValue: '100', description: 'Maximum number of records in SendLocalList', @@ -1251,8 +1209,8 @@ export const VARIABLE_REGISTRY: Record = { }, // MonitoringCtrlr Component - [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr as string, 'ActiveMonitoringBase')]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr, 'ActiveMonitoringBase')]: { + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.OptionList, defaultValue: 'All', description: @@ -1263,8 +1221,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ActiveMonitoringBase', }, - [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr as string, 'ActiveMonitoringLevel')]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr, 'ActiveMonitoringLevel')]: { + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.integer, defaultValue: '9', description: @@ -1276,8 +1234,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ActiveMonitoringLevel', }, - [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr as string, 'Available')]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr, 'Available')]: { + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Whether monitoring is available', @@ -1286,8 +1244,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr as string, 'MonitoringBase')]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr, 'MonitoringBase')]: { + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.OptionList, defaultValue: 'All', description: 'Currently used monitoring base (readonly)', @@ -1297,8 +1255,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'MonitoringBase', }, - [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr as string, 'MonitoringLevel')]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr, 'MonitoringLevel')]: { + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.integer, defaultValue: '9', description: 'Currently used monitoring level (readonly)', @@ -1309,8 +1267,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'MonitoringLevel', }, - [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr as string, 'OfflineQueuingSeverity')]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr, 'OfflineQueuingSeverity')]: { + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.integer, defaultValue: '5', description: @@ -1323,11 +1281,11 @@ export const VARIABLE_REGISTRY: Record = { variable: 'OfflineQueuingSeverity', }, [buildRegistryKey( - OCPP20ComponentName.MonitoringCtrlr as string, - OCPP20RequiredVariableName.BytesPerMessage as string, + OCPP20ComponentName.MonitoringCtrlr, + OCPP20RequiredVariableName.BytesPerMessage, 'ClearVariableMonitoring' )]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.integer, defaultValue: '8192', description: 'Maximum number of bytes in a ClearVariableMonitoring message.', @@ -1339,11 +1297,11 @@ export const VARIABLE_REGISTRY: Record = { variable: OCPP20RequiredVariableName.BytesPerMessage, }, [buildRegistryKey( - OCPP20ComponentName.MonitoringCtrlr as string, - OCPP20RequiredVariableName.BytesPerMessage as string, + OCPP20ComponentName.MonitoringCtrlr, + OCPP20RequiredVariableName.BytesPerMessage, 'SetVariableMonitoring' )]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.integer, defaultValue: '8192', description: 'Maximum number of bytes in a SetVariableMonitoring message', @@ -1355,25 +1313,22 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: OCPP20RequiredVariableName.BytesPerMessage, }, - [buildRegistryKey( - OCPP20ComponentName.MonitoringCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.MonitoringCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Whether monitoring is enabled.', mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, [buildRegistryKey( - OCPP20ComponentName.MonitoringCtrlr as string, - OCPP20RequiredVariableName.ItemsPerMessage as string, + OCPP20ComponentName.MonitoringCtrlr, + OCPP20RequiredVariableName.ItemsPerMessage, 'ClearVariableMonitoring' )]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.integer, defaultValue: '100', description: 'Maximum number of IDs in a ClearVariableMonitoringRequest.', @@ -1385,11 +1340,11 @@ export const VARIABLE_REGISTRY: Record = { variable: OCPP20RequiredVariableName.ItemsPerMessage, }, [buildRegistryKey( - OCPP20ComponentName.MonitoringCtrlr as string, - OCPP20RequiredVariableName.ItemsPerMessage as string, + OCPP20ComponentName.MonitoringCtrlr, + OCPP20RequiredVariableName.ItemsPerMessage, 'SetVariableMonitoring' )]: { - component: OCPP20ComponentName.MonitoringCtrlr as string, + component: OCPP20ComponentName.MonitoringCtrlr, dataType: DataEnumType.integer, defaultValue: '100', description: @@ -1404,8 +1359,8 @@ export const VARIABLE_REGISTRY: Record = { }, // OCPPCommCtrlr Component - [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr as string, 'ActiveNetworkProfile')]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, 'ActiveNetworkProfile')]: { + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.string, description: 'Indicates the configuration profile the station uses at that moment to connect to the network.', @@ -1414,8 +1369,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ActiveNetworkProfile', }, - [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr as string, 'FieldLength')]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, 'FieldLength')]: { + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, description: 'This variable is used to report the length of in when it is larger than the length that is defined in the standard OCPP message schema.', @@ -1424,19 +1379,18 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'FieldLength', }, - [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr as string, 'PublicKeyWithSignedMeterValue')]: - { - component: OCPP20ComponentName.OCPPCommCtrlr as string, - dataType: DataEnumType.OptionList, - description: - 'This Configuration Variable can be used to configure whether a public key needs to be sent with a signed meter value.', - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: 'PublicKeyWithSignedMeterValue', - }, - [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr as string, 'QueueAllMessages')]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, 'PublicKeyWithSignedMeterValue')]: { + component: OCPP20ComponentName.OCPPCommCtrlr, + dataType: DataEnumType.OptionList, + description: + 'This Configuration Variable can be used to configure whether a public key needs to be sent with a signed meter value.', + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'PublicKeyWithSignedMeterValue', + }, + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, 'QueueAllMessages')]: { + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1446,8 +1400,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'QueueAllMessages', }, - [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr as string, 'RetryBackOffRandomRange')]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, 'RetryBackOffRandomRange')]: { + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, description: 'When the Charging Station is reconnecting, after a connection loss, it will use this variable as the maximum value for the random part of the back-off time', @@ -1456,8 +1410,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'RetryBackOffRandomRange', }, - [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr as string, 'RetryBackOffRepeatTimes')]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, 'RetryBackOffRepeatTimes')]: { + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, description: 'When the Charging Station is reconnecting, after a connection loss, it will use this variable for the amount of times it will double the previous back-off time.', @@ -1466,8 +1420,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'RetryBackOffRepeatTimes', }, - [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr as string, 'RetryBackOffWaitMinimum')]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, 'RetryBackOffWaitMinimum')]: { + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, description: 'When the Charging Station is reconnecting, after a connection loss, it will use this variable as the minimum back-off time, the first time it tries to reconnect.', @@ -1477,10 +1431,10 @@ export const VARIABLE_REGISTRY: Record = { variable: 'RetryBackOffWaitMinimum', }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20OptionalVariableName.HeartbeatInterval )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: millisecondsToSeconds(Constants.DEFAULT_HEARTBEAT_INTERVAL).toString(), description: 'Interval between Heartbeat messages.', @@ -1492,14 +1446,14 @@ export const VARIABLE_REGISTRY: Record = { positive: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20OptionalVariableName.HeartbeatInterval as string, + variable: OCPP20OptionalVariableName.HeartbeatInterval, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20OptionalVariableName.WebSocketPingInterval )]: { allowZero: true, - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: '30', description: @@ -1509,13 +1463,13 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20OptionalVariableName.WebSocketPingInterval as string, + variable: OCPP20OptionalVariableName.WebSocketPingInterval, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.FileTransferProtocols )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.MemberList, defaultValue: 'HTTPS,FTPS,SFTP', description: 'Supported file transfer protocols.', @@ -1524,18 +1478,18 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.FileTransferProtocols as string, + variable: OCPP20RequiredVariableName.FileTransferProtocols, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.MessageAttemptInterval, - OCPP20RequestCommand.TRANSACTION_EVENT as string + OCPP20RequestCommand.TRANSACTION_EVENT )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: '5', description: 'Interval (seconds) between retry attempts for TransactionEvent messages.', - instance: OCPP20RequestCommand.TRANSACTION_EVENT as string, + instance: OCPP20RequestCommand.TRANSACTION_EVENT, max: 3600, min: 1, mutability: MutabilityEnumType.ReadWrite, @@ -1544,18 +1498,18 @@ export const VARIABLE_REGISTRY: Record = { required: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20RequiredVariableName.MessageAttemptInterval as string, + variable: OCPP20RequiredVariableName.MessageAttemptInterval, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.MessageAttempts, - OCPP20RequestCommand.TRANSACTION_EVENT as string + OCPP20RequestCommand.TRANSACTION_EVENT )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: '3', description: 'Maximum number of TransactionEvent message attempts after initial send.', - instance: OCPP20RequestCommand.TRANSACTION_EVENT as string, + instance: OCPP20RequestCommand.TRANSACTION_EVENT, max: 10, min: 1, mutability: MutabilityEnumType.ReadWrite, @@ -1563,14 +1517,14 @@ export const VARIABLE_REGISTRY: Record = { positive: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.MessageAttempts as string, + variable: OCPP20RequiredVariableName.MessageAttempts, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.MessageTimeout, 'Default' )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: Constants.DEFAULT_CONNECTION_TIMEOUT.toString(), description: 'Timeout (in seconds) waiting for responses to general OCPP messages.', @@ -1583,13 +1537,13 @@ export const VARIABLE_REGISTRY: Record = { required: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20RequiredVariableName.MessageTimeout as string, + variable: OCPP20RequiredVariableName.MessageTimeout, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.NetworkConfigurationPriority )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.string, defaultValue: '1,2,3', description: 'Comma separated ordered list of network profile priorities.', @@ -1598,13 +1552,13 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.NetworkConfigurationPriority as string, + variable: OCPP20RequiredVariableName.NetworkConfigurationPriority, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.NetworkProfileConnectionAttempts )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: '3', description: 'Connection attempts before switching profile.', @@ -1614,13 +1568,13 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.NetworkProfileConnectionAttempts as string, + variable: OCPP20RequiredVariableName.NetworkProfileConnectionAttempts, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.OfflineThreshold )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: '300', description: 'Offline duration threshold for status refresh.', @@ -1632,14 +1586,11 @@ export const VARIABLE_REGISTRY: Record = { required: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20RequiredVariableName.OfflineThreshold as string, + variable: OCPP20RequiredVariableName.OfflineThreshold, }, - [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, - OCPP20RequiredVariableName.ResetRetries - )]: { + [buildRegistryKey(OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.ResetRetries)]: { allowZero: true, - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.integer, defaultValue: '2', description: 'Number of times to retry a reset.', @@ -1649,13 +1600,13 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.ResetRetries as string, + variable: OCPP20RequiredVariableName.ResetRetries, }, [buildRegistryKey( - OCPP20ComponentName.OCPPCommCtrlr as string, + OCPP20ComponentName.OCPPCommCtrlr, OCPP20RequiredVariableName.UnlockOnEVSideDisconnect )]: { - component: OCPP20ComponentName.OCPPCommCtrlr as string, + component: OCPP20ComponentName.OCPPCommCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Unlock cable when unplugged at EV side.', @@ -1663,12 +1614,12 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.UnlockOnEVSideDisconnect as string, + variable: OCPP20RequiredVariableName.UnlockOnEVSideDisconnect, }, // ReservationCtrlr Component - [buildRegistryKey(OCPP20ComponentName.ReservationCtrlr as string, 'Available')]: { - component: OCPP20ComponentName.ReservationCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.ReservationCtrlr, 'Available')]: { + component: OCPP20ComponentName.ReservationCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Whether reservation is supported.', @@ -1678,10 +1629,10 @@ export const VARIABLE_REGISTRY: Record = { variable: 'Available', }, [buildRegistryKey( - OCPP20ComponentName.ReservationCtrlr as string, - OCPP20OptionalVariableName.NonEvseSpecific as string + OCPP20ComponentName.ReservationCtrlr, + OCPP20OptionalVariableName.NonEvseSpecific )]: { - component: OCPP20ComponentName.ReservationCtrlr as string, + component: OCPP20ComponentName.ReservationCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1689,25 +1640,22 @@ export const VARIABLE_REGISTRY: Record = { mutability: MutabilityEnumType.ReadOnly, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20OptionalVariableName.NonEvseSpecific as string, + variable: OCPP20OptionalVariableName.NonEvseSpecific, }, - [buildRegistryKey( - OCPP20ComponentName.ReservationCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.ReservationCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.ReservationCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.ReservationCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Whether reservation is enabled.', mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, // SampledDataCtrlr Component - [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr as string, 'Available')]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr, 'Available')]: { + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'If this variable reports a value of true, Sampled Data is supported', @@ -1716,20 +1664,19 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr as string, 'RegisterValuesWithoutPhases')]: - { - component: OCPP20ComponentName.SampledDataCtrlr as string, - dataType: DataEnumType.boolean, - defaultValue: 'false', - description: - 'If this variable reports a value of true, then meter values of measurand Energy.Active.Import.Register will only report the total energy over all phases without reporting the individual phase values.', - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: 'RegisterValuesWithoutPhases', - }, - [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr as string, 'SignReadings')]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr, 'RegisterValuesWithoutPhases')]: { + component: OCPP20ComponentName.SampledDataCtrlr, + dataType: DataEnumType.boolean, + defaultValue: 'false', + description: + 'If this variable reports a value of true, then meter values of measurand Energy.Active.Import.Register will only report the total energy over all phases without reporting the individual phase values.', + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'RegisterValuesWithoutPhases', + }, + [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr, 'SignReadings')]: { + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -1739,8 +1686,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'SignReadings', }, - [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr as string, 'TxEndedInterval')]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr, 'TxEndedInterval')]: { + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.integer, defaultValue: '60', description: @@ -1753,26 +1700,24 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.SECONDS, variable: 'TxEndedInterval', }, + [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr, OCPP20MeasurandEnumType.CURRENT_IMPORT)]: + { + component: OCPP20ComponentName.SampledDataCtrlr, + dataType: DataEnumType.decimal, + description: 'Instantaneous import current (A).', + dynamicValueResolver: () => '0', + mutability: MutabilityEnumType.ReadOnly, + persistence: PersistenceEnumType.Volatile, + supportedAttributes: [AttributeEnumType.Actual], + unit: OCPP20UnitEnumType.AMP, + variable: OCPP20MeasurandEnumType.CURRENT_IMPORT, + vendorSpecific: true, + }, [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, - OCPP20MeasurandEnumType.CURRENT_IMPORT - )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, - dataType: DataEnumType.decimal, - description: 'Instantaneous import current (A).', - dynamicValueResolver: () => '0', - mutability: MutabilityEnumType.ReadOnly, - persistence: PersistenceEnumType.Volatile, - supportedAttributes: [AttributeEnumType.Actual], - unit: OCPP20UnitEnumType.AMP, - variable: OCPP20MeasurandEnumType.CURRENT_IMPORT, - vendorSpecific: true, - }, - [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, + OCPP20ComponentName.SampledDataCtrlr, OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_REGISTER )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.decimal, description: 'Cumulative active energy imported (Wh).', dynamicValueResolver: () => '0', @@ -1784,10 +1729,10 @@ export const VARIABLE_REGISTRY: Record = { vendorSpecific: true, }, [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, + OCPP20ComponentName.SampledDataCtrlr, OCPP20MeasurandEnumType.POWER_ACTIVE_IMPORT )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.decimal, description: 'Instantaneous active power import (W).', dynamicValueResolver: () => '0', @@ -1798,11 +1743,8 @@ export const VARIABLE_REGISTRY: Record = { variable: OCPP20MeasurandEnumType.POWER_ACTIVE_IMPORT, vendorSpecific: true, }, - [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, - OCPP20MeasurandEnumType.VOLTAGE - )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr, OCPP20MeasurandEnumType.VOLTAGE)]: { + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.decimal, description: 'RMS voltage (V).', dynamicValueResolver: () => '230', @@ -1813,24 +1755,21 @@ export const VARIABLE_REGISTRY: Record = { variable: OCPP20MeasurandEnumType.VOLTAGE, vendorSpecific: true, }, - [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SampledDataCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'If this variable reports a value of true, Sampled Data is enabled.', mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, + OCPP20ComponentName.SampledDataCtrlr, OCPP20RequiredVariableName.TxEndedMeasurands )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.MemberList, // Default includes cumulative energy and interval energy plus voltage for billing context defaultValue: `${OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_REGISTER},${OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_INTERVAL},${OCPP20MeasurandEnumType.VOLTAGE}`, @@ -1855,13 +1794,13 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.TxEndedMeasurands as string, + variable: OCPP20RequiredVariableName.TxEndedMeasurands, }, [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, + OCPP20ComponentName.SampledDataCtrlr, OCPP20RequiredVariableName.TxStartedMeasurands )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.MemberList, defaultValue: `${OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_REGISTER},${OCPP20MeasurandEnumType.POWER_ACTIVE_IMPORT},${OCPP20MeasurandEnumType.VOLTAGE}`, description: 'Measurands sampled at transaction start.', @@ -1885,14 +1824,14 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.TxStartedMeasurands as string, + variable: OCPP20RequiredVariableName.TxStartedMeasurands, }, // Volatile rationale: sampling interval affects runtime only; simulator does not persist across restarts. [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, + OCPP20ComponentName.SampledDataCtrlr, OCPP20RequiredVariableName.TxUpdatedInterval )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.integer, defaultValue: Constants.DEFAULT_TX_UPDATED_INTERVAL.toString(), description: @@ -1905,13 +1844,13 @@ export const VARIABLE_REGISTRY: Record = { required: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20RequiredVariableName.TxUpdatedInterval as string, + variable: OCPP20RequiredVariableName.TxUpdatedInterval, }, [buildRegistryKey( - OCPP20ComponentName.SampledDataCtrlr as string, + OCPP20ComponentName.SampledDataCtrlr, OCPP20RequiredVariableName.TxUpdatedMeasurands )]: { - component: OCPP20ComponentName.SampledDataCtrlr as string, + component: OCPP20ComponentName.SampledDataCtrlr, dataType: DataEnumType.MemberList, defaultValue: `${OCPP20MeasurandEnumType.ENERGY_ACTIVE_IMPORT_REGISTER},${OCPP20MeasurandEnumType.CURRENT_IMPORT},${OCPP20MeasurandEnumType.VOLTAGE}`, description: 'Measurands included in periodic updates.', @@ -1935,23 +1874,22 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.TxUpdatedMeasurands as string, + variable: OCPP20RequiredVariableName.TxUpdatedMeasurands, }, // SecurityCtrlr Component - [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr as string, 'AdditionalRootCertificateCheck')]: - { - component: OCPP20ComponentName.SecurityCtrlr as string, - dataType: DataEnumType.boolean, - defaultValue: 'false', - description: 'Required for all security profiles except profile 1.', - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: 'AdditionalRootCertificateCheck', - }, - [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr as string, 'BasicAuthPassword')]: { - component: OCPP20ComponentName.SecurityCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr, 'AdditionalRootCertificateCheck')]: { + component: OCPP20ComponentName.SecurityCtrlr, + dataType: DataEnumType.boolean, + defaultValue: 'false', + description: 'Required for all security profiles except profile 1.', + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'AdditionalRootCertificateCheck', + }, + [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr, 'BasicAuthPassword')]: { + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.string, description: 'The basic authentication password is used for HTTP Basic Authentication.', mutability: MutabilityEnumType.WriteOnly, @@ -1959,8 +1897,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'BasicAuthPassword', }, - [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr as string, 'CertSigningRepeatTimes')]: { - component: OCPP20ComponentName.SecurityCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr, 'CertSigningRepeatTimes')]: { + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.integer, defaultValue: '3', description: @@ -1971,8 +1909,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'CertSigningRepeatTimes', }, - [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr as string, 'CertSigningWaitMinimum')]: { - component: OCPP20ComponentName.SecurityCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr, 'CertSigningWaitMinimum')]: { + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.integer, defaultValue: '60', description: @@ -1984,8 +1922,8 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.SECONDS, variable: 'CertSigningWaitMinimum', }, - [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr as string, 'Identity')]: { - component: OCPP20ComponentName.SecurityCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr, 'Identity')]: { + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.string, description: 'The Charging Station identity.', mutability: MutabilityEnumType.ReadWrite, @@ -1994,10 +1932,10 @@ export const VARIABLE_REGISTRY: Record = { variable: 'Identity', }, [buildRegistryKey( - OCPP20ComponentName.SecurityCtrlr as string, + OCPP20ComponentName.SecurityCtrlr, OCPP20OptionalVariableName.MaxCertificateChainSize )]: { - component: OCPP20ComponentName.SecurityCtrlr as string, + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.integer, description: "Limit of the size of the 'certificateChain' field from the CertificateSignedRequest", @@ -2005,14 +1943,14 @@ export const VARIABLE_REGISTRY: Record = { mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20OptionalVariableName.MaxCertificateChainSize as string, + variable: OCPP20OptionalVariableName.MaxCertificateChainSize, }, [buildRegistryKey( - OCPP20ComponentName.SecurityCtrlr as string, + OCPP20ComponentName.SecurityCtrlr, OCPP20RequiredVariableName.CertificateEntries )]: { allowZero: true, - component: OCPP20ComponentName.SecurityCtrlr as string, + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.integer, defaultValue: '0', description: 'Count of installed certificates.', @@ -2021,13 +1959,13 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.CertificateEntries as string, + variable: OCPP20RequiredVariableName.CertificateEntries, }, [buildRegistryKey( - OCPP20ComponentName.SecurityCtrlr as string, + OCPP20ComponentName.SecurityCtrlr, OCPP20RequiredVariableName.OrganizationName )]: { - component: OCPP20ComponentName.SecurityCtrlr as string, + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.string, defaultValue: 'ChangeMeOrg', description: 'Organization name for client certificate subject.', @@ -2037,60 +1975,57 @@ export const VARIABLE_REGISTRY: Record = { rebootRequired: true, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.OrganizationName as string, + variable: OCPP20RequiredVariableName.OrganizationName, }, // Enumeration limited to profiles 1..3 commonly used; spec allows additional profiles via extensions. - [buildRegistryKey( - OCPP20ComponentName.SecurityCtrlr as string, - OCPP20RequiredVariableName.SecurityProfile - )]: { - component: OCPP20ComponentName.SecurityCtrlr as string, - dataType: DataEnumType.integer, - defaultValue: '1', - description: 'Selected security profile.', - enumeration: ['1', '2', '3'], - max: 3, - maxLength: 1, - min: 1, - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - positive: true, - rebootRequired: true, - required: true, - supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.SecurityProfile as string, - }, + [buildRegistryKey(OCPP20ComponentName.SecurityCtrlr, OCPP20RequiredVariableName.SecurityProfile)]: + { + component: OCPP20ComponentName.SecurityCtrlr, + dataType: DataEnumType.integer, + defaultValue: '1', + description: 'Selected security profile.', + enumeration: ['1', '2', '3'], + max: 3, + maxLength: 1, + min: 1, + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + positive: true, + rebootRequired: true, + required: true, + supportedAttributes: [AttributeEnumType.Actual], + variable: OCPP20RequiredVariableName.SecurityProfile, + }, // Vendor-specific write-only placeholder to exercise WriteOnly path. [buildRegistryKey( - OCPP20ComponentName.SecurityCtrlr as string, + OCPP20ComponentName.SecurityCtrlr, OCPP20VendorVariableName.CertificatePrivateKey )]: { - component: OCPP20ComponentName.SecurityCtrlr as string, + component: OCPP20ComponentName.SecurityCtrlr, dataType: DataEnumType.string, description: 'Private key material upload placeholder; write-only for security.', maxLength: 2048, mutability: MutabilityEnumType.WriteOnly, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20VendorVariableName.CertificatePrivateKey as string, + variable: OCPP20VendorVariableName.CertificatePrivateKey, vendorSpecific: true, }, // SmartChargingCtrlr Component - [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr as string, 'ACPhaseSwitchingSupported')]: - { - component: OCPP20ComponentName.SmartChargingCtrlr as string, - dataType: DataEnumType.boolean, - defaultValue: 'false', - description: - 'This variable can be used to indicate an on-load/in-transaction capability. If defined and true, this EVSE supports the selection of which phase to use for 1 phase AC charging.', - mutability: MutabilityEnumType.ReadOnly, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - variable: 'ACPhaseSwitchingSupported', - }, - [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr as string, 'Available')]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'ACPhaseSwitchingSupported')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, + dataType: DataEnumType.boolean, + defaultValue: 'false', + description: + 'This variable can be used to indicate an on-load/in-transaction capability. If defined and true, this EVSE supports the selection of which phase to use for 1 phase AC charging.', + mutability: MutabilityEnumType.ReadOnly, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'ACPhaseSwitchingSupported', + }, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'Available')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Whether smart charging is supported.', @@ -2099,12 +2034,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey( - OCPP20ComponentName.SmartChargingCtrlr as string, - 'Entries', - 'ChargingProfiles' - )]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'Entries', 'ChargingProfiles')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.integer, defaultValue: '0', description: @@ -2117,11 +2048,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Entries', }, - [buildRegistryKey( - OCPP20ComponentName.SmartChargingCtrlr as string, - 'ExternalControlSignalsEnabled' - )]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'ExternalControlSignalsEnabled')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -2131,8 +2059,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ExternalControlSignalsEnabled', }, - [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr as string, 'LimitChangeSignificance')]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'LimitChangeSignificance')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.decimal, defaultValue: '1.0', description: @@ -2146,11 +2074,8 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.PERCENT, variable: 'LimitChangeSignificance', }, - [buildRegistryKey( - OCPP20ComponentName.SmartChargingCtrlr as string, - 'NotifyChargingLimitWithSchedules' - )]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'NotifyChargingLimitWithSchedules')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -2160,8 +2085,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'NotifyChargingLimitWithSchedules', }, - [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr as string, 'PeriodsPerSchedule')]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'PeriodsPerSchedule')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.integer, defaultValue: '24', description: 'Maximum number of periods that may be defined per ChargingSchedule.', @@ -2172,8 +2097,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'PeriodsPerSchedule', }, - [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr as string, 'Phases3to1')]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'Phases3to1')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -2183,8 +2108,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Phases3to1', }, - [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr as string, 'ProfileStackLevel')]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'ProfileStackLevel')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.integer, defaultValue: '10', description: @@ -2196,8 +2121,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'ProfileStackLevel', }, - [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr as string, 'RateUnit')]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, 'RateUnit')]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.MemberList, defaultValue: `${OCPP20ChargingRateUnitEnumType.A},${OCPP20ChargingRateUnitEnumType.W}`, description: `A list of supported quantities for use in a ChargingSchedule. Allowed values: '${OCPP20ChargingRateUnitEnumType.A}' and '${OCPP20ChargingRateUnitEnumType.W}'`, @@ -2208,23 +2133,20 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'RateUnit', }, - [buildRegistryKey( - OCPP20ComponentName.SmartChargingCtrlr as string, - OCPP20RequiredVariableName.Enabled as string - )]: { - component: OCPP20ComponentName.SmartChargingCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.SmartChargingCtrlr, OCPP20RequiredVariableName.Enabled)]: { + component: OCPP20ComponentName.SmartChargingCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Whether smart charging is enabled.', mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, // TariffCostCtrlr Component - [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr as string, 'Available', 'Cost')]: { - component: OCPP20ComponentName.TariffCostCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr, 'Available', 'Cost')]: { + component: OCPP20ComponentName.TariffCostCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Instance Cost: Whether costs are supported.', @@ -2234,8 +2156,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr as string, 'Available', 'Tariff')]: { - component: OCPP20ComponentName.TariffCostCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr, 'Available', 'Tariff')]: { + component: OCPP20ComponentName.TariffCostCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Instance Tariff: Whether tariffs are supported.', @@ -2245,8 +2167,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Available', }, - [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr as string, 'Currency')]: { - component: OCPP20ComponentName.TariffCostCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr, 'Currency')]: { + component: OCPP20ComponentName.TariffCostCtrlr, dataType: DataEnumType.string, defaultValue: 'EUR', description: 'Currency used by this Charging Station in a ISO 4217 formatted currency code.', @@ -2257,8 +2179,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'Currency', }, - [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr as string, 'TariffFallbackMessage')]: { - component: OCPP20ComponentName.TariffCostCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr, 'TariffFallbackMessage')]: { + component: OCPP20ComponentName.TariffCostCtrlr, dataType: DataEnumType.string, defaultValue: 'Standard charging rate applies', description: @@ -2270,8 +2192,8 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'TariffFallbackMessage', }, - [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr as string, 'TotalCostFallbackMessage')]: { - component: OCPP20ComponentName.TariffCostCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TariffCostCtrlr, 'TotalCostFallbackMessage')]: { + component: OCPP20ComponentName.TariffCostCtrlr, dataType: DataEnumType.string, defaultValue: 'Cost information not available', description: @@ -2284,11 +2206,11 @@ export const VARIABLE_REGISTRY: Record = { variable: 'TotalCostFallbackMessage', }, [buildRegistryKey( - OCPP20ComponentName.TariffCostCtrlr as string, - OCPP20RequiredVariableName.Enabled as string, + OCPP20ComponentName.TariffCostCtrlr, + OCPP20RequiredVariableName.Enabled, 'Cost' )]: { - component: OCPP20ComponentName.TariffCostCtrlr as string, + component: OCPP20ComponentName.TariffCostCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Instance Cost: Whether costs are enabled.', @@ -2296,14 +2218,14 @@ export const VARIABLE_REGISTRY: Record = { mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, [buildRegistryKey( - OCPP20ComponentName.TariffCostCtrlr as string, - OCPP20RequiredVariableName.Enabled as string, + OCPP20ComponentName.TariffCostCtrlr, + OCPP20RequiredVariableName.Enabled, 'Tariff' )]: { - component: OCPP20ComponentName.TariffCostCtrlr as string, + component: OCPP20ComponentName.TariffCostCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: 'Instance Tariff: Whether tariffs are enabled.', @@ -2311,12 +2233,12 @@ export const VARIABLE_REGISTRY: Record = { mutability: MutabilityEnumType.ReadWrite, persistence: PersistenceEnumType.Persistent, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.Enabled as string, + variable: OCPP20RequiredVariableName.Enabled, }, // TxCtrlr Component - [buildRegistryKey(OCPP20ComponentName.TxCtrlr as string, 'ChargingTime')]: { - component: OCPP20ComponentName.TxCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TxCtrlr, 'ChargingTime')]: { + component: OCPP20ComponentName.TxCtrlr, dataType: DataEnumType.decimal, description: 'Time from earliest to latest substantive energy transfer', mutability: MutabilityEnumType.ReadOnly, @@ -2325,8 +2247,8 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.SECONDS, variable: 'ChargingTime', }, - [buildRegistryKey(OCPP20ComponentName.TxCtrlr as string, 'TxBeforeAcceptedEnabled')]: { - component: OCPP20ComponentName.TxCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TxCtrlr, 'TxBeforeAcceptedEnabled')]: { + component: OCPP20ComponentName.TxCtrlr, dataType: DataEnumType.boolean, defaultValue: 'false', description: @@ -2336,26 +2258,21 @@ export const VARIABLE_REGISTRY: Record = { supportedAttributes: [AttributeEnumType.Actual], variable: 'TxBeforeAcceptedEnabled', }, - [buildRegistryKey( - OCPP20ComponentName.TxCtrlr as string, - OCPP20OptionalVariableName.MaxEnergyOnInvalidId as string - )]: { - component: OCPP20ComponentName.TxCtrlr as string, - dataType: DataEnumType.integer, - description: - 'Maximum amount of energy in Wh delivered when an identifier is deauthorized by the CSMS after start of a transaction.', - min: 0, - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - supportedAttributes: [AttributeEnumType.Actual], - unit: OCPP20UnitEnumType.WATT_HOUR, - variable: OCPP20OptionalVariableName.MaxEnergyOnInvalidId as string, - }, - [buildRegistryKey( - OCPP20ComponentName.TxCtrlr as string, - OCPP20RequiredVariableName.EVConnectionTimeOut - )]: { - component: OCPP20ComponentName.TxCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TxCtrlr, OCPP20OptionalVariableName.MaxEnergyOnInvalidId)]: + { + component: OCPP20ComponentName.TxCtrlr, + dataType: DataEnumType.integer, + description: + 'Maximum amount of energy in Wh delivered when an identifier is deauthorized by the CSMS after start of a transaction.', + min: 0, + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + supportedAttributes: [AttributeEnumType.Actual], + unit: OCPP20UnitEnumType.WATT_HOUR, + variable: OCPP20OptionalVariableName.MaxEnergyOnInvalidId, + }, + [buildRegistryKey(OCPP20ComponentName.TxCtrlr, OCPP20RequiredVariableName.EVConnectionTimeOut)]: { + component: OCPP20ComponentName.TxCtrlr, dataType: DataEnumType.integer, defaultValue: Constants.DEFAULT_EV_CONNECTION_TIMEOUT.toString(), description: 'Timeout for EV to establish connection.', @@ -2368,13 +2285,13 @@ export const VARIABLE_REGISTRY: Record = { required: true, supportedAttributes: [AttributeEnumType.Actual], unit: OCPP20UnitEnumType.SECONDS, - variable: OCPP20RequiredVariableName.EVConnectionTimeOut as string, + variable: OCPP20RequiredVariableName.EVConnectionTimeOut, }, [buildRegistryKey( - OCPP20ComponentName.TxCtrlr as string, + OCPP20ComponentName.TxCtrlr, OCPP20RequiredVariableName.StopTxOnEVSideDisconnect )]: { - component: OCPP20ComponentName.TxCtrlr as string, + component: OCPP20ComponentName.TxCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Deauthorize transaction when cable unplugged at EV.', @@ -2382,13 +2299,10 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.StopTxOnEVSideDisconnect as string, + variable: OCPP20RequiredVariableName.StopTxOnEVSideDisconnect, }, - [buildRegistryKey( - OCPP20ComponentName.TxCtrlr as string, - OCPP20RequiredVariableName.StopTxOnInvalidId - )]: { - component: OCPP20ComponentName.TxCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TxCtrlr, OCPP20RequiredVariableName.StopTxOnInvalidId)]: { + component: OCPP20ComponentName.TxCtrlr, dataType: DataEnumType.boolean, defaultValue: 'true', description: 'Deauthorize transaction on invalid id token status.', @@ -2396,13 +2310,10 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.StopTxOnInvalidId as string, + variable: OCPP20RequiredVariableName.StopTxOnInvalidId, }, - [buildRegistryKey( - OCPP20ComponentName.TxCtrlr as string, - OCPP20RequiredVariableName.TxStartPoint - )]: { - component: OCPP20ComponentName.TxCtrlr as string, + [buildRegistryKey(OCPP20ComponentName.TxCtrlr, OCPP20RequiredVariableName.TxStartPoint)]: { + component: OCPP20ComponentName.TxCtrlr, dataType: DataEnumType.MemberList, defaultValue: 'Authorized,EVConnected', description: 'Trigger conditions for starting a transaction.', @@ -2418,27 +2329,26 @@ export const VARIABLE_REGISTRY: Record = { persistence: PersistenceEnumType.Persistent, required: true, supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.TxStartPoint as string, + variable: OCPP20RequiredVariableName.TxStartPoint, + }, + [buildRegistryKey(OCPP20ComponentName.TxCtrlr, OCPP20RequiredVariableName.TxStopPoint)]: { + component: OCPP20ComponentName.TxCtrlr, + dataType: DataEnumType.MemberList, + defaultValue: 'EVConnected,PowerPathClosed', + description: 'Trigger conditions for ending a transaction.', + enumeration: [ + 'Authorized', + 'EVConnected', + 'PowerPathClosed', + 'EnergyTransfer', + 'ParkingBayOccupied', + ], + mutability: MutabilityEnumType.ReadWrite, + persistence: PersistenceEnumType.Persistent, + required: true, + supportedAttributes: [AttributeEnumType.Actual], + variable: OCPP20RequiredVariableName.TxStopPoint, }, - [buildRegistryKey(OCPP20ComponentName.TxCtrlr as string, OCPP20RequiredVariableName.TxStopPoint)]: - { - component: OCPP20ComponentName.TxCtrlr as string, - dataType: DataEnumType.MemberList, - defaultValue: 'EVConnected,PowerPathClosed', - description: 'Trigger conditions for ending a transaction.', - enumeration: [ - 'Authorized', - 'EVConnected', - 'PowerPathClosed', - 'EnergyTransfer', - 'ParkingBayOccupied', - ], - mutability: MutabilityEnumType.ReadWrite, - persistence: PersistenceEnumType.Persistent, - required: true, - supportedAttributes: [AttributeEnumType.Actual], - variable: OCPP20RequiredVariableName.TxStopPoint as string, - }, } /** @@ -2450,7 +2360,7 @@ export const VARIABLE_REGISTRY: Record = { * @returns Lower-case composite key for lookup. */ export function buildCaseInsensitiveCompositeKey ( - component: string, + component: OCPP20ComponentName | string, instance: string | undefined, variable: string ): string { -- 2.43.0