F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DirectiveIdEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DirectiveIdEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DirectiveId enum
5 // ======================================================================
6 
7 #ifndef Svc_Fpy_DirectiveIdEnumAc_HPP
8 #define Svc_Fpy_DirectiveIdEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
11 #include "Fw/Types/Assert.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Svc {
16 
17  namespace Fpy {
18 
19  class DirectiveId :
20  public Fw::Serializable
21  {
22 
23  public:
24 
25  // ----------------------------------------------------------------------
26  // Types
27  // ----------------------------------------------------------------------
28 
30  using SerialType = U8;
31 
33  enum T {
34  INVALID = 0,
35  WAIT_REL = 1,
36  WAIT_ABS = 2,
37  GOTO = 3,
38  IF = 4,
39  NO_OP = 5,
41  PUSH_PRM = 7,
42  CONST_CMD = 8,
43  OR = 9,
44  AND = 10,
45  IEQ = 11,
46  INE = 12,
47  ULT = 13,
48  ULE = 14,
49  UGT = 15,
50  UGE = 16,
51  SLT = 17,
52  SLE = 18,
53  SGT = 19,
54  SGE = 20,
55  FEQ = 21,
56  FNE = 22,
57  FLT = 23,
58  FLE = 24,
59  FGT = 25,
60  FGE = 26,
61  NOT = 27,
62  FPTOSI = 28,
63  FPTOUI = 29,
64  SITOFP = 30,
65  UITOFP = 31,
66  ADD = 32,
67  SUB = 33,
68  MUL = 34,
69  UDIV = 35,
70  SDIV = 36,
71  UMOD = 37,
72  SMOD = 38,
73  FADD = 39,
74  FSUB = 40,
75  FMUL = 41,
76  FDIV = 42,
77  FPOW = 43,
78  FLOG = 44,
79  FMOD = 45,
80  FPEXT = 46,
81  FPTRUNC = 47,
82  SIEXT_8_64 = 48,
85  ZIEXT_8_64 = 51,
91  EXIT = 57,
92  ALLOCATE = 58,
94  LOAD_REL = 60,
95  PUSH_VAL = 61,
96  DISCARD = 62,
97  MEMCMP = 63,
98  STACK_CMD = 64,
100  PUSH_TIME = 66,
101  GET_FIELD = 67,
102  PEEK = 68,
103  STORE_REL = 69,
104  CALL = 70,
105  RETURN = 71,
106  LOAD_ABS = 72,
107  STORE_ABS = 73,
109  POP_EVENT = 75,
110  SET_SEED = 76,
111  PUSH_RAND = 77,
113  };
114 
116  using t = enum T;
117 
118  public:
119 
120  // ----------------------------------------------------------------------
121  // Constants
122  // ----------------------------------------------------------------------
123 
124  enum {
129  };
130 
131  public:
132 
133  // ----------------------------------------------------------------------
134  // Constructors
135  // ----------------------------------------------------------------------
136 
139  {
140  this->e = INVALID;
141  }
142 
145  const enum T e1
146  )
147  {
148  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
149  this->e = e1;
150  }
151 
154  const DirectiveId& obj
155  )
156  {
157  this->e = obj.e;
158 #ifdef BUILD_UT
159  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
160  this->m_serializeValue = obj.m_serializeValue;
161 #endif
162  }
163 
164  public:
165 
166  // ----------------------------------------------------------------------
167  // Operators
168  // ----------------------------------------------------------------------
169 
172  const DirectiveId& obj
173  );
174 
177  enum T e1
178  );
179 
181  operator enum T() const
182  {
183  return this->e;
184  }
185 
187  bool operator==(enum T e1) const
188  {
189  return this->e == e1;
190  }
191 
193  bool operator!=(enum T e1) const
194  {
195  return !(*this == e1);
196  }
197 
198 #ifdef BUILD_UT
199 
201  friend std::ostream& operator<<(
202  std::ostream& os,
203  const DirectiveId& obj
204  );
205 
206 #endif
207 
208  public:
209 
210  // ----------------------------------------------------------------------
211  // Member functions
212  // ----------------------------------------------------------------------
213 
215  bool isValid() const;
216 
219  Fw::SerialBufferBase& buffer,
221  ) const;
222 
225  Fw::SerialBufferBase& buffer,
227  );
228 
229 #if FW_SERIALIZABLE_TO_STRING
230 
232  void toString(
233  Fw::StringBase& sb
234  ) const;
235 
236 #endif
237 
238 #ifdef BUILD_UT
239 
241  void setSerializeValue(
242  SerialType serializeValue
243  );
244 
245 #endif
246 
247  public:
248 
249  // ----------------------------------------------------------------------
250  // Static functions
251  // ----------------------------------------------------------------------
252 
254  static bool isValid(
255  SerialType serialTypeValue
256  );
257 
258  public:
259 
260  // ----------------------------------------------------------------------
261  // Public member variables
262  // ----------------------------------------------------------------------
263 
265  enum T e;
266 
267  private:
268 
269  // ----------------------------------------------------------------------
270  // Private member variables
271  // ----------------------------------------------------------------------
272 
273 #ifdef BUILD_UT
274 
280  bool m_serializeValueIsSet = false;
281 
283  SerialType m_serializeValue = 0;
284 
285 #endif
286 
287  };
288 
289  }
290 
291 }
292 
293 #endif
DirectiveId(const DirectiveId &obj)
Copy constructor.
DirectiveId()
Constructor (default value of INVALID)
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
The number of enumerated constants.
SerializeStatus
forward declaration for string
DirectiveId & operator=(const DirectiveId &obj)
Copy assignment operator (object)
enum T e
The raw enum value.
The size of the serial representation.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
DirectiveId(const enum T e1)
Constructor (user-provided value)
bool isValid() const
Check raw enum value for validity.
T
The raw enum type.
U8 SerialType
The serial representation type.
bool operator==(enum T e1) const
Equality operator.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
RateGroupDivider component implementation.
bool operator!=(enum T e1) const
Inequality operator.
Endianness
enum T t
For backwards compatibility.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.