F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
RateConfigSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title RateConfigSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for RateConfig struct
5 // ======================================================================
6 
7 #ifndef Svc_RateConfigSerializableAc_HPP
8 #define Svc_RateConfigSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
15 
16 namespace Svc {
17 
19  class RateConfig :
20  public Fw::Serializable
21  {
22 
23  public:
24 
25  // ----------------------------------------------------------------------
26  // Constants
27  // ----------------------------------------------------------------------
28 
29  enum {
33  sizeof(U32) +
34  sizeof(U32)
35  };
36 
37  public:
38 
39  // ----------------------------------------------------------------------
40  // Constructors
41  // ----------------------------------------------------------------------
42 
44  RateConfig();
45 
47  RateConfig(
48  Svc::RateLogic::T rateLogic,
49  U32 min,
50  U32 max
51  );
52 
54  RateConfig(
55  const RateConfig& obj
56  );
57 
58  public:
59 
60  // ----------------------------------------------------------------------
61  // Operators
62  // ----------------------------------------------------------------------
63 
66  const RateConfig& obj
67  );
68 
70  bool operator==(
71  const RateConfig& obj
72  ) const;
73 
75  bool operator!=(
76  const RateConfig& obj
77  ) const;
78 
79 #ifdef BUILD_UT
80 
82  friend std::ostream& operator<<(
83  std::ostream& os,
84  const RateConfig& obj
85  );
86 
87 #endif
88 
89  public:
90 
91  // ----------------------------------------------------------------------
92  // Member functions
93  // ----------------------------------------------------------------------
94 
97  Fw::SerialBufferBase& buffer,
99  ) const;
100 
103  Fw::SerialBufferBase& buffer,
105  );
106 
108  FwSizeType serializedSize() const;
109 
110 #if FW_SERIALIZABLE_TO_STRING
111 
113  void toString(
114  Fw::StringBase& sb
115  ) const;
116 
117 #endif
118 
119  // ----------------------------------------------------------------------
120  // Getter functions
121  // ----------------------------------------------------------------------
122 
125  {
126  return this->m_rateLogic.e;
127  }
128 
130  U32 get_min() const
131  {
132  return this->m_min;
133  }
134 
136  U32 get_max() const
137  {
138  return this->m_max;
139  }
140 
141  // ----------------------------------------------------------------------
142  // Setter functions
143  // ----------------------------------------------------------------------
144 
146  void set(
147  Svc::RateLogic::T rateLogic,
148  U32 min,
149  U32 max
150  );
151 
153  void set_rateLogic(Svc::RateLogic::T rateLogic);
154 
156  void set_min(U32 min);
157 
159  void set_max(U32 max);
160 
161  protected:
162 
163  // ----------------------------------------------------------------------
164  // Member variables
165  // ----------------------------------------------------------------------
166 
168  U32 m_min;
169  U32 m_max;
170 
171  };
172 
173 }
174 
175 #endif
The size of the serial representation.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
void set_rateLogic(Svc::RateLogic::T rateLogic)
Set member rateLogic.
PlatformSizeType FwSizeType
void set_max(U32 max)
Set member max.
Svc::RateLogic::T get_rateLogic() const
Get member rateLogic.
U32 get_min() const
Get member min.
enum T e
The raw enum value.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
SerializeStatus
forward declaration for string
RateConfig & operator=(const RateConfig &obj)
Copy assignment operator.
Enumeration for rate logic types for telemetry groups.
bool operator!=(const RateConfig &obj) const
Inequality operator.
bool operator==(const RateConfig &obj) const
Equality operator.
static U32 min(const U32 a, const U32 b)
Definition: Checksum.cpp:16
RateConfig()
Constructor (default value)
void set_min(U32 min)
Set member min.
RateGroupDivider component implementation.
Endianness
U32 get_max() const
Get member max.
Big endian serialization.
The size of the serial representation.
T
The raw enum type.