hpp-centroidal-dynamics: centroidal_dynamics::Logger Class Reference

hpp-centroidal-dynamics 9.0.2 Utility classes for testing (robust) equilibrium of a system in contact with the environment, and other centroidal dynamics methods.

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
centroidal_dynamics::Logger Class Reference

`#include <hpp/centroidal-dynamics/logger.hh>`

## Public Member Functions
| Logger (double timeSample=0.001, double streamPrintPeriod=1.0)
| ~Logger ()
void | countdown ()
void | sendMsg (std::string msg, MsgType type, const char *file="", int line=0)
bool | setTimeSample (double t)
bool | setStreamPrintPeriod (double s)
void | setVerbosity (LoggerVerbosity lv)

## Protected Member Functions
bool | isStreamMsg (MsgType m)
bool | isDebugMsg (MsgType m)
bool | isInfoMsg (MsgType m)
bool | isWarningMsg (MsgType m)
bool | isErrorMsg (MsgType m)

## Protected Attributes
LoggerVerbosity | m_lv
double | m_timeSample
| verbosity of the logger More...
double | m_streamPrintPeriod
| specify the period of call of the countdown method More...
double | m_printCountdown
| specify the time period of the stream prints More...
std::map< std::string, double > | m_stream_msg_counters

## Detailed Description

A simple class for logging messages

## Constructor & Destructor Documentation

## ◆ Logger()

centroidal_dynamics::Logger::Logger | ( | double | timeSample = `0.001`,
|  | double | streamPrintPeriod = `1.0`
| ) |  |

Constructor

## ◆ ~Logger()

centroidal_dynamics::Logger::~Logger | ( |  | ) |
| inline

Destructor

## Member Function Documentation

## ◆ countdown()

void centroidal_dynamics::Logger::countdown | ( |  | ) |

Method to be called at every control iteration to decrement the internal Logger's counter.

## ◆ isDebugMsg()

bool centroidal_dynamics::Logger::isDebugMsg | ( | MsgType | m | ) |
| inlineprotected

## ◆ isErrorMsg()

bool centroidal_dynamics::Logger::isErrorMsg | ( | MsgType | m | ) |
| inlineprotected

## ◆ isInfoMsg()

bool centroidal_dynamics::Logger::isInfoMsg | ( | MsgType | m | ) |
| inlineprotected

## ◆ isStreamMsg()

bool centroidal_dynamics::Logger::isStreamMsg | ( | MsgType | m | ) |
| inlineprotected

## ◆ isWarningMsg()

bool centroidal_dynamics::Logger::isWarningMsg | ( | MsgType | m | ) |
| inlineprotected

## ◆ sendMsg()

void centroidal_dynamics::Logger::sendMsg | ( | std::string | msg,
|  | MsgType | type,
|  | const char * | file = `""`,
|  | int | line = `0`
| ) |  |

Print the specified message on standard output if the verbosity level allows it. The file name and the line number are used to identify the point where sendMsg is called so that streaming messages are printed only every streamPrintPeriod iterations.

## ◆ setStreamPrintPeriod()

bool centroidal_dynamics::Logger::setStreamPrintPeriod | ( | double | s | ) |

Set the time period for printing of streaming messages.

## ◆ setTimeSample()

bool centroidal_dynamics::Logger::setTimeSample | ( | double | t | ) |

Set the sampling time at which the method countdown() is going to be called.

## ◆ setVerbosity()

void centroidal_dynamics::Logger::setVerbosity | ( | LoggerVerbosity | lv | ) |

Set the verbosity level of the logger.

## Member Data Documentation

## ◆ m_lv

LoggerVerbosity centroidal_dynamics::Logger::m_lv
| protected

## ◆ m_printCountdown

double centroidal_dynamics::Logger::m_printCountdown
| protected

specify the time period of the stream prints

## ◆ m_stream_msg_counters

std::map<std::string, double> centroidal_dynamics::Logger::m_stream_msg_counters
| protected

every time this is < 0 (i.e. every _streamPrintPeriod sec) print stuff Pointer to the dynamic structure which holds the collection of streaming messages

## ◆ m_streamPrintPeriod

double centroidal_dynamics::Logger::m_streamPrintPeriod
| protected

specify the period of call of the countdown method

## ◆ m_timeSample

double centroidal_dynamics::Logger::m_timeSample
| protected

verbosity of the logger

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

- include/hpp/centroidal-dynamics/logger.hh
- src/logger.cpp