Variant type node identifier?|OPC UA Implementation: Stacks, Tools, and Samples|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
Variant type node identifier?
Avatar
Johanna Sandström
Member
Members
Forum Posts: 4
Member Since:
02/16/2021
sp_UserOfflineSmall Offline
1
04/23/2021 - 06:11
sp_Permalink sp_Print

In the Quickstart Reference Server there is a node type (?) called Variant (can for example be found under CTT/Scalar/Simulation/Mass/Variant) that has a dynamic, ever changing Datatype. Is there a way to identify this type of node? If so, how?

Avatar
Randy Armstrong
Admin
Forum Posts: 1457
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
04/23/2021 - 10:19
sp_Permalink sp_Print

The Variant Node. by design, has a value that could be any DataType.

The Value of the DataType Attribute is BaseDataType.

When you read a value using the Read service you get a union with a Type mask that tells you what you got in that Read, however, the next Read could return something different.

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