F´ Flight Software - C/C++ Documentation  devel
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 "FpConfig.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Os {
15 
17  class TaskStatus :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef I32 SerialType;
29 
31  enum T {
33  OP_OK = 0,
54  };
55 
57  typedef T t;
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Constants
63  // ----------------------------------------------------------------------
64 
65  enum {
70  };
71 
72  public:
73 
74  // ----------------------------------------------------------------------
75  // Constructors
76  // ----------------------------------------------------------------------
77 
80  {
81  this->e = OP_OK;
82  }
83 
86  const T e1
87  )
88  {
89  this->e = e1;
90  }
91 
94  const TaskStatus& obj
95  )
96  {
97  this->e = obj.e;
98  }
99 
100  public:
101 
102  // ----------------------------------------------------------------------
103  // Operators
104  // ----------------------------------------------------------------------
105 
108  const TaskStatus& obj
109  );
110 
113  T e1
114  );
115 
117  operator T() const
118  {
119  return this->e;
120  }
121 
123  bool operator==(T e1) const
124  {
125  return this->e == e1;
126  }
127 
129  bool operator!=(T e1) const
130  {
131  return !(*this == e1);
132  }
133 
134 #ifdef BUILD_UT
135 
137  friend std::ostream& operator<<(
138  std::ostream& os,
139  const TaskStatus& obj
140  );
141 
142 #endif
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Member functions
148  // ----------------------------------------------------------------------
149 
151  bool isValid() const;
152 
155  Fw::SerializeBufferBase& buffer
156  ) const;
157 
160  Fw::SerializeBufferBase& buffer
161  );
162 
163 #if FW_SERIALIZABLE_TO_STRING
164 
166  void toString(
167  Fw::StringBase& sb
168  ) const;
169 
170 #endif
171 
172  public:
173 
174  // ----------------------------------------------------------------------
175  // Member variables
176  // ----------------------------------------------------------------------
177 
179  T e;
180 
181  };
182 
183 }
184 
185 #endif
C++-compatible configuration header for fprime configuration.
forward declaration
FPP shadow-enum representing Os::Task::Status.
T e
The raw enum value.
TaskStatus(const T e1)
Constructor (user-provided value)
I32 SerialType
The serial representation type.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
bool operator==(T e1) const
Equality operator.
@ NUM_CONSTANTS
The number of enumerated constants.
@ SERIALIZED_SIZE
The size of the serial representation.
bool operator!=(T e1) const
Inequality operator.
T t
For backwards compatibility.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
TaskStatus(const TaskStatus &obj)
Copy constructor.
TaskStatus()
Constructor (default value of OP_OK)
T
The raw enum type.
@ UNKNOWN_ERROR
unexpected error return value
@ INVALID_STATE
Task is in an invalid state for the operation.
@ INVALID_HANDLE
Task handle invalid.
@ INVALID_AFFINITY
unable to set the task affinity
@ DELAY_ERROR
error trying to delay the task
@ ERROR_RESOURCES
unable to allocate more tasks
@ OP_OK
message sent/received okay
@ ERROR_PERMISSION
permissions error setting-up tasks
@ JOIN_ERROR
error trying to join the task
@ INVALID_PARAMS
started task with invalid parameters
@ INVALID_STACK
started with invalid stack size
TaskStatus & operator=(const TaskStatus &obj)
Copy assignment operator (object)
bool isValid() const
Check raw enum value for validity.
SerializeStatus
forward declaration for string