##

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 PlotManager * | Instance ()
| Get an instance of the singleton. More...

## Detailed Description

A class that connects simulation data with the plotting tool.

## Constructor & Destructor Documentation

## PlotManager()

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] | _name | Name of variable
  [in] | _curve | Curve 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] | _topic | Name of topic
  [in] | _curve | Curve 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] | _window | Plot window to add

## HumanReadableName()

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

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

Parameters

  [in] | _uri | URI representing the variable

Returns
  Human readable name

## Instance()

static PlotManager * Instance | ( |  | ) |

inline static inherited

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] | _data | Message data containing world control commands

## RemoveIntrospectionCurve()

void RemoveIntrospectionCurve | ( | PlotCurveWeakPtr | _curve | ) |

Remove an introspection curve from the manager.

Parameters

  [in] | _curve | Curve to remove.

## RemoveTopicCurve()

void RemoveTopicCurve | ( | PlotCurveWeakPtr | _curve | ) |

Remove a topic curve from the manager.

Parameters

  [in] | _curve | Curve to remove.

## RemoveWindow()

void RemoveWindow | ( | PlotWindow * | _window | ) |

Remove a plot window from the manager.

Parameters

  [in] | _window | Plot window to remove.

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

- PlotManager.hh