semf
|
Class for string related UART communication. Using this class outside of an esh-context can make sense too and is encouraged. More...
#include <printer.h>
Public Types | |
enum class | ErrorCode : uint8_t { Print_IsBusy = 0 } |
Error codes for this class. Error ID identify a unique error() / onError call (excluding transferring). More... | |
Public Member Functions | |
Printer (semf::UartHardware &uart) | |
Constructor. More... | |
Printer (const Printer &other)=delete | |
virtual | ~Printer ()=default |
void | print (char character, size_t count) |
Prints a single character count times. More... | |
void | print (std::string_view text, size_t count=1) |
Prints a string count times. More... | |
void | readCharacter () |
Triggers a read cyle for reading a single character. More... | |
bool | isBusy () const |
Indicates wether the printer is busy. More... | |
SEMF_SIGNAL (dataWritten) | |
SEMF_SIGNAL (dataAvailable, char) | |
SEMF_SIGNAL (error, Error) | |
Class for string related UART communication. Using this class outside of an esh-context can make sense too and is encouraged.
|
strong |
|
explicit |
|
delete |
|
virtualdefault |
bool semf::esh::Printer::isBusy | ( | ) | const |
Indicates wether the printer is busy.
true
if busy. Definition at line 64 of file printer.cpp.
void semf::esh::Printer::print | ( | char | character, |
size_t | count | ||
) |
Prints a single character count
times.
character | Character to print. |
count | Amout of print cycles. |
Print_IsBusy | If object is busy. |
Definition at line 20 of file printer.cpp.
void semf::esh::Printer::print | ( | std::string_view | text, |
size_t | count = 1 |
||
) |
Prints a string count
times.
text | String to print. |
count | Amount of print cycles. |
Print_IsBusy | If object is busy. |
Definition at line 36 of file printer.cpp.
void semf::esh::Printer::readCharacter | ( | ) |
Triggers a read cyle for reading a single character.
Definition at line 58 of file printer.cpp.
semf::esh::Printer::SEMF_SIGNAL | ( | dataAvailable | , |
char | |||
) |
Emitted after character was received.
semf::esh::Printer::SEMF_SIGNAL | ( | dataWritten | ) |
Emitted after print finished successfully.
semf::esh::Printer::SEMF_SIGNAL | ( | error | , |
Error | |||
) |
Emitted on error.