#include <PrintCompat.h>
Public Member Functions | |
virtual size_t | write (uint8_t ch)=0 |
virtual size_t | write (const char *sz) |
void | print (char ch) |
void | println (char ch) |
void | print (const char *sz) |
void | println (const char *sz) |
void | print (int val, int radix=DEC) |
void | println (int val, int radix=DEC) |
void | print (unsigned int val, int radix=DEC) |
void | println (unsigned int val, int radix=DEC) |
void | print (long val, int radix=DEC) |
void | println (long val, int radix=DEC) |
void | print (unsigned long val, int radix=DEC) |
void | println (unsigned long val, int radix=DEC) |
void | print (double dbl, int dp=3) |
void | println (double dbl, int dp=3) |
void | print (bool b) |
void | println (bool b) |
void | println () |
size_t | write (short t) |
size_t | write (unsigned short t) |
size_t | write (int t) |
size_t | write (unsigned int t) |
size_t | write (long t) |
size_t | write (unsigned long t) |
size_t | write (char c) |
size_t | write (int8_t c) |
This is a print interface that is roughly compatible with the Arduino one, supporting printing of characters, strings, integers, float, boolean and double. In order to provide a class that supports Print you must implement at least write(char ch);
|
pure virtual |
this is the minimum that you must implement to provide the write interface. It writes a single character to the underlying stream.
ch | the character to write. |
Implemented in PrintfLogger, PrintfLogger, and MBedLogger.
|
inlinevirtual |
You can optionally override this function, it writes a whole string to the underlying stream, returning the number of characters written
sz | the string data to write, zero terminated |
Reimplemented in PrintfLogger, PrintfLogger, and MBedLogger.
|
inline |
Prints a characcter to the stream without a newline
ch | the character to print. |
|
inline |
Prints a character to the stream followed by a newline.
ch |
|
inline |
Prints a zero terminated string to the stream
sz | the string to write. |
|
inline |
Prints a zero terminated string followed by newline to the stream
sz | the string to write |
|
inline |
Prints an integer value, with an optional radix, default DEC, but either DEC, HEX or BIN
val | the numeric value to be printed |
radix | the base, DEC, HEX or BIN |
|
inline |
Prints an integer value, with an optional radix, default DEC, but either DEC, HEX or BIN, the integer is followed by a new line character.
val | the numeric value to be printed |
radix | the base DEC, HEX or BIN |
|
inline |
Prints an unsigned integer value, with an optional radix, default DEC, but either DEC, HEX or BIN
val | the numeric value to be printed |
radix | the base, DEC, HEX or BIN |
|
inline |
Prints an integer value, with an optional radix, default DEC, but either DEC, HEX or BIN, the integer is followed by a new line character.
val | the numeric value to be printed |
radix | the base DEC, HEX or BIN |
|
inline |
Prints a long value, with an optional radix, default DEC, but either DEC, HEX or BIN
val | the numeric value to be printed |
radix | the base DEC, HEX or BIN |
|
inline |
Prints a long value, with an optional radix, default DEC, but either DEC, HEX or BIN, the integer is followed by a new line character.
val | the numeric value to be printed |
radix | the base DEC, HEX or BIN |
|
inline |
Prints an unsigned long value, with an optional radix, default DEC, but either DEC, HEX or BIN
val | the numeric value to be printed |
radix | the base, DEC, HEX or BIN |
|
inline |
Prints an unsigned long value, with an optional radix, default DEC, but either DEC, HEX or BIN
val | the numeric value to be printed |
radix | the base, DEC, HEX or BIN |
|
inline |
Prints a double value to a number of decimal places (maximum supported decimal places is 6).
dbl | the double value to print |
dp | the number of decimal places, default 3. Max 6. |
|
inline |
Prints a double value to a number of decimal places (maximum supported decimal places is 19). This is followed by a newline.
dbl | the double value to print |
dp | the number of decimal places, default 3. Max 19. |
|
inline |
Prints a boolean value, either true or false.
b | the boolean to print. |
|
inline |
Prints a boolean value, either true or false, followed by a newline.
b | the boolean to print. |
|
inline |
Print a newline character.