F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FrameAccumulator.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title FrameAccumulator.hpp
3
// \author mstarch
4
// \brief hpp file for FrameAccumulator component implementation class
5
// ======================================================================
6
7
#ifndef Svc_FrameAccumulator_HPP
8
#define Svc_FrameAccumulator_HPP
9
10
#include "
Fw/Types/MemAllocator.hpp
"
11
#include "
Svc/FrameAccumulator/FrameAccumulatorComponentAc.hpp
"
12
#include "
Svc/FrameAccumulator/FrameDetector.hpp
"
13
#include "
Utils/Types/CircularBuffer.hpp
"
14
15
namespace
Svc
{
16
17
class
FrameAccumulator
final :
public
FrameAccumulatorComponentBase
{
18
friend
class
FrameAccumulatorTester
;
19
20
public
:
21
// ----------------------------------------------------------------------
22
// Component construction and destruction
23
// ----------------------------------------------------------------------
24
26
FrameAccumulator
(
const
char
*
const
compName
27
);
28
30
~FrameAccumulator
();
31
36
void
configure
(
const
FrameDetector
& detector,
37
FwEnumStoreType
allocationId,
38
Fw::MemAllocator
& allocator,
39
FwSizeType
store_size
40
);
41
43
void
cleanup
();
44
45
private
:
46
// ----------------------------------------------------------------------
47
// Handler implementations for user-defined typed input ports
48
// ----------------------------------------------------------------------
49
53
void
dataIn_handler(
FwIndexType
portNum,
54
Fw::Buffer
& recvBuffer,
55
const
ComCfg::FrameContext
& context)
override
;
56
60
void
dataReturnIn_handler(
FwIndexType
portNum,
61
Fw::Buffer
& fwBuffer,
62
const
ComCfg::FrameContext
& context
63
)
override
;
64
65
private
:
68
void
processBuffer(
Fw::Buffer
& buffer);
69
71
void
processRing();
72
74
Types::CircularBuffer
m_inRing;
75
77
FrameDetector
const
* m_detector;
78
80
Fw::MemAllocator
* m_memoryAllocator;
81
83
U8
* m_memory;
84
86
FwEnumStoreType
m_allocatorId;
87
};
88
89
}
// namespace Svc
90
91
#endif
FrameAccumulatorComponentAc.hpp
FwSizeType
PlatformSizeType FwSizeType
Definition:
FwSizeTypeAliasAc.h:15
FwEnumStoreType
I32 FwEnumStoreType
Definition:
FwEnumStoreTypeAliasAc.h:14
Types::CircularBuffer
Definition:
CircularBuffer.hpp:25
Svc::FrameAccumulator::FrameAccumulator
FrameAccumulator(const char *const compName)
Construct FrameAccumulator object.
Definition:
FrameAccumulator.cpp:17
Svc::FrameAccumulator::~FrameAccumulator
~FrameAccumulator()
Destroy FrameAccumulator object.
Definition:
FrameAccumulator.cpp:24
Svc::FrameAccumulator
Definition:
FrameAccumulator.hpp:17
FrameDetector.hpp
Svc::FrameAccumulator::FrameAccumulatorTester
friend class FrameAccumulatorTester
Definition:
FrameAccumulator.hpp:18
U8
uint8_t U8
8-bit unsigned integer
Definition:
BasicTypes.h:53
Svc::FrameAccumulator::cleanup
void cleanup()
Deallocate internal resources (set up by configure() call)
Definition:
FrameAccumulator.cpp:41
Fw::MemAllocator
Definition:
MemAllocator.hpp:46
FwIndexType
PlatformIndexType FwIndexType
Definition:
FwIndexTypeAliasAc.h:15
Svc::FrameAccumulator::configure
void configure(const FrameDetector &detector, FwEnumStoreType allocationId, Fw::MemAllocator &allocator, FwSizeType store_size)
configure memory allocation for the circular buffer
Definition:
FrameAccumulator.cpp:26
ComCfg::FrameContext
Type used to pass context info between components during framing/deframing.
Definition:
FrameContextSerializableAc.hpp:20
Svc::FrameAccumulatorComponentBase
Auto-generated base for FrameAccumulator component.
Definition:
FrameAccumulatorComponentAc.hpp:33
Svc
RateGroupDivider component implementation.
Definition:
ActiveRateGroupCfg.hpp:18
MemAllocator.hpp
Defines a base class for a memory allocator for classes.
Fw::Buffer
Definition:
Buffer.hpp:47
Svc::FrameDetector
interface class used to codify what must be supported to allow frame detection
Definition:
FrameDetector.hpp:14
CircularBuffer.hpp
Svc
FrameAccumulator
FrameAccumulator.hpp
Generated by
1.8.14