modm API documentation
modm::log::Logger Class Reference

Interface to the Logger. More...

#include <modm/debug/logger/logger.hpp>

Inheritance diagram for modm::log::Logger:
modm::IOStream

Public Member Functions

 Logger (::modm::IODevice &outputDevice)
 
IOStreamascii ()
 set the output mode to ASCII style for integer types
 
IOStreambin ()
 set the output mode to binary style for integer types
 
IOStreamendl ()
 
IOStreamflush ()
 
IOStreamget (char &c)
 Reads one character and returns it if available. Otherwise, returns IOStream::eof.
 
IOStreamget (char *s, size_t n)
 
template<size_t N>
IOStreamget (char (&s)[N])
 
IOStreamhex ()
 set the output mode to hexadecimal style for integer types
 
IOStreamoperator<< (const bool &v)
 
IOStreamoperator<< (const char &v)
 
IOStreamoperator<< (const uint8_t &v)
 
IOStreamoperator<< (const int16_t &v)
 
IOStreamoperator<< (const uint16_t &v)
 
IOStreamoperator<< (const int32_t &v)
 
IOStreamoperator<< (const uint32_t &v)
 
IOStreamoperator<< (const int64_t &v)
 
IOStreamoperator<< (const uint64_t &v)
 
IOStreamoperator<< (const int &v)
 
IOStreamoperator<< (const unsigned int &v)
 
IOStreamoperator<< (const float &v)
 
IOStreamoperator<< (const double &v)
 
IOStreamoperator<< (const char *s)
 
IOStreamoperator<< (const void *p)
 write the hex value of a pointer
 
template<class Ret , class... Args>
IOStreamoperator<< (Ret (*pointer)(Args...))
 Write the hex value of any function pointer.
 
IOStreamoperator<< (IOStream &(*format)(IOStream &))
 
IOStreamprintf (const char *fmt,...)))
 
IOStreamvprintf (const char *fmt, va_list vlist)))
 
IOStreamwrite (char c)
 

Static Public Attributes

static constexpr char eof = -1
 

Protected Member Functions

void writeBin (uint8_t value)
 
void writeDouble (const double &value)
 
void writeFloat (float value)
 
void writeHex (uint8_t value)
 
void writeInteger (int16_t value)
 
void writeInteger (uint16_t value)
 
void writeInteger (int32_t value)
 
void writeInteger (uint32_t value)
 
void writeInteger (int64_t value)
 
void writeInteger (uint64_t value)
 
template<typename T >
void writeIntegerMode (const T v)
 
void writePointer (const void *value)
 

Detailed Description

Interface to the Logger.

It is used by the macros defined below. This class overloads the shift-operator so that it is possible to write different message types to the logger.

Author
Martin Rosekeit martin.rosekeit@rwth-aachen.de

Member Function Documentation

IOStream & modm::IOStream::get ( char *  s,
size_t  n 
)
inherited

reads characters into NULL delimited c string in contrast to the standard implementation, this does not care about newline characters in the input


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