TinyPPP
PPP networking over any Arduino Stream
Loading...
Searching...
No Matches
Public Member Functions | List of all members
HDLCDecoder< MAX_FRAME > Class Template Reference

HDLC frame decoder (RFC 1662). More...

#include <HDLC.h>

Public Member Functions

bool add (uint8_t b)
 Feed one byte: returns true when a valid frame is available.
 
uint32_t fcsErrors () const
 Number of frames dropped because of a wrong FCS.
 
uint8_t * frame ()
 Frame content without FCS (address/control included if sent)
 
size_t frameLen () const
 Length of the frame returned by frame()
 

Detailed Description

template<size_t MAX_FRAME>
class tinyppp::HDLCDecoder< MAX_FRAME >

HDLC frame decoder (RFC 1662).

Reassembles frames from a byte stream. After a complete frame with a valid FCS has been received, add() returns true and frame()/frameLen() give the content (address/control removed when present, FCS removed).

Member Function Documentation

◆ add()

template<size_t MAX_FRAME>
bool add ( uint8_t  b)
inline

Feed one byte: returns true when a valid frame is available.

◆ fcsErrors()

template<size_t MAX_FRAME>
uint32_t fcsErrors ( ) const
inline

Number of frames dropped because of a wrong FCS.

◆ frame()

template<size_t MAX_FRAME>
uint8_t * frame ( )
inline

Frame content without FCS (address/control included if sent)

◆ frameLen()

template<size_t MAX_FRAME>
size_t frameLen ( ) const
inline

Length of the frame returned by frame()


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