F´ Flight Software - C/C++ Documentation
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 
14 #include "Fw/FPrimeBasicTypes.hpp"
19 
20 namespace Svc {
21 
28  {
29 
30  // ----------------------------------------------------------------------
31  // Friend classes
32  // ----------------------------------------------------------------------
33 
35  friend class ComStubTesterBase;
37  friend class ComStubTester;
38 
39  PROTECTED:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
46  enum {
52  };
53 
55  enum {
61  };
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Component initialization
67  // ----------------------------------------------------------------------
68 
70  void init(
71  FwEnumStoreType instance = 0
72  );
73 
74  public:
75 
76  // ----------------------------------------------------------------------
77  // Getters for typed input ports
78  // ----------------------------------------------------------------------
79 
84  FwIndexType portNum
85  );
86 
91  FwIndexType portNum
92  );
93 
98  FwIndexType portNum
99  );
100 
105  FwIndexType portNum
106  );
107 
112  FwIndexType portNum
113  );
114 
115  public:
116 
117  // ----------------------------------------------------------------------
118  // Connect typed input ports to typed output ports
119  // ----------------------------------------------------------------------
120 
123  FwIndexType portNum,
125  );
126 
129  FwIndexType portNum,
131  );
132 
135  FwIndexType portNum,
137  );
138 
141  FwIndexType portNum,
143  );
144 
147  FwIndexType portNum,
149  );
150 
151 #if FW_PORT_SERIALIZATION
152 
153  public:
154 
155  // ----------------------------------------------------------------------
156  // Connect serial input ports to typed output ports
157  // ----------------------------------------------------------------------
158 
161  FwIndexType portNum,
162  Fw::InputSerializePort* port
163  );
164 
167  FwIndexType portNum,
168  Fw::InputSerializePort* port
169  );
170 
173  FwIndexType portNum,
174  Fw::InputSerializePort* port
175  );
176 
179  FwIndexType portNum,
180  Fw::InputSerializePort* port
181  );
182 
185  FwIndexType portNum,
186  Fw::InputSerializePort* port
187  );
188 
189 #endif
190 
191  PROTECTED:
192 
193  // ----------------------------------------------------------------------
194  // Component construction and destruction
195  // ----------------------------------------------------------------------
196 
199  const char* compName = ""
200  );
201 
203  virtual ~ComStubComponentBase();
204 
205  PROTECTED:
206 
207  // ----------------------------------------------------------------------
208  // Getters for numbers of typed input ports
209  // ----------------------------------------------------------------------
210 
215 
220 
225 
230 
235 
236  PROTECTED:
237 
238  // ----------------------------------------------------------------------
239  // Getters for numbers of typed output ports
240  // ----------------------------------------------------------------------
241 
246 
251 
256 
261 
266 
267  PROTECTED:
268 
269  // ----------------------------------------------------------------------
270  // Connection status queries for typed output ports
271  // ----------------------------------------------------------------------
272 
277  FwIndexType portNum
278  );
279 
284  FwIndexType portNum
285  );
286 
291  FwIndexType portNum
292  );
293 
298  FwIndexType portNum
299  );
300 
305  FwIndexType portNum
306  );
307 
308  PROTECTED:
309 
310  // ----------------------------------------------------------------------
311  // Handlers to implement for typed input ports
312  // ----------------------------------------------------------------------
313 
315  virtual void dataIn_handler(
316  FwIndexType portNum,
317  Fw::Buffer& data,
318  const ComCfg::FrameContext& context
319  ) = 0;
320 
322  virtual void dataReturnIn_handler(
323  FwIndexType portNum,
324  Fw::Buffer& data,
325  const ComCfg::FrameContext& context
326  ) = 0;
327 
329  virtual void drvConnected_handler(
330  FwIndexType portNum
331  ) = 0;
332 
334  virtual void drvReceiveIn_handler(
335  FwIndexType portNum,
336  Fw::Buffer& buffer,
337  const Drv::ByteStreamStatus& status
338  ) = 0;
339 
341  virtual void drvSendReturnIn_handler(
342  FwIndexType portNum,
343  Fw::Buffer& buffer,
344  const Drv::ByteStreamStatus& status
345  ) = 0;
346 
347  PROTECTED:
348 
349  // ----------------------------------------------------------------------
350  // Port handler base-class functions for typed input ports
351  //
352  // Call these functions directly to bypass the corresponding ports
353  // ----------------------------------------------------------------------
354 
356  void dataIn_handlerBase(
357  FwIndexType portNum,
358  Fw::Buffer& data,
359  const ComCfg::FrameContext& context
360  );
361 
364  FwIndexType portNum,
365  Fw::Buffer& data,
366  const ComCfg::FrameContext& context
367  );
368 
371  FwIndexType portNum
372  );
373 
376  FwIndexType portNum,
377  Fw::Buffer& buffer,
378  const Drv::ByteStreamStatus& status
379  );
380 
383  FwIndexType portNum,
384  Fw::Buffer& buffer,
385  const Drv::ByteStreamStatus& status
386  );
387 
388  PROTECTED:
389 
390  // ----------------------------------------------------------------------
391  // Invocation functions for typed output ports
392  // ----------------------------------------------------------------------
393 
395  void comStatusOut_out(
396  FwIndexType portNum,
397  Fw::Success& condition
398  );
399 
401  void dataOut_out(
402  FwIndexType portNum,
403  Fw::Buffer& data,
404  const ComCfg::FrameContext& context
405  );
406 
408  void dataReturnOut_out(
409  FwIndexType portNum,
410  Fw::Buffer& data,
411  const ComCfg::FrameContext& context
412  );
413 
416  FwIndexType portNum,
417  Fw::Buffer& fwBuffer
418  );
419 
421  void drvSendOut_out(
422  FwIndexType portNum,
423  Fw::Buffer& fwBuffer
424  );
425 
426  PRIVATE:
427 
428  // ----------------------------------------------------------------------
429  // Calls for messages received on typed input ports
430  // ----------------------------------------------------------------------
431 
433  static void m_p_dataIn_in(
434  Fw::PassiveComponentBase* callComp,
435  FwIndexType portNum,
436  Fw::Buffer& data,
437  const ComCfg::FrameContext& context
438  );
439 
441  static void m_p_dataReturnIn_in(
442  Fw::PassiveComponentBase* callComp,
443  FwIndexType portNum,
444  Fw::Buffer& data,
445  const ComCfg::FrameContext& context
446  );
447 
449  static void m_p_drvConnected_in(
450  Fw::PassiveComponentBase* callComp,
451  FwIndexType portNum
452  );
453 
455  static void m_p_drvReceiveIn_in(
456  Fw::PassiveComponentBase* callComp,
457  FwIndexType portNum,
458  Fw::Buffer& buffer,
459  const Drv::ByteStreamStatus& status
460  );
461 
463  static void m_p_drvSendReturnIn_in(
464  Fw::PassiveComponentBase* callComp,
465  FwIndexType portNum,
466  Fw::Buffer& buffer,
467  const Drv::ByteStreamStatus& status
468  );
469 
470  PRIVATE:
471 
472  // ----------------------------------------------------------------------
473  // Typed input ports
474  // ----------------------------------------------------------------------
475 
478 
481 
484 
487 
490 
491  PRIVATE:
492 
493  // ----------------------------------------------------------------------
494  // Typed output ports
495  // ----------------------------------------------------------------------
496 
499 
502 
505 
507  Fw::OutputBufferSendPort m_drvReceiveReturnOut_OutputPort[NUM_DRVRECEIVERETURNOUT_OUTPUT_PORTS];
508 
510  Fw::OutputBufferSendPort m_drvSendOut_OutputPort[NUM_DRVSENDOUT_OUTPUT_PORTS];
511 
512  };
513 
514 }
515 
516 #endif
Drv::InputByteStreamDataPort * get_drvSendReturnIn_InputPort(FwIndexType portNum)
FwIndexType getNum_drvSendOut_OutputPorts() const
ComStubComponentBase(const char *compName="")
Construct ComStubComponentBase object.
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
FwIndexType getNum_dataIn_InputPorts() const
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
I32 FwEnumStoreType
FwIndexType getNum_drvReceiveReturnOut_OutputPorts() const
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
void drvSendReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)
Handler base-class function for input port drvSendReturnIn.
void drvConnected_handlerBase(FwIndexType portNum)
Handler base-class function for input port drvConnected.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
void set_drvSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to drvSendOut[portNum].
FwIndexType getNum_drvSendReturnIn_InputPorts() const
bool isConnected_drvReceiveReturnOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_dataReturnOut_OutputPorts() const
FwIndexType getNum_drvConnected_InputPorts() const
Auto-generated base for ComStub component.
Drv::InputByteStreamDataPort * get_drvReceiveIn_InputPort(FwIndexType portNum)
virtual void drvConnected_handler(FwIndexType portNum)=0
Handler for input port drvConnected.
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
virtual ~ComStubComponentBase()
Destroy ComStubComponentBase object.
void init()
Object initializer.
Definition: ObjBase.cpp:26
void drvReceiveReturnOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port drvReceiveReturnOut.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum)
void drvSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port drvSendOut.
Status returned by the send call.
friend class ComStubTester
Friend class tester implementation to support white-box testing.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
Drv::InputByteStreamReadyPort * get_drvConnected_InputPort(FwIndexType portNum)
bool isConnected_drvSendOut_OutputPort(FwIndexType portNum)
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
friend class ComStubTesterBase
Friend class tester to support autocoded test harness.
FwIndexType getNum_drvReceiveIn_InputPorts() const
FwIndexType getNum_dataOut_OutputPorts() const
virtual void drvReceiveIn_handler(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)=0
Handler for input port drvReceiveIn.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
virtual void drvSendReturnIn_handler(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)=0
Handler for input port drvSendReturnIn.
PlatformIndexType FwIndexType
void set_drvReceiveReturnOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to drvReceiveReturnOut[portNum].
Type used to pass context info between components during framing/deframing.
void drvReceiveIn_handlerBase(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)
Handler base-class function for input port drvReceiveIn.
RateGroupDivider component implementation.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
void set_comStatusOut_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatusOut[portNum].
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition)
Invoke output port comStatusOut.
FwIndexType getNum_dataReturnIn_InputPorts() const
FwIndexType getNum_comStatusOut_OutputPorts() const
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
Success/Failure.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.