F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
QueueIdEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title QueueIdEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for QueueId enum
5 // ======================================================================
6 
7 #ifndef Svc_Ccsds_Cfdp_QueueIdEnumAc_HPP
8 #define Svc_Ccsds_Cfdp_QueueIdEnumAc_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 Ccsds {
18 
19  namespace Cfdp {
20 
23  class QueueId :
24  public Fw::Serializable
25  {
26 
27  public:
28 
29  // ----------------------------------------------------------------------
30  // Types
31  // ----------------------------------------------------------------------
32 
34  using SerialType = U8;
35 
37  enum T {
39  PEND = 0,
40  TXA = 1,
41  TXW = 2,
42  RX = 3,
43  HIST = 4,
44  HIST_FREE = 5,
45  FREE = 6,
46  NUM = 7,
47  };
48 
50  using t = enum T;
51 
52  public:
53 
54  // ----------------------------------------------------------------------
55  // Constants
56  // ----------------------------------------------------------------------
57 
58  enum {
63  };
64 
65  public:
66 
67  // ----------------------------------------------------------------------
68  // Constructors
69  // ----------------------------------------------------------------------
70 
73  {
74  this->e = PEND;
75  }
76 
79  const enum T e1
80  )
81  {
82  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
83  this->e = e1;
84  }
85 
88  const SerialType e1
89  )
90  {
91  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
92  this->e = static_cast<enum T>(e1);
93  }
94 
97  const QueueId& obj
98  )
99  {
100  this->e = obj.e;
101 #ifdef BUILD_UT
102  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
103  this->m_serializeValue = obj.m_serializeValue;
104 #endif
105  }
106 
107  public:
108 
109  // ----------------------------------------------------------------------
110  // Operators
111  // ----------------------------------------------------------------------
112 
115  const QueueId& obj
116  );
117 
120  SerialType e1
121  );
122 
125  enum T e1
126  );
127 
129  operator enum T() const
130  {
131  return this->e;
132  }
133 
135  bool operator==(enum T e1) const
136  {
137  return this->e == e1;
138  }
139 
141  bool operator!=(enum T e1) const
142  {
143  return !(*this == e1);
144  }
145 
146 #ifdef BUILD_UT
147 
149  friend std::ostream& operator<<(
150  std::ostream& os,
151  const QueueId& obj
152  );
153 
154 #endif
155 
156  public:
157 
158  // ----------------------------------------------------------------------
159  // Member functions
160  // ----------------------------------------------------------------------
161 
163  bool isValid() const;
164 
167  Fw::SerialBufferBase& buffer,
169  ) const;
170 
173  Fw::SerialBufferBase& buffer,
175  );
176 
177 #if FW_SERIALIZABLE_TO_STRING
178 
180  void toString(
181  Fw::StringBase& sb
182  ) const;
183 
184 #endif
185 
186 #ifdef BUILD_UT
187 
189  void setSerializeValue(
190  SerialType serializeValue
191  );
192 
193 #endif
194 
195  public:
196 
197  // ----------------------------------------------------------------------
198  // Static functions
199  // ----------------------------------------------------------------------
200 
202  static bool isValid(
203  SerialType serialTypeValue
204  );
205 
206  public:
207 
208  // ----------------------------------------------------------------------
209  // Public member variables
210  // ----------------------------------------------------------------------
211 
213  enum T e;
214 
215  private:
216 
217  // ----------------------------------------------------------------------
218  // Private member variables
219  // ----------------------------------------------------------------------
220 
221 #ifdef BUILD_UT
222 
228  bool m_serializeValueIsSet = false;
229 
231  SerialType m_serializeValue = 0;
232 
233 #endif
234 
235  };
236 
237  }
238 
239  }
240 
241 }
242 
243 #endif
enum T t
For backwards compatibility.
QueueId(const enum T e1)
Constructor (user-provided value)
The size of the serial representation.
first one on this list is active
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
QueueId(const SerialType e1)
Constructor (serial representation value)
enum T e
The raw enum value.
SerializeStatus
forward declaration for string
U8 SerialType
The serial representation type.
bool isValid() const
Check raw enum value for validity.
QueueId(const QueueId &obj)
Copy constructor.
QueueId()
Constructor (default value of PEND)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
The number of enumerated constants.
bool operator!=(enum T e1) const
Inequality operator.
bool operator==(enum T e1) const
Equality operator.
RateGroupDivider component implementation.
QueueId & operator=(const QueueId &obj)
Copy assignment operator (object)
Endianness
T
The raw enum type.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
Big endian serialization.