Legacy Issue Number: 16243
Source: DECA ( Rick Warren)
Members of a structure or union type have a small number of metadata attributes, among them:
· optional: indicates that the member may or may not take a value in a particular sample
· must_understand: indicates that a consumer of the data must discard the sample if it encounters such a field in it
The type-level assignability rules detect mismatches respecting non-optional must_understand members. (Such members will always take a value, and therefore there is no possibility of data exchange between the producer and consumer.) However, must_understand members that are optional must be detected on a sample-by-sample basis: any sample that does not contain the offending member can be exchanged, but those that do cannot.
The XML Data Representation allows the encoding of the must_understand attribute within each sample, as does the parameterized encapsulation variants of the Extended CDR Data Representation. However, the traditional, non-parameterized encapsulation variantsused by final and extensible structures and unionsdo not permit this attribute to be expressed. As a result, consumers will not be able to detect when it should have been present, and may therefore present incorrect data to applications.
The traditional CDR encapsulations prefix each optional member with a 32-bit “header” that indicates the presence and size of the member. In contrast, the parameterized CDR encapsulations prefix each member with a 32-bit parameter header that indicates the presence, size, ID, and metadata flags of the member, including must_understand. Therefore, we can reuse the parameter header structure we already have to solve this problem, instead of using just a 32-bit size, with no increase in overhead.
Reorganize the Extended CDR Data Representation section such that it first defines the parameter header structure and the member-ID-to-parameter-ID mapping. Second it shall define the traditional encapsulation variants, and finally it shall define the (fully) parameterized encapsulation variants.
Within the middle sectiontraditional CDRupdate section 184.108.40.206.5.2, “Optional Members.” Remove the description of a 32-bit size, and in its place describe the use of a parameter header. Note that either the four-byte header defined by DDS-RTPS or the 12-byte extended header defined by DDS-XTypes may be used.
Proposed Revised Text:
Reported: DDS-XTypes 1.0b2 — Wed, 4 May 2011 04:00 GMT
Disposition: Resolved — DDS-XTypes 1.0
Update section 220.127.116.11.5.2, “Optional Members.” Instead of preceding each optional member with a 32-bit size, use a parameter header. Note that either the four-byte header defined by DDS-RTPS or the 12-byte extended header defined by DDS-XTypes may be used.
Updated: Fri, 6 Mar 2015 21:48 GMT