ByteString vs. Byte Array|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
ByteString vs. Byte Array
Avatar
ImperatorHUN
Hungary
New Member
Members
Forum Posts: 1
Member Since:
02/06/2018
sp_UserOfflineSmall Offline
1
02/15/2018 - 02:13
sp_Permalink sp_Print

Hi Everyone!

I'm currently developing an OPCUA server with the 'UA.NET Standard' library for testing services. The Device Under Test (DUT) runs an OPCUA Client, which automatically connects to a pre-defined server, discovers certain variables and subscribes to them.

My problem is that the DUT only subscribes to variables with the type 'Byte Array', and I could only configure the .NET server to create a variable with the type 'ByteString'.

 

My variable is defined as a 'BaseDataVariableState' object.

DataType: NodeId - NamespaceIndex: 0, Identifier: 3 (DataTypeIds.Byte)

ValueRank: 1 (ValueRanks.OneDimension)

ArrayDimensions is also set

Value is set as a byte[] .NET object

 

How can I change the configuration to report it's type as 'Byte Array'?

Thank you for your help.

Avatar
Randy Armstrong
Admin
Forum Posts: 1445
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
02/15/2018 - 14:11
sp_Permalink sp_Print

The specification requires clients to treat Byte[] and ByteString as equivalents on the wire.

The .NET code base cannot distinguish between the two.

If the client does not handle a ByteString in place of a Byte[] then it is not conforming to the specification.

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