123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- namespace { char dummy; }
- using namespace eprosima::fastcdr::exception;
- TopicSample::Message::Message()
- {
-
- m_msgname ="";
-
- m_counter = 0;
-
- m_sendtime = 0;
-
- m_xdata.push_back(1);
- m_xdata.push_back(2);
- }
- TopicSample::Message::~Message()
- {
- }
- TopicSample::Message::Message(const Message &x)
- {
- m_msgname = x.m_msgname;
- m_counter = x.m_counter;
- m_sendtime = x.m_sendtime;
- m_xdata = x.m_xdata;
- }
- TopicSample::Message::Message(Message &&x)
- {
- m_msgname = std::move(x.m_msgname);
- m_counter = x.m_counter;
- m_sendtime = x.m_sendtime;
- m_xdata = std::move(x.m_xdata);
- }
- TopicSample::Message& TopicSample::Message::operator=(const Message &x)
- {
- m_msgname = x.m_msgname;
- m_counter = x.m_counter;
- m_sendtime = x.m_sendtime;
- m_xdata = x.m_xdata;
- return *this;
- }
- TopicSample::Message& TopicSample::Message::operator=(Message &&x)
- {
- m_msgname = std::move(x.m_msgname);
- m_counter = x.m_counter;
- m_sendtime = x.m_sendtime;
- m_xdata = std::move(x.m_xdata);
- return *this;
- }
- size_t TopicSample::Message::getMaxCdrSerializedSize(size_t current_alignment)
- {
- size_t initial_alignment = current_alignment;
- current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + 255 + 1;
- current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
- current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);
- current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
- current_alignment += (100 * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1);
- return 10000000;
- }
- size_t TopicSample::Message::getCdrSerializedSize(const TopicSample::Message& data, size_t current_alignment)
- {
- (void)data;
- size_t initial_alignment = current_alignment;
- current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.msgname().size() + 1;
- current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
- current_alignment += 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);
- current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
- if (data.xdata().size() > 0)
- {
- current_alignment += (data.xdata().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1);
- }
- return current_alignment - initial_alignment;
- }
- void TopicSample::Message::serialize(eprosima::fastcdr::Cdr &scdr) const
- {
- scdr << m_msgname;
- scdr << m_counter;
- scdr << m_sendtime;
- scdr << m_xdata;
- }
- void TopicSample::Message::deserialize(eprosima::fastcdr::Cdr &dcdr)
- {
- dcdr >> m_msgname;
- dcdr >> m_counter;
- dcdr >> m_sendtime;
- dcdr >> m_xdata;
- }
- void TopicSample::Message::msgname(const std::string &_msgname)
- {
- m_msgname = _msgname;
- }
- void TopicSample::Message::msgname(std::string &&_msgname)
- {
- m_msgname = std::move(_msgname);
- }
- const std::string& TopicSample::Message::msgname() const
- {
- return m_msgname;
- }
- std::string& TopicSample::Message::msgname()
- {
- return m_msgname;
- }
- void TopicSample::Message::counter(int32_t _counter)
- {
- m_counter = _counter;
- }
- int32_t TopicSample::Message::counter() const
- {
- return m_counter;
- }
- int32_t& TopicSample::Message::counter()
- {
- return m_counter;
- }
- void TopicSample::Message::sendtime(int64_t _sendtime)
- {
- m_sendtime = _sendtime;
- }
- int64_t TopicSample::Message::sendtime() const
- {
- return m_sendtime;
- }
- int64_t& TopicSample::Message::sendtime()
- {
- return m_sendtime;
- }
- void TopicSample::Message::xdata(const TopicSample::SomeBytes &_xdata)
- {
-
- m_xdata = _xdata;
- }
- void TopicSample::Message::xdata(TopicSample::SomeBytes &&_xdata)
- {
- m_xdata = std::move(_xdata);
- }
- const TopicSample::SomeBytes& TopicSample::Message::xdata() const
- {
- return m_xdata;
- }
- TopicSample::SomeBytes& TopicSample::Message::xdata()
- {
- return m_xdata;
- }
- size_t TopicSample::Message::getKeyMaxCdrSerializedSize(size_t current_alignment)
- {
- size_t current_align = current_alignment;
- return current_align;
- }
- bool TopicSample::Message::isKeyDefined()
- {
- return false;
- }
- void TopicSample::Message::serializeKey(eprosima::fastcdr::Cdr &scdr) const
- {
- (void) scdr;
-
-
-
-
- }
|