state-observation 1.7.0
General implementation of observers.
Loading...
Searching...
No Matches
stateObservation::tools::Logger Class Reference
Collaboration diagram for stateObservation::tools::Logger:
[legend]

Classes

struct  log_s

Public Member Functions

template<typename T>
void record (const T *address, const std::string &filename=std::string(""))
template<typename T>
void record (const T &reference, const std::string &filename=std::string(""))
template<typename T>
void updateAddress (const void *oldAddress, const T *newAddress)
 updates the address of a recorded variable with a new address
void setPath (const std::string &path)
 set the Path for the log files, the filenames will be appended to this path
template<typename T>
void push (const T &reference)
 update the log with a new value of the reference
template<typename T>
void push (const T *address)
void push ()
 updates all the logs for all recorded variables
const IndexedMatrixArray & getRecord (const void *address) const
IndexedMatrixArray & getRecord (const void *address)
void save (bool clear=false, bool append=false)
 saves the log in a file
void clearTracking ()
 clears all the tracking lists and delete all the logs
void clearLogs ()
 clears the logs but keeps the tracking including time indexation

Protected Types

typedef std::map< const void *, log_sTmap
typedef std::pair< const void *, log_sTpair

Protected Member Functions

void update_ (const Tmap::iterator &i)

Protected Attributes

std::string path_
std::map< const void *, log_slogs_
Matrix scalar_

Detailed Description

Definition at line 16 of file logger.hpp.

Member Typedef Documentation

◆ Tmap

typedef std::map<const void *, log_s> stateObservation::tools::Logger::Tmap
protected

Definition at line 80 of file logger.hpp.

◆ Tpair

typedef std::pair<const void *, log_s> stateObservation::tools::Logger::Tpair
protected

Definition at line 81 of file logger.hpp.

Member Function Documentation

◆ record()

template<typename T>
void stateObservation::tools::Logger::record ( const T * address,
const std::string & filename = std::string("") )

Use this function to start the recoding of this variable. WARNING: Be sure that the recorded variable keeps the same memory address otherwise use updateAddress

Member Data Documentation

◆ path_

std::string stateObservation::tools::Logger::path_
protected

Definition at line 85 of file logger.hpp.

◆ logs_

std::map<const void *, log_s> stateObservation::tools::Logger::logs_
protected

Definition at line 86 of file logger.hpp.

◆ scalar_

Matrix stateObservation::tools::Logger::scalar_
protected

Definition at line 87 of file logger.hpp.


The documentation for this class was generated from the following file:
  • /build/source/include/state-observation/tools/logger.hpp