F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
StatementSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title StatementSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Statement struct
5 // ======================================================================
6 
7 #ifndef Svc_Fpy_StatementSerializableAc_HPP
8 #define Svc_Fpy_StatementSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
14 #include "Fw/Types/String.hpp"
16 
17 namespace Svc {
18 
19  namespace Fpy {
20 
22  class Statement :
23  public Fw::Serializable
24  {
25 
26  public:
27 
28  // ----------------------------------------------------------------------
29  // Constants
30  // ----------------------------------------------------------------------
31 
32  enum {
37  };
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Constructors
43  // ----------------------------------------------------------------------
44 
46  Statement();
47 
49  Statement(
51  const Fw::StatementArgBuffer& argBuf
52  );
53 
55  Statement(
56  const Statement& obj
57  );
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Operators
63  // ----------------------------------------------------------------------
64 
67  const Statement& obj
68  );
69 
71  bool operator==(
72  const Statement& obj
73  ) const;
74 
76  bool operator!=(
77  const Statement& obj
78  ) const;
79 
80 #ifdef BUILD_UT
81 
83  friend std::ostream& operator<<(
84  std::ostream& os,
85  const Statement& obj
86  );
87 
88 #endif
89 
90  public:
91 
92  // ----------------------------------------------------------------------
93  // Member functions
94  // ----------------------------------------------------------------------
95 
98  Fw::SerializeBufferBase& buffer,
100  ) const;
101 
104  Fw::SerializeBufferBase& buffer,
106  );
107 
109  FwSizeType serializedSize() const;
110 
111 #if FW_SERIALIZABLE_TO_STRING
112 
114  void toString(
115  Fw::StringBase& sb
116  ) const;
117 
118 #endif
119 
120  // ----------------------------------------------------------------------
121  // Getter functions
122  // ----------------------------------------------------------------------
123 
126  {
127  return this->m_opCode.e;
128  }
129 
132  {
133  return this->m_argBuf;
134  }
135 
138  {
139  return this->m_argBuf;
140  }
141 
142  // ----------------------------------------------------------------------
143  // Setter functions
144  // ----------------------------------------------------------------------
145 
147  void set(
149  const Fw::StatementArgBuffer& argBuf
150  );
151 
154 
156  void set_argBuf(const Fw::StatementArgBuffer& argBuf);
157 
158  protected:
159 
160  // ----------------------------------------------------------------------
161  // Member variables
162  // ----------------------------------------------------------------------
163 
166 
167  };
168 
169  }
170 
171 }
172 
173 #endif
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
PlatformSizeType FwSizeType
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
The size of the serial representation.
bool operator!=(const Statement &obj) const
Inequality operator.
Fw::StatementArgBuffer m_argBuf
Fw::StatementArgBuffer & get_argBuf()
Get member argBuf.
SerializeStatus
forward declaration for string
void set_opCode(Svc::Fpy::DirectiveId::T opCode)
Set member opCode.
Statement()
Constructor (default value)
a statement is a directive opcode paired with an argument buffer
Statement & operator=(const Statement &obj)
Copy assignment operator.
T e
The raw enum value.
The size of the serial representation.
void set_argBuf(const Fw::StatementArgBuffer &argBuf)
Set member argBuf.
T
The raw enum type.
RateGroupDivider component implementation.
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
Svc::Fpy::DirectiveId::T get_opCode() const
Get member opCode.
bool operator==(const Statement &obj) const
Equality operator.
Endianness
const Fw::StatementArgBuffer & get_argBuf() const
Get member argBuf (const)
Big endian serialization.
Svc::Fpy::DirectiveId m_opCode