Must Enumeration definitions in a Node Set provide EnumStrings or EnumValues?|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Must Enumeration definitions in a Node Set provide EnumStrings or EnumValues?
Avatar
Markus Horstmann
New Member
Members
Forum Posts: 2
Member Since:
02/03/2015
sp_UserOfflineSmall Offline
1
06/20/2023 - 14:12
sp_Permalink sp_Print

Consider this declaration:

  <UADataType NodeId="ns=1;g=3adbe6d1-d00c-4483-9625-fb323383d7a2" BrowseName="1:TestEnum1">
    <DisplayName>TestEnum1</DisplayName>
    <Description></Description>
    <Category>Base Info Base Types</Category>
    <References>
      <Reference ReferenceType="HasSubtype" IsForward="false">Enumeration</Reference>
    </References>
    <Definition Name="1:TestEnum1">
      <Field Name="Enum1" Value="1">
        <DisplayName></DisplayName>
        <Description></Description>
      </Field>
      <Field Name="Enum2" Value="2">
        <DisplayName></DisplayName>
        <Description></Description>
      </Field>
    </Definition>
  </UADataType>
An EnumStrings or EnumValues does not seem to provide any additional information, and the specification (UA Part 3: Address Space Model - 5.8.3 DataType NodeClass (opcfoundation.org)) marks them as optional.
 
Is it a correct reading that these properties are optional for enumeration types, or would an authoring tool be better off generating these?
Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
06/20/2023 - 19:58
sp_Permalink sp_Print

From: https://reference.opcfoundatio.....docs/5.8.3

 

Enumeration DataTypes shall have either an EnumStrings Property or an EnumValues Property. They shall not be applied for other DataTypes.

The Definition is used to populate the DataTypeDefinition Attribute which results in some duplication of information. Tools need to generate both.

Avatar
Markus Horstmann
New Member
Members
Forum Posts: 2
Member Since:
02/03/2015
sp_UserOfflineSmall Offline
3
06/21/2023 - 17:53
sp_Permalink sp_Print

Randy Armstrong said
From: https://reference.opcfoundatio.....docs/5.8.3

 

Enumeration DataTypes shall have either an EnumStrings Property or an EnumValues Property. They shall not be applied for other DataTypes.

The Definition is used to populate the DataTypeDefinition Attribute which results in some duplication of information. Tools need to generate both.

  

Oops, I overlooked that sentence. Thanks for helping me read the spec!

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 48
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855