F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Svc::Deframer Class Reference

Generic deframing component using DeframingProtocol implementation for actual deframing. More...

#include <Svc/Deframer/Deframer.hpp>

Inheritance diagram for Svc::Deframer:
Svc::DeframerComponentBase Svc::DeframingProtocolInterface Fw::PassiveComponentBase Fw::ObjBase

Public Member Functions

 Deframer (const char *const compName)
 Construct Deframer instance. More...
 
 ~Deframer ()
 Destroy Deframer instance. More...
 
void setup (DeframingProtocol &protocol)
 Set up the instance. More...
 
- Public Member Functions inherited from Svc::DeframerComponentBase
void init (FwEnumStoreType instance=0)
 Initialize DeframerComponentBase object. More...
 
Fw::InputCmdResponsePortget_cmdResponseIn_InputPort (FwIndexType portNum)
 
Drv::InputByteStreamRecvPortget_framedIn_InputPort (FwIndexType portNum)
 
Svc::InputSchedPortget_schedIn_InputPort (FwIndexType portNum)
 
void set_bufferAllocate_OutputPort (FwIndexType portNum, Fw::InputBufferGetPort *port)
 Connect port to bufferAllocate[portNum]. More...
 
void set_bufferDeallocate_OutputPort (FwIndexType portNum, Fw::InputBufferSendPort *port)
 Connect port to bufferDeallocate[portNum]. More...
 
void set_bufferOut_OutputPort (FwIndexType portNum, Fw::InputBufferSendPort *port)
 Connect port to bufferOut[portNum]. More...
 
void set_comOut_OutputPort (FwIndexType portNum, Fw::InputComPort *port)
 Connect port to comOut[portNum]. More...
 
void set_framedDeallocate_OutputPort (FwIndexType portNum, Fw::InputBufferSendPort *port)
 Connect port to framedDeallocate[portNum]. More...
 
void set_framedPoll_OutputPort (FwIndexType portNum, Drv::InputByteStreamPollPort *port)
 Connect port to framedPoll[portNum]. More...
 
- Public Member Functions inherited from Fw::PassiveComponentBase
void setIdBase (const U32)
 Set the ID base. More...
 
U32 getIdBase () const
 
- Public Member Functions inherited from Svc::DeframingProtocolInterface
virtual ~DeframingProtocolInterface ()
 

Additional Inherited Members

- Protected Types inherited from Svc::DeframerComponentBase
enum  { NUM_CMDRESPONSEIN_INPUT_PORTS = 1 , NUM_FRAMEDIN_INPUT_PORTS = 1 , NUM_SCHEDIN_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  {
  NUM_BUFFERALLOCATE_OUTPUT_PORTS = 1 , NUM_BUFFERDEALLOCATE_OUTPUT_PORTS = 1 , NUM_BUFFEROUT_OUTPUT_PORTS = 1 , NUM_COMOUT_OUTPUT_PORTS = 1 ,
  NUM_FRAMEDDEALLOCATE_OUTPUT_PORTS = 1 , NUM_FRAMEDPOLL_OUTPUT_PORTS = 1
}
 Enumerations for numbers of typed output ports. More...
 
- Protected Member Functions inherited from Svc::DeframerComponentBase
 DeframerComponentBase (const char *compName="")
 Construct DeframerComponentBase object. More...
 
virtual ~DeframerComponentBase ()
 Destroy DeframerComponentBase object. More...
 
FwIndexType getNum_cmdResponseIn_InputPorts () const
 
FwIndexType getNum_framedIn_InputPorts () const
 
FwIndexType getNum_schedIn_InputPorts () const
 
FwIndexType getNum_bufferAllocate_OutputPorts () const
 
FwIndexType getNum_bufferDeallocate_OutputPorts () const
 
FwIndexType getNum_bufferOut_OutputPorts () const
 
FwIndexType getNum_comOut_OutputPorts () const
 
FwIndexType getNum_framedDeallocate_OutputPorts () const
 
FwIndexType getNum_framedPoll_OutputPorts () const
 
bool isConnected_bufferAllocate_OutputPort (FwIndexType portNum)
 
bool isConnected_bufferDeallocate_OutputPort (FwIndexType portNum)
 
bool isConnected_bufferOut_OutputPort (FwIndexType portNum)
 
bool isConnected_comOut_OutputPort (FwIndexType portNum)
 
bool isConnected_framedDeallocate_OutputPort (FwIndexType portNum)
 
bool isConnected_framedPoll_OutputPort (FwIndexType portNum)
 
void cmdResponseIn_handlerBase (FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
 Handler base-class function for input port cmdResponseIn. More...
 
void framedIn_handlerBase (FwIndexType portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)
 Handler base-class function for input port framedIn. More...
 
void schedIn_handlerBase (FwIndexType portNum, U32 context)
 Handler base-class function for input port schedIn. More...
 
Fw::Buffer bufferAllocate_out (FwIndexType portNum, U32 size)
 Invoke output port bufferAllocate. More...
 
void bufferDeallocate_out (FwIndexType portNum, Fw::Buffer &fwBuffer)
 Invoke output port bufferDeallocate. More...
 
void bufferOut_out (FwIndexType portNum, Fw::Buffer &fwBuffer)
 Invoke output port bufferOut. More...
 
void comOut_out (FwIndexType portNum, Fw::ComBuffer &data, U32 context)
 Invoke output port comOut. More...
 
void framedDeallocate_out (FwIndexType portNum, Fw::Buffer &fwBuffer)
 Invoke output port framedDeallocate. More...
 
Drv::PollStatus framedPoll_out (FwIndexType portNum, Fw::Buffer &pollBuffer)
 Invoke output port framedPoll. More...
 
virtual void lock ()
 Lock the guarded mutex. More...
 
virtual void unLock ()
 Unlock the guarded mutex. More...
 
- Protected Member Functions inherited from Fw::PassiveComponentBase
 PassiveComponentBase (const char *name)
 Named constructor. More...
 
virtual ~PassiveComponentBase ()
 Destructor. More...
 
void init (NATIVE_INT_TYPE instance)
 Initialization function. More...
 
NATIVE_INT_TYPE getInstance () const
 
- Protected Member Functions inherited from Fw::ObjBase
 ObjBase (const char *name)
 ObjBase constructor. More...
 
virtual ~ObjBase ()
 Destructor. More...
 
void init ()
 Object initializer. More...
 

Detailed Description

Generic deframing component using DeframingProtocol implementation for actual deframing.

Deframing component used to take byte streams and expand them into Com/File buffers. This is done using a deframing protocol specified in a DeframingProtocol instance. The instance must be supplied using the setup method.

Using this component, projects can implement and supply a fresh DeframingProtocol implementation without changing the reference topology.

Implementation uses a circular buffer to store incoming data, which is drained one framed packet at a time into buffers dispatched to the rest of the system.

Definition at line 38 of file Deframer.hpp.

Constructor & Destructor Documentation

◆ Deframer()

Svc::Deframer::Deframer ( const char *const  compName)

Construct Deframer instance.

Parameters
compNameThe component name

Definition at line 39 of file Deframer.cpp.

◆ ~Deframer()

Svc::Deframer::~Deframer ( )

Destroy Deframer instance.

Definition at line 48 of file Deframer.cpp.

Member Function Documentation

◆ setup()

void Svc::Deframer::setup ( DeframingProtocol protocol)

Set up the instance.

Parameters
protocolDeframing protocol instance

Definition at line 50 of file Deframer.cpp.


The documentation for this class was generated from the following files: