F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
HeaderSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title HeaderSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Header struct
5 // ======================================================================
6 
7 #ifndef Svc_Fpy_HeaderSerializableAc_HPP
8 #define Svc_Fpy_HeaderSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Svc {
16 
17  namespace Fpy {
18 
19  class Header :
20  public Fw::Serializable
21  {
22 
23  public:
24 
25  // ----------------------------------------------------------------------
26  // Constants
27  // ----------------------------------------------------------------------
28 
29  enum {
32  sizeof(U8) +
33  sizeof(U8) +
34  sizeof(U8) +
35  sizeof(U8) +
36  sizeof(U8) +
37  sizeof(U16) +
38  sizeof(U32)
39  };
40 
41  public:
42 
43  // ----------------------------------------------------------------------
44  // Constructors
45  // ----------------------------------------------------------------------
46 
48  Header();
49 
51  Header(
52  U8 majorVersion,
53  U8 minorVersion,
54  U8 patchVersion,
55  U8 schemaVersion,
56  U8 argumentCount,
57  U16 statementCount,
58  U32 bodySize
59  );
60 
62  Header(
63  const Header& obj
64  );
65 
66  public:
67 
68  // ----------------------------------------------------------------------
69  // Operators
70  // ----------------------------------------------------------------------
71 
74  const Header& obj
75  );
76 
78  bool operator==(
79  const Header& obj
80  ) const;
81 
83  bool operator!=(
84  const Header& obj
85  ) const;
86 
87 #ifdef BUILD_UT
88 
90  friend std::ostream& operator<<(
91  std::ostream& os,
92  const Header& obj
93  );
94 
95 #endif
96 
97  public:
98 
99  // ----------------------------------------------------------------------
100  // Member functions
101  // ----------------------------------------------------------------------
102 
105  Fw::SerializeBufferBase& buffer
106  ) const;
107 
110  Fw::SerializeBufferBase& buffer
111  );
112 
114  FwSizeType serializedSize() const;
115 
116 #if FW_SERIALIZABLE_TO_STRING
117 
119  void toString(
120  Fw::StringBase& sb
121  ) const;
122 
123 #endif
124 
125  // ----------------------------------------------------------------------
126  // Getter functions
127  // ----------------------------------------------------------------------
128 
131  {
132  return this->m_majorVersion;
133  }
134 
137  {
138  return this->m_minorVersion;
139  }
140 
143  {
144  return this->m_patchVersion;
145  }
146 
149  {
150  return this->m_schemaVersion;
151  }
152 
155  {
156  return this->m_argumentCount;
157  }
158 
160  U16 get_statementCount() const
161  {
162  return this->m_statementCount;
163  }
164 
166  U32 get_bodySize() const
167  {
168  return this->m_bodySize;
169  }
170 
171  // ----------------------------------------------------------------------
172  // Setter functions
173  // ----------------------------------------------------------------------
174 
176  void set(
177  U8 majorVersion,
178  U8 minorVersion,
179  U8 patchVersion,
180  U8 schemaVersion,
181  U8 argumentCount,
182  U16 statementCount,
183  U32 bodySize
184  );
185 
187  void set_majorVersion(U8 majorVersion);
188 
190  void set_minorVersion(U8 minorVersion);
191 
193  void set_patchVersion(U8 patchVersion);
194 
196  void set_schemaVersion(U8 schemaVersion);
197 
199  void set_argumentCount(U8 argumentCount);
200 
202  void set_statementCount(U16 statementCount);
203 
205  void set_bodySize(U32 bodySize);
206 
207  protected:
208 
209  // ----------------------------------------------------------------------
210  // Member variables
211  // ----------------------------------------------------------------------
212 
220 
221  };
222 
223  }
224 
225 }
226 
227 #endif
void set_statementCount(U16 statementCount)
Set member statementCount.
void set_bodySize(U32 bodySize)
Set member bodySize.
void set_patchVersion(U8 patchVersion)
Set member patchVersion.
U16 get_statementCount() const
Get member statementCount.
bool operator!=(const Header &obj) const
Inequality operator.
PlatformSizeType FwSizeType
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
U8 get_patchVersion() const
Get member patchVersion.
void set_argumentCount(U8 argumentCount)
Set member argumentCount.
void set_schemaVersion(U8 schemaVersion)
Set member schemaVersion.
void set_minorVersion(U8 minorVersion)
Set member minorVersion.
SerializeStatus
forward declaration for string
The size of the serial representation.
U8 get_majorVersion() const
Get member majorVersion.
U8 get_schemaVersion() const
Get member schemaVersion.
U8 get_minorVersion() const
Get member minorVersion.
U32 get_bodySize() const
Get member bodySize.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
bool operator==(const Header &obj) const
Equality operator.
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialization.
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialization.
Header()
Constructor (default value)
U8 get_argumentCount() const
Get member argumentCount.
forward declaration
RateGroupDivider component implementation.
Header & operator=(const Header &obj)
Copy assignment operator.
void set_majorVersion(U8 majorVersion)
Set member majorVersion.