Graphics::Console Class Reference

#include <Console.h>

Inheritance diagram for Graphics::Console:
Collaboration diagram for Graphics::Console:

Public Member Functions

 Console (AbstractDisplay &display, RenderQueue &renderQueue)
 Console constructor. More...
 
void systemDebugOutput (bool enable)
 Use console for debug output. More...
 
void pause (bool state)
 Suspend/resume output to display. More...
 
bool isPaused () const
 Determine if output is paused. More...
 
size_t write (const uint8_t *data, size_t size) override
 Writes characters from a buffer to output stream. More...
 
size_t write (uint8_t c) override
 Writes a single character to output stream. More...
 
- Public Member Functions inherited from Print
virtual ~Print ()
 
int getWriteError ()
 Gets last error. More...
 
void clearWriteError ()
 Clears the last write error. More...
 
size_t write (const char *str)
 Writes a c-string to output stream. More...
 
size_t write (const char *buffer, size_t size)
 Writes characters from a buffer to output stream. More...
 
size_t print (char c)
 Prints a single character to output stream. More...
 
size_t print (const char str[])
 Prints a c-string to output stream. More...
 
size_t print (double num, int digits=2)
 Print a floating-point number to output stream. More...
 
template<typename T >
std::enable_if< has_printTo< T >::value, size_t >::type print (const T &obj)
 Prints a Printable object to output stream. More...
 
size_t print (const String &s)
 Prints a String to output stream. More...
 
template<typename E >
std::enable_if< std::is_enum< E >::value &&!std::is_convertible< E, int >::value, size_t >::type print (E value)
 enums can be printed as strings provided they have a toString(E) implementation. More...
 
size_t println ()
 Prints a newline to output stream. More...
 
template<typename... Args>
size_t println (const Args &... args)
 Print value plus newline to output stream. More...
 
size_t printf (const char *fmt,...)
 Prints a formatted c-string to output stream. More...
 
size_t print (unsigned long num, uint8_t base=DEC)
 
template<typename... Args>
size_t print (unsigned long num, Args... args)
 
template<typename... Args>
size_t print (const unsigned long long &num, Args... args)
 
size_t print (long num, uint8_t base=DEC)
 
template<typename... Args>
size_t print (long num, Args... args)
 
template<typename... Args>
size_t print (const long long &num, Args... args)
 
template<typename... Args>
size_t print (unsigned int num, Args... args)
 
template<typename... Args>
size_t print (unsigned char num, Args... args)
 
template<typename... Args>
size_t print (int num, Args... args)
 

Additional Inherited Members

- Protected Member Functions inherited from Print
void setWriteError (int err=1)
 

Constructor & Destructor Documentation

◆ Console()

Graphics::Console::Console ( AbstractDisplay display,
RenderQueue renderQueue 
)
inline

Console constructor.

Parameters
displayOutput device
renderQueueAllows shared access to display

Member Function Documentation

◆ isPaused()

bool Graphics::Console::isPaused ( ) const
inline

Determine if output is paused.

◆ pause()

void Graphics::Console::pause ( bool  state)

Suspend/resume output to display.

Parameters
statetrue to stop output, false to resume

While paused, content will be buffered in RAM.

◆ systemDebugOutput()

void Graphics::Console::systemDebugOutput ( bool  enable)

Use console for debug output.

Parameters
enabletrue to divert m_puts to console, false to disable debug output

◆ write() [1/2]

size_t Graphics::Console::write ( const uint8_t *  buffer,
size_t  size 
)
overridevirtual

Writes characters from a buffer to output stream.

Parameters
bufferPointer to character buffer
sizeQuantity of characters to write
Return values
size_tQuantity of characters written to stream

Reimplemented from Print.

◆ write() [2/2]

size_t Graphics::Console::write ( uint8_t  c)
inlineoverridevirtual

Writes a single character to output stream.

Parameters
cCharacter to write to output stream
Return values
size_tQuantity of characters written to output stream

Implements Print.


The documentation for this class was generated from the following file: