F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComDataContextPairSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ComDataContextPairSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ComDataContextPair struct
5 // ======================================================================
6 
7 #ifndef Svc_ComDataContextPairSerializableAc_HPP
8 #define Svc_ComDataContextPairSerializableAc_HPP
9 
10 #include "Fw/Buffer/Buffer.hpp"
11 #include "Fw/FPrimeBasicTypes.hpp"
14 #include "Fw/Types/String.hpp"
16 
17 namespace Svc {
18 
22  public Fw::Serializable
23  {
24 
25  public:
26 
27  // ----------------------------------------------------------------------
28  // Constants
29  // ----------------------------------------------------------------------
30 
31  enum {
36  };
37 
38  public:
39 
40  // ----------------------------------------------------------------------
41  // Constructors
42  // ----------------------------------------------------------------------
43 
46 
49  const Fw::Buffer& data,
50  const ComCfg::FrameContext& context
51  );
52 
55  const ComDataContextPair& obj
56  );
57 
58  public:
59 
60  // ----------------------------------------------------------------------
61  // Operators
62  // ----------------------------------------------------------------------
63 
66  const ComDataContextPair& obj
67  );
68 
70  bool operator==(
71  const ComDataContextPair& obj
72  ) const;
73 
75  bool operator!=(
76  const ComDataContextPair& obj
77  ) const;
78 
79 #ifdef BUILD_UT
80 
82  friend std::ostream& operator<<(
83  std::ostream& os,
84  const ComDataContextPair& obj
85  );
86 
87 #endif
88 
89  public:
90 
91  // ----------------------------------------------------------------------
92  // Member functions
93  // ----------------------------------------------------------------------
94 
97  Fw::SerialBufferBase& buffer,
99  ) const;
100 
103  Fw::SerialBufferBase& buffer,
105  );
106 
108  FwSizeType serializedSize() const;
109 
110 #if FW_SERIALIZABLE_TO_STRING
111 
113  void toString(
114  Fw::StringBase& sb
115  ) const;
116 
117 #endif
118 
119  // ----------------------------------------------------------------------
120  // Getter functions
121  // ----------------------------------------------------------------------
122 
125  {
126  return this->m_data;
127  }
128 
130  const Fw::Buffer& get_data() const
131  {
132  return this->m_data;
133  }
134 
137  {
138  return this->m_context;
139  }
140 
143  {
144  return this->m_context;
145  }
146 
147  // ----------------------------------------------------------------------
148  // Setter functions
149  // ----------------------------------------------------------------------
150 
152  void set(
153  const Fw::Buffer& data,
154  const ComCfg::FrameContext& context
155  );
156 
158  void set_data(const Fw::Buffer& data);
159 
161  void set_context(const ComCfg::FrameContext& context);
162 
163  protected:
164 
165  // ----------------------------------------------------------------------
166  // Member variables
167  // ----------------------------------------------------------------------
168 
171 
172  };
173 
174 }
175 
176 #endif
PlatformSizeType FwSizeType
The size of the serial representation.
void set_context(const ComCfg::FrameContext &context)
Set member context.
ComDataContextPair & operator=(const ComDataContextPair &obj)
Copy assignment operator.
void set_data(const Fw::Buffer &data)
Set member data.
SerializeStatus
forward declaration for string
bool operator==(const ComDataContextPair &obj) const
Equality operator.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:64
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
bool operator!=(const ComDataContextPair &obj) const
Inequality operator.
ComCfg::FrameContext & get_context()
Get member context.
ComDataContextPair()
Constructor (default value)
Fw::Buffer & get_data()
Get member data.
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
const ComCfg::FrameContext & get_context() const
Get member context (const)
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
Endianness
const Fw::Buffer & get_data() const
Get member data (const)
Big endian serialization.