12:19, EEST
March 28, 2023
Hi,
We use the PROSYS client server java SDK 4.10.4. We’ve encountered cases where servers send EnumValueType directly as the enum values. We haven’t been able to parse them as Enums because we couldn’t get all the states/facets of the sent enum. Is there a way to get EnumValueType as an enum? I’m not sure if that’s even the right think to do because EnumValueType are structures.
15:42, EEST
Moderators
February 11, 2020
Hello,
EnumValueType is a DataType used to define the values of an Enumeration in the EnumValues Property. You can check /Root/Types/DataTypes/BaseDataType/Enumeration/Duplex/EnumValues for an example of using EnumValueType.
The OPC UA Specification states that “Enumerations are encoded as Int32 values” (https://reference.opcfoundation.org/Core/Part6/v105/docs/5.2.4). This means that if the DataType of a Variable Node is Enumeration or any of its Subtypes, reading the Value Attribute of that Node would return the value in Int32 form.
Therefore, using EnumValueType or any other other DataType except for Int32 to encode Enumerations is not allowed. You should contact the manufacturer of the Server and let them know that they’re encoding Enumerations wrong.
Most Users Ever Online: 1919
Currently Online:
49 Guest(s)
Currently Browsing this Page:
2 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 734
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1