F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CompressionAlgorithmEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CompressionAlgorithmEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for CompressionAlgorithm enum
5 // ======================================================================
6 
7 #ifndef Svc_CompressionAlgorithmEnumAc_HPP
8 #define Svc_CompressionAlgorithmEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
11 #include "Fw/Types/Assert.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Svc {
16 
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  using SerialType = U8;
29 
31  enum T {
34  };
35 
37  using t = enum T;
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
45  enum {
50  };
51 
52  public:
53 
54  // ----------------------------------------------------------------------
55  // Constructors
56  // ----------------------------------------------------------------------
57 
60  {
61  this->e = UNCOMPRESSED;
62  }
63 
66  const enum T e1
67  )
68  {
69  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
70  this->e = e1;
71  }
72 
75  const CompressionAlgorithm& obj
76  )
77  {
78  this->e = obj.e;
79 #ifdef BUILD_UT
80  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
81  this->m_serializeValue = obj.m_serializeValue;
82 #endif
83  }
84 
85  public:
86 
87  // ----------------------------------------------------------------------
88  // Operators
89  // ----------------------------------------------------------------------
90 
93  const CompressionAlgorithm& obj
94  );
95 
98  enum T e1
99  );
100 
102  operator enum T() const
103  {
104  return this->e;
105  }
106 
108  bool operator==(enum T e1) const
109  {
110  return this->e == e1;
111  }
112 
114  bool operator!=(enum T e1) const
115  {
116  return !(*this == e1);
117  }
118 
119 #ifdef BUILD_UT
120 
122  friend std::ostream& operator<<(
123  std::ostream& os,
124  const CompressionAlgorithm& obj
125  );
126 
127 #endif
128 
129  public:
130 
131  // ----------------------------------------------------------------------
132  // Member functions
133  // ----------------------------------------------------------------------
134 
136  bool isValid() const;
137 
140  Fw::SerialBufferBase& buffer,
142  ) const;
143 
146  Fw::SerialBufferBase& buffer,
148  );
149 
150 #if FW_SERIALIZABLE_TO_STRING
151 
153  void toString(
154  Fw::StringBase& sb
155  ) const;
156 
157 #endif
158 
159 #ifdef BUILD_UT
160 
162  void setSerializeValue(
163  SerialType serializeValue
164  );
165 
166 #endif
167 
168  public:
169 
170  // ----------------------------------------------------------------------
171  // Static functions
172  // ----------------------------------------------------------------------
173 
175  static bool isValid(
176  SerialType serialTypeValue
177  );
178 
179  public:
180 
181  // ----------------------------------------------------------------------
182  // Public member variables
183  // ----------------------------------------------------------------------
184 
186  enum T e;
187 
188  private:
189 
190  // ----------------------------------------------------------------------
191  // Private member variables
192  // ----------------------------------------------------------------------
193 
194 #ifdef BUILD_UT
195 
201  bool m_serializeValueIsSet = false;
202 
204  SerialType m_serializeValue = 0;
205 
206 #endif
207 
208  };
209 
210 }
211 
212 #endif
bool operator==(enum T e1) const
Equality operator.
CompressionAlgorithm()
Constructor (default value of UNCOMPRESSED)
bool isValid() const
Check raw enum value for validity.
SerializeStatus
forward declaration for string
The size of the serial representation.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
CompressionAlgorithm(const enum T e1)
Constructor (user-provided value)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
CompressionAlgorithm & operator=(const CompressionAlgorithm &obj)
Copy assignment operator (object)
CompressionAlgorithm(const CompressionAlgorithm &obj)
Copy constructor.
RateGroupDivider component implementation.
Endianness
enum T t
For backwards compatibility.
bool operator!=(enum T e1) const
Inequality operator.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
U8 SerialType
The serial representation type.
Big endian serialization.