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 
14 
15 namespace Svc {
16 
18  public:
19  // ----------------------------------------------------------------------
20  // Component construction and destruction
21  // ----------------------------------------------------------------------
22 
24  FrameAccumulator(const char* const compName
25  );
26 
29 
34  void configure(const FrameDetector& detector,
35  FwEnumStoreType allocationId,
36  Fw::MemAllocator& allocator,
37  FwSizeType store_size
38  );
39 
41  void cleanup();
42 
43 
44  PRIVATE:
45  // ----------------------------------------------------------------------
46  // Handler implementations for user-defined typed input ports
47  // ----------------------------------------------------------------------
48 
52  void dataIn_handler(FwIndexType portNum,
53  Fw::Buffer& recvBuffer) override;
54 
55  PRIVATE:
58  void processBuffer(Fw::Buffer& buffer);
59 
61  void processRing();
62 
64  Types::CircularBuffer m_inRing;
65 
67  FrameDetector const* m_detector;
68 
70  Fw::MemAllocator* m_memoryAllocator;
71 
73  U8* m_memory;
74 
76  FwEnumStoreType m_allocatorId;
77 };
78 
79 } // namespace Svc
80 
81 #endif
PlatformSizeType FwSizeType
I32 FwEnumStoreType
FrameAccumulator(const char *const compName)
Construct FrameAccumulator object.
~FrameAccumulator()
Destroy FrameAccumulator object.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:56
void cleanup()
Deallocate internal resources (set up by configure() call)
PlatformIndexType FwIndexType
void configure(const FrameDetector &detector, FwEnumStoreType allocationId, Fw::MemAllocator &allocator, FwSizeType store_size)
configure memory allocation for the circular buffer
Auto-generated base for FrameAccumulator component.
RateGroupDivider component implementation.
Defines a base class for a memory allocator for classes.
interface class used to codify what must be supported to allow frame detection