TinyPPP
PPP networking over any Arduino Stream
Loading...
Searching...
No Matches
Public Member Functions | List of all members
HDLCEncoder Class Reference

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

#include <HDLC.h>

Public Member Functions

void begin (uint16_t protocol, bool escapeAllControl=false)
 Starts a frame with address/control header and the protocol number.
 
void data (const uint8_t *buf, size_t len)
 Adds payload bytes.
 
void data (uint8_t b)
 Adds one payload byte.
 
bool end ()
 Appends FCS and closing flag; returns false if the output dropped bytes.
 
void setACCM (uint32_t accm)
 Async-Control-Character-Map of the peer: control chars to escape.
 
void setOutput (Print *out)
 Defines the output (e.g. the serial port)
 

Detailed Description

HDLC frame encoder (RFC 1662).

Writes one HDLC frame at a time to a Print. Output is collected in a small buffer so that the underlying (USB) serial gets reasonably sized writes.

Member Function Documentation

◆ begin()

void begin ( uint16_t  protocol,
bool  escapeAllControl = false 
)
inline

Starts a frame with address/control header and the protocol number.

◆ data() [1/2]

void data ( const uint8_t *  buf,
size_t  len 
)
inline

Adds payload bytes.

◆ data() [2/2]

void data ( uint8_t  b)
inline

Adds one payload byte.

◆ end()

bool end ( )
inline

Appends FCS and closing flag; returns false if the output dropped bytes.

◆ setACCM()

void setACCM ( uint32_t  accm)
inline

Async-Control-Character-Map of the peer: control chars to escape.

◆ setOutput()

void setOutput ( Print *  out)
inline

Defines the output (e.g. the serial port)


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