A fixed length byte accumulator used by an UART.
More...
#include <yatemodem.h>
A fixed length byte accumulator used by an UART.
This class is used by an UART to accumulate messages with known length
◆ UARTBuffer()
Constructor
- Parameters
-
| client | The client of this buffer |
References reset().
◆ accumulate()
| bool accumulate |
( |
unsigned char | value | ) |
|
|
inline |
Accumulate data
- Parameters
-
| value | The value to append to the buffer |
- Returns
- False on buffer overflow
◆ buffer()
Get the accumulated data
- Returns
- The accumulated data
◆ free()
| unsigned int free |
( |
| ) |
const |
|
inline |
Get the free space length in the buffer
- Returns
- The free space length
◆ reset()
| 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 |
Referenced by UARTBuffer().
The documentation for this class was generated from the following file: