F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
QueueStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title QueueStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for QueueStatus enum
5 // ======================================================================
6 
7 #ifndef Os_QueueStatusEnumAc_HPP
8 #define Os_QueueStatusEnumAc_HPP
9 
10 #include "FpConfig.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Os {
15 
17  class QueueStatus :
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,
37  EMPTY = 2,
49  FULL = 8,
52  };
53 
55  typedef T t;
56 
57  public:
58 
59  // ----------------------------------------------------------------------
60  // Constants
61  // ----------------------------------------------------------------------
62 
63  enum {
68  };
69 
70  public:
71 
72  // ----------------------------------------------------------------------
73  // Constructors
74  // ----------------------------------------------------------------------
75 
78  {
79  this->e = OP_OK;
80  }
81 
84  const T e1
85  )
86  {
87  this->e = e1;
88  }
89 
92  const QueueStatus& obj
93  )
94  {
95  this->e = obj.e;
96  }
97 
98  public:
99 
100  // ----------------------------------------------------------------------
101  // Operators
102  // ----------------------------------------------------------------------
103 
106  const QueueStatus& obj
107  );
108 
111  T e1
112  );
113 
115  operator T() const
116  {
117  return this->e;
118  }
119 
121  bool operator==(T e1) const
122  {
123  return this->e == e1;
124  }
125 
127  bool operator!=(T e1) const
128  {
129  return !(*this == e1);
130  }
131 
132 #ifdef BUILD_UT
133 
135  friend std::ostream& operator<<(
136  std::ostream& os,
137  const QueueStatus& obj
138  );
139 
140 #endif
141 
142  public:
143 
144  // ----------------------------------------------------------------------
145  // Member functions
146  // ----------------------------------------------------------------------
147 
149  bool isValid() const;
150 
153  Fw::SerializeBufferBase& buffer
154  ) const;
155 
158  Fw::SerializeBufferBase& buffer
159  );
160 
161 #if FW_SERIALIZABLE_TO_STRING
162 
164  void toString(
165  Fw::StringBase& sb
166  ) const;
167 
168 #endif
169 
170  public:
171 
172  // ----------------------------------------------------------------------
173  // Member variables
174  // ----------------------------------------------------------------------
175 
177  T e;
178 
179  };
180 
181 }
182 
183 #endif
C++-compatible configuration header for fprime configuration.
forward declaration
FPP shadow-enum representing Os::Queue::Status.
QueueStatus()
Constructor (default value of OP_OK)
QueueStatus(const T e1)
Constructor (user-provided value)
T t
For backwards compatibility.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
I32 SerialType
The serial representation type.
QueueStatus & operator=(const QueueStatus &obj)
Copy assignment operator (object)
@ NUM_CONSTANTS
The number of enumerated constants.
@ SERIALIZED_SIZE
The size of the serial representation.
bool operator==(T e1) const
Equality operator.
bool isValid() const
Check raw enum value for validity.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
T
The raw enum type.
@ RECEIVE_ERROR
message receive error
@ OP_OK
message sent/received okay
@ SIZE_MISMATCH
attempted to send or receive with buffer too large, too small
@ UNINITIALIZED
Queue wasn't initialized successfully.
@ EMPTY
If non-blocking, all the messages have been drained.
@ ALREADY_CREATED
creating an already created queue
@ FULL
queue was full when attempting to send a message
@ UNKNOWN_ERROR
Unexpected error; can't match with returns.
@ SEND_ERROR
message send error
@ INVALID_PRIORITY
invalid priority requested
T e
The raw enum value.
QueueStatus(const QueueStatus &obj)
Copy constructor.
bool operator!=(T e1) const
Inequality operator.
SerializeStatus
forward declaration for string