View Issue Details

IDProjectCategoryView StatusLast Update
0010307OPC-11030: UA Modelling Best PracticesDocumentation Erratapublic2025-05-14 08:28
ReporterMartin Lang Assigned ToWolfgang Mahnke  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Summary0010307: Best Practice for Usage of EnumStrings/EnumValues on Variables with Enumeration DataTypes
Description

It is technically allowed to use EnumStrings/EnumValues on any Variable, as there is no explicit prohibition in the OPC UA specifications.
However, best practices for modeling suggest limiting this behavior to specific cases. (see addtional information)
If a Variable has an Enumeration DataType, the EnumStrings/EnumValues are already provided through the DataType itself and do not need to be redundantly replicated on the Variable (no reference/no new child node property instance).
However, for client convenience and improved accessibility, it may be acceptable for a Variable to have a HasProperty reference to the DataType’s EnumStrings Property.

Discussion Point:
Should it be considered a best practice to:

  • Avoid duplicating EnumStrings/EnumValues on the Variable if they are already available via the Enumeration DataType?
  • Allow a HasProperty reference to the DataType Property EnumStrings/EnumValues only when there is a clear convenience or usability advantage for clients?

Proposal for Best Practice:

  • For Variables with an Enumeration DataType, rely on the EnumStrings/EnumValues provided by the DataType.
  • Avoid creating redundant or inconsistent EnumString definitions on Variables, if required reference the EnumStrings/EnumValues from the Enumeration DataType direct..
Additional Information

https://opcfoundation.org/forum/opc-ua-standard/clarification-on-handling-enumstrings-enumvalues-in-enumeration-variable-instances/#p5589

TagsNo tags attached.

Activities

Wolfgang Mahnke

2025-05-14 08:27

manager   ~0022734

Discussed in Harmonization WG meeting on 12th of May 2025.
Will not be addressed in whitepaper.

Reasoning:
For DataType NodeClass it is clearly defined when to use those properties on a DataType, and when not (in Part 3).
They are not defined as common properties for Variables or VariableTypes. They are used in Part 8 on concrete VariableTypes, and it is explained how to use them (and even a reference to the DataTypes usage).

I does not make sense for Properties defined on Object- or VariableTypes to define their usage in other places as a best practice. There are hundreds of those properties in the base specs and companion specifications.

Wolfgang Mahnke

2025-05-14 08:28

manager   ~0022735

Discussed and agreed in Harmonization WG meeting on 12th of May 2025.

Issue History

Date Modified Username Field Change
2025-04-28 11:04 Martin Lang New Issue
2025-05-14 08:27 Wolfgang Mahnke Assigned To => Wolfgang Mahnke
2025-05-14 08:27 Wolfgang Mahnke Status new => resolved
2025-05-14 08:27 Wolfgang Mahnke Resolution open => won't fix
2025-05-14 08:27 Wolfgang Mahnke Note Added: 0022734
2025-05-14 08:28 Wolfgang Mahnke Status resolved => closed
2025-05-14 08:28 Wolfgang Mahnke Note Added: 0022735