F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TaskStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TaskStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TaskStatus enum
5 // ======================================================================
6 
7 #ifndef Os_TaskStatusEnumAc_HPP
8 #define Os_TaskStatusEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
11 #include "Fw/Types/Assert.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Os {
16 
18  class TaskStatus :
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Types
26  // ----------------------------------------------------------------------
27 
29  using SerialType = U8;
30 
32  enum T {
34  OP_OK = 0,
59  };
60 
62  using t = enum T;
63 
64  public:
65 
66  // ----------------------------------------------------------------------
67  // Constants
68  // ----------------------------------------------------------------------
69 
70  enum {
75  };
76 
77  public:
78 
79  // ----------------------------------------------------------------------
80  // Constructors
81  // ----------------------------------------------------------------------
82 
85  {
86  this->e = OP_OK;
87  }
88 
91  const enum T e1
92  )
93  {
94  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
95  this->e = e1;
96  }
97 
100  const SerialType e1
101  )
102  {
103  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
104  this->e = static_cast<enum T>(e1);
105  }
106 
109  const TaskStatus& obj
110  )
111  {
112  this->e = obj.e;
113 #ifdef BUILD_UT
114  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
115  this->m_serializeValue = obj.m_serializeValue;
116 #endif
117  }
118 
119  public:
120 
121  // ----------------------------------------------------------------------
122  // Operators
123  // ----------------------------------------------------------------------
124 
127  const TaskStatus& obj
128  );
129 
132  SerialType e1
133  );
134 
137  enum T e1
138  );
139 
141  operator enum T() const
142  {
143  return this->e;
144  }
145 
147  bool operator==(enum T e1) const
148  {
149  return this->e == e1;
150  }
151 
153  bool operator!=(enum T e1) const
154  {
155  return !(*this == e1);
156  }
157 
158 #ifdef BUILD_UT
159 
161  friend std::ostream& operator<<(
162  std::ostream& os,
163  const TaskStatus& obj
164  );
165 
166 #endif
167 
168  public:
169 
170  // ----------------------------------------------------------------------
171  // Member functions
172  // ----------------------------------------------------------------------
173 
175  bool isValid() const;
176 
179  Fw::SerialBufferBase& buffer,
181  ) const;
182 
185  Fw::SerialBufferBase& buffer,
187  );
188 
189 #if FW_SERIALIZABLE_TO_STRING
190 
192  void toString(
193  Fw::StringBase& sb
194  ) const;
195 
196 #endif
197 
198 #ifdef BUILD_UT
199 
201  void setSerializeValue(
202  SerialType serializeValue
203  );
204 
205 #endif
206 
207  public:
208 
209  // ----------------------------------------------------------------------
210  // Static functions
211  // ----------------------------------------------------------------------
212 
214  static bool isValid(
215  SerialType serialTypeValue
216  );
217 
218  public:
219 
220  // ----------------------------------------------------------------------
221  // Public member variables
222  // ----------------------------------------------------------------------
223 
225  enum T e;
226 
227  private:
228 
229  // ----------------------------------------------------------------------
230  // Private member variables
231  // ----------------------------------------------------------------------
232 
233 #ifdef BUILD_UT
234 
240  bool m_serializeValueIsSet = false;
241 
243  SerialType m_serializeValue = 0;
244 
245 #endif
246 
247  };
248 
249 }
250 
251 #endif
bool isValid() const
Check raw enum value for validity.
Task feature is not supported.
error trying to join the task
enum T e
The raw enum value.
U8 SerialType
The serial representation type.
started with invalid stack size
SerializeStatus
forward declaration for string
TaskStatus(const SerialType e1)
Constructor (serial representation value)
T
The raw enum type.
bool operator==(enum T e1) const
Equality operator.
FPP shadow-enum representing Os::Task::Status.
started task with invalid parameters
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
error trying to delay the task
The size of the serial representation.
TaskStatus(const enum T e1)
Constructor (user-provided value)
started task with invalid priority
unable to set the task affinity
permissions error setting-up tasks
enum T t
For backwards compatibility.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
message sent/received okay
Task is in an invalid state for the operation.
The number of enumerated constants.
TaskStatus & operator=(const TaskStatus &obj)
Copy assignment operator (object)
bool operator!=(enum T e1) const
Inequality operator.
Endianness
TaskStatus(const TaskStatus &obj)
Copy constructor.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
TaskStatus()
Constructor (default value of OP_OK)
unexpected error return value
#define FW_ASSERT(...)
Definition: Assert.hpp:14
unable to allocate more tasks
Big endian serialization.