Main class of the real-time logger. More...
#include <real-time-logger-def.h>
Classes | |
| struct | Data |
| struct | thread |
Public Member Functions | |
| void | addOutputStream (const LoggerStreamPtr_t &os) |
| void | clearOutputStreams () |
| bool | empty () const |
| RTLoggerStream | emptyStream () |
| Return an empty stream object. More... | |
| RTLoggerStream | front () |
| void | frontReady () |
| bool | full () const |
| std::size_t | getBufferSize () |
| RealTimeLogger (const std::size_t &bufferSize) | |
| std::size_t | size () const |
| bool | spinOnce () |
| ~RealTimeLogger () | |
Static Public Member Functions | |
| static void | destroy () |
| static RealTimeLogger & | instance () |
Private Attributes | |
| std::size_t | backIdx_ |
| std::vector< Data * > | buffer_ |
| std::size_t | frontIdx_ |
| Index of the next value to be read. More... | |
| std::size_t | nbDiscarded_ |
| std::ostream | oss_ |
| std::vector< LoggerStreamPtr_t > | outputs_ |
| boost::mutex | wmutex |
| The writer mutex. More... | |
Static Private Attributes | |
| static RealTimeLogger * | instance_ = NULL |
| static thread * | thread_ = NULL |
Main class of the real-time logger.
It is intended to be used like this:
Definition at line 96 of file real-time-logger-def.h.
| dynamicgraph::RealTimeLogger::RealTimeLogger | ( | const std::size_t & | bufferSize | ) |
Definition at line 15 of file src/debug/real-time-logger.cpp.
| dynamicgraph::RealTimeLogger::~RealTimeLogger | ( | ) |
Definition at line 24 of file src/debug/real-time-logger.cpp.
|
inline |
Definition at line 108 of file real-time-logger-def.h.
|
inline |
Definition at line 106 of file real-time-logger-def.h.
|
static |
Definition at line 129 of file src/debug/real-time-logger.cpp.
|
inline |
Definition at line 129 of file real-time-logger-def.h.
|
inline |
Return an empty stream object.
Definition at line 122 of file real-time-logger-def.h.
| RTLoggerStream dynamicgraph::RealTimeLogger::front | ( | ) |
Return an object onto which a real-time thread can write. The message is considered finished when the object is destroyed.
Definition at line 42 of file src/debug/real-time-logger.cpp.
|
inline |
Definition at line 124 of file real-time-logger-def.h.
|
inline |
Definition at line 131 of file real-time-logger-def.h.
|
inline |
Definition at line 142 of file real-time-logger-def.h.
|
static |
Definition at line 121 of file src/debug/real-time-logger.cpp.
|
inline |
Definition at line 135 of file real-time-logger-def.h.
| bool dynamicgraph::RealTimeLogger::spinOnce | ( | ) |
Write next message to output. It does nothing if the buffer is empty.
Definition at line 29 of file src/debug/real-time-logger.cpp.
|
private |
Index of the slot where to write next value (does not contain valid data).
Definition at line 157 of file real-time-logger-def.h.
|
private |
Definition at line 152 of file real-time-logger-def.h.
|
private |
Index of the next value to be read.
Definition at line 154 of file real-time-logger-def.h.
|
staticprivate |
Definition at line 164 of file real-time-logger-def.h.
|
private |
Definition at line 162 of file real-time-logger-def.h.
|
private |
Definition at line 158 of file real-time-logger-def.h.
|
private |
Definition at line 151 of file real-time-logger-def.h.
|
staticprivate |
Definition at line 167 of file real-time-logger-def.h.
|
private |
The writer mutex.
Definition at line 161 of file real-time-logger-def.h.