F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
AggregationMachine_StateEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AggregationMachine_StateEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for AggregationMachine_State enum
5 // ======================================================================
6 
7 #ifndef Svc_AggregationMachine_StateEnumAc_HPP
8 #define Svc_AggregationMachine_StateEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
11 #include "Fw/Types/Assert.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Svc {
16 
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  using SerialType = U8;
29 
31  enum T {
35  FILL = 1,
38  };
39 
41  using t = enum T;
42 
43  public:
44 
45  // ----------------------------------------------------------------------
46  // Constants
47  // ----------------------------------------------------------------------
48 
49  enum {
54  };
55 
56  public:
57 
58  // ----------------------------------------------------------------------
59  // Constructors
60  // ----------------------------------------------------------------------
61 
64  {
65  this->e = __FPRIME_UNINITIALIZED;
66  }
67 
70  const enum T e1
71  )
72  {
73  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
74  this->e = e1;
75  }
76 
79  const SerialType e1
80  )
81  {
82  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
83  this->e = static_cast<enum T>(e1);
84  }
85 
88  const AggregationMachine_State& obj
89  )
90  {
91  this->e = obj.e;
92 #ifdef BUILD_UT
93  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
94  this->m_serializeValue = obj.m_serializeValue;
95 #endif
96  }
97 
98  public:
99 
100  // ----------------------------------------------------------------------
101  // Operators
102  // ----------------------------------------------------------------------
103 
106  const AggregationMachine_State& obj
107  );
108 
111  SerialType e1
112  );
113 
116  enum T e1
117  );
118 
120  operator enum T() const
121  {
122  return this->e;
123  }
124 
126  bool operator==(enum T e1) const
127  {
128  return this->e == e1;
129  }
130 
132  bool operator!=(enum T e1) const
133  {
134  return !(*this == e1);
135  }
136 
137 #ifdef BUILD_UT
138 
140  friend std::ostream& operator<<(
141  std::ostream& os,
142  const AggregationMachine_State& obj
143  );
144 
145 #endif
146 
147  public:
148 
149  // ----------------------------------------------------------------------
150  // Member functions
151  // ----------------------------------------------------------------------
152 
154  bool isValid() const;
155 
158  Fw::SerialBufferBase& buffer,
160  ) const;
161 
164  Fw::SerialBufferBase& buffer,
166  );
167 
168 #if FW_SERIALIZABLE_TO_STRING
169 
171  void toString(
172  Fw::StringBase& sb
173  ) const;
174 
175 #endif
176 
177 #ifdef BUILD_UT
178 
180  void setSerializeValue(
181  SerialType serializeValue
182  );
183 
184 #endif
185 
186  public:
187 
188  // ----------------------------------------------------------------------
189  // Static functions
190  // ----------------------------------------------------------------------
191 
193  static bool isValid(
194  SerialType serialTypeValue
195  );
196 
197  public:
198 
199  // ----------------------------------------------------------------------
200  // Public member variables
201  // ----------------------------------------------------------------------
202 
204  enum T e;
205 
206  private:
207 
208  // ----------------------------------------------------------------------
209  // Private member variables
210  // ----------------------------------------------------------------------
211 
212 #ifdef BUILD_UT
213 
219  bool m_serializeValueIsSet = false;
220 
222  SerialType m_serializeValue = 0;
223 
224 #endif
225 
226  };
227 
228 }
229 
230 #endif
bool operator!=(enum T e1) const
Inequality operator.
AggregationMachine_State()
Constructor (default value of __FPRIME_UNINITIALIZED)
U8 SerialType
The serial representation type.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
SerializeStatus
forward declaration for string
bool isValid() const
Check raw enum value for validity.
AggregationMachine_State & operator=(const AggregationMachine_State &obj)
Copy assignment operator (object)
AggregationMachine_State(const AggregationMachine_State &obj)
Copy constructor.
AggregationMachine_State(const enum T e1)
Constructor (user-provided value)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
enum T t
For backwards compatibility.
RateGroupDivider component implementation.
AggregationMachine_State(const SerialType e1)
Constructor (serial representation value)
Endianness
bool operator==(enum T e1) const
Equality operator.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.