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,
46  };
47 
49  typedef enum T t;
50 
51  public:
52 
53  // ----------------------------------------------------------------------
54  // Constants
55  // ----------------------------------------------------------------------
56 
57  enum {
62  };
63 
64  public:
65 
66  // ----------------------------------------------------------------------
67  // Constructors
68  // ----------------------------------------------------------------------
69 
72  {
73  this->e = configConstants;
74  }
75 
78  const enum T e1
79  )
80  {
81  this->e = e1;
82  }
83 
86  const Phases& obj
87  )
88  {
89  this->e = obj.e;
90  }
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Operators
96  // ----------------------------------------------------------------------
97 
100  const Phases& obj
101  );
102 
104  Phases& operator=(
105  enum T e1
106  );
107 
109  operator enum T() const
110  {
111  return this->e;
112  }
113 
115  bool operator==(enum T e1) const
116  {
117  return this->e == e1;
118  }
119 
121  bool operator!=(enum T e1) const
122  {
123  return !(*this == e1);
124  }
125 
126 #ifdef BUILD_UT
127 
129  friend std::ostream& operator<<(
130  std::ostream& os,
131  const Phases& obj
132  );
133 
134 #endif
135 
136  public:
137 
138  // ----------------------------------------------------------------------
139  // Member functions
140  // ----------------------------------------------------------------------
141 
143  bool isValid() const;
144 
147  Fw::SerialBufferBase& buffer,
149  ) const;
150 
153  Fw::SerialBufferBase& buffer,
155  );
156 
157 #if FW_SERIALIZABLE_TO_STRING
158 
160  void toString(
161  Fw::StringBase& sb
162  ) const;
163 
164 #endif
165 
166  public:
167 
168  // ----------------------------------------------------------------------
169  // Member variables
170  // ----------------------------------------------------------------------
171 
173  enum T e;
174 
175  };
176 
177  }
178 
179 }
180 
181 #endif
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.
enum 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==(enum T e1) const
Equality operator.
bool operator!=(enum T e1) const
Inequality operator.
Phases(const Phases &obj)
Copy constructor.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
The number of enumerated constants.
U8 SerialType
The serial representation type.
Phases()
Constructor (default value of configConstants)
Phases(const enum T e1)
Constructor (user-provided value)
enum T e
The raw enum value.
Endianness
Phases & operator=(const Phases &obj)
Copy assignment operator (object)
T
The raw enum type.
Big endian serialization.