F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SequenceSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SequenceSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Sequence struct
5 // ======================================================================
6 
7 #ifndef Svc_Fpy_SequenceSerializableAc_HPP
8 #define Svc_Fpy_SequenceSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
17 
18 namespace Svc {
19 
20  namespace Fpy {
21 
22  class Sequence :
23  public Fw::Serializable
24  {
25 
26  public:
27 
28  // ----------------------------------------------------------------------
29  // Types
30  // ----------------------------------------------------------------------
31 
33  using Type_of_args = U8[16];
34 
37 
38  public:
39 
40  // ----------------------------------------------------------------------
41  // Constants
42  // ----------------------------------------------------------------------
43 
44  enum {
48  sizeof(U8) * 16 +
51  };
52 
53  public:
54 
55  // ----------------------------------------------------------------------
56  // Constructors
57  // ----------------------------------------------------------------------
58 
60  Sequence();
61 
63  Sequence(
64  const Svc::Fpy::Header& header,
65  const Type_of_args& args,
66  const Type_of_statements& statements,
67  const Svc::Fpy::Footer& footer
68  );
69 
71  Sequence(
72  const Sequence& obj
73  );
74 
76  Sequence(
77  const Svc::Fpy::Header& header,
78  U8 args,
79  const Svc::Fpy::Statement& statements,
80  const Svc::Fpy::Footer& footer
81  );
82 
83  public:
84 
85  // ----------------------------------------------------------------------
86  // Operators
87  // ----------------------------------------------------------------------
88 
91  const Sequence& obj
92  );
93 
95  bool operator==(
96  const Sequence& obj
97  ) const;
98 
100  bool operator!=(
101  const Sequence& obj
102  ) const;
103 
104 #ifdef BUILD_UT
105 
107  friend std::ostream& operator<<(
108  std::ostream& os,
109  const Sequence& obj
110  );
111 
112 #endif
113 
114  public:
115 
116  // ----------------------------------------------------------------------
117  // Member functions
118  // ----------------------------------------------------------------------
119 
122  Fw::SerialBufferBase& buffer,
124  ) const;
125 
128  Fw::SerialBufferBase& buffer,
130  );
131 
133  FwSizeType serializedSize() const;
134 
135 #if FW_SERIALIZABLE_TO_STRING
136 
138  void toString(
139  Fw::StringBase& sb
140  ) const;
141 
142 #endif
143 
144  // ----------------------------------------------------------------------
145  // Getter functions
146  // ----------------------------------------------------------------------
147 
150  {
151  return this->m_header;
152  }
153 
156  {
157  return this->m_header;
158  }
159 
162  {
163  return this->m_args;
164  }
165 
167  const Type_of_args& get_args() const
168  {
169  return this->m_args;
170  }
171 
174  {
175  return this->m_statements;
176  }
177 
180  {
181  return this->m_statements;
182  }
183 
186  {
187  return this->m_footer;
188  }
189 
192  {
193  return this->m_footer;
194  }
195 
196  // ----------------------------------------------------------------------
197  // Setter functions
198  // ----------------------------------------------------------------------
199 
201  void set(
202  const Svc::Fpy::Header& header,
203  const Type_of_args& args,
204  const Type_of_statements& statements,
205  const Svc::Fpy::Footer& footer
206  );
207 
209  void set_header(const Svc::Fpy::Header& header);
210 
212  void set_args(const Type_of_args& args);
213 
215  void set_statements(const Type_of_statements& statements);
216 
218  void set_footer(const Svc::Fpy::Footer& footer);
219 
220  protected:
221 
222  // ----------------------------------------------------------------------
223  // Member variables
224  // ----------------------------------------------------------------------
225 
227  U8 m_args[16];
230 
231  };
232 
233  }
234 
235 }
236 
237 #endif
void set_header(const Svc::Fpy::Header &header)
Set member header.
const Type_of_args & get_args() const
Get member args (const)
Type_of_args & get_args()
Get member args.
PlatformSizeType FwSizeType
bool operator==(const Sequence &obj) const
Equality operator.
Svc::Fpy::Statement[1024] Type_of_statements
The type of statements.
void set_statements(const Type_of_statements &statements)
Set member statements.
bool operator!=(const Sequence &obj) const
Inequality operator.
const Svc::Fpy::Header & get_header() const
Get member header (const)
SerializeStatus
forward declaration for string
U8[16] Type_of_args
The type of args.
Svc::Fpy::Header & get_header()
Get member header.
const Type_of_statements & get_statements() const
Get member statements (const)
a statement is a directive opcode paired with an argument buffer
Sequence & operator=(const Sequence &obj)
Copy assignment operator.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
Sequence()
Constructor (default value)
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
Type_of_statements & get_statements()
Get member statements.
void set_footer(const Svc::Fpy::Footer &footer)
Set member footer.
The size of the serial representation.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void set_args(const Type_of_args &args)
Set member args.
The size of the serial representation.
Svc::Fpy::Footer & get_footer()
Get member footer.
RateGroupDivider component implementation.
Svc::Fpy::Statement m_statements[1024]
Endianness
const Svc::Fpy::Footer & get_footer() const
Get member footer (const)
The size of the serial representation.
Big endian serialization.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.