Class daisy::Logger¶
template <LoggerDestination dest>
Interface for simple USB logging. More...
#include <logger.h>
Public Functions¶
| Type | Name |
|---|---|
| Logger () |
Public Static Functions¶
| Type | Name |
|---|---|
| std::enable_if_t< D==LOGGER_UART > | Configure (const LoggerImpl< LOGGER_UART >::Config cfg) |
| void | Print (const char * format, ...) |
| void | PrintLine (const char * format, ...) |
| void | PrintLineV (const char * format, va_list va) |
| void | PrintV (const char * format, va_list va) |
| void | StartLog (bool wait_for_pc=false) |
Protected Types¶
| Type | Name |
|---|---|
| enum | LoggerConsts |
Protected Static Functions¶
| Type | Name |
|---|---|
| void | AppendNewLine () |
| constexpr size_t | NewLineSeqLength () |
| void | TransmitBuf () |
| void | TransmitSync (const void * buffer, size_t bytes) |
Detailed Description¶
Author:
Alexander Petrov-Savchenko ([email protected])
Date:
November 2020
Simple Example:
Public Functions Documentation¶
function Logger¶
Object constructor
Public Static Functions Documentation¶
function Configure¶
template<LoggerDestination D>
static inline std::enable_if_t< D== LOGGER_UART > daisy::Logger::Configure (
const LoggerImpl < LOGGER_UART >::Config cfg
)
Configuration specialization for UART Logging Only available for UART logger.
function Print¶
Print formatted string
function PrintLine¶
Print formatted string appending line termination sequence
function PrintLineV¶
Variadic argument variant of PrintLine()
function PrintV¶
Variadic argument variant of Print()
function StartLog¶
Start the logging session.
Parameters:
wait_for_pcblock until remote terminal is ready (this param has no effect when using the UART destination)
Protected Types Documentation¶
enum LoggerConsts¶
Internal constants
Protected Static Functions Documentation¶
function AppendNewLine¶
Trim control characters and append clean newline sequence, if there's room in the buffer
function NewLineSeqLength¶
Constexpr function equivalent of strlen(LOGGER_NEWLINE)
function TransmitBuf¶
Transfer accumulated data
function TransmitSync¶
Blocking wrapper for Transmit()
The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/logger.h