Imt.Base C++ API V4.1.1.0
Loading...
Searching...
No Matches
imt::base::lib::remoting::DataFrameSyncReceiveLayer Class Referencefinal

This layer receives a byte stream from a lower layer and tries to generate data frames out of the byte streams data. More...

#include <Imt.Base.Lib.Remoting/inc/Imt.Base.Lib.Remoting/DataFrameSyncReceiveLayer.h>

Inheritance diagram for imt::base::lib::remoting::DataFrameSyncReceiveLayer:
imt::base::lib::remoting::DataReceiverIfc imt::base::core::platform::Nonmovable

Public Member Functions

 DataFrameSyncReceiveLayer (DataReceiverIfc &upperLevelReceiver, uint8_t const frameEndCharacter=DEFAULT_FRAME_END_CHARACTER)
 Constructor.
 
void onDataReceived (uint8_t const *const pData, uint32_t const countDataBytes) final
 
virtual void onDataReceived (uint8_t const *const pData, uint32_t const countDataBytes)=0
 Callback if data is received.
 

Static Public Attributes

static constexpr uint8_t DEFAULT_FRAME_END_CHARACTER {static_cast<uint8_t>('~')}
 Default frame end character.
 

Additional Inherited Members

- Protected Member Functions inherited from imt::base::lib::remoting::DataReceiverIfc
 DataReceiverIfc () noexcept=default
 Default constructor.
 
 ~DataReceiverIfc () noexcept=default
 Destructor.
 
 DataReceiverIfc (DataReceiverIfc const &)=delete
 
 DataReceiverIfc (DataReceiverIfc &&)=delete
 
DataReceiverIfcoperator= (DataReceiverIfc const &) &=delete
 
DataReceiverIfcoperator= (DataReceiverIfc &&) &=delete
 

Detailed Description

This layer receives a byte stream from a lower layer and tries to generate data frames out of the byte streams data.

Characters in the user data that conflict with the special characters used for frame end marking are escaped. The technique used to ommit conflicts of the special characters with the user data is often referenced as byte stuffing or character stuffing.

Definition at line 25 of file DataFrameSyncReceiveLayer.h.

Constructor & Destructor Documentation

◆ DataFrameSyncReceiveLayer()

imt::base::lib::remoting::DataFrameSyncReceiveLayer::DataFrameSyncReceiveLayer ( DataReceiverIfc upperLevelReceiver,
uint8_t const  frameEndCharacter = DEFAULT_FRAME_END_CHARACTER 
)
explicit

Constructor.

Parameters
upperLevelReceiverInterface to the next higher receiver layer
frameEndCharacteroptional frame end character, default is '~'.

Member Function Documentation

◆ onDataReceived()

void imt::base::lib::remoting::DataFrameSyncReceiveLayer::onDataReceived ( uint8_t const *const  pData,
uint32_t const  countDataBytes 
)
finalvirtual

Member Data Documentation

◆ DEFAULT_FRAME_END_CHARACTER

constexpr uint8_t imt::base::lib::remoting::DataFrameSyncReceiveLayer::DEFAULT_FRAME_END_CHARACTER {static_cast<uint8_t>('~')}
staticconstexpr

Default frame end character.

Definition at line 34 of file DataFrameSyncReceiveLayer.h.


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