F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
WasmSequencer_StatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title WasmSequencer_StatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for WasmSequencer_Status enum
5 // ======================================================================
6 
7 #ifndef Svc_WasmSequencer_StatusEnumAc_HPP
8 #define Svc_WasmSequencer_StatusEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
11 #include "Fw/Types/Assert.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Svc {
16 
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Types
26  // ----------------------------------------------------------------------
27 
29  using SerialType = I32;
30 
32  enum T {
33  OK = 0,
50  ERR_EOF = 64,
139  };
140 
142  using t = enum T;
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Constants
148  // ----------------------------------------------------------------------
149 
150  enum {
155  };
156 
157  public:
158 
159  // ----------------------------------------------------------------------
160  // Constructors
161  // ----------------------------------------------------------------------
162 
165  {
166  this->e = OK;
167  }
168 
171  const enum T e1
172  )
173  {
174  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
175  this->e = e1;
176  }
177 
180  const SerialType e1
181  )
182  {
183  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
184  this->e = static_cast<enum T>(e1);
185  }
186 
189  const WasmSequencer_Status& obj
190  )
191  {
192  this->e = obj.e;
193 #ifdef BUILD_UT
194  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
195  this->m_serializeValue = obj.m_serializeValue;
196 #endif
197  }
198 
199  public:
200 
201  // ----------------------------------------------------------------------
202  // Operators
203  // ----------------------------------------------------------------------
204 
207  const WasmSequencer_Status& obj
208  );
209 
212  SerialType e1
213  );
214 
217  enum T e1
218  );
219 
221  operator enum T() const
222  {
223  return this->e;
224  }
225 
227  bool operator==(enum T e1) const
228  {
229  return this->e == e1;
230  }
231 
233  bool operator!=(enum T e1) const
234  {
235  return !(*this == e1);
236  }
237 
238 #ifdef BUILD_UT
239 
241  friend std::ostream& operator<<(
242  std::ostream& os,
243  const WasmSequencer_Status& obj
244  );
245 
246 #endif
247 
248  public:
249 
250  // ----------------------------------------------------------------------
251  // Member functions
252  // ----------------------------------------------------------------------
253 
255  bool isValid() const;
256 
259  Fw::SerialBufferBase& buffer,
261  ) const;
262 
265  Fw::SerialBufferBase& buffer,
267  );
268 
269 #if FW_SERIALIZABLE_TO_STRING
270 
272  void toString(
273  Fw::StringBase& sb
274  ) const;
275 
276 #endif
277 
278 #ifdef BUILD_UT
279 
281  void setSerializeValue(
282  SerialType serializeValue
283  );
284 
285 #endif
286 
287  public:
288 
289  // ----------------------------------------------------------------------
290  // Static functions
291  // ----------------------------------------------------------------------
292 
294  static bool isValid(
295  SerialType serialTypeValue
296  );
297 
298  public:
299 
300  // ----------------------------------------------------------------------
301  // Public member variables
302  // ----------------------------------------------------------------------
303 
305  enum T e;
306 
307  private:
308 
309  // ----------------------------------------------------------------------
310  // Private member variables
311  // ----------------------------------------------------------------------
312 
313 #ifdef BUILD_UT
314 
320  bool m_serializeValueIsSet = false;
321 
323  SerialType m_serializeValue = 0;
324 
325 #endif
326 
327  };
328 
329 }
330 
331 #endif
WasmSequencer_Status()
Constructor (default value of OK)
WasmSequencer_Status & operator=(const WasmSequencer_Status &obj)
Copy assignment operator (object)
I32 SerialType
The serial representation type.
SerializeStatus
forward declaration for string
enum T t
For backwards compatibility.
bool operator==(enum T e1) const
Equality operator.
WasmSequencer_Status(const WasmSequencer_Status &obj)
Copy constructor.
bool isValid() const
Check raw enum value for validity.
The size of the serial representation.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
WasmSequencer_Status(const enum T e1)
Constructor (user-provided value)
bool operator!=(enum T e1) const
Inequality operator.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
RateGroupDivider component implementation.
Endianness
Corresponds to spacewasm_status_t.
WasmSequencer_Status(const SerialType e1)
Constructor (serial representation value)
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.