|
logger
|
#include <Logfile.hpp>
Public Member Functions | |
| StreamLogger (std::string const &name, std::string const &type_name, std::string const &cxx_type_name, std::vector< logger::StreamMetadata > const &metadata, Logfile &file) | |
| StreamLogger (std::string const &name, std::string const &type_name, std::string const &cxx_type_name, Typelib::Registry const &type_def, std::vector< logger::StreamMetadata > const &metadata, Logfile &file) | |
| void | registerStream () |
| void | setSampling (base::Time const &period) |
| bool | writeSampleHeader (const base::Time ×tamp, size_t size) |
| std::ostream & | getStream () |
The objects of this class can be used to easily log samples for a given stream.
| Logging::StreamLogger::StreamLogger | ( | std::string const & | name, |
| std::string const & | type_name, | ||
| std::string const & | cxx_type_name, | ||
| std::vector< logger::StreamMetadata > const & | metadata, | ||
| Logfile & | file | ||
| ) |
Create a new logger, with no type definition
This logger will define a new named stream in stream, but without saving the type definition as the other constructor would.
| Logging::StreamLogger::StreamLogger | ( | std::string const & | name, |
| std::string const & | type_name, | ||
| std::string const & | cxx_type_name, | ||
| Typelib::Registry const & | type_def, | ||
| std::vector< logger::StreamMetadata > const & | metadata, | ||
| Logfile & | file | ||
| ) |
Create a new logger, with type definition
This logger will define a new named stream in stream, in which a type definition string is saved, allowing to re-read the log file without having to care about the type definition and (possible) type changes.
| std::ostream & Logging::StreamLogger::getStream | ( | ) |
| void Logging::StreamLogger::registerStream | ( | ) |
Registers the sample stream in the output file
| void Logging::StreamLogger::setSampling | ( | base::Time const & | period | ) |
Sets the sampling period. It is used in update() to filter out samples that are too near from each other
| bool Logging::StreamLogger::writeSampleHeader | ( | const base::Time & | timestamp, |
| size_t | size | ||
| ) |
1.8.13