If the Variable has child nodes, the fields of the SerializationFieldDataType representing the Variable are generated as shown in Figure 12 for the V1 Variable (V1Type):
- The Value of the Variable is mapped into a field with the name “Value” with the DataType of the Value of the V1 Variable.
- A field with name “Children” is inserted after the “Value” field. Its DataType is a new Structure DataType containing as many fields as there are children of the serialized Variable. The name of each of those fields equals the BrowseName of the mapped child. Servers shall make sure that field names are unique (e.g., two BrowseNames can have the same text field but different namespaces). The SerializationFieldDataType of each of those fields equals the DataType of the mapped child Variable if the respective child is a “leaf” of the Object tree. This is the case for Properties and “childless” Variables (see Figure 12, left column, V1Type and V1ChildrenType with “Include-Properties” set to False). If the child Variable itself has child nodes, the SerializationFieldDataType of the field representing the Variable is a Structure DataType generated according to the same rules which were applied to the parent Variable (recursiveness).
If “Include-Properties” are True, the SerializationFieldDataType is always a Structure DataType and contains additional fields mapping the corresponding Properties as shown in Figure 12 (middle and right column, V1Type and V2Type, examples for IncludeStatus and IncludeSourceTimestamp Properties).
Figure 12 – IncludeStatus and IncludeSourceTimestamp Properties Example with child Node
Figure 13, Figure 14 and Figure 15 demonstrate the SerializationFieldDataType generated if the “Include-Properties” (see 6.3.9) are set to False, which allows representing “leaves” of the Object tree as “simple” fields.
Figure 13 shows the SerializationFieldDataType for Variables with Properties and Variables.
Figure 13 – Serialization of Variables with children