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:
client The client of this buffer

Member Function Documentation

bool accumulate ( unsigned char  value  )  [inline]

Accumulate data

Parameters:
value The 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:
len The new length of the buffer. Set to 0 to left the length unchanged

The documentation for this class was generated from the following file:
Generated on Thu Apr 8 18:19:44 2010 for Yate by  doxygen 1.6.3