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 
113 #if FW_SERIALIZABLE_TO_STRING
114 
116  void toString(
117  Fw::StringBase& sb
118  ) const;
119 
120 #endif
121 
122  // ----------------------------------------------------------------------
123  // Getter functions
124  // ----------------------------------------------------------------------
125 
128  {
129  return this->m_majorVersion;
130  }
131 
134  {
135  return this->m_minorVersion;
136  }
137 
140  {
141  return this->m_patchVersion;
142  }
143 
146  {
147  return this->m_schemaVersion;
148  }
149 
152  {
153  return this->m_argumentCount;
154  }
155 
157  U16 getstatementCount() const
158  {
159  return this->m_statementCount;
160  }
161 
163  U32 getbodySize() const
164  {
165  return this->m_bodySize;
166  }
167 
168  // ----------------------------------------------------------------------
169  // Setter functions
170  // ----------------------------------------------------------------------
171 
173  void set(
174  U8 majorVersion,
175  U8 minorVersion,
176  U8 patchVersion,
177  U8 schemaVersion,
178  U8 argumentCount,
179  U16 statementCount,
180  U32 bodySize
181  );
182 
184  void setmajorVersion(U8 majorVersion);
185 
187  void setminorVersion(U8 minorVersion);
188 
190  void setpatchVersion(U8 patchVersion);
191 
193  void setschemaVersion(U8 schemaVersion);
194 
196  void setargumentCount(U8 argumentCount);
197 
199  void setstatementCount(U16 statementCount);
200 
202  void setbodySize(U32 bodySize);
203 
204  protected:
205 
206  // ----------------------------------------------------------------------
207  // Member variables
208  // ----------------------------------------------------------------------
209 
217 
218  };
219 
220  }
221 
222 }
223 
224 #endif
U8 getminorVersion() const
Get member minorVersion.
bool operator!=(const Header &obj) const
Inequality operator.
void setstatementCount(U16 statementCount)
Set member statementCount.
U8 getmajorVersion() const
Get member majorVersion.
U32 getbodySize() const
Get member bodySize.
void setmajorVersion(U8 majorVersion)
Set member majorVersion.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization.
U8 getargumentCount() const
Get member argumentCount.
SerializeStatus
forward declaration for string
void setpatchVersion(U8 patchVersion)
Set member patchVersion.
void setargumentCount(U8 argumentCount)
Set member argumentCount.
U16 getstatementCount() const
Get member statementCount.
void setbodySize(U32 bodySize)
Set member bodySize.
void setminorVersion(U8 minorVersion)
Set member minorVersion.
U8 getpatchVersion() const
Get member patchVersion.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:56
bool operator==(const Header &obj) const
Equality operator.
Header()
Constructor (default value)
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization.
U8 getschemaVersion() const
Get member schemaVersion.
forward declaration
RateGroupDivider component implementation.
Header & operator=(const Header &obj)
Copy assignment operator.
void setschemaVersion(U8 schemaVersion)
Set member schemaVersion.
The size of the serial representation.