1 #ifndef SAFE_STRING_STREAM_H
2 #define SAFE_STRING_STREAM_H
64 void begin(
const uint32_t baudRate = 0);
114 unsigned long us_perByte;
116 unsigned long releaseNextByte();
117 unsigned long sendTimerStart;
120 size_t missedCharsCount;
To create SafeStrings use one of the four (4) macros createSafeString or cSF, createSafeStringFromCha...
The SafeStringStream class allows you to test your code with data read from a given SafeString as tho...
int available()
How many bytes are currently available to be read.
SafeStringStream()
SafeStringStream empty constructor, nothing to read yet.
SafeStringStream(SafeString &sf, SafeString &sfRxBuffer)
SafeStringStream constructor with data to be read from this stream and an RX buffer to be used.
size_t RxBufferOverflow()
How may bytes have been dropped due to this stream's RX buffer being full.
void flush()
flush any buffered writes, does nothing here except release next byte at current baud rate.
int availableForWrite()
How may bytes can be written to this stream before its underlying SafeString is full.
void begin(const uint32_t baudRate=0)
Enable SafeStringStream to start delivering data when read() called.
SafeStringStream(SafeString &sf)
SafeStringStream constructor with data to be read from this stream.
void begin(SafeString &sf, const uint32_t baudRate=0)
Enable SafeStringStream to start delivering data from this SafeString when read() called.
int peek()
Peek at the next byte, returns -1 if none available.
size_t write(uint8_t b)
Write a byte to this stream, the data is appended to the SafeString that is supplying data for this s...
int read()
Read the next byte, returns -1 if none available.