F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComStub.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ComStub.hpp
3 // \author mstarch
4 // \brief hpp file for ComStub component implementation class
5 // ======================================================================
6 
7 #ifndef Svc_ComStub_HPP
8 #define Svc_ComStub_HPP
9 
12 
13 namespace Svc {
14 
15 class ComStub final : public ComStubComponentBase {
16  friend class ComStubTester;
17 
18  public:
20  // ----------------------------------------------------------------------
21  // Construction, initialization, and destruction
22  // ----------------------------------------------------------------------
23 
26  ComStub(const char* const compName
27  );
28 
31  ~ComStub() override;
32 
33  // ----------------------------------------------------------------------
34  // Handler implementations for user-defined typed input ports
35  // ----------------------------------------------------------------------
36  private:
41  void dataIn_handler(const FwIndexType portNum,
42  Fw::Buffer& sendBuffer,
43  const ComCfg::FrameContext& context) override;
44 
47  void drvConnected_handler(const FwIndexType portNum) override;
48 
53  void drvReceiveIn_handler(const FwIndexType portNum, Fw::Buffer& recvBuffer,
55  const Drv::ByteStreamStatus& recvStatus) override;
56 
60  void dataReturnIn_handler(FwIndexType portNum,
61  Fw::Buffer& fwBuffer,
62  const ComCfg::FrameContext& context) override;
63 
67  void drvAsyncSendReturnIn_handler(FwIndexType portNum,
68  Fw::Buffer& fwBuffer,
69  const Drv::ByteStreamStatus& recvStatus) override;
70 
71  // ----------------------------------------------------------------------
72  // Helper methods
73  // ----------------------------------------------------------------------
74  private:
76  void handleSynchronousSend(Fw::Buffer& sendBuffer, const ComCfg::FrameContext& context);
77 
79  void handleAsynchronousSend(Fw::Buffer& sendBuffer, const ComCfg::FrameContext& context);
80 
82  void handleAsyncRetry(Fw::Buffer& fwBuffer);
83 
84  // ----------------------------------------------------------------------
85  // Member variables
86  // ----------------------------------------------------------------------
87  private:
88  bool m_reinitialize;
89  ComCfg::FrameContext m_storedContext;
90  FwIndexType m_retry_count;
91 };
92 
93 } // end namespace Svc
94 
95 #endif
ComStub(const char *const compName)
Definition: ComStub.cpp:18
Auto-generated base for ComStub component.
Status returned by the send call.
friend class ComStubTester
Allow UT Tester to access private members.
Definition: ComStub.hpp:16
const FwIndexType RETRY_LIMIT
Definition: ComStub.hpp:19
~ComStub() override
Definition: ComStub.cpp:20
PlatformIndexType FwIndexType
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.