2018-07-19 16:37:12 +02:00
|
|
|
#include "rmw_cyclonedds_cpp/serdes.hpp"
|
|
|
|
|
2019-04-29 09:33:13 +02:00
|
|
|
cycser::cycser (std::vector<unsigned char>& dst_)
|
|
|
|
: dst (dst_)
|
|
|
|
, off (0)
|
|
|
|
{
|
|
|
|
dst.reserve (4);
|
|
|
|
/* FIXME: hard code to little endian ... and ignoring endianness in deser */
|
2019-05-03 17:12:51 +08:00
|
|
|
dst.push_back (0);
|
|
|
|
dst.push_back (3);
|
2019-04-29 09:33:13 +02:00
|
|
|
/* options: */
|
2019-05-03 17:12:51 +08:00
|
|
|
dst.push_back (0);
|
|
|
|
dst.push_back (0);
|
2019-04-29 09:33:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cycdeser::cycdeser (const void *data_, size_t size_)
|
|
|
|
: data (static_cast<const char *> (data_) + 4)
|
|
|
|
, pos (0)
|
|
|
|
, lim (size_ - 4)
|
2018-07-19 16:37:12 +02:00
|
|
|
{
|
|
|
|
}
|