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

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

#include <Image.h>

+ Collaboration diagram for sensor_msgs::msg::Image:

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 encoding (const std::string &_encoding)
 This function copies the value in member encoding. More...
 
eProsima_user_DllExport void encoding (std::string &&_encoding)
 This function moves the value in member encoding. More...
 
eProsima_user_DllExport const std::string & encoding () const
 This function returns a constant reference to member encoding. More...
 
eProsima_user_DllExport std::string & encoding ()
 This function returns a reference to member encoding. 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 Image ()
 Default constructor. More...
 
eProsima_user_DllExport Image (const Image &x)
 Copy constructor. More...
 
eProsima_user_DllExport Image (Image &&x) noexcept
 Move constructor. More...
 
eProsima_user_DllExport void is_bigendian (uint8_t _is_bigendian)
 This function sets a value in member is_bigendian. More...
 
eProsima_user_DllExport uint8_t is_bigendian () const
 This function returns the value of member is_bigendian. More...
 
eProsima_user_DllExport uint8_t & is_bigendian ()
 This function returns a reference to member is_bigendian. More...
 
eProsima_user_DllExport bool operator!= (const Image &x) const
 Comparison operator. More...
 
eProsima_user_DllExport Imageoperator= (const Image &x)
 Copy assignment. More...
 
eProsima_user_DllExport Imageoperator= (Image &&x) noexcept
 Move assignment. More...
 
eProsima_user_DllExport bool operator== (const Image &x) const
 Comparison operator. 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 step (uint32_t _step)
 This function sets a value in member step. More...
 
eProsima_user_DllExport uint32_t step () const
 This function returns the value of member step. More...
 
eProsima_user_DllExport uint32_t & step ()
 This function returns a reference to member step. 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 ~Image ()
 Default destructor. More...
 

Static Public Member Functions

static eProsima_user_DllExport size_t getCdrSerializedSize (const sensor_msgs::msg::Image &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::string m_encoding
 
std_msgs::msg::Header m_header
 
uint32_t m_height
 
uint8_t m_is_bigendian
 
uint32_t m_step
 
uint32_t m_width
 

Detailed Description

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

Definition at line 72 of file ros2/types/Image.h.

Constructor & Destructor Documentation

◆ Image() [1/3]

sensor_msgs::msg::Image::Image ( )

Default constructor.

Definition at line 44 of file Image.cpp.

◆ ~Image()

sensor_msgs::msg::Image::~Image ( )

Default destructor.

Definition at line 61 of file Image.cpp.

◆ Image() [2/3]

sensor_msgs::msg::Image::Image ( const Image x)

Copy constructor.

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

Definition at line 65 of file Image.cpp.

References m_data, m_encoding, m_header, m_height, m_is_bigendian, m_step, and m_width.

◆ Image() [3/3]

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

Move constructor.

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

Definition at line 77 of file Image.cpp.

Member Function Documentation

◆ data() [1/4]

void sensor_msgs::msg::Image::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 373 of file Image.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ data() [2/4]

void sensor_msgs::msg::Image::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 383 of file Image.cpp.

◆ data() [3/4]

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

This function returns a constant reference to member data.

Returns
Constant reference to member data

Definition at line 393 of file Image.cpp.

◆ data() [4/4]

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

This function returns a reference to member data.

Returns
Reference to member data

Definition at line 402 of file Image.cpp.

◆ deserialize()

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

This function deserializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 169 of file Image.cpp.

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

+ Here is the caller graph for this function:

◆ encoding() [1/4]

void sensor_msgs::msg::Image::encoding ( const std::string &  _encoding)

This function copies the value in member encoding.

Parameters
_encodingNew value to be copied in member encoding

Definition at line 279 of file Image.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ encoding() [2/4]

void sensor_msgs::msg::Image::encoding ( std::string &&  _encoding)

This function moves the value in member encoding.

Parameters
_encodingNew value to be moved in member encoding

Definition at line 289 of file Image.cpp.

◆ encoding() [3/4]

const std::string & sensor_msgs::msg::Image::encoding ( ) const

This function returns a constant reference to member encoding.

Returns
Constant reference to member encoding

Definition at line 299 of file Image.cpp.

◆ encoding() [4/4]

std::string & sensor_msgs::msg::Image::encoding ( )

This function returns a reference to member encoding.

Returns
Reference to member encoding

Definition at line 308 of file Image.cpp.

◆ getCdrSerializedSize()

size_t sensor_msgs::msg::Image::getCdrSerializedSize ( const sensor_msgs::msg::Image 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 136 of file Image.cpp.

References data(), encoding(), std_msgs::msg::Header::getCdrSerializedSize(), and header().

Referenced by sensor_msgs::msg::ImagePubSubType::getSerializedSizeProvider().

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

◆ getKeyMaxCdrSerializedSize()

size_t sensor_msgs::msg::Image::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 407 of file Image.cpp.

References sensor_msgs_msg_Image_max_key_cdr_typesize.

Referenced by sensor_msgs::msg::ImagePubSubType::getKey(), and sensor_msgs::msg::ImagePubSubType::ImagePubSubType().

+ Here is the caller graph for this function:

◆ getMaxCdrSerializedSize()

size_t sensor_msgs::msg::Image::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 129 of file Image.cpp.

References sensor_msgs_msg_Image_max_cdr_typesize.

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

+ Here is the caller graph for this function:

◆ header() [1/4]

void sensor_msgs::msg::Image::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 185 of file Image.cpp.

Referenced by getCdrSerializedSize().

+ Here is the caller graph for this function:

◆ header() [2/4]

void sensor_msgs::msg::Image::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 195 of file Image.cpp.

◆ header() [3/4]

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

This function returns a constant reference to member header.

Returns
Constant reference to member header

Definition at line 205 of file Image.cpp.

◆ header() [4/4]

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

This function returns a reference to member header.

Returns
Reference to member header

Definition at line 214 of file Image.cpp.

◆ height() [1/3]

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

This function sets a value in member height.

Parameters
_heightNew value for member height

Definition at line 223 of file Image.cpp.

◆ height() [2/3]

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

This function returns the value of member height.

Returns
Value of member height

Definition at line 233 of file Image.cpp.

◆ height() [3/3]

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

This function returns a reference to member height.

Returns
Reference to member height

Definition at line 242 of file Image.cpp.

◆ is_bigendian() [1/3]

void sensor_msgs::msg::Image::is_bigendian ( uint8_t  _is_bigendian)

This function sets a value in member is_bigendian.

Parameters
_is_bigendianNew value for member is_bigendian

Definition at line 317 of file Image.cpp.

◆ is_bigendian() [2/3]

uint8_t sensor_msgs::msg::Image::is_bigendian ( ) const

This function returns the value of member is_bigendian.

Returns
Value of member is_bigendian

Definition at line 327 of file Image.cpp.

◆ is_bigendian() [3/3]

uint8_t & sensor_msgs::msg::Image::is_bigendian ( )

This function returns a reference to member is_bigendian.

Returns
Reference to member is_bigendian

Definition at line 336 of file Image.cpp.

◆ isKeyDefined()

bool sensor_msgs::msg::Image::isKeyDefined ( )
static

This function tells you if the Key has been defined for this type.

Definition at line 414 of file Image.cpp.

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

+ Here is the caller graph for this function:

◆ operator!=()

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

Comparison operator.

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

Definition at line 123 of file Image.cpp.

◆ operator=() [1/2]

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

Copy assignment.

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

Definition at line 89 of file Image.cpp.

References m_data, m_encoding, m_header, m_height, m_is_bigendian, m_step, and m_width.

◆ operator=() [2/2]

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

Move assignment.

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

Definition at line 103 of file Image.cpp.

◆ operator==()

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

Comparison operator.

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

Definition at line 117 of file Image.cpp.

References m_data, m_encoding, m_header, m_height, m_is_bigendian, m_step, and m_width.

◆ serialize()

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

This function serializes an object using CDR serialization.

Parameters
cdrCDR serialization object.

Definition at line 157 of file Image.cpp.

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

+ Here is the caller graph for this function:

◆ serializeKey()

void sensor_msgs::msg::Image::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 419 of file Image.cpp.

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

+ Here is the caller graph for this function:

◆ step() [1/3]

void sensor_msgs::msg::Image::step ( uint32_t  _step)

This function sets a value in member step.

Parameters
_stepNew value for member step

Definition at line 345 of file Image.cpp.

◆ step() [2/3]

uint32_t sensor_msgs::msg::Image::step ( ) const

This function returns the value of member step.

Returns
Value of member step

Definition at line 355 of file Image.cpp.

◆ step() [3/3]

uint32_t & sensor_msgs::msg::Image::step ( )

This function returns a reference to member step.

Returns
Reference to member step

Definition at line 364 of file Image.cpp.

◆ width() [1/3]

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

This function sets a value in member width.

Parameters
_widthNew value for member width

Definition at line 251 of file Image.cpp.

◆ width() [2/3]

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

This function returns the value of member width.

Returns
Value of member width

Definition at line 261 of file Image.cpp.

◆ width() [3/3]

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

This function returns a reference to member width.

Returns
Reference to member width

Definition at line 270 of file Image.cpp.

Member Data Documentation

◆ m_data

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

Definition at line 342 of file ros2/types/Image.h.

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

◆ m_encoding

std::string sensor_msgs::msg::Image::m_encoding
private

Definition at line 339 of file ros2/types/Image.h.

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

◆ m_header

std_msgs::msg::Header sensor_msgs::msg::Image::m_header
private

Definition at line 336 of file ros2/types/Image.h.

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

◆ m_height

uint32_t sensor_msgs::msg::Image::m_height
private

Definition at line 337 of file ros2/types/Image.h.

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

◆ m_is_bigendian

uint8_t sensor_msgs::msg::Image::m_is_bigendian
private

Definition at line 340 of file ros2/types/Image.h.

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

◆ m_step

uint32_t sensor_msgs::msg::Image::m_step
private

Definition at line 341 of file ros2/types/Image.h.

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

◆ m_width

uint32_t sensor_msgs::msg::Image::m_width
private

Definition at line 338 of file ros2/types/Image.h.

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


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