source: trunk/extremum_seeking/esc_common/include/esc_common/esc.h @ 5

Last change on this file since 5 was 5, checked in by wcaarls, 12 years ago

Imported extremum_seeking at revision 987

File size: 993 bytes
Line 
1/*
2 * esc.h
3 *
4 *  Created on: Jul 26, 2012
5 *      Author: Berk Calli, Wouter Caarls
6 *      Organization: Delft Biorobotics Lab., Delft University of Technology
7 *              Contact info: b.calli@tudelft.nl, web: www.dbl.tudelft.nl
8 *
9 * Superclass for extremum seeking control algorithms
10 */
11
12#ifndef ESC_H_
13#define ESC_H_
14#include <vector>
15#include <string>
16#define PI 3.141592654
17class ESC
18{
19public:
20
21        enum inputType { inputStateValue, inputValue };
22        enum outputType { outputVelocity, outputPosition };
23
24public:
25        virtual ~ESC() { }
26
27        virtual std::vector<std::string> monitorNames() { return std::vector<std::string>(); }
28        virtual std::vector<double> monitor() { return std::vector<double>(); }
29
30        virtual inputType getInputType() = 0;
31        virtual outputType getOutputType() = 0;
32
33        virtual std::vector<double> step(std::vector<double> state, double obj_val)
34        {
35                return step(obj_val);
36        }
37
38        virtual std::vector<double> step(double obj_val)
39        {
40                return std::vector<double>();
41        }
42};
43
44
45#endif /* ESC_H_ */
Note: See TracBrowser for help on using the repository browser.