Class DataLogger#

Inheritance Relationships#

Base Type#

Class Documentation#

class DataLogger : public Karana::Models::KModel<DataLogger, DataLoggerParams>#

The DataLogger model updates the visualization at each postHop.

Public Functions

DataLogger(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<ku::H5Writer> &h5_writer)#

DataLogger constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.

Parameters:
  • name – The name of the DataLogger model.

  • sp – The StatePropagator to register this model with.

  • h5_writer – The H5Writer to use for logging.

void postModelStep(const km::Ktime &t, const km::Vec &x)#

Perform data logging.

Parameters:
  • t – Current time. Not used.

  • x – Current state. Not used.

kc::ks_ptr<ku::H5Writer> getH5Writer()#

Get the H5Writer used by the model.

This can be used to enable/disable various tables of the H5Writer.

Returns:

The H5Write that this model uses for logging.

~DataLogger()#

Destructor for DataLogger.

Public Static Functions

static kc::ks_ptr<DataLogger> create(std::string_view name, const kc::ks_ptr<kd::StatePropagator> &sp, const kc::ks_ptr<ku::H5Writer> &h5_writer)#

Constructor.

Parameters:
  • name – The name of the DataLogger model.

  • sp – The StatePropagator to register this model with.

  • h5_writer – The H5Writer to use for logging.

Returns:

A ks_ptr to the newly created instance of the DataLogger model.

Protected Functions

virtual void _registerModel() override#

Register the model.

virtual void _unregisterModel() override#

Unregister the model.