F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TlmSendStateEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TlmSendStateEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TlmSendState enum
5 // ======================================================================
6 
7 #ifndef Svc_TlmSendStateEnumAc_HPP
8 #define Svc_TlmSendStateEnumAc_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  class TlmSendState :
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Types
26  // ----------------------------------------------------------------------
27 
29  using SerialType = U8;
30 
32  enum T {
41  };
42 
44  using t = enum T;
45 
46  public:
47 
48  // ----------------------------------------------------------------------
49  // Constants
50  // ----------------------------------------------------------------------
51 
52  enum {
57  };
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Constructors
63  // ----------------------------------------------------------------------
64 
67  {
68  this->e = INHERIT_FROM_PARENT;
69  }
70 
73  const enum T e1
74  )
75  {
76  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
77  this->e = e1;
78  }
79 
82  const SerialType e1
83  )
84  {
85  FW_ASSERT(isValid(e1), static_cast<FwAssertArgType>(e1));
86  this->e = static_cast<enum T>(e1);
87  }
88 
91  const TlmSendState& obj
92  )
93  {
94  this->e = obj.e;
95 #ifdef BUILD_UT
96  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
97  this->m_serializeValue = obj.m_serializeValue;
98 #endif
99  }
100 
101  public:
102 
103  // ----------------------------------------------------------------------
104  // Operators
105  // ----------------------------------------------------------------------
106 
109  const TlmSendState& obj
110  );
111 
114  SerialType e1
115  );
116 
119  enum T e1
120  );
121 
123  operator enum T() const
124  {
125  return this->e;
126  }
127 
129  bool operator==(enum T e1) const
130  {
131  return this->e == e1;
132  }
133 
135  bool operator!=(enum T e1) const
136  {
137  return !(*this == e1);
138  }
139 
140 #ifdef BUILD_UT
141 
143  friend std::ostream& operator<<(
144  std::ostream& os,
145  const TlmSendState& obj
146  );
147 
148 #endif
149 
150  public:
151 
152  // ----------------------------------------------------------------------
153  // Member functions
154  // ----------------------------------------------------------------------
155 
157  bool isValid() const;
158 
161  Fw::SerialBufferBase& buffer,
163  ) const;
164 
167  Fw::SerialBufferBase& buffer,
169  );
170 
171 #if FW_SERIALIZABLE_TO_STRING
172 
174  void toString(
175  Fw::StringBase& sb
176  ) const;
177 
178 #endif
179 
180 #ifdef BUILD_UT
181 
183  void setSerializeValue(
184  SerialType serializeValue
185  );
186 
187 #endif
188 
189  public:
190 
191  // ----------------------------------------------------------------------
192  // Static functions
193  // ----------------------------------------------------------------------
194 
196  static bool isValid(
197  SerialType serialTypeValue
198  );
199 
200  public:
201 
202  // ----------------------------------------------------------------------
203  // Public member variables
204  // ----------------------------------------------------------------------
205 
207  enum T e;
208 
209  private:
210 
211  // ----------------------------------------------------------------------
212  // Private member variables
213  // ----------------------------------------------------------------------
214 
215 #ifdef BUILD_UT
216 
222  bool m_serializeValueIsSet = false;
223 
225  SerialType m_serializeValue = 0;
226 
227 #endif
228 
229  };
230 
231 }
232 
233 #endif
Send policy of a group or packet. Resolution: packet -> group -> section enable.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
TlmSendState(const enum T e1)
Constructor (user-provided value)
bool operator!=(enum T e1) const
Inequality operator.
U8 SerialType
The serial representation type.
The size of the serial representation.
bool isValid() const
Check raw enum value for validity.
TlmSendState(const SerialType e1)
Constructor (serial representation value)
SerializeStatus
forward declaration for string
The number of enumerated constants.
bool operator==(enum T e1) const
Equality operator.
Packet: use the group&#39;s state; group: use the section enable (default)
TlmSendState(const TlmSendState &obj)
Copy constructor.
enum T t
For backwards compatibility.
T
The raw enum type.
Send only while the section is enabled.
TlmSendState & operator=(const TlmSendState &obj)
Copy assignment operator (object)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
enum T e
The raw enum value.
TlmSendState()
Constructor (default value of INHERIT_FROM_PARENT)
RateGroupDivider component implementation.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
Endianness
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.
Send; the section enable is ignored.