Expand description
The value-printing code the Fast DDS probe needs to answer with.
dump.rs writes C, for the two generators whose output is a plain
struct. Fast DDS generates a C++ class, so every member is read
through its getter and the expressions have a shape of their own —
the same split fill.rs and fill_cpp.rs have in the other
direction.
sample.x // Cyclone, RTI
sample.x() // Fast DDS
sample.location.x // Cyclone, RTI
sample.location().x() // Fast DDS§Why this is not a self-oracle
The statements read the vendor’s object, which the vendor’s deserialiser filled. A printer that read the wrong member shows up as a disagreement between the implementations, never as a false agreement.
§What the C++ binding has that the C one does not
Three constructs dump.rs refuses are printable here, because the
C++ mapping does define them: a bitset is a struct of public C++
bit-fields, a map is a std::map, and a wstring is a
std::wstring whose element is wchar_t. Only fixed<P, S> stays
refused, and there because fastddsgen rejects it in the IDL before
any accessor exists to read.
Functions§
- dump_
fastdds - Emit the C++ statements that print
sampleas canonical JSON.