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"
17 
18 namespace Svc {
19 
20  namespace Fpy {
21 
22  class Statement :
23  public Fw::Serializable
24  {
25 
26  public:
27 
28  // ----------------------------------------------------------------------
29  // Constants
30  // ----------------------------------------------------------------------
31 
32  enum {
36  sizeof(FwOpcodeType) +
38  };
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Constructors
44  // ----------------------------------------------------------------------
45 
47  Statement();
48 
50  Statement(
52  FwOpcodeType opCode,
53  const Fw::StatementArgBuffer& argBuf
54  );
55 
57  Statement(
58  const Statement& obj
59  );
60 
61  public:
62 
63  // ----------------------------------------------------------------------
64  // Operators
65  // ----------------------------------------------------------------------
66 
69  const Statement& obj
70  );
71 
73  bool operator==(
74  const Statement& obj
75  ) const;
76 
78  bool operator!=(
79  const Statement& obj
80  ) const;
81 
82 #ifdef BUILD_UT
83 
85  friend std::ostream& operator<<(
86  std::ostream& os,
87  const Statement& obj
88  );
89 
90 #endif
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Member functions
96  // ----------------------------------------------------------------------
97 
100  Fw::SerializeBufferBase& buffer
101  ) const;
102 
105  Fw::SerializeBufferBase& buffer
106  );
107 
108 #if FW_SERIALIZABLE_TO_STRING
109 
111  void toString(
112  Fw::StringBase& sb
113  ) const;
114 
115 #endif
116 
117  // ----------------------------------------------------------------------
118  // Getter functions
119  // ----------------------------------------------------------------------
120 
123  {
124  return this->m_type.e;
125  }
126 
129  {
130  return this->m_opCode;
131  }
132 
135  {
136  return this->m_argBuf;
137  }
138 
141  {
142  return this->m_argBuf;
143  }
144 
145  // ----------------------------------------------------------------------
146  // Setter functions
147  // ----------------------------------------------------------------------
148 
150  void set(
152  FwOpcodeType opCode,
153  const Fw::StatementArgBuffer& argBuf
154  );
155 
158 
160  void setopCode(FwOpcodeType opCode);
161 
163  void setargBuf(const Fw::StatementArgBuffer& argBuf);
164 
165  protected:
166 
167  // ----------------------------------------------------------------------
168  // Member variables
169  // ----------------------------------------------------------------------
170 
174 
175  };
176 
177  }
178 
179 }
180 
181 #endif
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization.
void settype(Svc::Fpy::StatementType::T type)
Set member type.
bool operator!=(const Statement &obj) const
Inequality operator.
Fw::StatementArgBuffer m_argBuf
void setargBuf(const Fw::StatementArgBuffer &argBuf)
Set member argBuf.
SerializeStatus
forward declaration for string
Statement()
Constructor (default value)
U32 FwOpcodeType
The type of a command opcode.
const Fw::StatementArgBuffer & getargBuf() const
Get member argBuf (const)
FwOpcodeType getopCode() const
Get member opCode.
The size of the serial representation.
Statement & operator=(const Statement &obj)
Copy assignment operator.
Svc::Fpy::StatementType::T gettype() const
Get member type.
void setopCode(FwOpcodeType opCode)
Set member opCode.
forward declaration
RateGroupDivider component implementation.
bool operator==(const Statement &obj) const
Equality operator.
Svc::Fpy::StatementType m_type
The size of the serial representation.
Fw::StatementArgBuffer & getargBuf()
Get member argBuf.