F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComRetry.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ComRetry.hpp
3 // \author valdaarhun
4 // \brief hpp file for ComRetry component implementation class
5 // ======================================================================
6 
7 #ifndef Svc_ComRetry_HPP
8 #define Svc_ComRetry_HPP
9 
11 
12 namespace Svc {
13 
14 class ComRetry final : public ComRetryComponentBase {
16  enum RetryState { WAITING_FOR_STATUS, WAITING_FOR_SEND, RETRYING };
17 
18  public:
19  // ----------------------------------------------------------------------
20  // Component construction and destruction
21  // ----------------------------------------------------------------------
22 
24  ComRetry(const char* const compName
25  );
26 
28  ~ComRetry();
29 
31  void configure(U32 num_retries
32  );
33 
34  private:
35  // ----------------------------------------------------------------------
36  // Handler implementations for typed input ports
37  // ----------------------------------------------------------------------
38 
42  void comStatusIn_handler(FwIndexType portNum,
43  Fw::Success& condition
44  ) override;
45 
49  void dataIn_handler(FwIndexType portNum,
50  Fw::Buffer& data,
51  const ComCfg::FrameContext& context) override;
52 
56  void dataReturnIn_handler(FwIndexType portNum,
57  Fw::Buffer& data,
58  const ComCfg::FrameContext& context) override;
59 
60  private:
61  // ----------------------------------------------------------------------
62  // Member variables
63  // ----------------------------------------------------------------------
64  U32 m_num_retries;
65  U32 m_retry_count;
66  RetryState m_retry_state;
67  ComCfg::FrameContext m_context;
68  Fw::Buffer m_buffer;
69  Fw::Buffer::OwnershipState m_bufferState;
70 };
71 
72 } // namespace Svc
73 
74 #endif
Auto-generated base for ComRetry component.
~ComRetry()
Destroy ComRetry object.
Definition: ComRetry.cpp:23
ComRetry(const char *const compName)
Construct ComRetry object.
Definition: ComRetry.cpp:16
void configure(U32 num_retries)
Configure the number of retries.
Definition: ComRetry.cpp:25
PlatformIndexType FwIndexType
OwnershipState
Definition: Buffer.hpp:54
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
Success/Failure.