CARLA
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
sensor_msgs::msg::PointCloud2 Class Reference

This class represents the structure PointCloud2 defined by the user in the IDL file. More...

#include <PointCloud2.h>

+ Collaboration diagram for sensor_msgs::msg::PointCloud2:

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::Headerheader () const
 This function returns a constant reference to member header. More...
 
eProsima_user_DllExport std_msgs::msg::Headerheader ()
 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 PointCloud2operator= (const PointCloud2 &x)
 Copy assignment. More...
 
eProsima_user_DllExport PointCloud2operator= (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::PointFieldm_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
 

Detailed Description

This class represents the structure PointCloud2 defined by the user in the IDL file.

Definition at line 73 of file PointCloud2.h.

Constructor & Destructor Documentation

◆ PointCloud2() [1/3]

sensor_msgs::msg::PointCloud2::PointCloud2 ( )

Default constructor.

Definition at line 46 of file PointCloud2.cpp.

◆ ~PointCloud2()

sensor_msgs::msg::PointCloud2::~PointCloud2 ( )

Default destructor.

Definition at line 68 of file PointCloud2.cpp.

◆ PointCloud2() [2/3]

sensor_msgs::msg::PointCloud2::PointCloud2 ( const PointCloud2 x)

Copy constructor.

Parameters
xReference 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.

◆ PointCloud2() [3/3]

sensor_msgs::msg::PointCloud2::PointCloud2 ( PointCloud2 &&  x)
noexcept

Move constructor.

Parameters
xReference to the object sensor_msgs::msg::PointCloud2 that will be copied.

Definition at line 86 of file PointCloud2.cpp.

Member Function Documentation

◆ data() [1/4]

void sensor_msgs::msg::PointCloud2::data ( const std::vector< uint8_t > &  _data)

This function copies the value in member data.

Parameters
_dataNew value to be copied in member data

Definition at line 429 of file PointCloud2.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ data() [2/4]

void sensor_msgs::msg::PointCloud2::data ( std::vector< uint8_t > &&  _data)

This function moves the value in member data.

Parameters
_dataNew value to be moved in member data

Definition at line 439 of file PointCloud2.cpp.

◆ data() [3/4]

const std::vector< uint8_t > & sensor_msgs::msg::PointCloud2::data ( ) const

This function returns a constant reference to member data.

Returns
Constant reference to member data

Definition at line 449 of file PointCloud2.cpp.

◆ data() [4/4]

std::vector< uint8_t > & sensor_msgs::msg::PointCloud2::data ( )

This function returns a reference to member data.

Returns
Reference to member data

Definition at line 458 of file PointCloud2.cpp.

◆ deserialize()

void sensor_msgs::msg::PointCloud2::deserialize ( eprosima::fastcdr::Cdr &  cdr)

This function deserializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 195 of file PointCloud2.cpp.

Referenced by sensor_msgs::msg::PointCloud2PubSubType::deserialize().

+ Here is the caller graph for this function:

◆ fields() [1/4]

void sensor_msgs::msg::PointCloud2::fields ( const std::vector< sensor_msgs::msg::PointField > &  _fields)

This function copies the value in member fields.

Parameters
_fieldsNew value to be copied in member fields

Definition at line 307 of file PointCloud2.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ fields() [2/4]

void sensor_msgs::msg::PointCloud2::fields ( std::vector< sensor_msgs::msg::PointField > &&  _fields)

This function moves the value in member fields.

Parameters
_fieldsNew value to be moved in member fields

Definition at line 317 of file PointCloud2.cpp.

◆ fields() [3/4]

const std::vector< sensor_msgs::msg::PointField > & sensor_msgs::msg::PointCloud2::fields ( ) const

This function returns a constant reference to member fields.

Returns
Constant reference to member fields

Definition at line 327 of file PointCloud2.cpp.

◆ fields() [4/4]

std::vector< sensor_msgs::msg::PointField > & sensor_msgs::msg::PointCloud2::fields ( )

This function returns a reference to member fields.

Returns
Reference to member fields

Definition at line 336 of file PointCloud2.cpp.

◆ getCdrSerializedSize()

size_t sensor_msgs::msg::PointCloud2::getCdrSerializedSize ( const sensor_msgs::msg::PointCloud2 data,
size_t  current_alignment = 0 
)
static

This function returns the serialized size of a data depending on the buffer alignment.

Parameters
dataData which is calculated its serialized size.
current_alignmentBuffer alignment.
Returns
Serialized size.

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getKeyMaxCdrSerializedSize()

size_t sensor_msgs::msg::PointCloud2::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.

Parameters
current_alignmentBuffer alignment.
Returns
Maximum serialized size.

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().

+ Here is the caller graph for this function:

◆ getMaxCdrSerializedSize()

size_t sensor_msgs::msg::PointCloud2::getMaxCdrSerializedSize ( size_t  current_alignment = 0)
static

This function returns the maximum serialized size of an object depending on the buffer alignment.

Parameters
current_alignmentBuffer alignment.
Returns
Maximum serialized size.

Definition at line 144 of file PointCloud2.cpp.

References sensor_msgs_msg_PointCloud2_max_cdr_typesize.

Referenced by sensor_msgs::msg::PointCloud2PubSubType::PointCloud2PubSubType().

+ Here is the caller graph for this function:

◆ header() [1/4]

void sensor_msgs::msg::PointCloud2::header ( const std_msgs::msg::Header _header)

This function copies the value in member header.

Parameters
_headerNew value to be copied in member header

Definition at line 213 of file PointCloud2.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ header() [2/4]

void sensor_msgs::msg::PointCloud2::header ( std_msgs::msg::Header &&  _header)

This function moves the value in member header.

Parameters
_headerNew value to be moved in member header

Definition at line 223 of file PointCloud2.cpp.

◆ header() [3/4]

const std_msgs::msg::Header & sensor_msgs::msg::PointCloud2::header ( ) const

This function returns a constant reference to member header.

Returns
Constant reference to member header

Definition at line 233 of file PointCloud2.cpp.

◆ header() [4/4]

std_msgs::msg::Header & sensor_msgs::msg::PointCloud2::header ( )

This function returns a reference to member header.

Returns
Reference to member header

Definition at line 242 of file PointCloud2.cpp.

◆ height() [1/3]

void sensor_msgs::msg::PointCloud2::height ( uint32_t  _height)

This function sets a value in member height.

Parameters
_heightNew value for member height

Definition at line 251 of file PointCloud2.cpp.

◆ height() [2/3]

uint32_t sensor_msgs::msg::PointCloud2::height ( ) const

This function returns the value of member height.

Returns
Value of member height

Definition at line 261 of file PointCloud2.cpp.

◆ height() [3/3]

uint32_t & sensor_msgs::msg::PointCloud2::height ( )

This function returns a reference to member height.

Returns
Reference to member height

Definition at line 270 of file PointCloud2.cpp.

◆ is_bigendian() [1/3]

void sensor_msgs::msg::PointCloud2::is_bigendian ( bool  _is_bigendian)

This function sets a value in member is_bigendian.

Parameters
_is_bigendianNew value for member is_bigendian

Definition at line 345 of file PointCloud2.cpp.

◆ is_bigendian() [2/3]

bool sensor_msgs::msg::PointCloud2::is_bigendian ( ) const

This function returns the value of member is_bigendian.

Returns
Value of member is_bigendian

Definition at line 355 of file PointCloud2.cpp.

◆ is_bigendian() [3/3]

bool & sensor_msgs::msg::PointCloud2::is_bigendian ( )

This function returns a reference to member is_bigendian.

Returns
Reference to member is_bigendian

Definition at line 364 of file PointCloud2.cpp.

◆ is_dense() [1/3]

void sensor_msgs::msg::PointCloud2::is_dense ( bool  _is_dense)

This function sets a value in member is_dense.

Parameters
_is_denseNew value for member is_dense

Definition at line 467 of file PointCloud2.cpp.

◆ is_dense() [2/3]

bool sensor_msgs::msg::PointCloud2::is_dense ( ) const

This function returns the value of member is_dense.

Returns
Value of member is_dense

Definition at line 477 of file PointCloud2.cpp.

◆ is_dense() [3/3]

bool & sensor_msgs::msg::PointCloud2::is_dense ( )

This function returns a reference to member is_dense.

Returns
Reference to member is_dense

Definition at line 486 of file PointCloud2.cpp.

◆ isKeyDefined()

bool sensor_msgs::msg::PointCloud2::isKeyDefined ( )
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().

+ Here is the caller graph for this function:

◆ operator!=()

bool sensor_msgs::msg::PointCloud2::operator!= ( const PointCloud2 x) const

Comparison operator.

Parameters
xsensor_msgs::msg::PointCloud2 object to compare.

Definition at line 138 of file PointCloud2.cpp.

◆ operator=() [1/2]

sensor_msgs::msg::PointCloud2 & sensor_msgs::msg::PointCloud2::operator= ( const PointCloud2 x)

Copy assignment.

Parameters
xReference 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.

◆ operator=() [2/2]

sensor_msgs::msg::PointCloud2 & sensor_msgs::msg::PointCloud2::operator= ( PointCloud2 &&  x)
noexcept

Move assignment.

Parameters
xReference to the object sensor_msgs::msg::PointCloud2 that will be copied.

Definition at line 116 of file PointCloud2.cpp.

◆ operator==()

bool sensor_msgs::msg::PointCloud2::operator== ( const PointCloud2 x) const

Comparison operator.

Parameters
xsensor_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.

◆ point_step() [1/3]

void sensor_msgs::msg::PointCloud2::point_step ( uint32_t  _point_step)

This function sets a value in member point_step.

Parameters
_point_stepNew value for member point_step

Definition at line 373 of file PointCloud2.cpp.

◆ point_step() [2/3]

uint32_t sensor_msgs::msg::PointCloud2::point_step ( ) const

This function returns the value of member point_step.

Returns
Value of member point_step

Definition at line 383 of file PointCloud2.cpp.

◆ point_step() [3/3]

uint32_t & sensor_msgs::msg::PointCloud2::point_step ( )

This function returns a reference to member point_step.

Returns
Reference to member point_step

Definition at line 392 of file PointCloud2.cpp.

◆ row_step() [1/3]

void sensor_msgs::msg::PointCloud2::row_step ( uint32_t  _row_step)

This function sets a value in member row_step.

Parameters
_row_stepNew value for member row_step

Definition at line 401 of file PointCloud2.cpp.

◆ row_step() [2/3]

uint32_t sensor_msgs::msg::PointCloud2::row_step ( ) const

This function returns the value of member row_step.

Returns
Value of member row_step

Definition at line 411 of file PointCloud2.cpp.

◆ row_step() [3/3]

uint32_t & sensor_msgs::msg::PointCloud2::row_step ( )

This function returns a reference to member row_step.

Returns
Reference to member row_step

Definition at line 420 of file PointCloud2.cpp.

◆ serialize()

void sensor_msgs::msg::PointCloud2::serialize ( eprosima::fastcdr::Cdr &  cdr) const

This function serializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 181 of file PointCloud2.cpp.

Referenced by sensor_msgs::msg::PointCloud2PubSubType::serialize().

+ Here is the caller graph for this function:

◆ serializeKey()

void sensor_msgs::msg::PointCloud2::serializeKey ( eprosima::fastcdr::Cdr &  cdr) const

This function serializes the key members of an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 503 of file PointCloud2.cpp.

Referenced by sensor_msgs::msg::PointCloud2PubSubType::getKey().

+ Here is the caller graph for this function:

◆ width() [1/3]

void sensor_msgs::msg::PointCloud2::width ( uint32_t  _width)

This function sets a value in member width.

Parameters
_widthNew value for member width

Definition at line 279 of file PointCloud2.cpp.

◆ width() [2/3]

uint32_t sensor_msgs::msg::PointCloud2::width ( ) const

This function returns the value of member width.

Returns
Value of member width

Definition at line 289 of file PointCloud2.cpp.

◆ width() [3/3]

uint32_t & sensor_msgs::msg::PointCloud2::width ( )

This function returns a reference to member width.

Returns
Reference to member width

Definition at line 298 of file PointCloud2.cpp.

Member Data Documentation

◆ m_data

std::vector<uint8_t> sensor_msgs::msg::PointCloud2::m_data
private

Definition at line 380 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_fields

std::vector<sensor_msgs::msg::PointField> sensor_msgs::msg::PointCloud2::m_fields
private

Definition at line 376 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_header

std_msgs::msg::Header sensor_msgs::msg::PointCloud2::m_header
private

Definition at line 373 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_height

uint32_t sensor_msgs::msg::PointCloud2::m_height
private

Definition at line 374 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_is_bigendian

bool sensor_msgs::msg::PointCloud2::m_is_bigendian
private

Definition at line 377 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_is_dense

bool sensor_msgs::msg::PointCloud2::m_is_dense
private

Definition at line 381 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_point_step

uint32_t sensor_msgs::msg::PointCloud2::m_point_step
private

Definition at line 378 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_row_step

uint32_t sensor_msgs::msg::PointCloud2::m_row_step
private

Definition at line 379 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().

◆ m_width

uint32_t sensor_msgs::msg::PointCloud2::m_width
private

Definition at line 375 of file PointCloud2.h.

Referenced by operator=(), operator==(), and PointCloud2().


The documentation for this class was generated from the following files: