This class represents the structure PointCloud2 defined by the user in the IDL file. More...
#include <PointCloud2.h>
Public Member Functions | |
eProsima_user_DllExport void | data (const std::vector< uint8_t > &_data) |
This function copies the value in member data. More... | |
eProsima_user_DllExport void | data (std::vector< uint8_t > &&_data) |
This function moves the value in member data. More... | |
eProsima_user_DllExport const std::vector< uint8_t > & | data () const |
This function returns a constant reference to member data. More... | |
eProsima_user_DllExport std::vector< uint8_t > & | data () |
This function returns a reference to member data. More... | |
eProsima_user_DllExport void | deserialize (eprosima::fastcdr::Cdr &cdr) |
This function deserializes an object using CDR serialization. More... | |
eProsima_user_DllExport void | fields (const std::vector< sensor_msgs::msg::PointField > &_fields) |
This function copies the value in member fields. More... | |
eProsima_user_DllExport void | fields (std::vector< sensor_msgs::msg::PointField > &&_fields) |
This function moves the value in member fields. More... | |
eProsima_user_DllExport const std::vector< sensor_msgs::msg::PointField > & | fields () const |
This function returns a constant reference to member fields. More... | |
eProsima_user_DllExport std::vector< sensor_msgs::msg::PointField > & | fields () |
This function returns a reference to member fields. More... | |
eProsima_user_DllExport void | header (const std_msgs::msg::Header &_header) |
This function copies the value in member header. More... | |
eProsima_user_DllExport void | header (std_msgs::msg::Header &&_header) |
This function moves the value in member header. More... | |
eProsima_user_DllExport const std_msgs::msg::Header & | header () const |
This function returns a constant reference to member header. More... | |
eProsima_user_DllExport std_msgs::msg::Header & | header () |
This function returns a reference to member header. More... | |
eProsima_user_DllExport void | height (uint32_t _height) |
This function sets a value in member height. More... | |
eProsima_user_DllExport uint32_t | height () const |
This function returns the value of member height. More... | |
eProsima_user_DllExport uint32_t & | height () |
This function returns a reference to member height. More... | |
eProsima_user_DllExport void | is_bigendian (bool _is_bigendian) |
This function sets a value in member is_bigendian. More... | |
eProsima_user_DllExport bool | is_bigendian () const |
This function returns the value of member is_bigendian. More... | |
eProsima_user_DllExport bool & | is_bigendian () |
This function returns a reference to member is_bigendian. More... | |
eProsima_user_DllExport void | is_dense (bool _is_dense) |
This function sets a value in member is_dense. More... | |
eProsima_user_DllExport bool | is_dense () const |
This function returns the value of member is_dense. More... | |
eProsima_user_DllExport bool & | is_dense () |
This function returns a reference to member is_dense. More... | |
eProsima_user_DllExport bool | operator!= (const PointCloud2 &x) const |
Comparison operator. More... | |
eProsima_user_DllExport PointCloud2 & | operator= (const PointCloud2 &x) |
Copy assignment. More... | |
eProsima_user_DllExport PointCloud2 & | operator= (PointCloud2 &&x) noexcept |
Move assignment. More... | |
eProsima_user_DllExport bool | operator== (const PointCloud2 &x) const |
Comparison operator. More... | |
eProsima_user_DllExport void | point_step (uint32_t _point_step) |
This function sets a value in member point_step. More... | |
eProsima_user_DllExport uint32_t | point_step () const |
This function returns the value of member point_step. More... | |
eProsima_user_DllExport uint32_t & | point_step () |
This function returns a reference to member point_step. More... | |
eProsima_user_DllExport | PointCloud2 () |
Default constructor. More... | |
eProsima_user_DllExport | PointCloud2 (const PointCloud2 &x) |
Copy constructor. More... | |
eProsima_user_DllExport | PointCloud2 (PointCloud2 &&x) noexcept |
Move constructor. More... | |
eProsima_user_DllExport void | row_step (uint32_t _row_step) |
This function sets a value in member row_step. More... | |
eProsima_user_DllExport uint32_t | row_step () const |
This function returns the value of member row_step. More... | |
eProsima_user_DllExport uint32_t & | row_step () |
This function returns a reference to member row_step. More... | |
eProsima_user_DllExport void | serialize (eprosima::fastcdr::Cdr &cdr) const |
This function serializes an object using CDR serialization. More... | |
eProsima_user_DllExport void | serializeKey (eprosima::fastcdr::Cdr &cdr) const |
This function serializes the key members of an object using CDR serialization. More... | |
eProsima_user_DllExport void | width (uint32_t _width) |
This function sets a value in member width. More... | |
eProsima_user_DllExport uint32_t | width () const |
This function returns the value of member width. More... | |
eProsima_user_DllExport uint32_t & | width () |
This function returns a reference to member width. More... | |
eProsima_user_DllExport | ~PointCloud2 () |
Default destructor. More... | |
Static Public Member Functions | |
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. More... | |
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 alignment. More... | |
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. More... | |
static eProsima_user_DllExport bool | isKeyDefined () |
This function tells you if the Key has been defined for this type. More... | |
Private Attributes | |
std::vector< uint8_t > | m_data |
std::vector< sensor_msgs::msg::PointField > | m_fields |
std_msgs::msg::Header | m_header |
uint32_t | m_height |
bool | m_is_bigendian |
bool | m_is_dense |
uint32_t | m_point_step |
uint32_t | m_row_step |
uint32_t | m_width |
This class represents the structure PointCloud2 defined by the user in the IDL file.
Definition at line 73 of file PointCloud2.h.
sensor_msgs::msg::PointCloud2::PointCloud2 | ( | ) |
Default constructor.
Definition at line 46 of file PointCloud2.cpp.
sensor_msgs::msg::PointCloud2::~PointCloud2 | ( | ) |
Default destructor.
Definition at line 68 of file PointCloud2.cpp.
sensor_msgs::msg::PointCloud2::PointCloud2 | ( | const PointCloud2 & | x | ) |
Copy constructor.
x | Reference to the object sensor_msgs::msg::PointCloud2 that will be copied. |
Definition at line 72 of file PointCloud2.cpp.
References m_data, m_fields, m_header, m_height, m_is_bigendian, m_is_dense, m_point_step, m_row_step, and m_width.
|
noexcept |
Move constructor.
x | Reference to the object sensor_msgs::msg::PointCloud2 that will be copied. |
Definition at line 86 of file PointCloud2.cpp.
void sensor_msgs::msg::PointCloud2::data | ( | const std::vector< uint8_t > & | _data | ) |
This function copies the value in member data.
_data | New value to be copied in member data |
Definition at line 429 of file PointCloud2.cpp.
Referenced by getCdrSerializedSize().
void sensor_msgs::msg::PointCloud2::data | ( | std::vector< uint8_t > && | _data | ) |
This function moves the value in member data.
_data | New value to be moved in member data |
Definition at line 439 of file PointCloud2.cpp.
const std::vector< uint8_t > & sensor_msgs::msg::PointCloud2::data | ( | ) | const |
This function returns a constant reference to member data.
Definition at line 449 of file PointCloud2.cpp.
std::vector< uint8_t > & sensor_msgs::msg::PointCloud2::data | ( | ) |
This function returns a reference to member data.
Definition at line 458 of file PointCloud2.cpp.
void sensor_msgs::msg::PointCloud2::deserialize | ( | eprosima::fastcdr::Cdr & | cdr | ) |
This function deserializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 195 of file PointCloud2.cpp.
Referenced by sensor_msgs::msg::PointCloud2PubSubType::deserialize().
void sensor_msgs::msg::PointCloud2::fields | ( | const std::vector< sensor_msgs::msg::PointField > & | _fields | ) |
This function copies the value in member fields.
_fields | New value to be copied in member fields |
Definition at line 307 of file PointCloud2.cpp.
Referenced by getCdrSerializedSize().
void sensor_msgs::msg::PointCloud2::fields | ( | std::vector< sensor_msgs::msg::PointField > && | _fields | ) |
This function moves the value in member fields.
_fields | New value to be moved in member fields |
Definition at line 317 of file PointCloud2.cpp.
const std::vector< sensor_msgs::msg::PointField > & sensor_msgs::msg::PointCloud2::fields | ( | ) | const |
This function returns a constant reference to member fields.
Definition at line 327 of file PointCloud2.cpp.
std::vector< sensor_msgs::msg::PointField > & sensor_msgs::msg::PointCloud2::fields | ( | ) |
This function returns a reference to member fields.
Definition at line 336 of file PointCloud2.cpp.
|
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. |
Definition at line 151 of file PointCloud2.cpp.
References data(), fields(), std_msgs::msg::Header::getCdrSerializedSize(), sensor_msgs::msg::PointField::getCdrSerializedSize(), and header().
Referenced by sensor_msgs::msg::PointCloud2PubSubType::getSerializedSizeProvider().
|
static |
This function returns the maximum serialized size of the Key of an object depending on the buffer alignment.
current_alignment | Buffer alignment. |
Definition at line 491 of file PointCloud2.cpp.
References sensor_msgs_msg_PointCloud2_max_key_cdr_typesize.
Referenced by sensor_msgs::msg::PointCloud2PubSubType::getKey(), and sensor_msgs::msg::PointCloud2PubSubType::PointCloud2PubSubType().
|
static |
This function returns the maximum serialized size of an object depending on the buffer alignment.
current_alignment | Buffer alignment. |
Definition at line 144 of file PointCloud2.cpp.
References sensor_msgs_msg_PointCloud2_max_cdr_typesize.
Referenced by sensor_msgs::msg::PointCloud2PubSubType::PointCloud2PubSubType().
void sensor_msgs::msg::PointCloud2::header | ( | const std_msgs::msg::Header & | _header | ) |
This function copies the value in member header.
_header | New value to be copied in member header |
Definition at line 213 of file PointCloud2.cpp.
Referenced by getCdrSerializedSize().
void sensor_msgs::msg::PointCloud2::header | ( | std_msgs::msg::Header && | _header | ) |
This function moves the value in member header.
_header | New value to be moved in member header |
Definition at line 223 of file PointCloud2.cpp.
const std_msgs::msg::Header & sensor_msgs::msg::PointCloud2::header | ( | ) | const |
This function returns a constant reference to member header.
Definition at line 233 of file PointCloud2.cpp.
std_msgs::msg::Header & sensor_msgs::msg::PointCloud2::header | ( | ) |
This function returns a reference to member header.
Definition at line 242 of file PointCloud2.cpp.
void sensor_msgs::msg::PointCloud2::height | ( | uint32_t | _height | ) |
This function sets a value in member height.
_height | New value for member height |
Definition at line 251 of file PointCloud2.cpp.
uint32_t sensor_msgs::msg::PointCloud2::height | ( | ) | const |
This function returns the value of member height.
Definition at line 261 of file PointCloud2.cpp.
uint32_t & sensor_msgs::msg::PointCloud2::height | ( | ) |
This function returns a reference to member height.
Definition at line 270 of file PointCloud2.cpp.
void sensor_msgs::msg::PointCloud2::is_bigendian | ( | bool | _is_bigendian | ) |
This function sets a value in member is_bigendian.
_is_bigendian | New value for member is_bigendian |
Definition at line 345 of file PointCloud2.cpp.
bool sensor_msgs::msg::PointCloud2::is_bigendian | ( | ) | const |
This function returns the value of member is_bigendian.
Definition at line 355 of file PointCloud2.cpp.
bool & sensor_msgs::msg::PointCloud2::is_bigendian | ( | ) |
This function returns a reference to member is_bigendian.
Definition at line 364 of file PointCloud2.cpp.
void sensor_msgs::msg::PointCloud2::is_dense | ( | bool | _is_dense | ) |
This function sets a value in member is_dense.
_is_dense | New value for member is_dense |
Definition at line 467 of file PointCloud2.cpp.
bool sensor_msgs::msg::PointCloud2::is_dense | ( | ) | const |
This function returns the value of member is_dense.
Definition at line 477 of file PointCloud2.cpp.
bool & sensor_msgs::msg::PointCloud2::is_dense | ( | ) |
This function returns a reference to member is_dense.
Definition at line 486 of file PointCloud2.cpp.
|
static |
This function tells you if the Key has been defined for this type.
Definition at line 498 of file PointCloud2.cpp.
Referenced by sensor_msgs::msg::PointCloud2PubSubType::PointCloud2PubSubType().
bool sensor_msgs::msg::PointCloud2::operator!= | ( | const PointCloud2 & | x | ) | const |
Comparison operator.
x | sensor_msgs::msg::PointCloud2 object to compare. |
Definition at line 138 of file PointCloud2.cpp.
sensor_msgs::msg::PointCloud2 & sensor_msgs::msg::PointCloud2::operator= | ( | const PointCloud2 & | x | ) |
Copy assignment.
x | Reference to the object sensor_msgs::msg::PointCloud2 that will be copied. |
Definition at line 100 of file PointCloud2.cpp.
References m_data, m_fields, m_header, m_height, m_is_bigendian, m_is_dense, m_point_step, m_row_step, and m_width.
|
noexcept |
Move assignment.
x | Reference to the object sensor_msgs::msg::PointCloud2 that will be copied. |
Definition at line 116 of file PointCloud2.cpp.
bool sensor_msgs::msg::PointCloud2::operator== | ( | const PointCloud2 & | x | ) | const |
Comparison operator.
x | sensor_msgs::msg::PointCloud2 object to compare. |
Definition at line 132 of file PointCloud2.cpp.
References m_data, m_fields, m_header, m_height, m_is_bigendian, m_is_dense, m_point_step, m_row_step, and m_width.
void sensor_msgs::msg::PointCloud2::point_step | ( | uint32_t | _point_step | ) |
This function sets a value in member point_step.
_point_step | New value for member point_step |
Definition at line 373 of file PointCloud2.cpp.
uint32_t sensor_msgs::msg::PointCloud2::point_step | ( | ) | const |
This function returns the value of member point_step.
Definition at line 383 of file PointCloud2.cpp.
uint32_t & sensor_msgs::msg::PointCloud2::point_step | ( | ) |
This function returns a reference to member point_step.
Definition at line 392 of file PointCloud2.cpp.
void sensor_msgs::msg::PointCloud2::row_step | ( | uint32_t | _row_step | ) |
This function sets a value in member row_step.
_row_step | New value for member row_step |
Definition at line 401 of file PointCloud2.cpp.
uint32_t sensor_msgs::msg::PointCloud2::row_step | ( | ) | const |
This function returns the value of member row_step.
Definition at line 411 of file PointCloud2.cpp.
uint32_t & sensor_msgs::msg::PointCloud2::row_step | ( | ) |
This function returns a reference to member row_step.
Definition at line 420 of file PointCloud2.cpp.
void sensor_msgs::msg::PointCloud2::serialize | ( | eprosima::fastcdr::Cdr & | cdr | ) | const |
This function serializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 181 of file PointCloud2.cpp.
Referenced by sensor_msgs::msg::PointCloud2PubSubType::serialize().
void sensor_msgs::msg::PointCloud2::serializeKey | ( | eprosima::fastcdr::Cdr & | cdr | ) | const |
This function serializes the key members of an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 503 of file PointCloud2.cpp.
Referenced by sensor_msgs::msg::PointCloud2PubSubType::getKey().
void sensor_msgs::msg::PointCloud2::width | ( | uint32_t | _width | ) |
This function sets a value in member width.
_width | New value for member width |
Definition at line 279 of file PointCloud2.cpp.
uint32_t sensor_msgs::msg::PointCloud2::width | ( | ) | const |
This function returns the value of member width.
Definition at line 289 of file PointCloud2.cpp.
uint32_t & sensor_msgs::msg::PointCloud2::width | ( | ) |
This function returns a reference to member width.
Definition at line 298 of file PointCloud2.cpp.
|
private |
Definition at line 380 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 376 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 373 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 374 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 377 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 381 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 378 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 379 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().
|
private |
Definition at line 375 of file PointCloud2.h.
Referenced by operator=(), operator==(), and PointCloud2().