BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Protected Member Functions
BeeeOn::SimpleConsole Class Reference

#include <SimpleConsole.h>

Inheritance diagram for BeeeOn::SimpleConsole:
BeeeOn::Printable

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

ConsoleSessionsession ()
 

Detailed Description

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.

Member Function Documentation

void SimpleConsole::close ( )

Close the current session.

bool SimpleConsole::eof ( )

Test whether the current session says End-of-File. Open a session if necessary.

void SimpleConsole::print ( const std::string &  text,
bool  newline = true 
)
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.


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