BeeeOn Gateway
v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
|
#include <Console.h>
Public Member Functions | |
ConsoleSession (Console &console) | |
std::string | readLine () |
std::string | readBytes (const unsigned int length) |
void | print (const std::string &text, bool newline=true) override |
bool | eof () |
ConsoleSession represents a single session of a user. The exact semantics of a session is defined by the ConsoleSessionImpl. This class is a universal wrapper around the implementation and provides a public API to be widely used.
bool ConsoleSession::eof | ( | ) |
Return true if there will be no input from the console.
|
overridevirtual |
Print the given text to the output. The newline can be optionally appended.
Implements BeeeOn::Printable.
string ConsoleSession::readBytes | ( | const unsigned int | length | ) |
Read up to length bytes from input. The call is always blocking.
string ConsoleSession::readLine | ( | ) |
Print prompt and read the next line from the input. The call is always blocking.