F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PolyDbEntryEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PolyDbEntryEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PolyDbEntry enum
5 // ======================================================================
6 
7 #ifndef Svc_PolyDbCfg_PolyDbEntryEnumAc_HPP
8 #define Svc_PolyDbCfg_PolyDbEntryEnumAc_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 PolyDbCfg {
18 
21  class PolyDbEntry :
22  public Fw::Serializable
23  {
24 
25  public:
26 
27  // ----------------------------------------------------------------------
28  // Types
29  // ----------------------------------------------------------------------
30 
32  using SerialType = U32;
33 
35  enum T {
54  };
55 
57  using t = enum T;
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Constants
63  // ----------------------------------------------------------------------
64 
65  enum {
70  };
71 
72  public:
73 
74  // ----------------------------------------------------------------------
75  // Constructors
76  // ----------------------------------------------------------------------
77 
80  {
81  this->e = POLYDB_ENTRY_00;
82  }
83 
86  const enum T e1
87  )
88  {
89  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
90  this->e = e1;
91  }
92 
95  const SerialType e1
96  )
97  {
98  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
99  this->e = static_cast<enum T>(e1);
100  }
101 
104  const PolyDbEntry& obj
105  )
106  {
107  this->e = obj.e;
108 #ifdef BUILD_UT
109  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
110  this->m_serializeValue = obj.m_serializeValue;
111 #endif
112  }
113 
114  public:
115 
116  // ----------------------------------------------------------------------
117  // Operators
118  // ----------------------------------------------------------------------
119 
122  const PolyDbEntry& obj
123  );
124 
127  SerialType e1
128  );
129 
132  enum T e1
133  );
134 
136  operator enum T() const
137  {
138  return this->e;
139  }
140 
142  bool operator==(enum T e1) const
143  {
144  return this->e == e1;
145  }
146 
148  bool operator!=(enum T e1) const
149  {
150  return !(*this == e1);
151  }
152 
153 #ifdef BUILD_UT
154 
156  friend std::ostream& operator<<(
157  std::ostream& os,
158  const PolyDbEntry& obj
159  );
160 
161 #endif
162 
163  public:
164 
165  // ----------------------------------------------------------------------
166  // Member functions
167  // ----------------------------------------------------------------------
168 
170  bool isValid() const;
171 
174  Fw::SerialBufferBase& buffer,
176  ) const;
177 
180  Fw::SerialBufferBase& buffer,
182  );
183 
184 #if FW_SERIALIZABLE_TO_STRING
185 
187  void toString(
188  Fw::StringBase& sb
189  ) const;
190 
191 #endif
192 
193 #ifdef BUILD_UT
194 
196  void setSerializeValue(
197  SerialType serializeValue
198  );
199 
200 #endif
201 
202  public:
203 
204  // ----------------------------------------------------------------------
205  // Static functions
206  // ----------------------------------------------------------------------
207 
209  static bool isValid(
210  SerialType serialTypeValue
211  );
212 
213  public:
214 
215  // ----------------------------------------------------------------------
216  // Public member variables
217  // ----------------------------------------------------------------------
218 
220  enum T e;
221 
222  private:
223 
224  // ----------------------------------------------------------------------
225  // Private member variables
226  // ----------------------------------------------------------------------
227 
228 #ifdef BUILD_UT
229 
235  bool m_serializeValueIsSet = false;
236 
238  SerialType m_serializeValue = 0;
239 
240 #endif
241 
242  };
243 
244  }
245 
246 }
247 
248 #endif
PolyDbEntry & operator=(const PolyDbEntry &obj)
Copy assignment operator (object)
bool operator==(enum T e1) const
Equality operator.
Entry 8.
Entry 4.
bool operator!=(enum T e1) const
Inequality operator.
Entry 5.
The size of the serial representation.
Entry 2.
SerializeStatus
forward declaration for string
T
The raw enum type.
bool isValid() const
Check raw enum value for validity.
Entry 7.
PolyDbEntry(const SerialType e1)
Constructor (serial representation value)
enum T t
For backwards compatibility.
enum T e
The raw enum value.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
PolyDbEntry(const enum T e1)
Constructor (user-provided value)
PolyDbEntry()
Constructor (default value of POLYDB_ENTRY_00)
RateGroupDivider component implementation.
Entry 6.
PolyDbEntry(const PolyDbEntry &obj)
Copy constructor.
The number of enumerated constants.
Entry 9.
Entry 1.
Endianness
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Entry 0.
Big endian serialization.
U32 SerialType
The serial representation type.