Source: Airbus Group ( Oliver Kellogg)
The DDS-XTypes 1.2-beta1 document section 188.8.131.52.4.2 (Union Types) on page 34 first paragraph states:
> (Note that it is not required for every potential discriminator value to be
> associated with a member.)
Supporting this, 184.108.40.206.1 (Notation used for the match criteria) on p.121 states:
> O : UNION_TYPE An object "O" of a Union type as defined in 220.127.116.11.4.2
> * O.selected_member is the member of the union selected
> based on the value of the discriminator. Note that certain
> discriminator values may select no member.
However, 18.104.22.168.3 (Omission and Reordering of Members of Aggregated Types) on page 110 third para states:
> Because union members are identified based on a discriminator value,
> the value of the discriminator member must be serialized before the
> value of the current non-discriminator member.
> Neither member value may be omitted.
I suggest replacing "Neither member value may be omitted" by:
" The discriminator value may not be omitted.
If the discriminator value has an associated member then the member value may not be omitted. "
Section 22.214.171.124.6 (Operation: get_item_count) on page 185 states:
> The "item count" of the data depends on the type of the object.
> * If the object is of a union type, return the number of members in the
> object. This value will always be two: the discriminator and the current
> member corresponding to it.
I suggest replacing the last sentence by:
" This value will be two if the discriminator value has a corresponding member. It will be one if the discriminator value has no corresponding member. "
Reported: DDS-XTypes 1.2b1 — Wed, 29 Nov 2017 16:12 GMT
Disposition: Resolved — DDS-XTypes 1.3
Modify the 126.96.36.199.3 description of union serializarion
Indicate that in the case of a union the only mandatory thing to serialize is the discriminator. The member may be omitted if no branch is selected.
Updated: Tue, 8 Oct 2019 17:55 GMT