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

Abstract base class representing a deframing protocol. More...

#include <Svc/FramingProtocol/DeframingProtocol.hpp>

Inheritance diagram for Svc::DeframingProtocol:
Svc::FprimeDeframing

Public Types

enum  DeframingStatus {
  DEFRAMING_STATUS_SUCCESS , DEFRAMING_INVALID_SIZE , DEFRAMING_INVALID_CHECKSUM , DEFRAMING_MORE_NEEDED ,
  DEFRAMING_INVALID_FORMAT , DEFRAMING_MAX_STATUS
}
 Status of the deframing call. More...
 

Public Member Functions

virtual ~DeframingProtocol ()
 
 DeframingProtocol ()
 
void setup (DeframingProtocolInterface &interface)
 
virtual DeframingStatus deframe (Types::CircularBuffer &buffer, U32 &needed)=0
 

Protected Attributes

DeframingProtocolInterfacem_interface
 

Detailed Description

Abstract base class representing a deframing protocol.

This class represents the basic interface for writing a deframing protocol. This class may be subclassed to provide concrete implementations for the protocol. A DeframingProtocolInterface is be supplied using the setup call. This instance is usually the DeframingComponentImpl.

Implementations are expected to call m_interface.route to send the deframed data and may call m_interface.allocate to allocate new memory.

Definition at line 33 of file DeframingProtocol.hpp.

Member Enumeration Documentation

◆ DeframingStatus

Status of the deframing call.

Enumerator
DEFRAMING_STATUS_SUCCESS 

Successful deframing

DEFRAMING_INVALID_SIZE 

Invalid size found

DEFRAMING_INVALID_CHECKSUM 

Invalid checksum

DEFRAMING_MORE_NEEDED 

Successful deframing likely with more data

DEFRAMING_INVALID_FORMAT 

Invalid format

DEFRAMING_MAX_STATUS 

The number of status enumerations

Definition at line 39 of file DeframingProtocol.hpp.

Constructor & Destructor Documentation

◆ ~DeframingProtocol()

virtual Svc::DeframingProtocol::~DeframingProtocol ( )
inlinevirtual

Definition at line 35 of file DeframingProtocol.hpp.

◆ DeframingProtocol()

Svc::DeframingProtocol::DeframingProtocol ( )

Constructor

Definition at line 19 of file DeframingProtocol.cpp.

Member Function Documentation

◆ deframe()

virtual DeframingStatus Svc::DeframingProtocol::deframe ( Types::CircularBuffer buffer,
U32 &  needed 
)
pure virtual

Deframe packets from within the circular buffer

Returns
deframing status of this deframe attempt
Parameters
bufferDeframe from circular buffer
neededReturn needed number of bytes

Implemented in Svc::FprimeDeframing.

◆ setup()

void Svc::DeframingProtocol::setup ( DeframingProtocolInterface interface)

Setup the deframing protocol with the deframing interface

Parameters
interfaceDeframing interface

Definition at line 21 of file DeframingProtocol.cpp.

Member Data Documentation

◆ m_interface

DeframingProtocolInterface* Svc::DeframingProtocol::m_interface
protected

Definition at line 63 of file DeframingProtocol.hpp.


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