F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FrameErrorEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FrameErrorEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FrameError enum
5 // ======================================================================
6 
7 #ifndef Svc_Ccsds_FrameErrorEnumAc_HPP
8 #define Svc_Ccsds_FrameErrorEnumAc_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 
21  class FrameError :
22  public Fw::Serializable
23  {
24 
25  public:
26 
27  // ----------------------------------------------------------------------
28  // Types
29  // ----------------------------------------------------------------------
30 
32  using SerialType = U8;
33 
35  enum T {
58  };
59 
61  using t = enum T;
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Constants
67  // ----------------------------------------------------------------------
68 
69  enum {
74  };
75 
76  public:
77 
78  // ----------------------------------------------------------------------
79  // Constructors
80  // ----------------------------------------------------------------------
81 
84  {
85  this->e = SP_INVALID_PACKET;
86  }
87 
90  const enum T e1
91  )
92  {
93  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
94  this->e = e1;
95  }
96 
99  const SerialType e1
100  )
101  {
102  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
103  this->e = static_cast<enum T>(e1);
104  }
105 
108  const FrameError& obj
109  )
110  {
111  this->e = obj.e;
112 #ifdef BUILD_UT
113  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
114  this->m_serializeValue = obj.m_serializeValue;
115 #endif
116  }
117 
118  public:
119 
120  // ----------------------------------------------------------------------
121  // Operators
122  // ----------------------------------------------------------------------
123 
126  const FrameError& obj
127  );
128 
131  SerialType e1
132  );
133 
136  enum T e1
137  );
138 
140  operator enum T() const
141  {
142  return this->e;
143  }
144 
146  bool operator==(enum T e1) const
147  {
148  return this->e == e1;
149  }
150 
152  bool operator!=(enum T e1) const
153  {
154  return !(*this == e1);
155  }
156 
157 #ifdef BUILD_UT
158 
160  friend std::ostream& operator<<(
161  std::ostream& os,
162  const FrameError& obj
163  );
164 
165 #endif
166 
167  public:
168 
169  // ----------------------------------------------------------------------
170  // Member functions
171  // ----------------------------------------------------------------------
172 
174  bool isValid() const;
175 
178  Fw::SerialBufferBase& buffer,
180  ) const;
181 
184  Fw::SerialBufferBase& buffer,
186  );
187 
188 #if FW_SERIALIZABLE_TO_STRING
189 
191  void toString(
192  Fw::StringBase& sb
193  ) const;
194 
195 #endif
196 
197 #ifdef BUILD_UT
198 
200  void setSerializeValue(
201  SerialType serializeValue
202  );
203 
204 #endif
205 
206  public:
207 
208  // ----------------------------------------------------------------------
209  // Static functions
210  // ----------------------------------------------------------------------
211 
213  static bool isValid(
214  SerialType serialTypeValue
215  );
216 
217  public:
218 
219  // ----------------------------------------------------------------------
220  // Public member variables
221  // ----------------------------------------------------------------------
222 
224  enum T e;
225 
226  private:
227 
228  // ----------------------------------------------------------------------
229  // Private member variables
230  // ----------------------------------------------------------------------
231 
232 #ifdef BUILD_UT
233 
239  bool m_serializeValueIsSet = false;
240 
242  SerialType m_serializeValue = 0;
243 
244 #endif
245 
246  };
247 
248  }
249 
250 }
251 
252 #endif
CCSDS 732.0-B-5: Transfer Frame Version Number mismatch (4.1.2.2.2)
enum T t
For backwards compatibility.
CCSDS 133.1-B-3: Encapsulation Packet Protocol error.
CCSDS 732.0-B-5: Frame length insufficient.
CCSDS 732.0-B-5: Frame Error Control Field CRC mismatch (4.1.6)
The size of the serial representation.
FrameError(const FrameError &obj)
Copy constructor.
FrameError()
Constructor (default value of SP_INVALID_PACKET)
CCSDS 732.0-B-5: Virtual Channel ID mismatch (4.1.2.3)
bool operator!=(enum T e1) const
Inequality operator.
SerializeStatus
forward declaration for string
enum T e
The raw enum value.
FrameError(const SerialType e1)
Constructor (serial representation value)
FrameError & operator=(const FrameError &obj)
Copy assignment operator (object)
bool operator==(enum T e1) const
Equality operator.
CCSDS 732.0-B-5: Spacecraft ID mismatch (4.1.2.2)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
RateGroupDivider component implementation.
FrameError(const enum T e1)
Constructor (user-provided value)
Endianness
T
The raw enum type.
bool isValid() const
Check raw enum value for validity.
U8 SerialType
The serial representation type.
The number of enumerated constants.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.
CCSDS 732.0-B-5: AOS VC frame count discontinuity detected.