JsonParserGeneratorRK
|
Class for printing to a stream or file. More...
#include <spark_wiring_print.h>
Public Member Functions | |
int | getWriteError () |
Return the last error code. 0 means no error. | |
void | clearWriteError () |
Clear the last error code to 0. | |
virtual size_t | write (uint8_t c)=0 |
Write a single byte to the stream or file. More... | |
size_t | write (const char *str) |
Write a null-terminated c-string the stream or file. More... | |
virtual size_t | write (const uint8_t *buffer, size_t size) |
Write a bytes specified by a buffer and length to the stream or file. More... | |
size_t | print (const char[]) |
Print a null-terminated array of char variables (a c-string) to the stream or file. | |
size_t | print (char) |
Print a single character to the stream or file. | |
size_t | print (unsigned char value, int base=DEC) |
Print an unsigned char (byte value, 8 bits) in the specified base to the stream or file. More... | |
size_t | print (int value, int base=DEC) |
Print an int (32 bit integer) the specified base to the stream or file. More... | |
size_t | print (unsigned int value, int base=DEC) |
Print an unsigned int (32 bit unsigned integer) the specified base to the stream or file. More... | |
size_t | print (long value, int base=DEC) |
Print a long (32 bit integer) the specified base to the stream or file. More... | |
size_t | print (unsigned long value, int base=DEC) |
Print a unsigned long (32 bit unsigned integer) the specified base to the stream or file. More... | |
size_t | print (double value, int dec=2) |
Print a double floating point value to the stream or file. More... | |
size_t | print (const Printable &) |
Print an object derived from Printable to the stream or file. | |
size_t | println (const char[]) |
Print a null-terminated array of char variables (a c-string) plus a CRLF end-of-line terminator to the stream or file. | |
size_t | println (char value) |
Print a single character plus a CRLF end-of-line terminator to the stream or file. | |
size_t | println (unsigned char value, int base=DEC) |
Print an unsigned char (byte value. 8 bits) in the specified base plus a CRLF end-of-line terminator to the stream or file. More... | |
size_t | println (int value, int base=DEC) |
Print an int (32 bit integer) the specified base to plus a CRLF end-of-line terminator the stream or file. More... | |
size_t | println (unsigned int value, int base=DEC) |
Print an unsigned int (32 bit unsigned integer) the specified base plus a CRLF end-of-line terminator to the stream or file. More... | |
size_t | println (long value, int base=DEC) |
Print a long (32 bit signed integer) the specified base plus a CRLF end-of-line terminator to the stream or file. More... | |
size_t | println (unsigned long value, int base=DEC) |
Print a unsigned long (32 bit unsigned integer) the specified base plus a CRLF end-of-line terminator to the stream or file. More... | |
size_t | println (double value, int dec=2) |
Print a double floating point value plus a CRLF end-of-line terminator to the stream or file. More... | |
size_t | println (const Printable &) |
Print an object derived from Printable plus a CRLF end-of-line terminator to the stream or file. | |
size_t | println (void) |
Print a CRLF end-of-line terminator to the stream or file. | |
template<typename... Args> | |
size_t | printf (const char *format, Args... args) |
Print using printf-style formatting to the stream or file. More... | |
template<typename... Args> | |
size_t | printlnf (const char *format, Args... args) |
Print using printf-style formatting plus a CRLF end-of-line terminator to the stream or file. More... | |
Class for printing to a stream or file.
Various classes include serial, TCP network streams, and files inherit from this and can use these methods.
size_t Print::print | ( | unsigned char | value, |
int | base = DEC |
||
) |
Print an unsigned char (byte value, 8 bits) in the specified base to the stream or file.
value | The value to print. |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::print | ( | int | value, |
int | base = DEC |
||
) |
Print an int (32 bit integer) the specified base to the stream or file.
value | The value to print. |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::print | ( | unsigned int | value, |
int | base = DEC |
||
) |
Print an unsigned int (32 bit unsigned integer) the specified base to the stream or file.
value | The value to print. |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::print | ( | long | value, |
int | base = DEC |
||
) |
Print a long (32 bit integer) the specified base to the stream or file.
value | The value to print. |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::print | ( | unsigned long | value, |
int | base = DEC |
||
) |
Print a unsigned long (32 bit unsigned integer) the specified base to the stream or file.
value | The value to print. |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::print | ( | double | value, |
int | dec = 2 |
||
) |
Print a double floating point value to the stream or file.
value | The value to print. |
dec | The number of decimal places to include for the fractional part. Default: 2 |
|
inline |
Print using printf-style formatting to the stream or file.
format | printf-style formatting string |
args | variable arguments |
size_t Print::println | ( | unsigned char | value, |
int | base = DEC |
||
) |
Print an unsigned char (byte value. 8 bits) in the specified base plus a CRLF end-of-line terminator to the stream or file.
value | The value to print. |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::println | ( | int | value, |
int | base = DEC |
||
) |
Print an int (32 bit integer) the specified base to plus a CRLF end-of-line terminator the stream or file.
value | The value to print |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::println | ( | unsigned int | value, |
int | base = DEC |
||
) |
Print an unsigned int (32 bit unsigned integer) the specified base plus a CRLF end-of-line terminator to the stream or file.
value | The value to print |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::println | ( | long | value, |
int | base = DEC |
||
) |
Print a long (32 bit signed integer) the specified base plus a CRLF end-of-line terminator to the stream or file.
value | The value to print |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::println | ( | unsigned long | value, |
int | base = DEC |
||
) |
Print a unsigned long (32 bit unsigned integer) the specified base plus a CRLF end-of-line terminator to the stream or file.
value | The value to print. |
base | The base to print. Default is DEC (decimal). Other values are HEX (hexadecimal), OCT (octal), and BIN (binary). |
size_t Print::println | ( | double | value, |
int | dec = 2 |
||
) |
Print a double floating point value plus a CRLF end-of-line terminator to the stream or file.
value | The value to print. |
dec | The number of decimal places to include for the fractional part. Default: 2 |
|
inline |
Print using printf-style formatting plus a CRLF end-of-line terminator to the stream or file.
format | printf-style formatting string |
args | variable arguments |
|
pure virtual |
Write a single byte to the stream or file.
c | The byte to write. All values 0 - 255 are allowed. |
|
inline |
Write a null-terminated c-string the stream or file.
str | point to a null-terminated c-string. |
|
virtual |
Write a bytes specified by a buffer and length to the stream or file.
buffer | pointer to the buffer. The data does not need to be null-terminated. |
size | size in bytes |