F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
RateLogicEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title RateLogicEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for RateLogic enum
5 // ======================================================================
6 
7 #ifndef Svc_RateLogicEnumAc_HPP
8 #define Svc_RateLogicEnumAc_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 RateLogic :
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Types
26  // ----------------------------------------------------------------------
27 
29  using SerialType = I32;
30 
32  enum T {
34  SILENCED = 0,
36  EVERY_MAX = 1,
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 = SILENCED;
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 RateLogic& obj
83  )
84  {
85  this->e = obj.e;
86 #ifdef BUILD_UT
87  this->m_serializeValueIsSet = obj.m_serializeValueIsSet;
88  this->m_serializeValue = obj.m_serializeValue;
89 #endif
90  }
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Operators
96  // ----------------------------------------------------------------------
97 
100  const RateLogic& obj
101  );
102 
105  enum T e1
106  );
107 
109  operator enum T() const
110  {
111  return this->e;
112  }
113 
115  bool operator==(enum T e1) const
116  {
117  return this->e == e1;
118  }
119 
121  bool operator!=(enum T e1) const
122  {
123  return !(*this == e1);
124  }
125 
126 #ifdef BUILD_UT
127 
129  friend std::ostream& operator<<(
130  std::ostream& os,
131  const RateLogic& obj
132  );
133 
134 #endif
135 
136  public:
137 
138  // ----------------------------------------------------------------------
139  // Member functions
140  // ----------------------------------------------------------------------
141 
143  bool isValid() const;
144 
147  Fw::SerialBufferBase& buffer,
149  ) const;
150 
153  Fw::SerialBufferBase& buffer,
155  );
156 
157 #if FW_SERIALIZABLE_TO_STRING
158 
160  void toString(
161  Fw::StringBase& sb
162  ) const;
163 
164 #endif
165 
166 #ifdef BUILD_UT
167 
169  void setSerializeValue(
170  SerialType serializeValue
171  );
172 
173 #endif
174 
175  public:
176 
177  // ----------------------------------------------------------------------
178  // Static functions
179  // ----------------------------------------------------------------------
180 
182  static bool isValid(
183  SerialType serialTypeValue
184  );
185 
186  public:
187 
188  // ----------------------------------------------------------------------
189  // Public member variables
190  // ----------------------------------------------------------------------
191 
193  enum T e;
194 
195  private:
196 
197  // ----------------------------------------------------------------------
198  // Private member variables
199  // ----------------------------------------------------------------------
200 
201 #ifdef BUILD_UT
202 
208  bool m_serializeValueIsSet = false;
209 
211  SerialType m_serializeValue = 0;
212 
213 #endif
214 
215  };
216 
217 }
218 
219 #endif
bool operator==(enum T e1) const
Equality operator.
Send on updates after MIN ticks since last send OR at MAX ticks between sends.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
enum T e
The raw enum value.
Send on updates after MIN ticks since last send.
Send every MAX ticks between sends.
SerializeStatus
forward declaration for string
RateLogic(const RateLogic &obj)
Copy constructor.
No logic applied. Does not send group and freezes counter.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
bool operator!=(enum T e1) const
Inequality operator.
The number of enumerated constants.
Enumeration for rate logic types for telemetry groups.
RateLogic & operator=(const RateLogic &obj)
Copy assignment operator (object)
RateLogic(const enum T e1)
Constructor (user-provided value)
The size of the serial representation.
bool isValid() const
Check raw enum value for validity.
I32 SerialType
The serial representation type.
enum T t
For backwards compatibility.
RateGroupDivider component implementation.
RateLogic()
Constructor (default value of SILENCED)
Endianness
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Big endian serialization.
T
The raw enum type.