Yate
Public Member Functions
UARTBuffer Class Reference

A fixed length byte accumulator used by an UART. More...

#include <yatemodem.h>

List of all members.

Public Member Functions

 UARTBuffer (UART *client)
const DataBlockbuffer () const
unsigned int free () const
void reset (unsigned int len=0)
bool accumulate (unsigned char value)

Detailed Description

A fixed length byte accumulator used by an UART.

This class is used by an UART to accumulate messages with known length


Constructor & Destructor Documentation

UARTBuffer ( UART client) [inline]

Constructor

Parameters:
clientThe client of this buffer

Member Function Documentation

bool accumulate ( unsigned char  value) [inline]

Accumulate data

Parameters:
valueThe value to append to the buffer
Returns:
False on buffer overflow

References TelEngine::Debug().

const DataBlock& buffer ( ) const [inline]

Get the accumulated data

Returns:
The accumulated data
unsigned int free ( ) const [inline]

Get the free space length in the buffer

Returns:
The free space length
void reset ( unsigned int  len = 0) [inline]

Reset the buffer

Parameters:
lenThe new length of the buffer. Set to 0 to left the length unchanged

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