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;
219 #endif // CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_H_ std::string & data()
This function returns a reference to member data.
Definition: underlay_message.h:130
void seq(int32_t _seq)
This function sets a value in member seq.
Definition: underlay_message.h:95
int32_t & timestamp()
This function returns a reference to member timestamp.
Definition: underlay_message.h:90
This class represents the structure UnderlayMessage defined by the user in the IDL file...
Definition: underlay_message.h:38
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
void datatype(std::string &&_datatype)
This function moves the value in member datatype.
Definition: underlay_message.h:141
const std::string & data() const
This function returns a constant reference to member data.
Definition: underlay_message.h:124
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...
const std::string & datatype() const
This function returns a constant reference to member datatype.
Definition: underlay_message.h:149
static bool isKeyDefined()
This function tells you if the Key has been defined for this type.
std::string & datatype()
This function returns a reference to member datatype.
Definition: underlay_message.h:155
void datatype(const std::string &_datatype)
This function copies the value in member datatype.
Definition: underlay_message.h:135
void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
int32_t seq() const
This function returns the value of member seq.
Definition: underlay_message.h:101
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 data(const std::string &_data)
This function copies the value in member data.
Definition: underlay_message.h:112
void data(std::string &&_data)
This function moves the value in member data.
Definition: underlay_message.h:118
~UnderlayMessage()
Default destructor.
int32_t & seq()
This function returns a reference to member seq.
Definition: underlay_message.h:107
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
UnderlayMessage & operator=(const UnderlayMessage &x)
Copy assignment.
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.
void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
void timestamp(int32_t _timestamp)
This function sets a value in member timestamp.
Definition: underlay_message.h:78
int32_t timestamp() const
This function returns the value of member timestamp.
Definition: underlay_message.h:84
UnderlayMessage()
Default constructor.