clock.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 
33 #ifndef ACADO_TOOLKIT_CLOCK_HPP
34 #define ACADO_TOOLKIT_CLOCK_HPP
35 
36 
38 
39 
41 
42 
53 class Clock
54 {
55  //
56  // PUBLIC MEMBER FUNCTIONS:
57  //
58  public:
59 
62  Clock( );
63 
68  Clock( const Clock &rhs
69  );
70 
73  virtual ~Clock();
74 
79  Clock& operator=( const Clock &rhs
80  );
81 
86  virtual Clock* clone( ) const = 0;
87 
88 
95  virtual returnValue init( double _initialTime
96  );
97 
102  virtual returnValue reset( );
103 
104 
111  virtual returnValue start( ) = 0;
112 
121  virtual returnValue step( double _timeShift
122  ) = 0;
123 
130  virtual returnValue stop ( ) = 0;
131 
132 
140  virtual returnValue getTime( double& _elapsedTime
141  );
142 
148  virtual double getTime( );
149 
150 
155  inline ClockStatus getStatus( ) const;
156 
157 
158 
159  //
160  // PROTECTED MEMBERS:
161  //
162  protected:
163  double elapsedTime;
165 };
166 
167 
169 
170 
171 #include <acado/clock/clock.ipp>
172 
173 
174 // collect all remaining headers of clock directory
177 
178 
179 #endif // ACADO_TOOLKIT_CLOCK_HPP
180 
181 
182 /*
183  * end of file
184  */
virtual double getTime()
Definition: clock.cpp:116
Base class for all kind of time measurements.
Definition: clock.hpp:53
virtual returnValue stop()=0
Clock()
Definition: clock.cpp:45
virtual returnValue reset()
Definition: clock.cpp:86
virtual returnValue start()=0
Allows to pass back messages to the calling function.
virtual returnValue init(double _initialTime)
Definition: clock.cpp:76
virtual Clock * clone() const =0
double elapsedTime
Definition: clock.hpp:163
virtual ~Clock()
Definition: clock.cpp:58
ClockStatus getStatus() const
#define CLOSE_NAMESPACE_ACADO
ClockStatus
virtual returnValue step(double _timeShift)=0
void rhs(const real_t *x, real_t *f)
#define BEGIN_NAMESPACE_ACADO
ClockStatus status
Definition: clock.hpp:164
Clock & operator=(const Clock &rhs)
Definition: clock.cpp:63


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