PlotManager Class Reference

A class that connects simulation data with the plotting tool. More...

#include <PlotManager.hh>

Inherits SingletonT< PlotManager >.

Public Member Functions

 PlotManager ()
 Constructor. More...
 
virtual ~PlotManager ()
 Destructor. More...
 
void AddIntrospectionCurve (const std::string &_name, PlotCurveWeakPtr _curve)
 Add an introspection curve to the manager. More...
 
void AddTopicCurve (const std::string &_topic, PlotCurveWeakPtr _curve)
 Add a topic curve to the manager. More...
 
void AddWindow (PlotWindow *_window)
 Add a plot window to the manager. More...
 
std::string HumanReadableName (const std::string &_uri) const
 Get Human-readable name from uri-formatted variable name. More...
 
void OnWorldControl (ConstWorldControlPtr &_data)
 Callback when a world control message is received. More...
 
void RemoveIntrospectionCurve (PlotCurveWeakPtr _curve)
 Remove an introspection curve from the manager. More...
 
void RemoveTopicCurve (PlotCurveWeakPtr _curve)
 Remove a topic curve from the manager. More...
 
void RemoveWindow (PlotWindow *_window)
 Remove a plot window from the manager. More...
 

Static Public Member Functions

static PlotManagerInstance ()
 Get an instance of the singleton. More...
 

Detailed Description

A class that connects simulation data with the plotting tool.

Constructor & Destructor Documentation

◆ PlotManager()

Constructor.

◆ ~PlotManager()

virtual ~PlotManager ( )
virtual

Destructor.

Member Function Documentation

◆ AddIntrospectionCurve()

void AddIntrospectionCurve ( const std::string &  _name,
PlotCurveWeakPtr  _curve 
)

Add an introspection curve to the manager.

Data received from the introspection client will be added to the curve

Parameters
[in]_nameName of variable
[in]_curveCurve that will be populated with data.

◆ AddTopicCurve()

void AddTopicCurve ( const std::string &  _topic,
PlotCurveWeakPtr  _curve 
)

Add a topic curve to the manager.

Data received from the topic subscriber will be added to the curve

Parameters
[in]_topicName of topic
[in]_curveCurve that will be populated with data.

◆ AddWindow()

void AddWindow ( PlotWindow _window)

Add a plot window to the manager.

The manager will listen to world events, e.g. Reset, and update the window's plots accordingly

Parameters
[in]_windowPlot window to add

◆ HumanReadableName()

std::string HumanReadableName ( const std::string &  _uri) const

Get Human-readable name from uri-formatted variable name.

Parameters
[in]_uriURI representing the variable
Returns
Human readable name

◆ Instance()

static PlotManager * Instance ( )
inlinestaticinherited

Get an instance of the singleton.

◆ OnWorldControl()

void OnWorldControl ( ConstWorldControlPtr &  _data)

Callback when a world control message is received.

It is used to detect simulation resets.

Parameters
[in]_dataMessage data containing world control commands

◆ RemoveIntrospectionCurve()

void RemoveIntrospectionCurve ( PlotCurveWeakPtr  _curve)

Remove an introspection curve from the manager.

Parameters
[in]_curveCurve to remove.

◆ RemoveTopicCurve()

void RemoveTopicCurve ( PlotCurveWeakPtr  _curve)

Remove a topic curve from the manager.

Parameters
[in]_curveCurve to remove.

◆ RemoveWindow()

void RemoveWindow ( PlotWindow _window)

Remove a plot window from the manager.

Parameters
[in]_windowPlot window to remove.

The documentation for this class was generated from the following file: