class UARTBuffer

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

Full nameTelEngine::UARTBuffer
Definition#include <libs/ymodem/yatemodem.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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

inline  UARTBuffer (UART* client)

UARTBuffer

Constructor

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

inline bool  accumulate (unsigned char value)

accumulate

Accumulate data

Parameters:
valueThe value to append to the buffer

Returns: False on buffer overflow


Generated by: paulc on bussard on Tue Apr 12 17:15:21 2011, using kdoc 2.0a54.