]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
feat(ocpp): add spec-required DisplayMessageCtrlr variables
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 2 Apr 2026 18:52:28 +0000 (20:52 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 2 Apr 2026 18:52:28 +0000 (20:52 +0200)
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).

README.md
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts

index b65323d42b62f34ab34d4876ea973863e8bae3bd..9729a47d40e03139cba82cbd1f862567a2afac67 100644 (file)
--- 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: -)
index 2937c8d16dc9ce7e6c0e073cdfade4172675d31a..cb9698b4139422b6ed2e26e5feb03cb74fca3152 100644 (file)
@@ -11,6 +11,7 @@ import {
   OCPP20DeviceInfoVariableName,
   OCPP20IncomingRequestCommand,
   OCPP20MeasurandEnumType,
+  OCPP20MessageFormatEnumType,
   OCPP20OperationalStatusEnumType,
   OCPP20OptionalVariableName,
   OCPP20RequestCommand,
@@ -749,6 +750,7 @@ export const VARIABLE_REGISTRY: Record<string, VariableMetadata> = {
     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<string, VariableMetadata> = {
     unit: OCPP20UnitEnumType.CHARS,
     variable: OCPP20OptionalVariableName.ValueSize,
   },
-  // DeviceDataCtrlr Component
+
   [buildRegistryKey(
     OCPP20ComponentName.DeviceDataCtrlr,
     OCPP20RequiredVariableName.BytesPerMessage
@@ -897,6 +899,50 @@ export const VARIABLE_REGISTRY: Record<string, VariableMetadata> = {
     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,