Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Enum discovery and resolution on client
March 28, 2023
12:19, EEST
Avatar
gaurav.kumar3
Member
Members
Forum Posts: 5
Member Since:
March 28, 2023
sp_UserOfflineSmall Offline

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.

March 28, 2023
15:42, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 346
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

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.

March 28, 2023
16:03, EEST
Avatar
gaurav.kumar3
Member
Members
Forum Posts: 5
Member Since:
March 28, 2023
sp_UserOfflineSmall Offline

Thanks Matti. I was of the same opinion while trying to find a solution.

Forum Timezone: Europe/Helsinki

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, edgardo3518

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1