TimeSeriesWriter< Loggers > Struct Template Reference

CPP API: mio::abm::TimeSeriesWriter< Loggers > Struct Template Reference
mio::abm::TimeSeriesWriter< Loggers > Struct Template Reference

This is like the DataWriterToMemory, but it only logs time series data. More...

#include <common_abm_loggers.h>

Public Types

using Data = std::tuple< mio::TimeSeries< ScalarType > >
 

Static Public Member Functions

template<class Logger >
static void add_record (const typename Logger::Type &t, Data &data)
 This function adds an entry to the TimeSeries consisting of the TimePoint and the value. More...
 

Detailed Description

template<class... Loggers>
struct mio::abm::TimeSeriesWriter< Loggers >

This is like the DataWriterToMemory, but it only logs time series data.

Template Parameters
LoggersThe loggers that are used to log data. The loggers must return a touple with a TimePoint and a value.

Member Typedef Documentation

◆ Data

template<class... Loggers>
using mio::abm::TimeSeriesWriter< Loggers >::Data = std::tuple<mio::TimeSeries<ScalarType> >

Member Function Documentation

◆ add_record()

template<class... Loggers>
template<class Logger >
static void mio::abm::TimeSeriesWriter< Loggers >::add_record ( const typename Logger::Type &  t,
Data data 
)
inlinestatic

This function adds an entry to the TimeSeries consisting of the TimePoint and the value.

The Loggers must return a touple with a TimePoint and a value of return type Eigen::VectorX<ScalarType>.

Parameters
[in]tThe data from the logger.
[in,out]dataThe data tuple.