update to allow talker/listener demos to run

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.
This commit is contained in:
Erik Boasson 2019-05-03 17:12:51 +08:00
parent c9a23a9b8a
commit 315d39a2ec
4 changed files with 182 additions and 36 deletions

View file

@ -5,13 +5,12 @@ cycser::cycser (std::vector<unsigned char>& dst_)
, off (0)
{
dst.reserve (4);
unsigned char *magic = dst.data ();
/* FIXME: hard code to little endian ... and ignoring endianness in deser */
magic[0] = 0;
magic[1] = 3;
dst.push_back (0);
dst.push_back (3);
/* options: */
magic[2] = 0;
magic[3] = 0;
dst.push_back (0);
dst.push_back (0);
}
cycdeser::cycdeser (const void *data_, size_t size_)