|
roo_monitoring
API Documentation for roo_monitoring
|
Reader for a single log file. More...
#include <log.h>
Public Member Functions | |
| LogFileReader (roo_io::Mount &mount) | |
| Creates a reader over the specified mount. | |
| bool | open (const char *path, int64_t checkpoint) |
| Opens the log file at path and seeks to checkpoint. | |
| bool | is_open () const |
| Returns true if a file is currently open. | |
| void | close () |
| Closes the reader. | |
| int64_t | checkpoint () const |
| Returns the current checkpoint position. | |
| bool | next (int64_t *timestamp, std::vector< LogSample > *data, bool is_hot) |
| Reads the next entry from the file. | |
|
inline |
|
inline |
Returns the current checkpoint position.
Definition at line 82 of file log.h.
Referenced by open(), and roo_monitoring::LogReader::tell().
|
inline |
Closes the reader.
Definition at line 79 of file log.h.
Referenced by roo_monitoring::LogReader::nextSample().
|
inline |
Returns true if a file is currently open.
Definition at line 76 of file log.h.
Referenced by roo_monitoring::LogReader::nextSample().
| bool roo_monitoring::LogFileReader::next | ( | int64_t * | timestamp, |
| std::vector< LogSample > * | data, | ||
| bool | is_hot | ||
| ) |
Reads the next entry from the file.
Definition at line 45 of file log.cpp.
References roo_monitoring::CODE_DATUM, and roo_monitoring::CODE_TIMESTAMP.
Referenced by roo_monitoring::LogReader::nextSample().
| bool roo_monitoring::LogFileReader::open | ( | const char * | path, |
| int64_t | checkpoint | ||
| ) |
Opens the log file at path and seeks to checkpoint.
Definition at line 23 of file log.cpp.
References checkpoint().
Referenced by roo_monitoring::LogReader::seek().