17#ifndef CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_H_
18#define CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_H_
29#include "fastcdr/Cdr.h"
80 inline void timestamp(uint64_t _timestamp) { m_timestamp = _timestamp; }
86 inline uint64_t
timestamp()
const {
return m_timestamp; }
92 inline uint64_t&
timestamp() {
return m_timestamp; }
97 inline void seq(uint64_t _seq) { m_seq = _seq; }
103 inline uint64_t
seq()
const {
return m_seq; }
109 inline uint64_t&
seq() {
return m_seq; }
114 inline void data(
const std::string& _data) { m_data = _data; }
120 inline void data(std::string&& _data) { m_data = std::move(_data); }
126 inline const std::string&
data()
const {
return m_data; }
132 inline std::string&
data() {
return m_data; }
150 size_t current_alignment = 0);
156 void serialize(eprosima::fastcdr::Cdr& cdr)
const;
186 uint64_t m_timestamp;
This class represents the structure UnderlayMessage defined by the user in the IDL file.
void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
void data(std::string &&_data)
This function moves the value in member data
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.
uint64_t seq() const
This function returns the value of member seq
void seq(uint64_t _seq)
This function sets a value in member seq
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.
uint64_t & timestamp()
This function returns a reference to member timestamp
void timestamp(uint64_t _timestamp)
This function sets a value in member timestamp
uint64_t & seq()
This function returns a reference to member seq
void data(const std::string &_data)
This function copies the value in member data
UnderlayMessage()
Default constructor.
void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
uint64_t timestamp() const
This function returns the value of member timestamp