CARLA
 
载入中...
搜索中...
未找到
PointCloud2.h
浏览该文件的文档.
1// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*!
16 * @file PointCloud2.h
17 * This header file contains the declaration of the described types in the IDL file.
18 *
19 * This file was generated by the tool gen.
20 */
21
22#ifndef _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_POINTCLOUD2_H_
23#define _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_POINTCLOUD2_H_
24
25#include "Header.h"
26#include "PointField.h"
27
28#include <fastrtps/utils/fixed_size_string.hpp>
29
30#include <stdint.h>
31#include <array>
32#include <string>
33#include <vector>
34#include <map>
35#include <bitset>
36
37#if defined(_WIN32)
38#if defined(EPROSIMA_USER_DLL_EXPORT)
39#define eProsima_user_DllExport __declspec( dllexport )
40#else
41#define eProsima_user_DllExport
42#endif // EPROSIMA_USER_DLL_EXPORT
43#else
44#define eProsima_user_DllExport
45#endif // _WIN32
46
47#if defined(_WIN32)
48#if defined(EPROSIMA_USER_DLL_EXPORT)
49#if defined(PointCloud2_SOURCE)
50#define PointCloud2_DllAPI __declspec( dllexport )
51#else
52#define PointCloud2_DllAPI __declspec( dllimport )
53#endif // PointCloud2_SOURCE
54#else
55#define PointCloud2_DllAPI
56#endif // EPROSIMA_USER_DLL_EXPORT
57#else
58#define PointCloud2_DllAPI
59#endif // _WIN32
60
61namespace eprosima {
62namespace fastcdr {
63class Cdr;
64} // namespace fastcdr
65} // namespace eprosima
66
67namespace sensor_msgs {
68 namespace msg {
69 /*!
70 * @brief This class represents the structure PointCloud2 defined by the user in the IDL file.
71 * @ingroup POINTCLOUD2
72 */
74 {
75 public:
76
77 /*!
78 * @brief Default constructor.
79 */
81
82 /*!
83 * @brief Default destructor.
84 */
86
87 /*!
88 * @brief Copy constructor.
89 * @param x Reference to the object sensor_msgs::msg::PointCloud2 that will be copied.
90 */
92 const PointCloud2& x);
93
94 /*!
95 * @brief Move constructor.
96 * @param x Reference to the object sensor_msgs::msg::PointCloud2 that will be copied.
97 */
99 PointCloud2&& x) noexcept;
100
101 /*!
102 * @brief Copy assignment.
103 * @param x Reference to the object sensor_msgs::msg::PointCloud2 that will be copied.
104 */
106 const PointCloud2& x);
107
108 /*!
109 * @brief Move assignment.
110 * @param x Reference to the object sensor_msgs::msg::PointCloud2 that will be copied.
111 */
113 PointCloud2&& x) noexcept;
114
115 /*!
116 * @brief Comparison operator.
117 * @param x sensor_msgs::msg::PointCloud2 object to compare.
118 */
120 const PointCloud2& x) const;
121
122 /*!
123 * @brief Comparison operator.
124 * @param x sensor_msgs::msg::PointCloud2 object to compare.
125 */
127 const PointCloud2& x) const;
128
129 /*!
130 * @brief This function copies the value in member header
131 * @param _header New value to be copied in member header
132 */
134 const std_msgs::msg::Header& _header);
135
136 /*!
137 * @brief This function moves the value in member header
138 * @param _header New value to be moved in member header
139 */
141 std_msgs::msg::Header&& _header);
142
143 /*!
144 * @brief This function returns a constant reference to member header
145 * @return Constant reference to member header
146 */
148
149 /*!
150 * @brief This function returns a reference to member header
151 * @return Reference to member header
152 */
154 /*!
155 * @brief This function sets a value in member height
156 * @param _height New value for member height
157 */
159 uint32_t _height);
160
161 /*!
162 * @brief This function returns the value of member height
163 * @return Value of member height
164 */
165 eProsima_user_DllExport uint32_t height() const;
166
167 /*!
168 * @brief This function returns a reference to member height
169 * @return Reference to member height
170 */
172
173 /*!
174 * @brief This function sets a value in member width
175 * @param _width New value for member width
176 */
178 uint32_t _width);
179
180 /*!
181 * @brief This function returns the value of member width
182 * @return Value of member width
183 */
184 eProsima_user_DllExport uint32_t width() const;
185
186 /*!
187 * @brief This function returns a reference to member width
188 * @return Reference to member width
189 */
190 eProsima_user_DllExport uint32_t& width();
191
192 /*!
193 * @brief This function copies the value in member fields
194 * @param _fields New value to be copied in member fields
195 */
197 const std::vector<sensor_msgs::msg::PointField>& _fields);
198
199 /*!
200 * @brief This function moves the value in member fields
201 * @param _fields New value to be moved in member fields
202 */
204 std::vector<sensor_msgs::msg::PointField>&& _fields);
205
206 /*!
207 * @brief This function returns a constant reference to member fields
208 * @return Constant reference to member fields
209 */
210 eProsima_user_DllExport const std::vector<sensor_msgs::msg::PointField>& fields() const;
211
212 /*!
213 * @brief This function returns a reference to member fields
214 * @return Reference to member fields
215 */
216 eProsima_user_DllExport std::vector<sensor_msgs::msg::PointField>& fields();
217 /*!
218 * @brief This function sets a value in member is_bigendian
219 * @param _is_bigendian New value for member is_bigendian
220 */
222 bool _is_bigendian);
223
224 /*!
225 * @brief This function returns the value of member is_bigendian
226 * @return Value of member is_bigendian
227 */
229
230 /*!
231 * @brief This function returns a reference to member is_bigendian
232 * @return Reference to member is_bigendian
233 */
235
236 /*!
237 * @brief This function sets a value in member point_step
238 * @param _point_step New value for member point_step
239 */
241 uint32_t _point_step);
242
243 /*!
244 * @brief This function returns the value of member point_step
245 * @return Value of member point_step
246 */
247 eProsima_user_DllExport uint32_t point_step() const;
248
249 /*!
250 * @brief This function returns a reference to member point_step
251 * @return Reference to member point_step
252 */
254
255 /*!
256 * @brief This function sets a value in member row_step
257 * @param _row_step New value for member row_step
258 */
260 uint32_t _row_step);
261
262 /*!
263 * @brief This function returns the value of member row_step
264 * @return Value of member row_step
265 */
266 eProsima_user_DllExport uint32_t row_step() const;
267
268 /*!
269 * @brief This function returns a reference to member row_step
270 * @return Reference to member row_step
271 */
273
274 /*!
275 * @brief This function copies the value in member data
276 * @param _data New value to be copied in member data
277 */
279 const std::vector<uint8_t>& _data);
280
281 /*!
282 * @brief This function moves the value in member data
283 * @param _data New value to be moved in member data
284 */
286 std::vector<uint8_t>&& _data);
287
288 /*!
289 * @brief This function returns a constant reference to member data
290 * @return Constant reference to member data
291 */
292 eProsima_user_DllExport const std::vector<uint8_t>& data() const;
293
294 /*!
295 * @brief This function returns a reference to member data
296 * @return Reference to member data
297 */
298 eProsima_user_DllExport std::vector<uint8_t>& data();
299 /*!
300 * @brief This function sets a value in member is_dense
301 * @param _is_dense New value for member is_dense
302 */
304 bool _is_dense);
305
306 /*!
307 * @brief This function returns the value of member is_dense
308 * @return Value of member is_dense
309 */
311
312 /*!
313 * @brief This function returns a reference to member is_dense
314 * @return Reference to member is_dense
315 */
317
318 /*!
319 * @brief This function returns the maximum serialized size of an object
320 * depending on the buffer alignment.
321 * @param current_alignment Buffer alignment.
322 * @return Maximum serialized size.
323 */
325 size_t current_alignment = 0);
326
327 /*!
328 * @brief This function returns the serialized size of a data depending on the buffer alignment.
329 * @param data Data which is calculated its serialized size.
330 * @param current_alignment Buffer alignment.
331 * @return Serialized size.
332 */
335 size_t current_alignment = 0);
336
337 /*!
338 * @brief This function serializes an object using CDR serialization.
339 * @param cdr CDR serialization object.
340 */
342 eprosima::fastcdr::Cdr& cdr) const;
343
344 /*!
345 * @brief This function deserializes an object using CDR serialization.
346 * @param cdr CDR serialization object.
347 */
349 eprosima::fastcdr::Cdr& cdr);
350
351 /*!
352 * @brief This function returns the maximum serialized size of the Key of an object
353 * depending on the buffer alignment.
354 * @param current_alignment Buffer alignment.
355 * @return Maximum serialized size.
356 */
358 size_t current_alignment = 0);
359
360 /*!
361 * @brief This function tells you if the Key has been defined for this type
362 */
364
365 /*!
366 * @brief This function serializes the key members of an object using CDR serialization.
367 * @param cdr CDR serialization object.
368 */
370 eprosima::fastcdr::Cdr& cdr) const;
371
372 private:
374 uint32_t m_height;
375 uint32_t m_width;
376 std::vector<sensor_msgs::msg::PointField> m_fields;
378 uint32_t m_point_step;
379 uint32_t m_row_step;
380 std::vector<uint8_t> m_data;
382 };
383 } // namespace msg
384} // namespace sensor_msgs
385
386#endif // _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_POINTCLOUD2_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
This class represents the structure PointCloud2 defined by the user in the IDL file.
Definition PointCloud2.h:74
std_msgs::msg::Header m_header
eProsima_user_DllExport bool operator==(const PointCloud2 &x) const
Comparison operator.
eProsima_user_DllExport const std::vector< uint8_t > & data() const
This function returns a constant reference to member data
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type
eProsima_user_DllExport bool is_bigendian() const
This function returns the value of member is_bigendian
std::vector< sensor_msgs::msg::PointField > m_fields
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 const std::vector< sensor_msgs::msg::PointField > & fields() const
This function returns a constant reference to member fields
eProsima_user_DllExport uint32_t width() const
This function returns the value of member width
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
eProsima_user_DllExport PointCloud2()
Default constructor.
eProsima_user_DllExport bool operator!=(const PointCloud2 &x) const
Comparison operator.
eProsima_user_DllExport const std_msgs::msg::Header & header() const
This function returns a constant reference to member header
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
eProsima_user_DllExport uint32_t row_step() const
This function returns the value of member row_step
std::vector< uint8_t > m_data
eProsima_user_DllExport uint32_t point_step() const
This function returns the value of member point_step
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.
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 bool is_dense() const
This function returns the value of member is_dense
eProsima_user_DllExport ~PointCloud2()
Default destructor.
eProsima_user_DllExport uint32_t height() const
This function returns the value of member height
eProsima_user_DllExport PointCloud2 & operator=(const PointCloud2 &x)
Copy assignment.
This class represents the structure Header defined by the user in the IDL file.
Definition Header.h:73