RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
gen_saw.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 Georgia Institute of Technology
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation, either version 3 of the License, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GEN_SAW_H_
19 #define GEN_SAW_H_
20 
21 #include "generator.h"
22 
23 class GeneratorSaw : public Generator
24 {
25 
26 public:
27  // default constructor
28  GeneratorSaw();
29  GeneratorSaw(double delay, double width, double amplitude, double dt);
30  ~GeneratorSaw();
31 
32  // initialize waveform
33  void init(double delay, double width, double amplitude, double dt);
34 
35 protected:
36  double delay; // delay in time (s) between ramps
37  double width; // width in time (s) of ramp
38  double amplitude;
39 };
40 
41 #endif /* GEN_SAW_H_ */
double dt
Definition: generator.h:57
double width
Definition: gen_saw.h:37
double delay
Definition: gen_saw.h:36
double amplitude
Definition: gen_saw.h:38
void init()
Definition: generator.cpp:43