CARLA
CameraInfo.h
Go to the documentation of this file.
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 CameraInfo.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_CAMERAINFO_H_
23 #define _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_CAMERAINFO_H_
24 
25 #include "RegionOfInterest.h"
26 #include "Header.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(CAMERAINFO_SOURCE)
50 #define CAMERAINFO_DllAPI __declspec( dllexport )
51 #else
52 #define CAMERAINFO_DllAPI __declspec( dllimport )
53 #endif // CAMERAINFO_SOURCE
54 #else
55 #define CAMERAINFO_DllAPI
56 #endif // EPROSIMA_USER_DLL_EXPORT
57 #else
58 #define CAMERAINFO_DllAPI
59 #endif // _WIN32
60 
61 namespace eprosima {
62 namespace fastcdr {
63 class Cdr;
64 } // namespace fastcdr
65 } // namespace eprosima
66 
67 namespace sensor_msgs {
68  namespace msg {
69  /*!
70  * @brief This class represents the structure CameraInfo defined by the user in the IDL file.
71  * @ingroup CameraInfo
72  */
73  class CameraInfo
74  {
75  public:
76 
77  /*!
78  * @brief Default constructor.
79  */
80  eProsima_user_DllExport CameraInfo(uint32_t height = 0, uint32_t width = 0, double fov = 0.0);
81 
82  /*!
83  * @brief Default destructor.
84  */
85  eProsima_user_DllExport ~CameraInfo();
86 
87  /*!
88  * @brief Copy constructor.
89  * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.
90  */
91  eProsima_user_DllExport CameraInfo(
92  const CameraInfo& x);
93 
94  /*!
95  * @brief Move constructor.
96  * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.
97  */
98  eProsima_user_DllExport CameraInfo(
99  CameraInfo&& x) noexcept;
100 
101  /*!
102  * @brief Copy assignment.
103  * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.
104  */
105  eProsima_user_DllExport CameraInfo& operator =(
106  const CameraInfo& x);
107 
108  /*!
109  * @brief Move assignment.
110  * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.
111  */
112  eProsima_user_DllExport CameraInfo& operator =(
113  CameraInfo&& x) noexcept;
114 
115  /*!
116  * @brief Comparison operator.
117  * @param x sensor_msgs::msg::CameraInfo object to compare.
118  */
120  const CameraInfo& x) const;
121 
122  /*!
123  * @brief Comparison operator.
124  * @param x sensor_msgs::msg::CameraInfo object to compare.
125  */
127  const CameraInfo& 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  */
133  eProsima_user_DllExport void header(
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  */
140  eProsima_user_DllExport void header(
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  */
147  eProsima_user_DllExport const std_msgs::msg::Header& header() const;
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  */
158  eProsima_user_DllExport void height(
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  */
171  eProsima_user_DllExport uint32_t& height();
172 
173  /*!
174  * @brief This function sets a value in member width
175  * @param _width New value for member width
176  */
177  eProsima_user_DllExport void width(
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 distortion_model
194  * @param _distortion_model New value to be copied in member distortion_model
195  */
196  eProsima_user_DllExport void distortion_model(
197  const std::string& _distortion_model);
198 
199  /*!
200  * @brief This function moves the value in member distortion_model
201  * @param _distortion_model New value to be moved in member distortion_model
202  */
203  eProsima_user_DllExport void distortion_model(
204  std::string&& _distortion_model);
205 
206  /*!
207  * @brief This function returns a constant reference to member distortion_model
208  * @return Constant reference to member distortion_model
209  */
210  eProsima_user_DllExport const std::string& distortion_model() const;
211 
212  /*!
213  * @brief This function returns a reference to member distortion_model
214  * @return Reference to member distortion_model
215  */
216  eProsima_user_DllExport std::string& distortion_model();
217  /*!
218  * @brief This function copies the value in member D
219  * @param _D New value to be copied in member D
220  */
222  const std::vector<double>& _D);
223 
224  /*!
225  * @brief This function moves the value in member D
226  * @param _D New value to be moved in member D
227  */
229  std::vector<double>&& _D);
230 
231  /*!
232  * @brief This function returns a constant reference to member D
233  * @return Constant reference to member D
234  */
235  eProsima_user_DllExport const std::vector<double>& D() const;
236 
237  /*!
238  * @brief This function returns a reference to member D
239  * @return Reference to member D
240  */
241  eProsima_user_DllExport std::vector<double>& D();
242  /*!
243  * @brief This function copies the value in member K
244  * @param _K New value to be copied in member K
245  */
247  const std::array<double, 9>& _k);
248 
249  /*!
250  * @brief This function moves the value in member k
251  * @param _k New value to be moved in member k
252  */
254  std::array<double, 9>&& _k);
255 
256  /*!
257  * @brief This function returns a constant reference to member k
258  * @return Constant reference to member k
259  */
260  eProsima_user_DllExport const std::array<double, 9>& k() const;
261 
262  /*!
263  * @brief This function returns a reference to member k
264  * @return Reference to member k
265  */
266  eProsima_user_DllExport std::array<double, 9>& k();
267  /*!
268  * @brief This function copies the value in member r
269  * @param _r New value to be copied in member r
270  */
272  const std::array<double, 9>& _r);
273 
274  /*!
275  * @brief This function moves the value in member r
276  * @param _r New value to be moved in member r
277  */
279  std::array<double, 9>&& _r);
280 
281  /*!
282  * @brief This function returns a constant reference to member r
283  * @return Constant reference to member r
284  */
285  eProsima_user_DllExport const std::array<double, 9>& r() const;
286 
287  /*!
288  * @brief This function returns a reference to member r
289  * @return Reference to member r
290  */
291  eProsima_user_DllExport std::array<double, 9>& r();
292  /*!
293  * @brief This function copies the value in member p
294  * @param _p New value to be copied in member p
295  */
297  const std::array<double, 12>& _p);
298 
299  /*!
300  * @brief This function moves the value in member p
301  * @param _p New value to be moved in member p
302  */
304  std::array<double, 12>&& _p);
305 
306  /*!
307  * @brief This function returns a constant reference to member p
308  * @return Constant reference to member p
309  */
310  eProsima_user_DllExport const std::array<double, 12>& p() const;
311 
312  /*!
313  * @brief This function returns a reference to member p
314  * @return Reference to member p
315  */
316  eProsima_user_DllExport std::array<double, 12>& p();
317  /*!
318  * @brief This function sets a value in member binning_x
319  * @param _binning_x New value for member binning_x
320  */
321  eProsima_user_DllExport void binning_x(
322  uint32_t _binning_x);
323 
324  /*!
325  * @brief This function returns the value of member binning_x
326  * @return Value of member binning_x
327  */
328  eProsima_user_DllExport uint32_t binning_x() const;
329 
330  /*!
331  * @brief This function returns a reference to member binning_x
332  * @return Reference to member binning_x
333  */
334  eProsima_user_DllExport uint32_t& binning_x();
335 
336  /*!
337  * @brief This function sets a value in member binning_y
338  * @param _binning_y New value for member binning_y
339  */
340  eProsima_user_DllExport void binning_y(
341  uint32_t _binning_y);
342 
343  /*!
344  * @brief This function returns the value of member binning_y
345  * @return Value of member binning_y
346  */
347  eProsima_user_DllExport uint32_t binning_y() const;
348 
349  /*!
350  * @brief This function returns a reference to member binning_y
351  * @return Reference to member binning_y
352  */
353  eProsima_user_DllExport uint32_t& binning_y();
354 
355  /*!
356  * @brief This function copies the value in member roi
357  * @param _roi New value to be copied in member roi
358  */
359  eProsima_user_DllExport void roi(
361 
362  /*!
363  * @brief This function moves the value in member roi
364  * @param _roi New value to be moved in member roi
365  */
366  eProsima_user_DllExport void roi(
368 
369  /*!
370  * @brief This function returns a constant reference to member roi
371  * @return Constant reference to member roi
372  */
374 
375  /*!
376  * @brief This function returns a reference to member roi
377  * @return Reference to member roi
378  */
380 
381  /*!
382  * @brief This function returns the maximum serialized size of an object
383  * depending on the buffer alignment.
384  * @param current_alignment Buffer alignment.
385  * @return Maximum serialized size.
386  */
387  eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
388  size_t current_alignment = 0);
389 
390  /*!
391  * @brief This function returns the serialized size of a data depending on the buffer alignment.
392  * @param data Data which is calculated its serialized size.
393  * @param current_alignment Buffer alignment.
394  * @return Serialized size.
395  */
396  eProsima_user_DllExport static size_t getCdrSerializedSize(
397  const sensor_msgs::msg::CameraInfo& data,
398  size_t current_alignment = 0);
399 
400  /*!
401  * @brief This function serializes an object using CDR serialization.
402  * @param cdr CDR serialization object.
403  */
404  eProsima_user_DllExport void serialize(
405  eprosima::fastcdr::Cdr& cdr) const;
406 
407  /*!
408  * @brief This function deserializes an object using CDR serialization.
409  * @param cdr CDR serialization object.
410  */
411  eProsima_user_DllExport void deserialize(
412  eprosima::fastcdr::Cdr& cdr);
413 
414  /*!
415  * @brief This function returns the maximum serialized size of the Key of an object
416  * depending on the buffer alignment.
417  * @param current_alignment Buffer alignment.
418  * @return Maximum serialized size.
419  */
420  eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
421  size_t current_alignment = 0);
422 
423  /*!
424  * @brief This function tells you if the Key has been defined for this type
425  */
426  eProsima_user_DllExport static bool isKeyDefined();
427 
428  /*!
429  * @brief This function serializes the key members of an object using CDR serialization.
430  * @param cdr CDR serialization object.
431  */
432  eProsima_user_DllExport void serializeKey(
433  eprosima::fastcdr::Cdr& cdr) const;
434 
435  private:
437  uint32_t m_height;
438  uint32_t m_width;
439  std::string m_distortion_model;
440  std::vector<double> m_d;
441  std::array<double, 9> m_k;
442  std::array<double, 9> m_r;
443  std::array<double, 12> m_p;
444  uint32_t m_binning_x;
445  uint32_t m_binning_y;
447  };
448  } // namespace msg
449 } // namespace sensor_msgs
450 
451 #endif // _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_CAMERAINFO_H_
bool operator==(const Waypoint &lhs, const Waypoint &rhs)
This class represents the structure Header defined by the user in the IDL file.
Definition: Header.h:72
This class represents the structure CameraInfo defined by the user in the IDL file.
Definition: CameraInfo.h:73
sensor_msgs::msg::RegionOfInterest m_roi
Definition: CameraInfo.h:446
std::vector< double > m_d
Definition: CameraInfo.h:440
std::array< double, 9 > m_k
Definition: CameraInfo.h:441
bool operator!=(const Waypoint &lhs, const Waypoint &rhs)
#define eProsima_user_DllExport
Definition: CameraInfo.h:44
This class represents the structure RegionOfInterest defined by the user in the IDL file...
std_msgs::msg::Header m_header
Definition: CameraInfo.h:436
std::array< double, 12 > m_p
Definition: CameraInfo.h:443
std::array< double, 9 > m_r
Definition: CameraInfo.h:442