10#ifndef SEMF_COMMUNICATION_ESH_PRINTER_H_
11#define SEMF_COMMUNICATION_ESH_PRINTER_H_
47 void print(
char character,
size_t count);
54 void print(std::string_view text,
size_t count = 1);
75 void onStringWritten();
77 void onDataAvailable();
86 std::string_view m_string;
92 uint8_t m_availableChar;
94 SEMF_SLOT(m_onDataAvailableSlot,
Printer, *
this, onDataAvailable);
96 SEMF_SLOT(m_onCharWrittenSlot,
Printer, *
this, onCharWritten);
98 SEMF_SLOT(m_onStringWrittenSlot,
Printer, *
this, onStringWritten);
102 static constexpr Error::ClassID kSemfClassId = Error::ClassID::Printer;
Class for representing errors. Every error should have a unique source code. As a user feel encourage...
Signal for lightweight signal/slot implementation. One signal can be connected to multiple slots and ...
Class for using UART hardware.
Class for string related UART communication. Using this class outside of an esh-context can make sens...
ErrorCode
Error codes for this class. Error ID identify a unique error() / onError call (excluding transferring...
void print(char character, size_t count)
Prints a single character count times.
Printer(const Printer &other)=delete
Printer(semf::UartHardware &uart)
Constructor.
SEMF_SIGNAL(error, Error)
SEMF_SIGNAL(dataAvailable, char)
bool isBusy() const
Indicates wether the printer is busy.
void readCharacter()
Triggers a read cyle for reading a single character.
virtual ~Printer()=default