F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ByteStreamStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ByteStreamStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ByteStreamStatus enum
5 // ======================================================================
6 
7 #ifndef Drv_ByteStreamStatusEnumAc_HPP
8 #define Drv_ByteStreamStatusEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Drv {
15 
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,
40  };
41 
43  typedef T t;
44 
45  public:
46 
47  // ----------------------------------------------------------------------
48  // Constants
49  // ----------------------------------------------------------------------
50 
51  enum {
56  };
57 
58  public:
59 
60  // ----------------------------------------------------------------------
61  // Constructors
62  // ----------------------------------------------------------------------
63 
66  {
67  this->e = OP_OK;
68  }
69 
72  const T e1
73  )
74  {
75  this->e = e1;
76  }
77 
80  const ByteStreamStatus& obj
81  )
82  {
83  this->e = obj.e;
84  }
85 
86  public:
87 
88  // ----------------------------------------------------------------------
89  // Operators
90  // ----------------------------------------------------------------------
91 
94  const ByteStreamStatus& obj
95  );
96 
99  T e1
100  );
101 
103  operator T() const
104  {
105  return this->e;
106  }
107 
109  bool operator==(T e1) const
110  {
111  return this->e == e1;
112  }
113 
115  bool operator!=(T e1) const
116  {
117  return !(*this == e1);
118  }
119 
120 #ifdef BUILD_UT
121 
123  friend std::ostream& operator<<(
124  std::ostream& os,
125  const ByteStreamStatus& obj
126  );
127 
128 #endif
129 
130  public:
131 
132  // ----------------------------------------------------------------------
133  // Member functions
134  // ----------------------------------------------------------------------
135 
137  bool isValid() const;
138 
141  Fw::SerializeBufferBase& buffer
142  ) const;
143 
146  Fw::SerializeBufferBase& buffer
147  );
148 
149 #if FW_SERIALIZABLE_TO_STRING
150 
152  void toString(
153  Fw::StringBase& sb
154  ) const;
155 
156 #endif
157 
158  public:
159 
160  // ----------------------------------------------------------------------
161  // Member variables
162  // ----------------------------------------------------------------------
163 
165  T e;
166 
167  };
168 
169 }
170 
171 #endif
bool isValid() const
Check raw enum value for validity.
ByteStreamStatus()
Constructor (default value of OP_OK)
Error occurred, retrying may succeed.
I32 SerialType
The serial representation type.
Receive worked, but there was no data.
SerializeStatus
forward declaration for string
Status returned by the send call.
bool operator==(T e1) const
Equality operator.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
Operation worked as expected.
The size of the serial representation.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
T t
For backwards compatibility.
ByteStreamStatus & operator=(const ByteStreamStatus &obj)
Copy assignment operator (object)
forward declaration
ByteStreamStatus(const T e1)
Constructor (user-provided value)
bool operator!=(T e1) const
Inequality operator.
The number of enumerated constants.
ByteStreamStatus(const ByteStreamStatus &obj)
Copy constructor.