AceUtils  0.3
Useful Arduino utilties which are too small as separate libraries, but complex enough to have external dependencies to other libraries.
Public Member Functions | List of all members
cli::StreamLineReader Class Reference

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>

Inheritance diagram for cli::StreamLineReader:
Inheritance graph
[legend]
Collaboration diagram for cli::StreamLineReader:
Collaboration graph
[legend]

Public Member Functions

 StreamLineReader (ace_routine::Channel< InputLine > &channel, Stream &stream, char *buffer, int bufferSize)
 Constructor. More...
 
int runCoroutine () override
 

Detailed Description

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 39 of file StreamLineReader.h.

Constructor & Destructor Documentation

◆ StreamLineReader()

cli::StreamLineReader::StreamLineReader ( ace_routine::Channel< InputLine > &  channel,
Stream &  stream,
char *  buffer,
int  bufferSize 
)
inline

Constructor.

Parameters
channelThe output Channel used to send an InputLine message back to the receiver.
streamThe input stream, usually the global Serial object.
bufferThe input character buffer.
bufferSizeThe size of the buffer, should be set large enough to hold the longest line without triggering buffer overflow.

Definition at line 51 of file StreamLineReader.h.


The documentation for this class was generated from the following file: