gnuplot_window.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
34 #ifndef ACADO_TOOLKIT_ACADO_2_GNUPLOT_HPP
35 #define ACADO_TOOLKIT_ACADO_2_GNUPLOT_HPP
36 
37 
39 
40 
42 
43 
58 class GnuplotWindow : public PlotWindow
59 {
60 
61  // PUBLIC FUNCTIONS:
62  // -----------------
63 
64  public:
65 
67  GnuplotWindow( );
68 
73  GnuplotWindow( PlotFrequency _frequency
74  );
75 
80  GnuplotWindow( const GnuplotWindow& arg
81  );
82 
84  virtual ~GnuplotWindow( );
85 
91  );
92 
93 
99  virtual PlotWindow* clone( ) const;
100 
101 
107  virtual returnValue init( );
108 
109 
119  virtual returnValue replot( PlotFrequency _frequency = PLOT_IN_ANY_CASE
120  );
121 
122 
129 
138  BooleanType getMouseEvent( double& mouseX,
139  double& mouseY
140  );
141 
150  returnValue waitForMouseEvent( double& mouseX,
151  double& mouseY
152  );
153 
154 
155 
156  // PROTECTED FUNCTIONS:
157  // --------------------
158 
159  protected:
168 
169 
178  std::string& plotModeString
179  ) const;
180 
189  std::string& plotStyleString
190  ) const;
191 
200  std::string& _plotDataString
201  ) const;
202 
203 
204 
205  // PROTECTED DATA MEMBERS:
206  // -----------------------
207 
208  protected:
209 
210  FILE* gnuPipe;
214  static int counter;
215 };
216 
217 
219 
220 
221 #endif // ACADO_TOOLKIT_ACADO_2_GNUPLOT_HPP
222 
223 /*
224  * end of file
225  */
226 
returnValue getPlotModeString(PlotMode plotMode, std::string &plotModeString) const
returnValue waitForMouseEvent(double &mouseX, double &mouseY)
PlotMode
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
virtual returnValue init()
BooleanType mouseEvent
virtual PlotWindow * clone() const
#define CLOSE_NAMESPACE_ACADO
VariableType
Definition: acado_types.hpp:95
PlotFrequency
virtual ~GnuplotWindow()
Allows to setup and plot user-specified plot windows for algorithmic outputs.
Definition: plot_window.hpp:76
returnValue waitForMouseEvents()
GnuplotWindow & operator=(const GnuplotWindow &arg)
static int counter
returnValue obtainPlotDataString(VariablesGrid &_dataGrid, std::string &_plotDataString) const
#define BEGIN_NAMESPACE_ACADO
returnValue sendDataToGnuplot()
virtual returnValue replot(PlotFrequency _frequency=PLOT_IN_ANY_CASE)
Provides an interface to Gnuplot for plotting algorithmic outputs.
BooleanType getMouseEvent(double &mouseX, double &mouseY)
returnValue getPlotStyleString(VariableType _type, std::string &plotStyleString) const


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:39