BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
#include <SimpleConsole.h>
Public Member Functions | |
SimpleConsole (Poco::SharedPtr< Console > console) | |
std::string | readLine () |
std::string | readBytes (const unsigned int length) |
void | print (const std::string &text, bool newline=true) override |
bool | eof () |
void | close () |
void | setConsole (Poco::SharedPtr< Console > console) |
Protected Member Functions | |
ConsoleSession & | session () |
The SimpleConsole class just wraps another Console implementation. It manages a single session inside. Note that this class is not thread-safe as it is intended for very simple scenarios.
void SimpleConsole::close | ( | ) |
Close the current session.
bool SimpleConsole::eof | ( | ) |
Test whether the current session says End-of-File. Open a session if necessary.
|
overridevirtual |
Print text and an optional new line to the console. Open a session if necessary.
Implements BeeeOn::Printable.
string SimpleConsole::readBytes | ( | const unsigned int | length | ) |
Read the requested number of raw bytes. Open a session if necessary.
string SimpleConsole::readLine | ( | ) |
Prompt for input and read a single line. Open a session if necessary.