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"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
16  namespace Ccsds {
17 
20  class FrameError :
21  public Fw::Serializable
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Types
28  // ----------------------------------------------------------------------
29 
31  using SerialType = U8;
32 
34  enum T {
55  };
56 
58  using t = enum T;
59 
60  public:
61 
62  // ----------------------------------------------------------------------
63  // Constants
64  // ----------------------------------------------------------------------
65 
66  enum {
71  };
72 
73  public:
74 
75  // ----------------------------------------------------------------------
76  // Constructors
77  // ----------------------------------------------------------------------
78 
81  {
82  this->e = SP_INVALID_PACKET;
83  }
84 
87  const enum T e1
88  )
89  {
90  this->e = e1;
91  }
92 
95  const FrameError& obj
96  )
97  {
98  this->e = obj.e;
99  }
100 
101  public:
102 
103  // ----------------------------------------------------------------------
104  // Operators
105  // ----------------------------------------------------------------------
106 
109  const FrameError& obj
110  );
111 
114  enum T e1
115  );
116 
118  operator enum T() const
119  {
120  return this->e;
121  }
122 
124  bool operator==(enum T e1) const
125  {
126  return this->e == e1;
127  }
128 
130  bool operator!=(enum T e1) const
131  {
132  return !(*this == e1);
133  }
134 
135 #ifdef BUILD_UT
136 
138  friend std::ostream& operator<<(
139  std::ostream& os,
140  const FrameError& obj
141  );
142 
143 #endif
144 
145  public:
146 
147  // ----------------------------------------------------------------------
148  // Member functions
149  // ----------------------------------------------------------------------
150 
152  bool isValid() const;
153 
156  Fw::SerialBufferBase& buffer,
158  ) const;
159 
162  Fw::SerialBufferBase& buffer,
164  );
165 
166 #if FW_SERIALIZABLE_TO_STRING
167 
169  void toString(
170  Fw::StringBase& sb
171  ) const;
172 
173 #endif
174 
175  public:
176 
177  // ----------------------------------------------------------------------
178  // Static functions
179  // ----------------------------------------------------------------------
180 
182  static bool isValid(
183  SerialType serialTypeValue
184  );
185 
186  public:
187 
188  // ----------------------------------------------------------------------
189  // Member variables
190  // ----------------------------------------------------------------------
191 
193  enum T e;
194 
195  };
196 
197  }
198 
199 }
200 
201 #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)
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 & 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:53
The size of the serial representation.
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.
The number of enumerated constants.
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.
Big endian serialization.
CCSDS 732.0-B-5: AOS VC frame count discontinuity detected.