17#ifndef CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_H_
18#define CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_H_
27#include "fastcdr/Cdr.h"
78 inline void timestamp(int32_t _timestamp) { m_timestamp = _timestamp; }
84 inline int32_t
timestamp()
const {
return m_timestamp; }
95 inline void seq(int32_t _seq) { m_seq = _seq; }
101 inline int32_t
seq()
const {
return m_seq; }
107 inline int32_t&
seq() {
return m_seq; }
112 inline void data(
const std::string& _data) { m_data = _data; }
118 inline void data(std::string&& _data) { m_data = std::move(_data); }
124 inline const std::string&
data()
const {
return m_data; }
130 inline std::string&
data() {
return m_data; }
135 inline void datatype(
const std::string& _datatype) { m_datatype = _datatype; }
142 m_datatype = std::move(_datatype);
149 inline const std::string&
datatype()
const {
return m_datatype; }
155 inline std::string&
datatype() {
return m_datatype; }
173 size_t current_alignment = 0);
179 void serialize(eprosima::fastcdr::Cdr& cdr)
const;
212 std::string m_datatype;
This class represents the structure UnderlayMessage defined by the user in the IDL file.
int32_t seq() const
This function returns the value of member seq
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
void datatype(const std::string &_datatype)
This function copies the value in member datatype
void datatype(std::string &&_datatype)
This function moves the value in member datatype
int32_t timestamp() const
This function returns the value of member timestamp
void data(std::string &&_data)
This function moves the value in member data
int32_t & seq()
This function returns a reference to member seq
static bool isKeyDefined()
This function tells you if the Key has been defined for this type
static size_t getCdrSerializedSize(const UnderlayMessage &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
static size_t getMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of an object depending on the buffer alignment.
void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
static size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
~UnderlayMessage()
Default destructor.
const std::string & data() const
This function returns a constant reference to member data
std::string & data()
This function returns a reference to member data
UnderlayMessage & operator=(const UnderlayMessage &x)
Copy assignment.
const std::string & datatype() const
This function returns a constant reference to member datatype
void timestamp(int32_t _timestamp)
This function sets a value in member timestamp
void seq(int32_t _seq)
This function sets a value in member seq
void data(const std::string &_data)
This function copies the value in member data
UnderlayMessage()
Default constructor.
std::string & datatype()
This function returns a reference to member datatype
int32_t & timestamp()
This function returns a reference to member timestamp
void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.