Class DataPlotter#

Inheritance Relationships#

Base Type#

Class Documentation#

class DataPlotter : public Karana::Models::KModel<DataPlotter, DataPlotterParams>#

The DataPlotter model updates the visualization at each postHop.

Public Functions

DataPlotter(std::string_view name, const kc::ks_ptr<kd::ModelManager> &mm, const kc::ks_ptr<ku::PlotData> &plot_data)#

DataPlotter 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 DataPlotter model.

  • mm – The ModelManager to register this model with.

  • plot_data – The PlotData to use for updating plots.

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::PlotData> getPlotData()#

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.

~DataPlotter()#

Destructor for DataPlotter.

Public Static Functions

static kc::ks_ptr<DataPlotter> create(std::string_view name, const kc::ks_ptr<kd::ModelManager> &mm, const kc::ks_ptr<ku::PlotData> &plot_data)#

Constructor.

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

  • mm – The ModelManager to register this model with.

  • plot_data – The PlotData to use for updating plots.

Returns:

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

Protected Functions

virtual void _registerModel() override#

Register the model.

virtual void _unregisterModel() override#

Unregister the model.