encoding/decoding structures|OPC UA Standard|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
encoding/decoding structures
Avatar
Melissa Peterss
New Member
Members
Forum Posts: 1
Member Since:
09/10/2023
sp_UserOfflineSmall Offline
1
09/10/2023 - 09:03
sp_Permalink sp_Print

Hi,

In UA 1.05.02, the handling of encoding/decoding structures is changed i.e. it is either AllowSubTypes or Optional properties as a choice.

Can someone please help with context of this and reasoning?

 

Thanks,

Mohit

Avatar
Randy Armstrong
Admin
Forum Posts: 1568
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/11/2023 - 06:51
sp_Permalink sp_Print sp_EditHistory

There was a flaw in the DataTypeDefinition Structure because it did not have a way to represent fields with abstract DataTypes.

Prior to 1.05.02, the DataTypes of fields with abstract DataTypes needed to be declared a "Structure". This generic representation produced the correct code on the wire but the DataTypeDefinition lost important information.

As of 1.05.02, the DataTypes of fields with abstract DataTypes can be declared as the DataType provided the StructureWithSubtypedValues/AllowsSubtypes flags are set.

There is no difference in the actual encoding on the wire between the <1.05.02 and >=1.05.02. The change only affects the metadata published in the DataTypeDefinition attribute.  If a Server knows it needs to support <1.05.02 clients it can continue to use the <1.05.02 convention of substituting "Structure" for the DataType of fields when the StructureWithSubtypedValues/AllowsSubtypes flags are set.

<1.05.02 client that read a DataTypeDefinition with the new convention should already report an error because they encounter an unrecognized StructureType. This is not ideal but could not be avoided.

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