F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
BufferSendPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title BufferSendPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for BufferSend port
5 // ======================================================================
6 
7 #ifndef Fw_BufferSendPortAc_HPP
8 #define Fw_BufferSendPortAc_HPP
9 
10 #include "Fw/Buffer/Buffer.hpp"
11 #include "Fw/FPrimeBasicTypes.hpp"
13 #if !FW_DIRECT_PORT_CALLS
17 #endif
18 
19 namespace Fw {
20 
25  {
26 
27  public:
28 
29  // ----------------------------------------------------------------------
30  // Public constants for BufferSendPortBuffer
31  // ----------------------------------------------------------------------
32 
35  static constexpr FwSizeType CAPACITY =
37 
38  public:
39 
40  // ----------------------------------------------------------------------
41  // Public member functions for BufferSendPortBuffer
42  // ----------------------------------------------------------------------
43 
47  return CAPACITY;
48  }
49 
52  U8* getBuffAddr() override {
53  return m_buff;
54  }
55 
58  const U8* getBuffAddr() const override {
59  return m_buff;
60  }
61 
62  private:
63 
64  // ----------------------------------------------------------------------
65  // Private member variables
66  // ----------------------------------------------------------------------
67 
68  U8 m_buff[CAPACITY];
69 
70  };
71 
75 
76  public:
77 
78  // ----------------------------------------------------------------------
79  // Public constructors for BufferSendPortSerializer
80  // ----------------------------------------------------------------------
81 
84 
85  public:
86 
87  // ----------------------------------------------------------------------
88  // Public member functions for BufferSendPortSerializer
89  // ----------------------------------------------------------------------
90 
93  Fw::SerialBufferBase& _buffer
94  );
95 
96  public:
97 
98  // ----------------------------------------------------------------------
99  // Public static functions for BufferSendPortSerializer
100  // ----------------------------------------------------------------------
101 
104  Fw::Buffer& fwBuffer,
105  Fw::SerialBufferBase& _buffer
106  );
107 
108  public:
109 
110  // ----------------------------------------------------------------------
111  // Public member variables for BufferSendPortSerializer
112  // ----------------------------------------------------------------------
113 
115 
116  };
117 
118 #if !FW_DIRECT_PORT_CALLS
119 
123  public Fw::InputPortBase
124  {
125 
126  public:
127 
128  // ----------------------------------------------------------------------
129  // Public types for InputBufferSendPort
130  // ----------------------------------------------------------------------
131 
133  typedef void (*CompFuncPtr)(
134  Fw::PassiveComponentBase* callComp,
135  FwIndexType portNum,
136  Fw::Buffer& fwBuffer
137  );
138 
139  public:
140 
141  // ----------------------------------------------------------------------
142  // Public constructors for InputBufferSendPort
143  // ----------------------------------------------------------------------
144 
147 
148  public:
149 
150  // ----------------------------------------------------------------------
151  // Public member functions for InputBufferSendPort
152  // ----------------------------------------------------------------------
153 
155  void init();
156 
158  void addCallComp(
159  Fw::PassiveComponentBase* callComp,
160  CompFuncPtr funcPtr
161  );
162 
164  void invoke(
165  Fw::Buffer& fwBuffer
166  );
167 
168  private:
169 
170  // ----------------------------------------------------------------------
171  // Private member functions for InputBufferSendPort
172  // ----------------------------------------------------------------------
173 
174 #if FW_PORT_SERIALIZATION == 1
175 
178  Fw::SerializeStatus invokeSerial(
179  Fw::LinearBufferBase& _buffer
180  );
181 
182 #endif
183 
184  private:
185 
186  // ----------------------------------------------------------------------
187  // Private member variables for InputBufferSendPort
188  // ----------------------------------------------------------------------
189 
191  CompFuncPtr m_func;
192 
193  };
194 
198  public Fw::OutputPortBase
199  {
200 
201  public:
202 
203  // ----------------------------------------------------------------------
204  // Public constructors for OutputBufferSendPort
205  // ----------------------------------------------------------------------
206 
209 
210  public:
211 
212  // ----------------------------------------------------------------------
213  // Public member functions for OutputBufferSendPort
214  // ----------------------------------------------------------------------
215 
217  void init();
218 
220  void addCallPort(
221  InputBufferSendPort* callPort
222  );
223 
225  void invoke(
226  Fw::Buffer& fwBuffer
227  ) const;
228 
229  private:
230 
231  // ----------------------------------------------------------------------
232  // Private member variables for OutputBufferSendPort
233  // ----------------------------------------------------------------------
234 
236  InputBufferSendPort* m_port;
237 
238  };
239 
240 #endif
241 
242 }
243 
244 #endif
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, Fw::Buffer &fwBuffer)
The port callback function type.
PlatformSizeType FwSizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
static constexpr FwSizeType CAPACITY
Fw::Serializable::SizeType getCapacity() const override
SerializeStatus
forward declaration for string
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
void init()
Initialization function.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
OutputBufferSendPort()
Constructor.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
FwSizeType SizeType
InputBufferSendPort()
Constructor.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void init()
Initialization function.
PlatformIndexType FwIndexType
void invoke(Fw::Buffer &fwBuffer)
Invoke a port interface.
Implementation of malloc based allocator.
const U8 * getBuffAddr() const override
static Fw::SerializeStatus serializePortArgs(Fw::Buffer &fwBuffer, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:64