04/01/2014
Hi Randy,
I have following scenario for Structures and I wanted to understand what structureType should I consider in these scenarios.
- Base Structure with Optional Fields and Child Structure with no fields.
As per my understanding, in this case, Base Structure Type is considered as StructureWithOptionalFields_1(Structure with optional fields). Should we also consider, Child Structure as StructureWithOptionalFields_1 as it does not have its own fields and all are derived from Base Structure.
In the same case, is it ever possible to have Base Structure as StructureWithOptionalFields_1 while Child Structure as Structure_0(A Structure without optional fields)??
On similar lines, another scenario is - Base Structure as Union_2. Should we always consider Child Structure as Union or can it be StructureWithOptionalFields_1 or Structure_0.
I also wanted to understand, how to specify enum values in nodeSetFiles. It has been observed in several Companion Specs that Enum is specified as <enumname>name_0</enumname>.
Here in name_0, ‘name’ is the field name and ‘0’ is the value of that field. Is this correct as per the specification? Or, should it only contain 0 here.
Regards,
Shubhi Gogna
05/30/2017
If a BaseType has optional fields then all subtypes have optional fields that they inherit from the BaseType even if the subtype has no new optional fields. The UA Binary encoding requires that a single bitmask is used for all optional fields in all subtypes.
Subtypes of unions are not permitted as per Part 3:
https://reference.opcfoundatio.....art3/8.41/
All union DataTypes shall inherit directly from this DataType.
05/30/2017
The _n conversion was adopted to allow XML encodings to preserve the number associated with the value because the XML schema has no place to specify a numeric value. It was NOT supposed to be specified in the NodeSet because the NodeSet has another field to specify the numeric Value. So CS that do this are not right (i think it was a bug in the tool they used to create the NodeSet).
The only place the name_x convention should appear in schema files is in the XML schema associated with a NodeSet.
1 Guest(s)