![sp_Feed](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_Feed.png)
![sp_TopicIcon](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_TopicIcon.png)
12:19, EEST
![Avatar](https://forum.prosysopc.com/wp-content/sp-resources/forum-avatars/defaults/userdefault.png)
March 28, 2023
![sp_UserOfflineSmall](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
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
![Avatar](https://forum.prosysopc.com/wp-content/sp-resources/forum-avatars/defaults/moderatordefault.png)
Moderators
February 11, 2020
![sp_UserOfflineSmall](https://forum.prosysopc.com/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
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: 518
Currently Online:
24 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 142
pramanj: 86
Francesco Zambon: 83
rocket science: 82
Ibrahim: 76
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 704
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1482
Posts: 6316
Newest Members:
samui, TommyDab, wross, Jeremyknock, Pedromon, DonaldEdism, Miguelplese, Scotanine, katesalas95, PetertumModerators: Jouni Aro: 1015, Pyry: 1, Petri: 0, Bjarne Boström: 994, Jimmy Ni: 26, Matti Siponen: 330, Lusetti: 0
Administrators: admin: 1