This class represents the structure UnderlayMessage defined by the user in the IDL file.
更多...
#include <underlay_message.h>
|
| UnderlayMessage () |
| Default constructor.
|
|
| ~UnderlayMessage () |
| Default destructor.
|
|
| UnderlayMessage (const UnderlayMessage &x) |
| Copy constructor.
|
|
| UnderlayMessage (UnderlayMessage &&x) |
| Move constructor.
|
|
UnderlayMessage & | operator= (const UnderlayMessage &x) |
| Copy assignment.
|
|
UnderlayMessage & | operator= (UnderlayMessage &&x) |
| Move assignment.
|
|
void | timestamp (uint64_t _timestamp) |
| This function sets a value in member timestamp
|
|
uint64_t | timestamp () const |
| This function returns the value of member timestamp
|
|
uint64_t & | timestamp () |
| This function returns a reference to member timestamp
|
|
void | seq (uint64_t _seq) |
| This function sets a value in member seq
|
|
uint64_t | seq () const |
| This function returns the value of member seq
|
|
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
|
|
void | data (std::string &&_data) |
| This function moves the value in member data
|
|
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
|
|
void | serialize (eprosima::fastcdr::Cdr &cdr) const |
| This function serializes an object using CDR serialization.
|
|
void | deserialize (eprosima::fastcdr::Cdr &cdr) |
| This function deserializes an object using CDR serialization.
|
|
void | serializeKey (eprosima::fastcdr::Cdr &cdr) const |
| This function serializes the key members of an object using CDR serialization.
|
|
|
static size_t | getMaxCdrSerializedSize (size_t current_alignment=0) |
| This function returns the maximum serialized size of an object depending on the buffer alignment.
|
|
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 | getKeyMaxCdrSerializedSize (size_t current_alignment=0) |
| This function returns the maximum serialized size of the Key of an object depending on the buffer alignment.
|
|
static bool | isKeyDefined () |
| This function tells you if the Key has been defined for this type
|
|
This class represents the structure UnderlayMessage defined by the user in the IDL file.
在文件 underlay_message.h 第 40 行定义.
◆ UnderlayMessage() [1/3]
apollo::cyber::transport::UnderlayMessage::UnderlayMessage |
( |
| ) |
|
Default constructor.
在文件 underlay_message.cc 第 32 行定义.
32 {
33 m_timestamp = 0;
34 m_seq = 0;
35 m_data = "";
36}
◆ ~UnderlayMessage()
apollo::cyber::transport::UnderlayMessage::~UnderlayMessage |
( |
| ) |
|
◆ UnderlayMessage() [2/3]
apollo::cyber::transport::UnderlayMessage::UnderlayMessage |
( |
const UnderlayMessage & |
x | ) |
|
Copy constructor.
- 参数
-
在文件 underlay_message.cc 第 40 行定义.
40 {
41 m_timestamp = x.m_timestamp;
42 m_seq = x.m_seq;
43 m_data = x.m_data;
44}
◆ UnderlayMessage() [3/3]
apollo::cyber::transport::UnderlayMessage::UnderlayMessage |
( |
UnderlayMessage && |
x | ) |
|
Move constructor.
- 参数
-
在文件 underlay_message.cc 第 46 行定义.
46 {
47 m_timestamp = x.m_timestamp;
48 m_seq = x.m_seq;
49 m_data = std::move(x.m_data);
50}
◆ data() [1/4]
std::string & apollo::cyber::transport::UnderlayMessage::data |
( |
| ) |
|
|
inline |
This function returns a reference to member data
- 返回
- Reference to member data
在文件 underlay_message.h 第 132 行定义.
◆ data() [2/4]
const std::string & apollo::cyber::transport::UnderlayMessage::data |
( |
| ) |
const |
|
inline |
This function returns a constant reference to member data
- 返回
- Constant reference to member data
在文件 underlay_message.h 第 126 行定义.
◆ data() [3/4]
void apollo::cyber::transport::UnderlayMessage::data |
( |
const std::string & |
_data | ) |
|
|
inline |
This function copies the value in member data
- 参数
-
_data | New value to be copied in member data |
在文件 underlay_message.h 第 114 行定义.
◆ data() [4/4]
void apollo::cyber::transport::UnderlayMessage::data |
( |
std::string && |
_data | ) |
|
|
inline |
This function moves the value in member data
- 参数
-
_data | New value to be moved in member data |
在文件 underlay_message.h 第 120 行定义.
120{ m_data = std::move(_data); }
◆ deserialize()
void apollo::cyber::transport::UnderlayMessage::deserialize |
( |
eprosima::fastcdr::Cdr & |
cdr | ) |
|
This function deserializes an object using CDR serialization.
- 参数
-
cdr | CDR serialization object. |
在文件 underlay_message.cc 第 95 行定义.
95 {
96 dcdr >> m_timestamp;
97 dcdr >> m_seq;
98 dcdr >> m_data;
99}
◆ getCdrSerializedSize()
size_t apollo::cyber::transport::UnderlayMessage::getCdrSerializedSize |
( |
const UnderlayMessage & |
data, |
|
|
size_t |
current_alignment = 0 |
|
) |
| |
|
static |
This function returns the serialized size of a data depending on the buffer alignment.
- 参数
-
data | Data which is calculated its serialized size. |
current_alignment | Buffer alignment. |
- 返回
- Serialized size.
在文件 underlay_message.cc 第 72 行定义.
73 {
74 size_t initial_alignment = current_alignment;
75
76 current_alignment +=
77 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);
78
79 current_alignment +=
80 8 + eprosima::fastcdr::Cdr::alignment(current_alignment, 8);
81
82 current_alignment += 4 +
83 eprosima::fastcdr::Cdr::alignment(current_alignment, 4) +
84 data.data().size() + 1;
85
86 return current_alignment - initial_alignment;
87}
const std::string & data() const
This function returns a constant reference to member data
◆ getKeyMaxCdrSerializedSize()
size_t apollo::cyber::transport::UnderlayMessage::getKeyMaxCdrSerializedSize |
( |
size_t |
current_alignment = 0 | ) |
|
|
static |
This function returns the maximum serialized size of the Key of an object depending on the buffer alignment.
- 参数
-
current_alignment | Buffer alignment. |
- 返回
- Maximum serialized size.
在文件 underlay_message.cc 第 101 行定义.
101 {
103}
#define UnderlayMessage_max_key_cdr_typesize
◆ getMaxCdrSerializedSize()
size_t apollo::cyber::transport::UnderlayMessage::getMaxCdrSerializedSize |
( |
size_t |
current_alignment = 0 | ) |
|
|
static |
This function returns the maximum serialized size of an object depending on the buffer alignment.
- 参数
-
current_alignment | Buffer alignment. |
- 返回
- Maximum serialized size.
在文件 underlay_message.cc 第 68 行定义.
68 {
70}
#define UnderlayMessage_max_cdr_typesize
◆ isKeyDefined()
bool apollo::cyber::transport::UnderlayMessage::isKeyDefined |
( |
| ) |
|
|
static |
◆ operator=() [1/2]
Copy assignment.
- 参数
-
在文件 underlay_message.cc 第 52 行定义.
52 {
53 m_timestamp = x.m_timestamp;
54 m_seq = x.m_seq;
55 m_data = x.m_data;
56
57 return *this;
58}
◆ operator=() [2/2]
Move assignment.
- 参数
-
在文件 underlay_message.cc 第 60 行定义.
60 {
61 m_timestamp = x.m_timestamp;
62 m_seq = x.m_seq;
63 m_data = std::move(x.m_data);
64
65 return *this;
66}
◆ seq() [1/3]
uint64_t & apollo::cyber::transport::UnderlayMessage::seq |
( |
| ) |
|
|
inline |
This function returns a reference to member seq
- 返回
- Reference to member seq
在文件 underlay_message.h 第 109 行定义.
◆ seq() [2/3]
uint64_t apollo::cyber::transport::UnderlayMessage::seq |
( |
| ) |
const |
|
inline |
◆ seq() [3/3]
void apollo::cyber::transport::UnderlayMessage::seq |
( |
uint64_t |
_seq | ) |
|
|
inline |
This function sets a value in member seq
- 参数
-
_seq | New value for member seq |
在文件 underlay_message.h 第 97 行定义.
◆ serialize()
void apollo::cyber::transport::UnderlayMessage::serialize |
( |
eprosima::fastcdr::Cdr & |
cdr | ) |
const |
This function serializes an object using CDR serialization.
- 参数
-
cdr | CDR serialization object. |
在文件 underlay_message.cc 第 89 行定义.
89 {
90 scdr << m_timestamp;
91 scdr << m_seq;
92 scdr << m_data;
93}
◆ serializeKey()
void apollo::cyber::transport::UnderlayMessage::serializeKey |
( |
eprosima::fastcdr::Cdr & |
cdr | ) |
const |
This function serializes the key members of an object using CDR serialization.
- 参数
-
cdr | CDR serialization object. |
在文件 underlay_message.cc 第 107 行定义.
107 {
108 (void)scdr;
109}
◆ timestamp() [1/3]
uint64_t & apollo::cyber::transport::UnderlayMessage::timestamp |
( |
| ) |
|
|
inline |
This function returns a reference to member timestamp
- 返回
- Reference to member timestamp
在文件 underlay_message.h 第 92 行定义.
92{ return m_timestamp; }
◆ timestamp() [2/3]
uint64_t apollo::cyber::transport::UnderlayMessage::timestamp |
( |
| ) |
const |
|
inline |
This function returns the value of member timestamp
- 返回
- Value of member timestamp
在文件 underlay_message.h 第 86 行定义.
86{ return m_timestamp; }
◆ timestamp() [3/3]
void apollo::cyber::transport::UnderlayMessage::timestamp |
( |
uint64_t |
_timestamp | ) |
|
|
inline |
This function sets a value in member timestamp
- 参数
-
_timestamp | New value for member timestamp |
在文件 underlay_message.h 第 80 行定义.
80{ m_timestamp = _timestamp; }
该类的文档由以下文件生成: