struct ddsi_sertopic will shortly change a little bit by the removal of
two members that should never have been in it in the first place and
that had to be initialized to 0. Relying on memset makes the source
code independent of this difference.
Signed-off-by: Erik Boasson <eb@ilities.com>
Almost there! Known issues:
* mangling/demangling is still wrong
* it necessarily has to run in the Cyclone default domain id: (1)
Cyclone is today still limited to a single domain at a time; and (2)
there is the "extra" participant that pops up here and there for
creating guard conditions and waitsets without a node existing
* almost all query operations create a reader for a builtin topic and
throw it away afterward, that might be a little excessive (on the other
hand, those readers are pretty cheap, so using them as a throwaway
reader is not so bad).
Still missing:
* get_service_names_and_types
* get_service_names_and_types_by_node
I haven't been able to actually try everything yet, so bugs are probably
lurking here-and-there.
This commit adds stubs for the missing functions and fixes a few bugs in
the serialisation code and topic creation. With these changes, the
talker and listener demos of ROS2 Crystal Clemmys work.
The changes in this commit make it compile with ROS2 Crystal Clemmys and
current Cyclone DDS. The RMW interface of ROS2 was modified in some
ways and extended in some other ways since Bouncy Bolson; and similarly,
Cyclone now has a somewhat reasonable interface for custom sample
representations and serialization, but the code in this commit probably
contains mistakes in using it.
Therefore, the expectation should be that this doesn't actually work
just yet, though it probably is quite close. As the old state wouldn't
build at all with any version of Cyclone DDS except the early commits,
this is significant progress already.