Logs data from Loggable classes to a global log file in binary format each cycle.
More...
#include <Logger.h>
|
void | Initialize () |
| Writes the header file and allocates the block of memory to log to.
|
|
void | Run () |
| Logs all data from one cycle into the log file.
|
|
template<typename T > |
void | Log (T *field, std::size_t size, std::string name, std::string source) |
| Saves a number of bytes from a variable for logging.
|
|
template<typename T > |
void | Log (T *field, std::string name, std::string source) |
| Saves a variable for logging.
|
|
template<typename T > |
void | Log (T value, std::string name, std::string source) |
| Saves a value for logging.
|
|
void | RunOneCycle () |
| Gives a semaphore which allows Tick() to be called.
|
|
virtual void | preTick () |
| Takes a semaphore which blocks Tick() until RunOneCycle() is called.
|
|
Logs data from Loggable classes to a global log file in binary format each cycle.
template<typename T >
void Logger::Log |
( |
T * |
field, |
|
|
std::size_t |
size, |
|
|
std::string |
name, |
|
|
std::string |
source |
|
) |
| |
|
inline |
Saves a number of bytes from a variable for logging.
- Parameters
-
field | pointer to the variable |
size | number of bytes to write from the pointer |
name | name of the field |
source | name of the Loggable object that logged this field |
template<typename T >
void Logger::Log |
( |
T * |
field, |
|
|
std::string |
name, |
|
|
std::string |
source |
|
) |
| |
|
inline |
Saves a variable for logging.
- Parameters
-
field | pointer to the variable |
name | name of the field |
source | name of the Loggable object that logged this variable |
template<typename T >
void Logger::Log |
( |
T |
value, |
|
|
std::string |
name, |
|
|
std::string |
source |
|
) |
| |
|
inline |
Saves a value for logging.
- Parameters
-
value | value to log |
name | name of the field |
source | name of the Loggable object that logged this field |
void Logger::RegisterLoggable |
( |
Loggable * |
loggable | ) |
|
|
static |
Registers a Loggable object for logging.
- Parameters
-
The documentation for this class was generated from the following files: