F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PhasesEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PhasesEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Phases enum
5 // ======================================================================
6 
7 #ifndef Fpp_ToCpp_PhasesEnumAc_HPP
8 #define Fpp_ToCpp_PhasesEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Fpp {
15 
16  namespace ToCpp {
17 
18  class Phases :
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Types
26  // ----------------------------------------------------------------------
27 
29  typedef U8 SerialType;
30 
32  enum T {
35  instances = 2,
42  stopTasks = 9,
45  };
46 
48  typedef T t;
49 
50  public:
51 
52  // ----------------------------------------------------------------------
53  // Constants
54  // ----------------------------------------------------------------------
55 
56  enum {
61  };
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Constructors
67  // ----------------------------------------------------------------------
68 
71  {
72  this->e = configConstants;
73  }
74 
77  const T e1
78  )
79  {
80  this->e = e1;
81  }
82 
85  const Phases& obj
86  )
87  {
88  this->e = obj.e;
89  }
90 
91  public:
92 
93  // ----------------------------------------------------------------------
94  // Operators
95  // ----------------------------------------------------------------------
96 
99  const Phases& obj
100  );
101 
103  Phases& operator=(
104  T e1
105  );
106 
108  operator T() const
109  {
110  return this->e;
111  }
112 
114  bool operator==(T e1) const
115  {
116  return this->e == e1;
117  }
118 
120  bool operator!=(T e1) const
121  {
122  return !(*this == e1);
123  }
124 
125 #ifdef BUILD_UT
126 
128  friend std::ostream& operator<<(
129  std::ostream& os,
130  const Phases& obj
131  );
132 
133 #endif
134 
135  public:
136 
137  // ----------------------------------------------------------------------
138  // Member functions
139  // ----------------------------------------------------------------------
140 
142  bool isValid() const;
143 
146  Fw::SerialBufferBase& buffer,
148  ) const;
149 
152  Fw::SerialBufferBase& buffer,
154  );
155 
156 #if FW_SERIALIZABLE_TO_STRING
157 
159  void toString(
160  Fw::StringBase& sb
161  ) const;
162 
163 #endif
164 
165  public:
166 
167  // ----------------------------------------------------------------------
168  // Member variables
169  // ----------------------------------------------------------------------
170 
172  T e;
173 
174  };
175 
176  }
177 
178 }
179 
180 #endif
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
T t
For backwards compatibility.
SerializeStatus
forward declaration for string
bool isValid() const
Check raw enum value for validity.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
bool operator==(T e1) const
Equality operator.
Phases(const Phases &obj)
Copy constructor.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
U8 SerialType
The serial representation type.
The size of the serial representation.
Phases()
Constructor (default value of configConstants)
bool operator!=(T e1) const
Inequality operator.
Phases(const T e1)
Constructor (user-provided value)
Endianness
Phases & operator=(const Phases &obj)
Copy assignment operator (object)
T e
The raw enum value.
T
The raw enum type.
The number of enumerated constants.
Big endian serialization.