30#include <fastcdr/Cdr.h>
32#include <fastcdr/exceptions/BadParamException.h>
33using namespace eprosima::fastcdr::exception;
37#define sensor_msgs_msg_PointField_max_cdr_typesize 272ULL;
38#define std_msgs_msg_Time_max_cdr_typesize 8ULL;
39#define sensor_msgs_msg_PointCloud2_max_cdr_typesize 27597ULL;
40#define std_msgs_msg_Header_max_cdr_typesize 268ULL;
41#define sensor_msgs_msg_PointField_max_key_cdr_typesize 0ULL;
42#define std_msgs_msg_Time_max_key_cdr_typesize 0ULL;
43#define sensor_msgs_msg_PointCloud2_max_key_cdr_typesize 0ULL;
44#define std_msgs_msg_Header_max_key_cdr_typesize 0ULL;
110 m_header = std::move(x.m_header);
112 m_height = x.m_height;
116 m_fields = std::move(x.m_fields);
118 m_is_bigendian = x.m_is_bigendian;
120 m_point_step = x.m_point_step;
122 m_row_step = x.m_row_step;
124 m_data = std::move(x.m_data);
126 m_is_dense = x.m_is_dense;
158 m_header = std::move(x.m_header);
160 m_height = x.m_height;
164 m_fields = std::move(x.m_fields);
166 m_is_bigendian = x.m_is_bigendian;
168 m_point_step = x.m_point_step;
170 m_row_step = x.m_row_step;
172 m_data = std::move(x.m_data);
174 m_is_dense = x.m_is_dense;
189 return !(*
this == x);
222 for(
size_t a = 0; a < data.
fields().size(); ++a)
243 if (data.
data().size() > 0)
258 eprosima::fastcdr::Cdr& scdr)
const
269 scdr << m_is_bigendian;
271 scdr << m_point_step;
281 eprosima::fastcdr::Cdr& dcdr)
292 dcdr >> m_is_bigendian;
294 dcdr >> m_point_step;
308 const std_msgs::msg::Header& _header)
318 std_msgs::msg::Header&& _header)
320 m_header = std::move(_header);
402 const std::vector<sensor_msgs::msg::PointField>& _fields)
412 std::vector<sensor_msgs::msg::PointField>&& _fields)
414 m_fields = std::move(_fields);
442 m_is_bigendian = _is_bigendian;
451 return m_is_bigendian;
460 return m_is_bigendian;
468 uint32_t _point_step)
470 m_point_step = _point_step;
498 m_row_step = _row_step;
524 const std::vector<uint8_t>& _data)
534 std::vector<uint8_t>&& _data)
536 m_data = std::move(_data);
564 m_is_dense = _is_dense;
605 eprosima::fastcdr::Cdr& scdr)
const
#define sensor_msgs_msg_PointCloud2_max_cdr_typesize
#define sensor_msgs_msg_PointCloud2_max_key_cdr_typesize
return current_alignment initial_alignment
This class represents the structure PointCloud2 defined by the user in the IDL file.
std_msgs::msg::Header m_header
eProsima_user_DllExport bool operator==(const PointCloud2 &x) const
Comparison operator.
eProsima_user_DllExport const std::vector< uint8_t > & data() const
This function returns a constant reference to member data
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type
eProsima_user_DllExport bool is_bigendian() const
This function returns the value of member is_bigendian
std::vector< sensor_msgs::msg::PointField > m_fields
static eProsima_user_DllExport size_t getMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of an object depending on the buffer alignment.
eProsima_user_DllExport const std::vector< sensor_msgs::msg::PointField > & fields() const
This function returns a constant reference to member fields
eProsima_user_DllExport uint32_t width() const
This function returns the value of member width
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
eProsima_user_DllExport void fields(const std::vector< sensor_msgs::msg::PointField > &_fields)
This function copies the value in member fields
eProsima_user_DllExport PointCloud2()
Default constructor.
eProsima_user_DllExport bool operator!=(const PointCloud2 &x) const
Comparison operator.
eProsima_user_DllExport const std_msgs::msg::Header & header() const
This function returns a constant reference to member header
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
eProsima_user_DllExport uint32_t row_step() const
This function returns the value of member row_step
eProsima_user_DllExport void data(const std::vector< uint8_t > &_data)
This function copies the value in member data
std::vector< uint8_t > m_data
eProsima_user_DllExport uint32_t point_step() const
This function returns the value of member point_step
static eProsima_user_DllExport size_t getCdrSerializedSize(const sensor_msgs::msg::PointCloud2 &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
static eProsima_user_DllExport 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...
eProsima_user_DllExport bool is_dense() const
This function returns the value of member is_dense
eProsima_user_DllExport ~PointCloud2()
Default destructor.
eProsima_user_DllExport uint32_t height() const
This function returns the value of member height
eProsima_user_DllExport PointCloud2 & operator=(const PointCloud2 &x)
Copy assignment.
eProsima_user_DllExport void header(const std_msgs::msg::Header &_header)
This function copies the value in member header
static eProsima_user_DllExport size_t getCdrSerializedSize(const sensor_msgs::msg::PointField &data, size_t current_alignment=0)
此函数返回数据的序列化大小 取决于缓冲区对齐。