Source: Real-Time Innovations ( Gerardo Pardo-Castellote)
Section 7.6.7 (Interoperability of Keyed Topics) states that:
As described in [ RTPS ] Clause 126.96.36.199, “KeyHash (PID_KEY_HASH)”, the key hash for a given object of a keyed type is obtained by first serializing the values of the key members in their declaration order. The algorithm described in that clause shall be amended such that key member values shall be serialized in the ascending orders of their member IDs. For calculation of KeyHash for mutable types, the key members shall be serialized without any parameter encapsulation.
This statement does not explicitly say what to do about the DHEADER.
The section should be amended to state that the DHEADER should also not be serialized for the purpose of the KeyHash computation. This is consistent with the stated "design rationale" of making the computation should be platform independent. The DHEADER could create an ambiguity as it allows to specify an endianess which would result in different hashes if different endianess are used.
In addition it would be desirable to include examples where the types containing the keys are @appendable and @mutable. E.g.
Also we there should be an examples where the key fields themselves are declared as structures with extensibility @appendable or @mutable. E.g.
Reported: DDS-XTypes 1.2 — Wed, 5 Sep 2018 02:08 GMT
Updated: Mon, 1 Apr 2019 17:40 GMT