CARLA
CarlaEgoVehicleControl.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 CarlaEgoCarlaEgoVehicleControl.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_CARLA_MSGS_MSG_CARLAEGOCarlaEgoVehicleControl_H_
23 #define _FAST_DDS_GENERATED_CARLA_MSGS_MSG_CARLAEGOCarlaEgoVehicleControl_H_
24 
25 #include "Header.h"
26 
27 #include <fastrtps/utils/fixed_size_string.hpp>
28 
29 #include <stdint.h>
30 #include <array>
31 #include <string>
32 #include <vector>
33 #include <map>
34 #include <bitset>
35 
36 #if defined(_WIN32)
37 #if defined(EPROSIMA_USER_DLL_EXPORT)
38 #define eProsima_user_DllExport __declspec( dllexport )
39 #else
40 #define eProsima_user_DllExport
41 #endif // EPROSIMA_USER_DLL_EXPORT
42 #else
43 #define eProsima_user_DllExport
44 #endif // _WIN32
45 
46 #if defined(_WIN32)
47 #if defined(EPROSIMA_USER_DLL_EXPORT)
48 #if defined(CarlaEgoCarlaEgoVehicleControl_SOURCE)
49 #define CarlaEgoCarlaEgoVehicleControl_DllAPI __declspec( dllexport )
50 #else
51 #define CarlaEgoCarlaEgoVehicleControl_DllAPI __declspec( dllimport )
52 #endif // CarlaEgoCarlaEgoVehicleControl_SOURCE
53 #else
54 #define CarlaEgoCarlaEgoVehicleControl_DllAPI
55 #endif // EPROSIMA_USER_DLL_EXPORT
56 #else
57 #define CarlaEgoCarlaEgoVehicleControl_DllAPI
58 #endif // _WIN32
59 
60 namespace eprosima {
61 namespace fastcdr {
62 class Cdr;
63 } // namespace fastcdr
64 } // namespace eprosima
65 
66 namespace carla_msgs {
67  namespace msg {
68  /*!
69  * @brief This class represents the structure CarlaEgoVehicleControl defined by the user in the IDL file.
70  * @ingroup CarlaEgoVehicleControl
71  */
73  {
74  public:
75 
76  /*!
77  * @brief Default constructor.
78  */
80 
81  /*!
82  * @brief Default destructor.
83  */
84  eProsima_user_DllExport ~CarlaEgoVehicleControl();
85 
86  /*!
87  * @brief Copy constructor.
88  * @param x Reference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.
89  */
90  eProsima_user_DllExport CarlaEgoVehicleControl(
91  const CarlaEgoVehicleControl& x);
92 
93  /*!
94  * @brief Move constructor.
95  * @param x Reference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.
96  */
97  eProsima_user_DllExport CarlaEgoVehicleControl(
98  CarlaEgoVehicleControl&& x) noexcept;
99 
100  /*!
101  * @brief Copy assignment.
102  * @param x Reference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.
103  */
104  eProsima_user_DllExport CarlaEgoVehicleControl& operator =(
105  const CarlaEgoVehicleControl& x);
106 
107  /*!
108  * @brief Move assignment.
109  * @param x Reference to the object carla_msgs::msg::CarlaEgoVehicleControl that will be copied.
110  */
111  eProsima_user_DllExport CarlaEgoVehicleControl& operator =(
112  CarlaEgoVehicleControl&& x) noexcept;
113 
114  /*!
115  * @brief Comparison operator.
116  * @param x carla_msgs::msg::CarlaEgoVehicleControl object to compare.
117  */
119  const CarlaEgoVehicleControl& x) const;
120 
121  /*!
122  * @brief Comparison operator.
123  * @param x carla_msgs::msg::CarlaEgoVehicleControl object to compare.
124  */
126  const CarlaEgoVehicleControl& x) const;
127 
128  /*!
129  * @brief This function copies the value in member header
130  * @param _header New value to be copied in member header
131  */
132  eProsima_user_DllExport void header(
133  const std_msgs::msg::Header& _header);
134 
135  /*!
136  * @brief This function moves the value in member header
137  * @param _header New value to be moved in member header
138  */
139  eProsima_user_DllExport void header(
140  std_msgs::msg::Header&& _header);
141 
142  /*!
143  * @brief This function returns a constant reference to member header
144  * @return Constant reference to member header
145  */
146  eProsima_user_DllExport const std_msgs::msg::Header& header() const;
147 
148  /*!
149  * @brief This function returns a reference to member header
150  * @return Reference to member header
151  */
153  /*!
154  * @brief This function sets a value in member throttle
155  * @param _throttle New value for member throttle
156  */
157  eProsima_user_DllExport void throttle(
158  float _throttle);
159 
160  /*!
161  * @brief This function returns the value of member throttle
162  * @return Value of member throttle
163  */
164  eProsima_user_DllExport float throttle() const;
165 
166  /*!
167  * @brief This function returns a reference to member throttle
168  * @return Reference to member throttle
169  */
170  eProsima_user_DllExport float& throttle();
171 
172  /*!
173  * @brief This function sets a value in member steer
174  * @param _steer New value for member steer
175  */
176  eProsima_user_DllExport void steer(
177  float _steer);
178 
179  /*!
180  * @brief This function returns the value of member steer
181  * @return Value of member steer
182  */
183  eProsima_user_DllExport float steer() const;
184 
185  /*!
186  * @brief This function returns a reference to member steer
187  * @return Reference to member steer
188  */
189  eProsima_user_DllExport float& steer();
190 
191  /*!
192  * @brief This function sets a value in member brake
193  * @param _brake New value for member brake
194  */
195  eProsima_user_DllExport void brake(
196  float _brake);
197 
198  /*!
199  * @brief This function returns the value of member brake
200  * @return Value of member brake
201  */
202  eProsima_user_DllExport float brake() const;
203 
204  /*!
205  * @brief This function returns a reference to member brake
206  * @return Reference to member brake
207  */
208  eProsima_user_DllExport float& brake();
209 
210  /*!
211  * @brief This function sets a value in member hand_brake
212  * @param _hand_brake New value for member hand_brake
213  */
214  eProsima_user_DllExport void hand_brake(
215  bool _hand_brake);
216 
217  /*!
218  * @brief This function returns the value of member hand_brake
219  * @return Value of member hand_brake
220  */
221  eProsima_user_DllExport bool hand_brake() const;
222 
223  /*!
224  * @brief This function returns a reference to member hand_brake
225  * @return Reference to member hand_brake
226  */
227  eProsima_user_DllExport bool& hand_brake();
228 
229  /*!
230  * @brief This function sets a value in member reverse
231  * @param _reverse New value for member reverse
232  */
234  bool _reverse);
235 
236  /*!
237  * @brief This function returns the value of member reverse
238  * @return Value of member reverse
239  */
240  eProsima_user_DllExport bool reverse() const;
241 
242  /*!
243  * @brief This function returns a reference to member reverse
244  * @return Reference to member reverse
245  */
247 
248  /*!
249  * @brief This function sets a value in member gear
250  * @param _gear New value for member gear
251  */
252  eProsima_user_DllExport void gear(
253  int32_t _gear);
254 
255  /*!
256  * @brief This function returns the value of member gear
257  * @return Value of member gear
258  */
259  eProsima_user_DllExport int32_t gear() const;
260 
261  /*!
262  * @brief This function returns a reference to member gear
263  * @return Reference to member gear
264  */
265  eProsima_user_DllExport int32_t& gear();
266 
267  /*!
268  * @brief This function sets a value in member manual_gear_shift
269  * @param _manual_gear_shift New value for member manual_gear_shift
270  */
271  eProsima_user_DllExport void manual_gear_shift(
272  bool _manual_gear_shift);
273 
274  /*!
275  * @brief This function returns the value of member manual_gear_shift
276  * @return Value of member manual_gear_shift
277  */
278  eProsima_user_DllExport bool manual_gear_shift() const;
279 
280  /*!
281  * @brief This function returns a reference to member manual_gear_shift
282  * @return Reference to member manual_gear_shift
283  */
284  eProsima_user_DllExport bool& manual_gear_shift();
285 
286  /*!
287  * @brief This function returns the maximum serialized size of an object
288  * depending on the buffer alignment.
289  * @param current_alignment Buffer alignment.
290  * @return Maximum serialized size.
291  */
292  eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
293  size_t current_alignment = 0);
294 
295  /*!
296  * @brief This function returns the serialized size of a data depending on the buffer alignment.
297  * @param data Data which is calculated its serialized size.
298  * @param current_alignment Buffer alignment.
299  * @return Serialized size.
300  */
301  eProsima_user_DllExport static size_t getCdrSerializedSize(
303  size_t current_alignment = 0);
304 
305  /*!
306  * @brief This function serializes an object using CDR serialization.
307  * @param cdr CDR serialization object.
308  */
309  eProsima_user_DllExport void serialize(
310  eprosima::fastcdr::Cdr& cdr) const;
311 
312  /*!
313  * @brief This function deserializes an object using CDR serialization.
314  * @param cdr CDR serialization object.
315  */
316  eProsima_user_DllExport void deserialize(
317  eprosima::fastcdr::Cdr& cdr);
318 
319  /*!
320  * @brief This function returns the maximum serialized size of the Key of an object
321  * depending on the buffer alignment.
322  * @param current_alignment Buffer alignment.
323  * @return Maximum serialized size.
324  */
325  eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
326  size_t current_alignment = 0);
327 
328  /*!
329  * @brief This function tells you if the Key has been defined for this type
330  */
331  eProsima_user_DllExport static bool isKeyDefined();
332 
333  /*!
334  * @brief This function serializes the key members of an object using CDR serialization.
335  * @param cdr CDR serialization object.
336  */
337  eProsima_user_DllExport void serializeKey(
338  eprosima::fastcdr::Cdr& cdr) const;
339 
340  private:
342  float m_throttle;
343  float m_steer;
344  float m_brake;
346  bool m_reverse;
347  int32_t m_gear;
349 
350  };
351  } // namespace msg
352 } // namespace carla_msgs
353 
354 #endif // _FAST_DDS_GENERATED_CARLA_MSGS_MSG_CARLAEGOCarlaEgoVehicleControl_H_
bool operator==(const Waypoint &lhs, const Waypoint &rhs)
void reverse(I begin, I end)
Definition: pugixml.cpp:7358
This class represents the structure Header defined by the user in the IDL file.
Definition: Header.h:72
This class represents the structure CarlaEgoVehicleControl defined by the user in the IDL file...
bool operator!=(const Waypoint &lhs, const Waypoint &rhs)
#define eProsima_user_DllExport