# class UARTBuffer | A fixed length byte accumulator used by an UART. More...
Full name | `TelEngine::UARTBuffer`
Definition | `#include <libs/ymodem/yatemodem.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline UARTBuffer (UART* client)
- inline const DataBlock& buffer () const
- inline unsigned int free () const
- inline void reset (unsigned int len = 0)
- inline bool accumulate (unsigned char value)

## Detailed Description

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

inline UARTBuffer (UART* client) | ### UARTBuffer

Constructor

Parameters:

client | The client of this buffer

inline const DataBlock& buffer () | ### buffer

[const]

Get the accumulated data

Returns: The accumulated data

inline unsigned int free () | ### free

[const]

Get the free space length in the buffer

Returns: The free space length

inline void reset (unsigned int len = 0) | ### reset

Reset the buffer

Parameters:

len | The new length of the buffer. Set to 0 to left the length unchanged

inline bool accumulate (unsigned char value) | ### accumulate

Accumulate data

Parameters:

value | The value to append to the buffer

Returns: False on buffer overflow

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.