Skip to content

Class daisy::Logger

template <LoggerDestination dest>

ClassList > daisy > Logger

Interface for simple USB logging. More...

  • #include <logger.h>

Public Functions

Type Name
Logger ()

Public Static Functions

Type Name
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

inline daisy::Logger::Logger () 

Object constructor


Public Static Functions Documentation

function Print

static void daisy::Logger::Print (
    const  char * format,
    ...
) 

Print formatted string


function PrintLine

static void daisy::Logger::PrintLine (
    const  char * format,
    ...
) 

Print formatted string appending line termination sequence


function PrintLineV

static void daisy::Logger::PrintLineV (
    const  char * format,
    va_list va
) 

Variadic argument variant of PrintLine()


function PrintV

static void daisy::Logger::PrintV (
    const  char * format,
    va_list va
) 

Variadic argument variant of Print()


function StartLog

static void daisy::Logger::StartLog (
    bool wait_for_pc=false
) 

Start the logging session.

Parameters:

  • wait_for_pc block until remote terminal is ready

Protected Types Documentation

enum LoggerConsts

enum daisy::Logger::LoggerConsts {
    LOGGER_SYNC_OUT = 0,
    LOGGER_SYNC_IN = 2
};

Internal constants


Protected Static Functions Documentation

function AppendNewLine

static void daisy::Logger::AppendNewLine () 

Trim control characters and append clean newline sequence, if there's room in the buffer


function NewLineSeqLength

static inline constexpr  size_t daisy::Logger::NewLineSeqLength () 

Constexpr function equivalent of strlen(LOGGER_NEWLINE)


function TransmitBuf

static void daisy::Logger::TransmitBuf () 

Transfer accumulated data


function TransmitSync

static inline void daisy::Logger::TransmitSync (
    const  void * buffer,
    size_t bytes
) 

Blocking wrapper for Transmit()



The documentation for this class was generated from the following file external-docs/libDaisy/src/hid/logger.h