This class represents the structure Image defined by the user in the IDL file. More...
#include <Image.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 | 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::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 | 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 Image & | operator= (const Image &x) |
Copy assignment. More... | |
eProsima_user_DllExport Image & | operator= (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 |
This class represents the structure Image defined by the user in the IDL file.
Definition at line 72 of file ros2/types/Image.h.
sensor_msgs::msg::Image::Image | ( | const Image & | x | ) |
Copy constructor.
x | Reference 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.
|
noexcept |
Move constructor.
x | Reference to the object sensor_msgs::msg::Image that will be copied. |
void sensor_msgs::msg::Image::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 373 of file Image.cpp.
Referenced by getCdrSerializedSize().
void sensor_msgs::msg::Image::data | ( | std::vector< uint8_t > && | _data | ) |
const std::vector< uint8_t > & sensor_msgs::msg::Image::data | ( | ) | const |
std::vector< uint8_t > & sensor_msgs::msg::Image::data | ( | ) |
void sensor_msgs::msg::Image::deserialize | ( | eprosima::fastcdr::Cdr & | cdr | ) |
This function deserializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 169 of file Image.cpp.
Referenced by sensor_msgs::msg::ImagePubSubType::deserialize().
void sensor_msgs::msg::Image::encoding | ( | const std::string & | _encoding | ) |
This function copies the value in member encoding.
_encoding | New value to be copied in member encoding |
Definition at line 279 of file Image.cpp.
Referenced by getCdrSerializedSize().
void sensor_msgs::msg::Image::encoding | ( | std::string && | _encoding | ) |
const std::string & sensor_msgs::msg::Image::encoding | ( | ) | const |
std::string & sensor_msgs::msg::Image::encoding | ( | ) |
|
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 136 of file Image.cpp.
References data(), encoding(), std_msgs::msg::Header::getCdrSerializedSize(), and header().
Referenced by sensor_msgs::msg::ImagePubSubType::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 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().
|
static |
This function returns the maximum serialized size of an object depending on the buffer alignment.
current_alignment | Buffer alignment. |
Definition at line 129 of file Image.cpp.
References sensor_msgs_msg_Image_max_cdr_typesize.
Referenced by sensor_msgs::msg::ImagePubSubType::ImagePubSubType().
void sensor_msgs::msg::Image::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 185 of file Image.cpp.
Referenced by getCdrSerializedSize().
void sensor_msgs::msg::Image::header | ( | std_msgs::msg::Header && | _header | ) |
const std_msgs::msg::Header & sensor_msgs::msg::Image::header | ( | ) | const |
std_msgs::msg::Header & sensor_msgs::msg::Image::header | ( | ) |
void sensor_msgs::msg::Image::height | ( | uint32_t | _height | ) |
uint32_t sensor_msgs::msg::Image::height | ( | ) | const |
uint32_t & sensor_msgs::msg::Image::height | ( | ) |
void sensor_msgs::msg::Image::is_bigendian | ( | uint8_t | _is_bigendian | ) |
uint8_t sensor_msgs::msg::Image::is_bigendian | ( | ) | const |
uint8_t & sensor_msgs::msg::Image::is_bigendian | ( | ) |
|
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().
bool sensor_msgs::msg::Image::operator!= | ( | const Image & | x | ) | const |
Comparison operator.
x | sensor_msgs::msg::Image object to compare. |
sensor_msgs::msg::Image & sensor_msgs::msg::Image::operator= | ( | const Image & | x | ) |
Copy assignment.
x | Reference 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.
|
noexcept |
Move assignment.
x | Reference to the object sensor_msgs::msg::Image that will be copied. |
bool sensor_msgs::msg::Image::operator== | ( | const Image & | x | ) | const |
Comparison operator.
x | sensor_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.
void sensor_msgs::msg::Image::serialize | ( | eprosima::fastcdr::Cdr & | cdr | ) | const |
This function serializes an object using CDR serialization.
cdr | CDR serialization object. |
Definition at line 157 of file Image.cpp.
Referenced by sensor_msgs::msg::ImagePubSubType::serialize().
void sensor_msgs::msg::Image::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 419 of file Image.cpp.
Referenced by sensor_msgs::msg::ImagePubSubType::getKey().
void sensor_msgs::msg::Image::step | ( | uint32_t | _step | ) |
uint32_t sensor_msgs::msg::Image::step | ( | ) | const |
uint32_t & sensor_msgs::msg::Image::step | ( | ) |
void sensor_msgs::msg::Image::width | ( | uint32_t | _width | ) |
uint32_t sensor_msgs::msg::Image::width | ( | ) | const |
uint32_t & sensor_msgs::msg::Image::width | ( | ) |
|
private |
Definition at line 342 of file ros2/types/Image.h.
Referenced by Image(), operator=(), and operator==().
|
private |
Definition at line 339 of file ros2/types/Image.h.
Referenced by Image(), operator=(), and operator==().
|
private |
Definition at line 336 of file ros2/types/Image.h.
Referenced by Image(), operator=(), and operator==().
|
private |
Definition at line 337 of file ros2/types/Image.h.
Referenced by Image(), operator=(), and operator==().
|
private |
Definition at line 340 of file ros2/types/Image.h.
Referenced by Image(), operator=(), and operator==().
|
private |
Definition at line 341 of file ros2/types/Image.h.
Referenced by Image(), operator=(), and operator==().
|
private |
Definition at line 338 of file ros2/types/Image.h.
Referenced by Image(), operator=(), and operator==().