F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComAggregator.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title ComAggregator.hpp
3
// \author lestarch
4
// \brief hpp file for ComAggregator component implementation class
5
// ======================================================================
6
7
#ifndef Svc_ComAggregator_HPP
8
#define Svc_ComAggregator_HPP
9
10
#include "
Os/Mutex.hpp
"
11
#include "
Svc/ComAggregator/ComAggregatorComponentAc.hpp
"
12
13
namespace
Svc
{
14
15
class
ComAggregator
final :
public
ComAggregatorComponentBase
{
16
friend
class
ComAggregatorTester
;
// Allow unit test access to private members
17
public
:
18
// ----------------------------------------------------------------------
19
// Component construction and destruction
20
// ----------------------------------------------------------------------
21
23
ComAggregator
(
const
char
*
const
compName
24
);
25
27
~ComAggregator
();
28
29
void
preamble
()
override
;
30
31
private
:
32
// ----------------------------------------------------------------------
33
// Handler implementations for typed input ports
34
// ----------------------------------------------------------------------
35
40
void
comStatusIn_handler(
FwIndexType
portNum,
41
Fw::Success
& condition
42
)
override
;
43
47
void
dataIn_handler(
FwIndexType
portNum,
48
Fw::Buffer
& data,
49
const
ComCfg::FrameContext
& context)
override
;
50
54
void
dataReturnIn_handler(
FwIndexType
portNum,
55
Fw::Buffer
& data,
56
const
ComCfg::FrameContext
& context)
override
;
57
59
void
timeout_handler(
FwIndexType
portNum,
60
U32 context
61
)
override
;
62
63
private
:
64
// ----------------------------------------------------------------------
65
// Implementations for internal state machine actions
66
// ----------------------------------------------------------------------
67
71
void
Svc_AggregationMachine_action_doClear(
SmId
smId,
72
Svc_AggregationMachine::Signal
signal
73
)
override
;
74
78
void
Svc_AggregationMachine_action_doFill(
SmId
smId,
79
Svc_AggregationMachine::Signal
signal,
80
const
Svc::ComDataContextPair
& value
81
)
override
;
82
86
void
Svc_AggregationMachine_action_doSend(
SmId
smId,
87
Svc_AggregationMachine::Signal
signal
88
)
override
;
89
93
void
Svc_AggregationMachine_action_doHold(
SmId
smId,
94
Svc_AggregationMachine::Signal
signal,
95
const
Svc::ComDataContextPair
& value
96
)
override
;
97
101
void
Svc_AggregationMachine_action_assertNoStatus(
SmId
smId,
102
Svc_AggregationMachine::Signal
signal
103
)
override
;
104
105
private
:
106
// ----------------------------------------------------------------------
107
// Implementations for internal state machine guards
108
// ----------------------------------------------------------------------
109
113
bool
Svc_AggregationMachine_guard_isFull(
SmId
smId,
114
Svc_AggregationMachine::Signal
signal,
115
const
Svc::ComDataContextPair
& value
116
)
const override
;
117
121
bool
Svc_AggregationMachine_guard_isNotEmpty(
SmId
smId,
122
Svc_AggregationMachine::Signal
signal
123
)
const override
;
124
128
bool
Svc_AggregationMachine_guard_isGood(
SmId
smId,
129
Svc_AggregationMachine::Signal
signal,
130
const
Fw::Success
& value
131
)
const override
;
132
133
private
:
134
U8
m_frameBufferStore[
ComCfg::AggregationSize
];
135
Fw::Buffer::OwnershipState
m_bufferState =
136
Fw::Buffer::OwnershipState::OWNED
;
137
Fw::Buffer
m_frameBuffer;
138
Fw::ExternalSerializeBufferWithMemberCopy
m_frameSerializer;
139
ComCfg::FrameContext
m_lastContext;
140
141
Svc::ComDataContextPair
m_held;
142
};
143
144
}
// namespace Svc
145
146
#endif
Svc::ComAggregator::ComAggregatorTester
friend class ComAggregatorTester
Definition:
ComAggregator.hpp:16
Svc::ComAggregatorComponentBase::SmId
SmId
State machine identifiers.
Definition:
ComAggregatorComponentAc.hpp:60
Svc::ComDataContextPair
Definition:
ComDataContextPairSerializableAc.hpp:21
Svc::ComAggregator
Definition:
ComAggregator.hpp:15
Svc::ComAggregator::~ComAggregator
~ComAggregator()
Destroy ComAggregator object.
Definition:
ComAggregator.cpp:21
ComCfg::AggregationSize
Definition:
FppConstantsAc.hpp:151
Svc::ComAggregator::preamble
void preamble() override
A function that will be called before the event loop is entered.
Definition:
ComAggregator.cpp:23
Mutex.hpp
ComAggregatorComponentAc.hpp
U8
uint8_t U8
8-bit unsigned integer
Definition:
BasicTypes.h:53
Svc::ComAggregatorComponentBase
Auto-generated base for ComAggregator component.
Definition:
ComAggregatorComponentAc.hpp:25
Svc::AggregationMachineStateMachineBase::Signal
Signal
The signal type.
Definition:
AggregationMachineStateMachineAc.hpp:46
Svc::ComAggregator::ComAggregator
ComAggregator(const char *const compName)
Construct ComAggregator object.
Definition:
ComAggregator.cpp:15
FwIndexType
PlatformIndexType FwIndexType
Definition:
FwIndexTypeAliasAc.h:15
Fw::Buffer::OwnershipState
OwnershipState
Definition:
Buffer.hpp:54
ComCfg::FrameContext
Type used to pass context info between components during framing/deframing.
Definition:
FrameContextSerializableAc.hpp:20
Fw::ExternalSerializeBufferWithMemberCopy
External serialize buffer with member copy semantics.
Definition:
Serializable.hpp:1552
Svc
RateGroupDivider component implementation.
Definition:
ActiveRateGroupCfg.hpp:18
Fw::Buffer::OwnershipState::OWNED
The buffer is currently owned.
Fw::Buffer
Definition:
Buffer.hpp:47
Fw::Success
Success/Failure.
Definition:
SuccessEnumAc.hpp:17
Svc
ComAggregator
ComAggregator.hpp
Generated by
1.8.14