OPC UA Generic Server - node "Array of Bytes" has value of type "ByteString" instead of "Array of Bytes". Is it correct?|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
OPC UA Generic Server - node "Array of Bytes" has value of type "ByteString" instead of "Array of Bytes". Is it correct?
Avatar
Jarosław Jasiński
Member
Members
Forum Posts: 5
Member Since:
12/04/2015
sp_UserOfflineSmall Offline
1
03/30/2016 - 06:25
sp_Permalink sp_Print

The id of the node is "ns=2;i=10302". It's full name is "Object/Data/Static/Array/ByteValue". The type of Value attribute is ByteString not Byte[].

All other sibling nodes like  "Object/Data/Static/Array/SByte" or "Object/Data/Static/Array/In16" have attribute Value of type array, respectively SByte[] and Int16[].

Does using ByteString instead of Byte[] is correct? If yes then is using Byte[] incorrect?

Avatar
Guest
Guests
2
03/30/2016 - 07:29
sp_Permalink sp_Print

Hello,

This is a good question and fortunately has an easy answer.

In some development languages such as Java and .NET, they cannot distinguish the difference between a ByteString and Byte[] array. For those languages they're seen the same thing and therefore interpreted [typically] as ByteString.

This poses more of a problem for the other development languages that can distinguish a difference between them. I think in UA 1.02 specification a clause was added to force Servers to automatically convert ByteString-to-Byte[] and vice-versa.

So to answer your question, this behavior is OK.

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