ACADO Toolkit
1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
|
Provides a generic way to plot algorithmic outputs during runtime. More...
#include <plotting.hpp>
Public Member Functions | |
Plotting () | |
Default constructor. | |
Plotting (const Plotting &rhs) | |
Copy constructor (deep copy). | |
virtual | ~Plotting () |
Destructor. | |
Plotting & | operator= (const Plotting &rhs) |
Assignment operator (deep copy). | |
int | operator<< (PlotWindow &_window) |
Adds a window to the plot collection. | |
int | addPlotWindow (PlotWindow &_window) |
Adds a window to the plot collection. | |
returnValue | getPlotWindow (uint idx, PlotWindow &_window) const |
Returns the window with given index from the plot collection. | |
returnValue | getPlotWindow (PlotWindow &_window) const |
Returns the window with certain index from the plot collection. | |
virtual returnValue | plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE) |
Plots all windows of the plot collection, each one into a new figure. | |
virtual returnValue | replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE) |
Plots all windows of the plot collection, each one into the corresponding existing figure, if possible. | |
uint | getNumPlotWindows () const |
Returns number of windows contained in the plot collection. | |
Protected Member Functions | |
virtual returnValue | getPlotDataFromMemberLoggings (PlotWindow &_window) const |
Copies all collected logging information required to plot a given window. | |
Protected Attributes | |
PlotCollection | plotCollection |
Plot collection containing a singly-linked list of plot windows. | |
Friends | |
class | AlgorithmicBase |
The class Plotting provides a generic way to plot algorithmic outputs during runtime. This class is part of the UserInterface class, i.e. all classes that are intended to interact with the user inherit the public functionality of the Plotting class.
Plotting::Plotting | ( | const Plotting & | rhs | ) |
[in] | rhs | Right-hand side object. |
References plotCollection.
Plotting::~Plotting | ( | ) | [virtual] |
int Plotting::addPlotWindow | ( | PlotWindow & | _window | ) | [inline] |
[in] | _window | Window to be added. |
Reimplemented in UserInteraction.
References PlotCollection::addPlotWindow(), and plotCollection.
Referenced by operator<<().
uint Plotting::getNumPlotWindows | ( | ) | const [inline] |
References PlotCollection::getNumPlotWindows(), and plotCollection.
Referenced by getPlotWindow().
returnValue Plotting::getPlotDataFromMemberLoggings | ( | PlotWindow & | _window | ) | const [protected, virtual] |
[in] | _window | Window to be plotted. |
Reimplemented in UserInteraction.
References SUCCESSFUL_RETURN.
Referenced by getPlotWindow().
returnValue Plotting::getPlotWindow | ( | uint | idx, |
PlotWindow & | _window | ||
) | const [inline] |
[in] | idx | Index of desired window. |
[out] | _window | Desired window. |
References ACADOERROR, getNumPlotWindows(), getPlotDataFromMemberLoggings(), plotCollection, and RET_INDEX_OUT_OF_BOUNDS.
Referenced by getPlotWindow(), plot(), and replot().
returnValue Plotting::getPlotWindow | ( | PlotWindow & | _window | ) | const [inline] |
This index is not provided when calling the function, but rather obtained by using the alias index of the window. If the window is no alias window, the error RET_INDEX_OUT_OF_BOUNDS is thrown.
[out] | _window | Desired window. |
References PlotWindow::getAliasIdx(), and getPlotWindow().
BEGIN_NAMESPACE_ACADO int Plotting::operator<< | ( | PlotWindow & | _window | ) | [inline] |
[in] | _window | Window to be added. |
Reimplemented in UserInteraction.
References addPlotWindow().
[in] | rhs | Right-hand side object. |
References plotCollection.
returnValue Plotting::plot | ( | PlotFrequency | _frequency = PLOT_IN_ANY_CASE | ) | [virtual] |
[in] | _frequency | Frequency determining at which time instants the window is to be plotted. |
References ACADOERROR, PlotCollection::first, PlotWindow::getNext(), getPlotWindow(), PlotWindow::plot(), PLOT_NEVER, plotCollection, RET_PLOTTING_FAILED, and SUCCESSFUL_RETURN.
Referenced by IntegrationAlgorithm::evaluate(), and AlgorithmicBase::plot().
returnValue Plotting::replot | ( | PlotFrequency | _frequency = PLOT_IN_ANY_CASE | ) | [virtual] |
[in] | _frequency | Frequency determining at which time instants the window is to be plotted. |
Reimplemented in Process.
References ACADOERROR, PlotCollection::first, PlotWindow::getNext(), getPlotWindow(), PLOT_NEVER, plotCollection, PlotWindow::replot(), RET_PLOTTING_FAILED, and SUCCESSFUL_RETURN.
Referenced by AlgorithmicBase::replot(), and RealTimeAlgorithm::solve().
friend class AlgorithmicBase [friend] |
PlotCollection Plotting::plotCollection [protected] |
Referenced by addPlotWindow(), getNumPlotWindows(), getPlotWindow(), operator=(), plot(), Plotting(), replot(), and Process::replot().