Shellminator V3.0.1
Simple Terminal
|
ShellminatorBufferedPrinter object. More...
#include <Shellminator-BufferedPrinter.hpp>
Public Member Functions | |
ShellminatorBufferedPrinter () | |
Empty constructor. More... | |
ShellminatorBufferedPrinter (Stream *channel_p, uint8_t *buffer_p, int bufferSize_p) | |
Stream specific constructor. More... | |
int | available () override |
Available bytes in the channel. More... | |
int | read () override |
Read one byte form the channel. More... | |
int | peek () override |
Peek the firtst byte from the channel. More... | |
void | flush () override |
Flush the channel. More... | |
size_t | write (uint8_t b) override |
Write one byte to the channel. More... | |
size_t | write (const uint8_t *data, size_t size) override |
Private Member Functions | |
void | clearBuffer () |
Clear the internal buffer. More... | |
Private Attributes | |
Stream * | channel = NULL |
uint8_t * | buffer = NULL |
int | bufferPointer = 0 |
int | bufferSize = 0 |
Friends | |
class | ShellminatorBufferedPrinterUT |
ShellminatorBufferedPrinter object.
It can be used to accelerate the rendering process on the host terminal interface. Terminal emulators usually works faster, when the data arrives in one large piece. Otherwise some annoying effect can be observed like flickering or cursor jumping. This object aims to fix this problem. It is a simple buffered printer.
Definition at line 60 of file Shellminator-BufferedPrinter.hpp.
ShellminatorBufferedPrinter::ShellminatorBufferedPrinter | ( | ) |
Empty constructor.
This is a simple, empty constructor.
Definition at line 36 of file Shellminator-BufferedPrinter.cpp.
ShellminatorBufferedPrinter::ShellminatorBufferedPrinter | ( | Stream * | channel_p, |
uint8_t * | buffer_p, | ||
int | bufferSize_p | ||
) |
Stream specific constructor.
With this constructor, you can specify the Stream object.
channel_p | Pointer to a Stream object. This object will be used as output. |
Definition at line 44 of file Shellminator-BufferedPrinter.cpp.
|
override |
Available bytes in the channel.
Definition at line 55 of file Shellminator-BufferedPrinter.cpp.
|
private |
Clear the internal buffer.
This value sets all of the elements in the internal buffer to '\0'.
Definition at line 67 of file Shellminator-BufferedPrinter.cpp.
|
override |
Flush the channel.
Definition at line 75 of file Shellminator-BufferedPrinter.cpp.
|
override |
Peek the firtst byte from the channel.
Definition at line 63 of file Shellminator-BufferedPrinter.cpp.
|
override |
Read one byte form the channel.
Definition at line 59 of file Shellminator-BufferedPrinter.cpp.
|
override |
Definition at line 121 of file Shellminator-BufferedPrinter.cpp.
|
override |
Write one byte to the channel.
b | The value that has to be written to the channel. |
Definition at line 93 of file Shellminator-BufferedPrinter.cpp.
|
friend |
Definition at line 118 of file Shellminator-BufferedPrinter.hpp.
|
private |
Definition at line 112 of file Shellminator-BufferedPrinter.hpp.
|
private |
Definition at line 113 of file Shellminator-BufferedPrinter.hpp.
|
private |
Definition at line 115 of file Shellminator-BufferedPrinter.hpp.
|
private |
Definition at line 110 of file Shellminator-BufferedPrinter.hpp.