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
10
#include "
Drv/ByteStreamDriverModel/ByteStreamStatusEnumAc.hpp
"
11
#include "
Svc/ComStub/ComStubComponentAc.hpp
"
12
13
namespace
Svc
{
14
15
class
ComStub
final :
public
ComStubComponentBase
{
16
friend
class
ComStubTester
;
17
18
public
:
19
const
FwIndexType
RETRY_LIMIT
= 10;
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
Svc::ComStub::ComStub
ComStub(const char *const compName)
Definition:
ComStub.cpp:18
ByteStreamStatusEnumAc.hpp
Svc::ComStubComponentBase
Auto-generated base for ComStub component.
Definition:
ComStubComponentAc.hpp:29
Drv::ByteStreamStatus
Status returned by the send call.
Definition:
ByteStreamStatusEnumAc.hpp:17
Svc::ComStub::ComStubTester
friend class ComStubTester
Allow UT Tester to access private members.
Definition:
ComStub.hpp:16
Svc::ComStub::RETRY_LIMIT
const FwIndexType RETRY_LIMIT
Definition:
ComStub.hpp:19
Svc::ComStub
Definition:
ComStub.hpp:15
Svc::ComStub::~ComStub
~ComStub() override
Definition:
ComStub.cpp:20
FwIndexType
PlatformIndexType FwIndexType
Definition:
FwIndexTypeAliasAc.h:15
ComStubComponentAc.hpp
ComCfg::FrameContext
Type used to pass context info between components during framing/deframing.
Definition:
FrameContextSerializableAc.hpp:20
Svc
RateGroupDivider component implementation.
Definition:
ActiveRateGroupCfg.hpp:18
Fw::Buffer
Definition:
Buffer.hpp:47
Svc
ComStub
ComStub.hpp
Generated by
1.8.14