pfodParser 3.61.0 The pfodParser library is handles commands sent from the Android pfodApp, pfodApp supports WiFi, BLE, Bluetooth and SMS connections

Public Member Functions | List of all members
pfodBufferedStream Class Reference

(c)2018 Forward Computing and Control Pty. More...

`#include <pfodBufferedStream.h>`

Inherits Stream.

## Public Member Functions
| pfodBufferedStream (const uint32_t baudRate, uint8_t *_buf, size_t _bufferSize, bool blocking=true)
| baudRate – the maximum rate at which the bytes are to be released. More...
pfodBufferedStream * | connect (Stream *_stream)
virtual size_t | write (uint8_t)
virtual size_t | write (const uint8_t *buf, size_t size)
virtual int | available ()
virtual int | read ()
virtual int | peek ()
virtual void | flush ()
virtual int | availableForWrite ()
void | setDebugStream (Print *out)
size_t | bytesToBeSent ()
size_t | getSize ()
void | clearTxBuffer ()
uint32_t | getBaudRate ()

## Detailed Description

(c)2018 Forward Computing and Control Pty.

Ltd. This code may be freely used for both private and commerical use. Provide this copyright is maintained.

Definition at line 12 of file pfodBufferedStream.h.

## Constructor & Destructor Documentation

## ◆ pfodBufferedStream()

pfodBufferedStream::pfodBufferedStream | ( | const uint32_t | baudRate,
|  | uint8_t * | _buf,
|  | size_t | _bufferSize,
|  | bool | blocking = `true`
| ) |  |

baudRate – the maximum rate at which the bytes are to be released.

Bytes will be relased slower depending on how long your loop() method takes to execute bufferSize – number of bytes to buffer,max bufferSize is limited to 32766 buf – the user allocated buffer to store the bytes, must be at least bufferSize long. blocking – default true, excess bytes block loop() until there is free space in the buffer. false drops excess bytes

## Member Function Documentation

## ◆ available()

virtual int pfodBufferedStream::available | ( |  | ) |
| virtual

## ◆ availableForWrite()

virtual int pfodBufferedStream::availableForWrite | ( |  | ) |
| virtual

## ◆ bytesToBeSent()

size_t pfodBufferedStream::bytesToBeSent | ( |  | ) |

## ◆ clearTxBuffer()

void pfodBufferedStream::clearTxBuffer | ( |  | ) |

## ◆ connect()

pfodBufferedStream* pfodBufferedStream::connect | ( | Stream * | _stream | ) |

## ◆ flush()

virtual void pfodBufferedStream::flush | ( |  | ) |
| virtual

## ◆ getBaudRate()

uint32_t pfodBufferedStream::getBaudRate | ( |  | ) |

## ◆ getSize()

size_t pfodBufferedStream::getSize | ( |  | ) |

## ◆ peek()

virtual int pfodBufferedStream::peek | ( |  | ) |
| virtual

## ◆ read()

virtual int pfodBufferedStream::read | ( |  | ) |
| virtual

## ◆ setDebugStream()

void pfodBufferedStream::setDebugStream | ( | Print * | out | ) |

## ◆ write() [1/2]

virtual size_t pfodBufferedStream::write | ( | const uint8_t * | buf,
|  | size_t | size
| ) |  |
| virtual

## ◆ write() [2/2]

virtual size_t pfodBufferedStream::write | ( | uint8_t |  | ) |
| virtual