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 
19  class FrameError :
20  public Fw::Serializable
21  {
22 
23  public:
24 
25  // ----------------------------------------------------------------------
26  // Types
27  // ----------------------------------------------------------------------
28 
30  typedef U8 SerialType;
31 
33  enum T {
40  };
41 
43  typedef enum 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 = SP_INVALID_PACKET;
68  }
69 
72  const enum T e1
73  )
74  {
75  this->e = e1;
76  }
77 
80  const FrameError& obj
81  )
82  {
83  this->e = obj.e;
84  }
85 
86  public:
87 
88  // ----------------------------------------------------------------------
89  // Operators
90  // ----------------------------------------------------------------------
91 
94  const FrameError& obj
95  );
96 
99  enum T e1
100  );
101 
103  operator enum T() const
104  {
105  return this->e;
106  }
107 
109  bool operator==(enum T e1) const
110  {
111  return this->e == e1;
112  }
113 
115  bool operator!=(enum 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 FrameError& obj
126  );
127 
128 #endif
129 
130  public:
131 
132  // ----------------------------------------------------------------------
133  // Member functions
134  // ----------------------------------------------------------------------
135 
137  bool isValid() const;
138 
141  Fw::SerialBufferBase& buffer,
143  ) const;
144 
147  Fw::SerialBufferBase& buffer,
149  );
150 
151 #if FW_SERIALIZABLE_TO_STRING
152 
154  void toString(
155  Fw::StringBase& sb
156  ) const;
157 
158 #endif
159 
160  public:
161 
162  // ----------------------------------------------------------------------
163  // Member variables
164  // ----------------------------------------------------------------------
165 
167  enum T e;
168 
169  };
170 
171  }
172 
173 }
174 
175 #endif
Enum representing an error during framing/deframing in the CCSDS protocols.
enum T t
For backwards compatibility.
FrameError(const FrameError &obj)
Copy constructor.
FrameError()
Constructor (default value of SP_INVALID_PACKET)
bool operator!=(enum T e1) const
Inequality operator.
The number of enumerated constants.
SerializeStatus
forward declaration for string
enum T e
The raw enum value.
The size of the serial representation.
FrameError & operator=(const FrameError &obj)
Copy assignment operator (object)
bool operator==(enum T e1) const
Equality operator.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
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.
U8 SerialType
The serial representation type.
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.
Big endian serialization.