Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

Provides an interface to Gnuplot for plotting algorithmic outputs. More...

#include <gnuplot_window.hpp>

Inheritance diagram for GnuplotWindow:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual PlotWindowclone () const
BooleanType getMouseEvent (double &mouseX, double &mouseY)
 GnuplotWindow ()
 GnuplotWindow (PlotFrequency _frequency)
 GnuplotWindow (const GnuplotWindow &arg)
virtual returnValue init ()
GnuplotWindowoperator= (const GnuplotWindow &arg)
virtual returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
returnValue waitForMouseEvent (double &mouseX, double &mouseY)
returnValue waitForMouseEvents ()
virtual ~GnuplotWindow ()

Protected Member Functions

returnValue getPlotModeString (PlotMode plotMode, std::string &plotModeString) const
returnValue getPlotStyleString (VariableType _type, std::string &plotStyleString) const
returnValue obtainPlotDataString (VariablesGrid &_dataGrid, std::string &_plotDataString) const
returnValue sendDataToGnuplot ()

Protected Attributes

FILE * gnuPipe
BooleanType mouseEvent

Static Protected Attributes

static int counter = 0

Detailed Description

Provides an interface to Gnuplot for plotting algorithmic outputs.

The acado2gnuplot interface provides the functionality to easiliy plot data which is available in the ACADO Toolkit format. The methods that are implemented in this interface convert ACADO sturctures into a format that can be read by the program Gnuplot.

Author:
Boris Houska, Hans Joachim Ferreau, Milan Vukov

Definition at line 58 of file gnuplot_window.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 59 of file gnuplot_window.cpp.

Constructor which takes the plot frequency.

Parameters:
[in]_frequencyFrequency determining at which time instants the window is to be plotted.

Definition at line 68 of file gnuplot_window.cpp.

Copy constructor (deep copy).

Parameters:
[in]argRight-hand side object.

Definition at line 78 of file gnuplot_window.cpp.

Destructor.

Definition at line 86 of file gnuplot_window.cpp.


Member Function Documentation

PlotWindow * GnuplotWindow::clone ( ) const [virtual]

Clone operator returning a base class pointer to a deep copy of respective class instance.

Returns:
Base class pointer to a deep copy of respective class instance

Reimplemented from PlotWindow.

Definition at line 111 of file gnuplot_window.cpp.

BooleanType GnuplotWindow::getMouseEvent ( double &  mouseX,
double &  mouseY 
)

Returns whether a mouse event has occured.

Parameters:
[out]mouseXX coordinate of mouse click.
[out]mouseXY coordinate of mouse click.
Returns:
BT_TRUE iff mouse event occured,
BT_FALSE otherwise

Definition at line 162 of file gnuplot_window.cpp.

returnValue GnuplotWindow::getPlotModeString ( PlotMode  plotMode,
std::string &  plotModeString 
) const [protected]

Generates string in Gnuplot syntax for plotting in given plot mode.

Parameters:
[in]plotModePlot mode whose string needs to be generated, see the PlotMode documentation for details.
[out]plotModeStringString in Gnuplot syntax for plotting in given plot mode.
Returns:
SUCCESSFUL_RETURN

Definition at line 617 of file gnuplot_window.cpp.

returnValue GnuplotWindow::getPlotStyleString ( VariableType  _type,
std::string &  plotStyleString 
) const [protected]

Generates string in Gnuplot syntax for plotting in given plot style.

Parameters:
[in]_typeType of variable to be plotted.
[out]plotStyleStringString in Gnuplot syntax for plotting in given plot style.
Returns:
SUCCESSFUL_RETURN

Definition at line 639 of file gnuplot_window.cpp.

Initializes the Gnuplot-thread.

Returns:
SUCCESSFUL_RETURN,
RET_PLOT_WINDOW_CAN_NOT_BE_OPEN

Reimplemented from PlotWindow.

Definition at line 117 of file gnuplot_window.cpp.

returnValue GnuplotWindow::obtainPlotDataString ( VariablesGrid _dataGrid,
std::string &  _plotDataString 
) const [protected]

Generates string in Gnuplot syntax for plotting given data grid.

Parameters:
[in]_dataGridDate grid to be plotted.
[out]_plotDataStringString in Gnuplot syntax for plotting given data grid.
Returns:
SUCCESSFUL_RETURN

Definition at line 678 of file gnuplot_window.cpp.

GnuplotWindow & GnuplotWindow::operator= ( const GnuplotWindow arg)

Assignment operator (deep copy).

Parameters:
[in]argRight-hand side object.

Definition at line 93 of file gnuplot_window.cpp.

Actually sets-up and plots the data in a Gnuplot window.

Parameters:
[in]_frequencyFrequency determining at which time instants the window is to be plotted.
Returns:
SUCCESSFUL_RETURN,
RET_PLOTTING_FAILED,
RET_INVALID_ARGUMENTS,
RET_PLOT_WINDOW_CAN_NOT_BE_OPEN

Reimplemented from PlotWindow.

Definition at line 138 of file gnuplot_window.cpp.

Sets-up and plots the data in a Gnuplot window.

Returns:
SUCCESSFUL_RETURN,
RET_PLOTTING_FAILED,
RET_INVALID_ARGUMENTS,
RET_PLOT_WINDOW_CAN_NOT_BE_OPEN

Definition at line 222 of file gnuplot_window.cpp.

returnValue GnuplotWindow::waitForMouseEvent ( double &  mouseX,
double &  mouseY 
)

Waits until a mouse event occurs.

Parameters:
[out]mouseXX coordinate of mouse click.
[out]mouseXY coordinate of mouse click.
Returns:
SUCCESSFUL_RETURN,
RET_NOT_YET_IMPLEMENTED

Definition at line 178 of file gnuplot_window.cpp.

Runs the Gnuplot window in waiting mode until a mouse event occurs.

Returns:
SUCCESSFUL_RETURN

Definition at line 155 of file gnuplot_window.cpp.


Member Data Documentation

BEGIN_NAMESPACE_ACADO int GnuplotWindow::counter = 0 [static, protected]

Static counter for counting the number of GnuplotWindows.

Definition at line 214 of file gnuplot_window.hpp.

FILE* GnuplotWindow::gnuPipe [protected]

Pipe to Gnuplot.

Definition at line 210 of file gnuplot_window.hpp.

Flag indicating whether window should wait for mouse events.

Definition at line 212 of file gnuplot_window.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:39