F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PrmDb_MergeEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PrmDb_MergeEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PrmDb_Merge enum
5 // ======================================================================
6 
7 #ifndef Svc_PrmDb_MergeEnumAc_HPP
8 #define Svc_PrmDb_MergeEnumAc_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  class PrmDb_Merge :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  using SerialType = U8;
29 
31  enum T {
32  MERGE = 0,
33  RESET = 1,
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 = MERGE;
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 SerialType e1
76  )
77  {
78  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
79  this->e = static_cast<enum T>(e1);
80  }
81 
84  const PrmDb_Merge& obj
85  )
86  {
87  this->e = obj.e;
88 #ifdef BUILD_UT
89  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
90  this->m_serializeValue = obj.m_serializeValue;
91 #endif
92  }
93 
94  public:
95 
96  // ----------------------------------------------------------------------
97  // Operators
98  // ----------------------------------------------------------------------
99 
102  const PrmDb_Merge& obj
103  );
104 
107  SerialType e1
108  );
109 
112  enum T e1
113  );
114 
116  operator enum T() const
117  {
118  return this->e;
119  }
120 
122  bool operator==(enum T e1) const
123  {
124  return this->e == e1;
125  }
126 
128  bool operator!=(enum T e1) const
129  {
130  return !(*this == e1);
131  }
132 
133 #ifdef BUILD_UT
134 
136  friend std::ostream& operator<<(
137  std::ostream& os,
138  const PrmDb_Merge& obj
139  );
140 
141 #endif
142 
143  public:
144 
145  // ----------------------------------------------------------------------
146  // Member functions
147  // ----------------------------------------------------------------------
148 
150  bool isValid() const;
151 
154  Fw::SerialBufferBase& buffer,
156  ) const;
157 
160  Fw::SerialBufferBase& buffer,
162  );
163 
164 #if FW_SERIALIZABLE_TO_STRING
165 
167  void toString(
168  Fw::StringBase& sb
169  ) const;
170 
171 #endif
172 
173 #ifdef BUILD_UT
174 
176  void setSerializeValue(
177  SerialType serializeValue
178  );
179 
180 #endif
181 
182  public:
183 
184  // ----------------------------------------------------------------------
185  // Static functions
186  // ----------------------------------------------------------------------
187 
189  static bool isValid(
190  SerialType serialTypeValue
191  );
192 
193  public:
194 
195  // ----------------------------------------------------------------------
196  // Public member variables
197  // ----------------------------------------------------------------------
198 
200  enum T e;
201 
202  private:
203 
204  // ----------------------------------------------------------------------
205  // Private member variables
206  // ----------------------------------------------------------------------
207 
208 #ifdef BUILD_UT
209 
215  bool m_serializeValueIsSet = false;
216 
218  SerialType m_serializeValue = 0;
219 
220 #endif
221 
222  };
223 
224 }
225 
226 #endif
T
The raw enum type.
PrmDb_Merge(const enum T e1)
Constructor (user-provided value)
PrmDb_Merge & operator=(const PrmDb_Merge &obj)
Copy assignment operator (object)
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.
U8 SerialType
The serial representation type.
SerializeStatus
forward declaration for string
bool operator!=(enum T e1) const
Inequality operator.
enum T t
For backwards compatibility.
PrmDb_Merge(const PrmDb_Merge &obj)
Copy constructor.
enum T e
The raw enum value.
bool isValid() const
Check raw enum value for validity.
bool operator==(enum T e1) const
Equality operator.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
PrmDb_Merge()
Constructor (default value of MERGE)
RateGroupDivider component implementation.
The number of enumerated constants.
The size of the serial representation.
PrmDb_Merge(const SerialType e1)
Constructor (serial representation value)
Endianness
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.