F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
ComStubComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ComStubComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ComStub component base class
5 // ======================================================================
6 
7 #ifndef Svc_ComStubComponentAc_HPP
8 #define Svc_ComStubComponentAc_HPP
9 
13 #include "FpConfig.hpp"
18 
19 namespace Svc {
20 
27  {
28 
29  // ----------------------------------------------------------------------
30  // Friend classes
31  // ----------------------------------------------------------------------
32 
35 
36  PROTECTED:
37 
38  // ----------------------------------------------------------------------
39  // Constants
40  // ----------------------------------------------------------------------
41 
43  enum {
47  };
48 
50  enum {
54  };
55 
56  public:
57 
58  // ----------------------------------------------------------------------
59  // Component initialization
60  // ----------------------------------------------------------------------
61 
63  void init(
64  FwEnumStoreType instance = 0
65  );
66 
67  public:
68 
69  // ----------------------------------------------------------------------
70  // Getters for typed input ports
71  // ----------------------------------------------------------------------
72 
77  FwIndexType portNum
78  );
79 
84  FwIndexType portNum
85  );
86 
91  FwIndexType portNum
92  );
93 
94  public:
95 
96  // ----------------------------------------------------------------------
97  // Connect typed input ports to typed output ports
98  // ----------------------------------------------------------------------
99 
102  FwIndexType portNum,
104  );
105 
108  FwIndexType portNum,
110  );
111 
114  FwIndexType portNum,
116  );
117 
118 #if FW_PORT_SERIALIZATION
119 
120  public:
121 
122  // ----------------------------------------------------------------------
123  // Connect serial input ports to typed output ports
124  // ----------------------------------------------------------------------
125 
128  FwIndexType portNum,
129  Fw::InputSerializePort* port
130  );
131 
134  FwIndexType portNum,
135  Fw::InputSerializePort* port
136  );
137 
138 #endif
139 
140  PROTECTED:
141 
142  // ----------------------------------------------------------------------
143  // Component construction and destruction
144  // ----------------------------------------------------------------------
145 
148  const char* compName = ""
149  );
150 
152  virtual ~ComStubComponentBase();
153 
154  PROTECTED:
155 
156  // ----------------------------------------------------------------------
157  // Getters for numbers of typed input ports
158  // ----------------------------------------------------------------------
159 
164 
169 
174 
175  PROTECTED:
176 
177  // ----------------------------------------------------------------------
178  // Getters for numbers of typed output ports
179  // ----------------------------------------------------------------------
180 
185 
190 
195 
196  PROTECTED:
197 
198  // ----------------------------------------------------------------------
199  // Connection status queries for typed output ports
200  // ----------------------------------------------------------------------
201 
206  FwIndexType portNum
207  );
208 
213  FwIndexType portNum
214  );
215 
220  FwIndexType portNum
221  );
222 
223  PROTECTED:
224 
225  // ----------------------------------------------------------------------
226  // Handlers to implement for typed input ports
227  // ----------------------------------------------------------------------
228 
231  FwIndexType portNum,
232  Fw::Buffer& sendBuffer
233  ) = 0;
234 
236  virtual void drvConnected_handler(
237  FwIndexType portNum
238  ) = 0;
239 
241  virtual void drvDataIn_handler(
242  FwIndexType portNum,
243  Fw::Buffer& recvBuffer,
244  const Drv::RecvStatus& recvStatus
245  ) = 0;
246 
247  PROTECTED:
248 
249  // ----------------------------------------------------------------------
250  // Port handler base-class functions for typed input ports
251  //
252  // Call these functions directly to bypass the corresponding ports
253  // ----------------------------------------------------------------------
254 
257  FwIndexType portNum,
258  Fw::Buffer& sendBuffer
259  );
260 
263  FwIndexType portNum
264  );
265 
268  FwIndexType portNum,
269  Fw::Buffer& recvBuffer,
270  const Drv::RecvStatus& recvStatus
271  );
272 
273  PROTECTED:
274 
275  // ----------------------------------------------------------------------
276  // Invocation functions for typed output ports
277  // ----------------------------------------------------------------------
278 
280  void comDataOut_out(
281  FwIndexType portNum,
282  Fw::Buffer& recvBuffer,
283  const Drv::RecvStatus& recvStatus
284  );
285 
287  void comStatus_out(
288  FwIndexType portNum,
289  Fw::Success& condition
290  );
291 
294  FwIndexType portNum,
295  Fw::Buffer& sendBuffer
296  );
297 
298  PRIVATE:
299 
300  // ----------------------------------------------------------------------
301  // Calls for messages received on typed input ports
302  // ----------------------------------------------------------------------
303 
305  static Drv::SendStatus m_p_comDataIn_in(
306  Fw::PassiveComponentBase* callComp,
307  FwIndexType portNum,
308  Fw::Buffer& sendBuffer
309  );
310 
312  static void m_p_drvConnected_in(
313  Fw::PassiveComponentBase* callComp,
314  FwIndexType portNum
315  );
316 
318  static void m_p_drvDataIn_in(
319  Fw::PassiveComponentBase* callComp,
320  FwIndexType portNum,
321  Fw::Buffer& recvBuffer,
322  const Drv::RecvStatus& recvStatus
323  );
324 
325  PRIVATE:
326 
327  // ----------------------------------------------------------------------
328  // Typed input ports
329  // ----------------------------------------------------------------------
330 
333 
336 
339 
340  PRIVATE:
341 
342  // ----------------------------------------------------------------------
343  // Typed output ports
344  // ----------------------------------------------------------------------
345 
348 
351 
354 
355  };
356 
357 }
358 
359 #endif
I32 FwEnumStoreType
Definition: FpConfig.h:64
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
C++-compatible configuration header for fprime configuration.
Status associated with the received data.
Status returned by the send call.
void init()
Object initializer.
Definition: ObjBase.cpp:27
Success/Failure.
Auto-generated base for ComStub component.
bool isConnected_comStatus_OutputPort(FwIndexType portNum)
bool isConnected_comDataOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_comStatus_OutputPorts() const
FwIndexType getNum_drvConnected_InputPorts() const
virtual void drvDataIn_handler(FwIndexType portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)=0
Handler for input port drvDataIn.
FwIndexType getNum_comDataOut_OutputPorts() const
void comStatus_out(FwIndexType portNum, Fw::Success &condition)
Invoke output port comStatus.
FwIndexType getNum_drvDataOut_OutputPorts() const
virtual void drvConnected_handler(FwIndexType portNum)=0
Handler for input port drvConnected.
FwIndexType getNum_drvDataIn_InputPorts() const
void comDataOut_out(FwIndexType portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)
Invoke output port comDataOut.
bool isConnected_drvDataOut_OutputPort(FwIndexType portNum)
virtual Drv::SendStatus comDataIn_handler(FwIndexType portNum, Fw::Buffer &sendBuffer)=0
Handler for input port comDataIn.
void drvDataIn_handlerBase(FwIndexType portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)
Handler base-class function for input port drvDataIn.
Drv::SendStatus drvDataOut_out(FwIndexType portNum, Fw::Buffer &sendBuffer)
Invoke output port drvDataOut.
virtual ~ComStubComponentBase()
Destroy ComStubComponentBase object.
void set_comStatus_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatus[portNum].
ComStubComponentBase(const char *compName="")
Construct ComStubComponentBase object.
Drv::SendStatus comDataIn_handlerBase(FwIndexType portNum, Fw::Buffer &sendBuffer)
Handler base-class function for input port comDataIn.
Drv::InputByteStreamSendPort * get_comDataIn_InputPort(FwIndexType portNum)
FwIndexType getNum_comDataIn_InputPorts() const
void set_comDataOut_OutputPort(FwIndexType portNum, Drv::InputByteStreamRecvPort *port)
Connect port to comDataOut[portNum].
Drv::InputByteStreamReadyPort * get_drvConnected_InputPort(FwIndexType portNum)
Drv::InputByteStreamRecvPort * get_drvDataIn_InputPort(FwIndexType portNum)
void drvConnected_handlerBase(FwIndexType portNum)
Handler base-class function for input port drvConnected.
void set_drvDataOut_OutputPort(FwIndexType portNum, Drv::InputByteStreamSendPort *port)
Connect port to drvDataOut[portNum].
friend class ComStubComponentBaseFriend
Friend class for white-box testing.