From: Jérôme Benoit Date: Thu, 2 Apr 2026 18:52:28 +0000 (+0200) Subject: feat(ocpp): add spec-required DisplayMessageCtrlr variables X-Git-Tag: ocpp-server@v4.3.0~31 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=37c3aa9ef96f42c6c13b8abf167c4379f4568355;p=e-mobility-charging-stations-simulator.git feat(ocpp): add spec-required DisplayMessageCtrlr variables Add DisplayMessages, SupportedFormats, SupportedPriorities to OCPP20VariableRegistry per OCPP 2.0.1 spec §3.1.8. Use OCPP20MessageFormatEnumType for SupportedFormats enumeration. Connector.ConnectorType deferred (requires isComponentValid design change per OpenSpec process). --- diff --git a/README.md b/README.md index b65323d4..9729a47d 100644 --- a/README.md +++ b/README.md @@ -745,6 +745,12 @@ All kind of OCPP parameters are supported in charging station configuration or c - :white_check_mark: ReportingValueSize (type: integer) (units: characters) - :white_check_mark: ValueSize (type: integer) (units: characters) +#### DisplayMessageCtrlr + +- :white_check_mark: DisplayMessages (type: integer) (units: -) +- :white_check_mark: SupportedFormats (type: memberlist) (units: -) +- :white_check_mark: SupportedPriorities (type: memberlist) (units: -) + #### EVSE - :white_check_mark: AllowReset (type: boolean) (units: -) diff --git a/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts b/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts index 2937c8d1..cb9698b4 100644 --- a/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts +++ b/src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts @@ -11,6 +11,7 @@ import { OCPP20DeviceInfoVariableName, OCPP20IncomingRequestCommand, OCPP20MeasurandEnumType, + OCPP20MessageFormatEnumType, OCPP20OperationalStatusEnumType, OCPP20OptionalVariableName, OCPP20RequestCommand, @@ -749,6 +750,7 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.CHARS, variable: OCPP20OptionalVariableName.ReportingValueSize, }, + [buildRegistryKey(OCPP20ComponentName.DeviceDataCtrlr, OCPP20OptionalVariableName.ValueSize)]: { component: OCPP20ComponentName.DeviceDataCtrlr, dataType: DataEnumType.integer, @@ -764,7 +766,7 @@ export const VARIABLE_REGISTRY: Record = { unit: OCPP20UnitEnumType.CHARS, variable: OCPP20OptionalVariableName.ValueSize, }, - // DeviceDataCtrlr Component + [buildRegistryKey( OCPP20ComponentName.DeviceDataCtrlr, OCPP20RequiredVariableName.BytesPerMessage @@ -897,6 +899,50 @@ export const VARIABLE_REGISTRY: Record = { variable: OCPP20RequiredVariableName.ItemsPerMessage, }, + // DisplayMessageCtrlr Component + [buildRegistryKey(OCPP20ComponentName.DisplayMessageCtrlr, 'DisplayMessages')]: { + component: OCPP20ComponentName.DisplayMessageCtrlr, + dataType: DataEnumType.integer, + defaultValue: '0', + description: + 'Amount of different messages that are currently configured in this Charging Station, via SetDisplayMessageRequest.', + min: 0, + mutability: MutabilityEnumType.ReadOnly, + persistence: PersistenceEnumType.Volatile, + required: true, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'DisplayMessages', + }, + [buildRegistryKey(OCPP20ComponentName.DisplayMessageCtrlr, 'SupportedFormats')]: { + component: OCPP20ComponentName.DisplayMessageCtrlr, + dataType: DataEnumType.MemberList, + defaultValue: 'ASCII,UTF8', + description: 'List of message formats supported by this Charging Station.', + enumeration: [ + OCPP20MessageFormatEnumType.ASCII, + OCPP20MessageFormatEnumType.HTML, + OCPP20MessageFormatEnumType.URI, + OCPP20MessageFormatEnumType.UTF8, + ], + mutability: MutabilityEnumType.ReadOnly, + persistence: PersistenceEnumType.Persistent, + required: true, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'SupportedFormats', + }, + [buildRegistryKey(OCPP20ComponentName.DisplayMessageCtrlr, 'SupportedPriorities')]: { + component: OCPP20ComponentName.DisplayMessageCtrlr, + dataType: DataEnumType.MemberList, + defaultValue: 'AlwaysFront,InFront,NormalCycle', + description: 'List of the priorities supported by this Charging Station.', + enumeration: ['AlwaysFront', 'InFront', 'NormalCycle'], + mutability: MutabilityEnumType.ReadOnly, + persistence: PersistenceEnumType.Persistent, + required: true, + supportedAttributes: [AttributeEnumType.Actual], + variable: 'SupportedPriorities', + }, + // EVSE Component [buildRegistryKey(OCPP20ComponentName.EVSE, 'AllowReset')]: { component: OCPP20ComponentName.EVSE,