F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SdlsStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SdlsStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for SdlsStatus enum
5 // ======================================================================
6 
7 #ifndef Svc_Ccsds_SdlsStatusEnumAc_HPP
8 #define Svc_Ccsds_SdlsStatusEnumAc_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 Ccsds {
18 
20  class SdlsStatus :
21  public Fw::Serializable
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Types
28  // ----------------------------------------------------------------------
29 
31  using SerialType = U8;
32 
34  enum T {
36  SUCCESS = 0,
46  KEY_ERROR = 5,
49  };
50 
52  using t = enum T;
53 
54  public:
55 
56  // ----------------------------------------------------------------------
57  // Constants
58  // ----------------------------------------------------------------------
59 
60  enum {
65  };
66 
67  public:
68 
69  // ----------------------------------------------------------------------
70  // Constructors
71  // ----------------------------------------------------------------------
72 
75  {
76  this->e = SUCCESS;
77  }
78 
81  const enum T e1
82  )
83  {
84  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
85  this->e = e1;
86  }
87 
90  const SerialType e1
91  )
92  {
93  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
94  this->e = static_cast<enum T>(e1);
95  }
96 
99  const SdlsStatus& obj
100  )
101  {
102  this->e = obj.e;
103 #ifdef BUILD_UT
104  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
105  this->m_serializeValue = obj.m_serializeValue;
106 #endif
107  }
108 
109  public:
110 
111  // ----------------------------------------------------------------------
112  // Operators
113  // ----------------------------------------------------------------------
114 
117  const SdlsStatus& obj
118  );
119 
122  SerialType e1
123  );
124 
127  enum T e1
128  );
129 
131  operator enum T() const
132  {
133  return this->e;
134  }
135 
137  bool operator==(enum T e1) const
138  {
139  return this->e == e1;
140  }
141 
143  bool operator!=(enum T e1) const
144  {
145  return !(*this == e1);
146  }
147 
148 #ifdef BUILD_UT
149 
151  friend std::ostream& operator<<(
152  std::ostream& os,
153  const SdlsStatus& obj
154  );
155 
156 #endif
157 
158  public:
159 
160  // ----------------------------------------------------------------------
161  // Member functions
162  // ----------------------------------------------------------------------
163 
165  bool isValid() const;
166 
169  Fw::SerialBufferBase& buffer,
171  ) const;
172 
175  Fw::SerialBufferBase& buffer,
177  );
178 
179 #if FW_SERIALIZABLE_TO_STRING
180 
182  void toString(
183  Fw::StringBase& sb
184  ) const;
185 
186 #endif
187 
188 #ifdef BUILD_UT
189 
191  void setSerializeValue(
192  SerialType serializeValue
193  );
194 
195 #endif
196 
197  public:
198 
199  // ----------------------------------------------------------------------
200  // Static functions
201  // ----------------------------------------------------------------------
202 
204  static bool isValid(
205  SerialType serialTypeValue
206  );
207 
208  public:
209 
210  // ----------------------------------------------------------------------
211  // Public member variables
212  // ----------------------------------------------------------------------
213 
215  enum T e;
216 
217  private:
218 
219  // ----------------------------------------------------------------------
220  // Private member variables
221  // ----------------------------------------------------------------------
222 
223 #ifdef BUILD_UT
224 
230  bool m_serializeValueIsSet = false;
231 
233  SerialType m_serializeValue = 0;
234 
235 #endif
236 
237  };
238 
239  }
240 
241 }
242 
243 #endif
SdlsStatus(const SerialType e1)
Constructor (serial representation value)
Security association index has no known mapping.
bool isValid() const
Check raw enum value for validity.
The number of enumerated constants.
enum T e
The raw enum value.
enum T t
For backwards compatibility.
bool operator!=(enum T e1) const
Inequality operator.
SdlsStatus()
Constructor (default value of SUCCESS)
Status of an SDLS (Space Data Link Security) encryption/decryption request.
SerializeStatus
forward declaration for string
SdlsStatus(const enum T e1)
Constructor (user-provided value)
Mapped port index is out of range or unconnected.
U8 SerialType
The serial representation type.
bool operator==(enum T e1) const
Equality operator.
Frame failed its authentication check.
SdlsStatus & operator=(const SdlsStatus &obj)
Copy assignment operator (object)
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
The size of the serial representation.
T
The raw enum type.
SdlsStatus(const SdlsStatus &obj)
Copy constructor.
RateGroupDivider component implementation.
Endianness
Request completed successfully.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.