42#ifndef SERIAL_OUTPUT_EOL 
   43#define SERIAL_OUTPUT_EOL    '\n' 
   90    virtual size_t write( 
char c ) = 0;
 
  100    virtual size_t write( 
const char* str ) = 0;
 
  111    virtual size_t write( 
const char* buffer, 
size_t size ) = 0;
 
  122    virtual size_t write( 
const uint8_t* buffer, 
size_t size ) = 0;
 
  129    virtual void flush() = 0;
 
  145    size_t print( 
const char* str, 
bool addLn = 
false );
 
  160    size_t print( 
const uint8_t* buf, 
size_t size, 
bool addLn = 
false );
 
  174    size_t print( 
char c, 
bool addLn = 
false );
 
  190    size_t print( int8_t n, 
int base = 
kDec, 
bool addLn = 
false );
 
  206    size_t print( uint8_t n, 
int base = 
kDec, 
bool addLn = 
false )
 
  207    { 
return print( 
static_cast<unsigned long>( n ), base, addLn ); }
 
 
  222    size_t print( 
int n, 
int base = 
kDec, 
bool addLn = 
false );
 
  238    size_t print( 
unsigned int n, 
int base = 
kDec, 
bool addLn = 
false )
 
  239    { 
return print( 
static_cast<unsigned long>( n ), base, addLn ); }
 
 
  255    size_t print( 
long n, 
int base = 
kDec, 
bool addLn = 
false );
 
  271    size_t print( 
unsigned long n, 
int base = 
kDec, 
bool addLn = 
false );
 
  286    size_t print( 
double d, 
int digits = 2, 
bool addLn = 
false );
 
  308    size_t println( 
const uint8_t* buf, 
size_t size )       { 
return print( buf, size, 
true ); }
 
  415    size_t println( 
double d, 
int digits = 2 )              { 
return print( d, digits, 
true ); }
 
  424    size_t printNumber( 
unsigned long n, uint8_t base );
 
  425    size_t printFloat( 
double d, uint8_t digits );
 
 
This is an abstract class defining a generic interface to write numbers and strings to a sequential s...
Definition Writer.h:64
 
size_t println(long n, int base=kDec)
Print a long integer to the output stream, adding a new line character at the end.
Definition Writer.h:388
 
size_t println(unsigned long n, int base=kDec)
Print an unsigned long integer to the output stream, adding a new line character at the end.
Definition Writer.h:402
 
size_t println()
Print a new line to the output stream.
Definition Writer.cpp:191
 
size_t println(const char *str)
Print a null-terminated string to the output stream, adding a new line character at the end.
Definition Writer.h:297
 
IntegerOutputBase
An enumeration that defines the number that will be used as the base for representing integer quantit...
Definition Writer.h:74
 
@ kBin
Produce a binary representation of integers (e.g., 11 is output as 0b1011)
Definition Writer.h:75
 
@ kHex
Produce a hexadecimal representation of integers (e.g., 11 is output as 0x0b)
Definition Writer.h:78
 
@ kOct
Produce an octal representation of integers (e.g, 11 is output as 013)
Definition Writer.h:76
 
@ kDec
Produce a decimal representation of integers (e.g., 11 is output as 11.
Definition Writer.h:77
 
virtual size_t write(char c)=0
Pure virtual function that writes a single character to the output stream.
Definition Writer.cpp:36
 
size_t print(unsigned int n, int base=kDec, bool addLn=false)
Print an unsigned integer to the output stream, with or without adding a new line character at the en...
Definition Writer.h:238
 
size_t println(int n, int base=kDec)
Print an integer to the output stream, adding a new line character at the end.
Definition Writer.h:360
 
size_t print(const char *str, bool addLn=false)
Print a null-terminated string to the output stream, with or without adding a new line character at t...
Definition Writer.cpp:73
 
size_t println(char c)
Print a single character to the output stream, adding a new line character at the end.
Definition Writer.h:318
 
size_t println(int8_t n, int base=kDec)
Print an 8-bit integer to the output stream, adding a new line character at the end.
Definition Writer.h:332
 
size_t print(uint8_t n, int base=kDec, bool addLn=false)
Print an 8-bit unsigned integer to the output stream, with or without adding a new line character at ...
Definition Writer.h:206
 
size_t println(const uint8_t *buf, size_t size)
Print a number of bytes to the output stream, adding a new line character at the end.
Definition Writer.h:308
 
size_t println(unsigned int n, int base=kDec)
Print an unsigned integer to the output stream, adding a new line character at the end.
Definition Writer.h:374
 
size_t println(uint8_t n, int base=kDec)
Print an 8-bit unsigned integer to the output stream, adding a new line character at the end.
Definition Writer.h:346
 
size_t println(double d, int digits=2)
Print a floating point number to the output stream, adding a new line character at the end.
Definition Writer.h:415
 
virtual void flush()=0
Pure virtual function to flush the output stream. When this function returns, all previously written ...
Definition Writer.cpp:64