View Issue Details

IDProjectCategoryView StatusLast Update
0010307OPC-11030: UA Modelling Best PracticesDocumentation Erratapublic2025-04-28 11:04
ReporterMartin Lang Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
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

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-04-28 11:04 Martin Lang New Issue