F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
FramerComponentImpl.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FramerComponentImpl.hpp
3 // \author mstarch
4 // \brief hpp file for Framer component implementation class
5 //
6 // \copyright
7 // Copyright 2009-2021, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #ifndef Framer_HPP
14 #define Framer_HPP
15 
16 #include "Svc/Framer/FramerComponentAc.hpp"
19 
20 namespace Svc {
31 class FramerComponentImpl : public FramerComponentBase, public FramingProtocolInterface {
32  public:
33  // ----------------------------------------------------------------------
34  // Construction, initialization, and destruction
35  // ----------------------------------------------------------------------
36 
39  FramerComponentImpl(const char* const compName
40  );
41 
44  void init(const NATIVE_INT_TYPE instance = 0
45  );
46 
49  void setup(FramingProtocol& protocol );
50 
54 
63  Fw::Buffer allocate(const U32 size);
64 
65  PRIVATE:
66  // ----------------------------------------------------------------------
67  // Handler implementations for user-defined typed input ports
68  // ----------------------------------------------------------------------
69 
72  void comIn_handler(const NATIVE_INT_TYPE portNum,
73  Fw::ComBuffer& data,
74  U32 context
75  );
76 
79  void bufferIn_handler(const NATIVE_INT_TYPE portNum,
80  Fw::Buffer& fwBuffer);
81 
84  void send(Fw::Buffer& outgoing);
85 
86  FramingProtocol* m_protocol;
87 };
88 
89 } // end namespace Svc
90 
91 #endif
Svc::FramerComponentImpl::setup
void setup(FramingProtocol &protocol)
Setup this component with a supplied framing protocol.
Definition: FramerComponentImpl.cpp:35
FramingProtocolInterface.hpp
Svc::FramerComponentImpl::~FramerComponentImpl
~FramerComponentImpl()
Definition: FramerComponentImpl.cpp:33
Fw::Buffer
Definition: Buffer.hpp:43
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:27
Svc::FramerComponentImpl::init
void init(const NATIVE_INT_TYPE instance=0)
Definition: FramerComponentImpl.cpp:29
Svc::FramingProtocol
abstract class representing a framing protocol
Definition: FramingProtocol.hpp:31
Svc
Definition: ActiveRateGroupCfg.hpp:18
Svc::FramerComponentImpl
Generic framing component using FramingProtocol implementation for actual framing.
Definition: FramerComponentImpl.hpp:31
FramingProtocol.hpp
Svc::FramerComponentImpl::FramerComponentImpl
FramerComponentImpl(const char *const compName)
Definition: FramerComponentImpl.cpp:26
Svc::FramerComponentImpl::allocate
Fw::Buffer allocate(const U32 size)
Allocation callback used to request memory for the framer.
Definition: FramerComponentImpl.cpp:65
Fw::ComBuffer
Definition: ComBuffer.hpp:21
Svc::FramingProtocolInterface
interface supplied to the framing protocol
Definition: FramingProtocolInterface.hpp:28