CARLA
TF2Error.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 TF2Error.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_TF2_MSGS_MSG_TF2ERROR_H_
23 #define _FAST_DDS_GENERATED_TF2_MSGS_MSG_TF2ERROR_H_
24 
25 #include <fastrtps/utils/fixed_size_string.hpp>
26 
27 #include <stdint.h>
28 #include <array>
29 #include <string>
30 #include <vector>
31 #include <map>
32 #include <bitset>
33 
34 #if defined(_WIN32)
35 #if defined(EPROSIMA_USER_DLL_EXPORT)
36 #define eProsima_user_DllExport __declspec( dllexport )
37 #else
38 #define eProsima_user_DllExport
39 #endif // EPROSIMA_USER_DLL_EXPORT
40 #else
41 #define eProsima_user_DllExport
42 #endif // _WIN32
43 
44 #if defined(_WIN32)
45 #if defined(EPROSIMA_USER_DLL_EXPORT)
46 #if defined(TF2Error_SOURCE)
47 #define TF2Error_DllAPI __declspec( dllexport )
48 #else
49 #define TF2Error_DllAPI __declspec( dllimport )
50 #endif // TF2Error_SOURCE
51 #else
52 #define TF2Error_DllAPI
53 #endif // EPROSIMA_USER_DLL_EXPORT
54 #else
55 #define TF2Error_DllAPI
56 #endif // _WIN32
57 
58 namespace eprosima {
59 namespace fastcdr {
60 class Cdr;
61 } // namespace fastcdr
62 } // namespace eprosima
63 
64 
65 namespace tf2_msgs {
66  namespace msg {
67  const uint8_t TF2Error__NO_ERROR = 0;
68  const uint8_t TF2Error__LOOKUP_ERROR = 1;
69  const uint8_t TF2Error__CONNECTIVITY_ERROR = 2;
70  const uint8_t TF2Error__EXTRAPOLATION_ERROR = 3;
72  const uint8_t TF2Error__TIMEOUT_ERROR = 5;
73  const uint8_t TF2Error__TRANSFORM_ERROR = 6;
74  /*!
75  * @brief This class represents the structure TF2Error defined by the user in the IDL file.
76  * @ingroup TF2ERROR
77  */
78  class TF2Error
79  {
80  public:
81 
82  /*!
83  * @brief Default constructor.
84  */
86 
87  /*!
88  * @brief Default destructor.
89  */
90  eProsima_user_DllExport ~TF2Error();
91 
92  /*!
93  * @brief Copy constructor.
94  * @param x Reference to the object tf2_msgs::msg::TF2Error that will be copied.
95  */
96  eProsima_user_DllExport TF2Error(
97  const TF2Error& x);
98 
99  /*!
100  * @brief Move constructor.
101  * @param x Reference to the object tf2_msgs::msg::TF2Error that will be copied.
102  */
103  eProsima_user_DllExport TF2Error(
104  TF2Error&& x) noexcept;
105 
106  /*!
107  * @brief Copy assignment.
108  * @param x Reference to the object tf2_msgs::msg::TF2Error that will be copied.
109  */
110  eProsima_user_DllExport TF2Error& operator =(
111  const TF2Error& x);
112 
113  /*!
114  * @brief Move assignment.
115  * @param x Reference to the object tf2_msgs::msg::TF2Error that will be copied.
116  */
117  eProsima_user_DllExport TF2Error& operator =(
118  TF2Error&& x) noexcept;
119 
120  /*!
121  * @brief Comparison operator.
122  * @param x tf2_msgs::msg::TF2Error object to compare.
123  */
125  const TF2Error& x) const;
126 
127  /*!
128  * @brief Comparison operator.
129  * @param x tf2_msgs::msg::TF2Error object to compare.
130  */
132  const TF2Error& x) const;
133 
134  /*!
135  * @brief This function sets a value in member error
136  * @param _error New value for member error
137  */
138  eProsima_user_DllExport void error(
139  uint8_t _error);
140 
141  /*!
142  * @brief This function returns the value of member error
143  * @return Value of member error
144  */
145  eProsima_user_DllExport uint8_t error() const;
146 
147  /*!
148  * @brief This function returns a reference to member error
149  * @return Reference to member error
150  */
151  eProsima_user_DllExport uint8_t& error();
152 
153  /*!
154  * @brief This function copies the value in member error_string
155  * @param _error_string New value to be copied in member error_string
156  */
157  eProsima_user_DllExport void error_string(
158  const std::string& _error_string);
159 
160  /*!
161  * @brief This function moves the value in member error_string
162  * @param _error_string New value to be moved in member error_string
163  */
164  eProsima_user_DllExport void error_string(
165  std::string&& _error_string);
166 
167  /*!
168  * @brief This function returns a constant reference to member error_string
169  * @return Constant reference to member error_string
170  */
171  eProsima_user_DllExport const std::string& error_string() const;
172 
173  /*!
174  * @brief This function returns a reference to member error_string
175  * @return Reference to member error_string
176  */
177  eProsima_user_DllExport std::string& error_string();
178 
179  /*!
180  * @brief This function returns the maximum serialized size of an object
181  * depending on the buffer alignment.
182  * @param current_alignment Buffer alignment.
183  * @return Maximum serialized size.
184  */
185  eProsima_user_DllExport static size_t getMaxCdrSerializedSize(
186  size_t current_alignment = 0);
187 
188  /*!
189  * @brief This function returns the serialized size of a data depending on the buffer alignment.
190  * @param data Data which is calculated its serialized size.
191  * @param current_alignment Buffer alignment.
192  * @return Serialized size.
193  */
194  eProsima_user_DllExport static size_t getCdrSerializedSize(
195  const tf2_msgs::msg::TF2Error& data,
196  size_t current_alignment = 0);
197 
198  /*!
199  * @brief This function serializes an object using CDR serialization.
200  * @param cdr CDR serialization object.
201  */
202  eProsima_user_DllExport void serialize(
203  eprosima::fastcdr::Cdr& cdr) const;
204 
205  /*!
206  * @brief This function deserializes an object using CDR serialization.
207  * @param cdr CDR serialization object.
208  */
209  eProsima_user_DllExport void deserialize(
210  eprosima::fastcdr::Cdr& cdr);
211 
212  /*!
213  * @brief This function returns the maximum serialized size of the Key of an object
214  * depending on the buffer alignment.
215  * @param current_alignment Buffer alignment.
216  * @return Maximum serialized size.
217  */
218  eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(
219  size_t current_alignment = 0);
220 
221  /*!
222  * @brief This function tells you if the Key has been defined for this type
223  */
224  eProsima_user_DllExport static bool isKeyDefined();
225 
226  /*!
227  * @brief This function serializes the key members of an object using CDR serialization.
228  * @param cdr CDR serialization object.
229  */
230  eProsima_user_DllExport void serializeKey(
231  eprosima::fastcdr::Cdr& cdr) const;
232 
233  private:
234  uint8_t m_error;
235  std::string m_error_string;
236  };
237  } // namespace msg
238 } // namespace tf2_msgs
239 
240 #endif // _FAST_DDS_GENERATED_TF2_MSGS_MSG_TF2ERROR_H_
const uint8_t TF2Error__TRANSFORM_ERROR
Definition: TF2Error.h:73
#define eProsima_user_DllExport
Definition: TF2Error.h:41
bool operator==(const Waypoint &lhs, const Waypoint &rhs)
std::string m_error_string
Definition: TF2Error.h:235
const uint8_t TF2Error__INVALID_ARGUMENT_ERROR
Definition: TF2Error.h:71
const uint8_t TF2Error__EXTRAPOLATION_ERROR
Definition: TF2Error.h:70
bool operator!=(const Waypoint &lhs, const Waypoint &rhs)
const uint8_t TF2Error__CONNECTIVITY_ERROR
Definition: TF2Error.h:69
This class represents the structure TF2Error defined by the user in the IDL file. ...
Definition: TF2Error.h:78
const uint8_t TF2Error__TIMEOUT_ERROR
Definition: TF2Error.h:72
const uint8_t TF2Error__NO_ERROR
Definition: TF2Error.h:67
const uint8_t TF2Error__LOOKUP_ERROR
Definition: TF2Error.h:68