F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
WaitEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title WaitEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Wait enum
5 // ======================================================================
6 
7 #ifndef Fw_WaitEnumAc_HPP
8 #define Fw_WaitEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Fw {
15 
17  class Wait :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef U8 SerialType;
29 
31  enum T {
33  WAIT = 0,
35  NO_WAIT = 1,
36  };
37 
39  typedef T t;
40 
41  public:
42 
43  // ----------------------------------------------------------------------
44  // Constants
45  // ----------------------------------------------------------------------
46 
47  enum {
52  };
53 
54  public:
55 
56  // ----------------------------------------------------------------------
57  // Constructors
58  // ----------------------------------------------------------------------
59 
61  Wait()
62  {
63  this->e = WAIT;
64  }
65 
68  const T e1
69  )
70  {
71  this->e = e1;
72  }
73 
76  const Wait& obj
77  )
78  {
79  this->e = obj.e;
80  }
81 
82  public:
83 
84  // ----------------------------------------------------------------------
85  // Operators
86  // ----------------------------------------------------------------------
87 
89  Wait& operator=(
90  const Wait& obj
91  );
92 
94  Wait& operator=(
95  T e1
96  );
97 
99  operator T() const
100  {
101  return this->e;
102  }
103 
105  bool operator==(T e1) const
106  {
107  return this->e == e1;
108  }
109 
111  bool operator!=(T e1) const
112  {
113  return !(*this == e1);
114  }
115 
116 #ifdef BUILD_UT
117 
119  friend std::ostream& operator<<(
120  std::ostream& os,
121  const Wait& obj
122  );
123 
124 #endif
125 
126  public:
127 
128  // ----------------------------------------------------------------------
129  // Member functions
130  // ----------------------------------------------------------------------
131 
133  bool isValid() const;
134 
137  Fw::SerialBufferBase& buffer,
139  ) const;
140 
143  Fw::SerialBufferBase& buffer,
145  );
146 
147 #if FW_SERIALIZABLE_TO_STRING
148 
150  void toString(
151  Fw::StringBase& sb
152  ) const;
153 
154 #endif
155 
156  public:
157 
158  // ----------------------------------------------------------------------
159  // Member variables
160  // ----------------------------------------------------------------------
161 
163  T e;
164 
165  };
166 
167 }
168 
169 #endif
bool operator==(T e1) const
Equality operator.
Definition: WaitEnumAc.hpp:105
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
Definition: WaitEnumAc.cpp:68
Wait or don&#39;t wait for something.
Definition: WaitEnumAc.hpp:17
Wait(const T e1)
Constructor (user-provided value)
Definition: WaitEnumAc.hpp:67
The size of the serial representation.
Definition: WaitEnumAc.hpp:49
U8 SerialType
The serial representation type.
Definition: WaitEnumAc.hpp:28
SerializeStatus
forward declaration for string
Wait(const Wait &obj)
Copy constructor.
Definition: WaitEnumAc.hpp:75
Wait & operator=(const Wait &obj)
Copy assignment operator (object)
Definition: WaitEnumAc.cpp:20
T
The raw enum type.
Definition: WaitEnumAc.hpp:31
bool operator!=(T e1) const
Inequality operator.
Definition: WaitEnumAc.hpp:111
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
Definition: WaitEnumAc.cpp:55
T e
The raw enum value.
Definition: WaitEnumAc.hpp:163
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
Wait()
Constructor (default value of WAIT)
Definition: WaitEnumAc.hpp:61
T t
For backwards compatibility.
Definition: WaitEnumAc.hpp:39
Wait for something.
Definition: WaitEnumAc.hpp:33
Implementation of malloc based allocator.
Endianness
bool isValid() const
Check raw enum value for validity.
Definition: WaitEnumAc.cpp:49
Don&#39;t wait for something.
Definition: WaitEnumAc.hpp:35
The number of enumerated constants.
Definition: WaitEnumAc.hpp:51
Big endian serialization.