AceUtils
0.5.0
Useful Arduino utilties which are too small as separate libraries, but complex enough to be shared among multiple projects, and often have external dependencies to other libraries.
|
An AceRoutine coroutine that reads lines (terminated by '\n' or '\r' from the Stream device, and write the InputLine message into the provided Channel. More...
#include <StreamLineReader.h>
Public Member Functions | |
StreamLineReader (ace_routine::Channel< InputLine > &channel, Stream &stream, char *buffer, int bufferSize) | |
Constructor. More... | |
int | runCoroutine () override |
Main body of the coroutine that reads a character from the input stream and writes it into the output channel. | |
An AceRoutine coroutine that reads lines (terminated by '\n' or '\r' from the Stream device, and write the InputLine message into the provided Channel.
The Stream will normally be the global Serial object.
Definition at line 40 of file StreamLineReader.h.
|
inline |
Constructor.
channel | The output Channel used to send an InputLine message back to the receiver. |
stream | The input stream, usually the global Serial object. |
buffer | The input character buffer. |
bufferSize | The size of the buffer, should be set large enough to hold the longest line without triggering buffer overflow. |
Definition at line 52 of file StreamLineReader.h.