30 #include <fastcdr/Cdr.h> 32 #include <fastcdr/exceptions/BadParamException.h> 37 #define builtin_interfaces_msg_Time_max_cdr_typesize 8ULL; 38 #define sensor_msgs_msg_Image_max_cdr_typesize 648ULL; 39 #define std_msgs_msg_Header_max_cdr_typesize 268ULL; 40 #define builtin_interfaces_msg_Time_max_key_cdr_typesize 0ULL; 41 #define sensor_msgs_msg_Image_max_key_cdr_typesize 0ULL; 42 #define std_msgs_msg_Header_max_key_cdr_typesize 0ULL; 80 m_header = std::move(x.m_header);
81 m_height = x.m_height;
83 m_encoding = std::move(x.m_encoding);
84 m_is_bigendian = x.m_is_bigendian;
86 m_data = std::move(x.m_data);
106 m_header = std::move(x.m_header);
107 m_height = x.m_height;
109 m_encoding = std::move(x.m_encoding);
110 m_is_bigendian = x.m_is_bigendian;
112 m_data = std::move(x.m_data);
118 const Image& x)
const 124 const Image& x)
const 126 return !(*
this == x);
130 size_t current_alignment)
132 static_cast<void>(current_alignment);
138 size_t current_alignment)
140 size_t initial_alignment = current_alignment;
142 current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
143 current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
144 current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4) + data.
encoding().size() + 1;
145 current_alignment += 1 + eprosima::fastcdr::Cdr::alignment(current_alignment, 1);
146 current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
147 current_alignment += 4 + eprosima::fastcdr::Cdr::alignment(current_alignment, 4);
149 if (data.
data().size() > 0)
151 current_alignment += (data.
data().size() * 1) + eprosima::fastcdr::Cdr::alignment(current_alignment, 1);
154 return current_alignment - initial_alignment;
158 eprosima::fastcdr::Cdr& scdr)
const 163 scdr << m_encoding.c_str();
164 scdr << m_is_bigendian;
170 eprosima::fastcdr::Cdr& dcdr)
176 dcdr >> m_is_bigendian;
198 m_header = std::move(_header);
280 const std::string& _encoding)
282 m_encoding = _encoding;
290 std::string&& _encoding)
292 m_encoding = std::move(_encoding);
318 uint8_t _is_bigendian)
320 m_is_bigendian = _is_bigendian;
329 return m_is_bigendian;
338 return m_is_bigendian;
374 const std::vector<uint8_t>& _data)
384 std::vector<uint8_t>&& _data)
386 m_data = std::move(_data);
408 size_t current_alignment)
410 static_cast<void>(current_alignment);
420 eprosima::fastcdr::Cdr& scdr)
const
eProsima_user_DllExport uint32_t width() const
This function returns the value of member width.
eProsima_user_DllExport void encoding(const std::string &_encoding)
This function copies the value in member encoding.
#define sensor_msgs_msg_Image_max_cdr_typesize
eProsima_user_DllExport void header(const std_msgs::msg::Header &_header)
This function copies the value in member header.
eProsima_user_DllExport const std::vector< uint8_t > & data() const
This function returns a constant reference to member data.
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 void data(const std::vector< uint8_t > &_data)
This function copies the value in member data.
eProsima_user_DllExport bool operator==(const Image &x) const
Comparison operator.
std_msgs::msg::Header m_header
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
eProsima_user_DllExport Image()
Default constructor.
eProsima_user_DllExport ~Image()
Default destructor.
std::vector< uint8_t > m_data
eProsima_user_DllExport bool operator!=(const Image &x) const
Comparison operator.
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 uint8_t is_bigendian() const
This function returns the value of member is_bigendian.
This class represents the structure Image defined by the user in the IDL file.
#define sensor_msgs_msg_Image_max_key_cdr_typesize
eProsima_user_DllExport const std::string & encoding() const
This function returns a constant reference to member encoding.
eProsima_user_DllExport uint32_t height() const
This function returns the value of member height.
eProsima_user_DllExport const std_msgs::msg::Header & header() const
This function returns a constant reference to member header.
eProsima_user_DllExport uint32_t step() const
This function returns the value of member step.
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.
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type.
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
eProsima_user_DllExport Image & operator=(const Image &x)
Copy assignment.