Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dummymotor.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef DUMMYMOTOR_H_
25 #define DUMMYMOTOR_H_
26 
27 #include "motor.h"
28 
29 namespace lpzrobots {
30 
31  class DummyMotor: public Motor {
32  public:
33  DummyMotor(int number=1)
34  : number(number) {
35  }
36  virtual ~DummyMotor() {};
37 
38  virtual void init(Primitive* own, Joint* joint = 0 ){
39  }
40 
41  virtual int getMotorNumber() const{
42  return number;
43  };
44 
45  virtual bool act(GlobalData& globaldata){
46  return true;
47  }
48 
49  virtual int set(const motor* values, int length){
50  return number;
51  };
52 
53  private:
54  int number;
55  };
56 
57 }
58 
59 #endif /* !DUMMYMOTOR_H_ */
virtual ~DummyMotor()
Definition: dummymotor.h:36
Definition: joint.h:41
virtual bool act(GlobalData &globaldata)
performs the actions, This is usually called in doInternalStuff() from the robot
Definition: dummymotor.h:45
DummyMotor(int number=1)
Definition: dummymotor.h:33
Abstact base class for attachable motors.
Definition: motor.h:35
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
Data structure holding all essential global information.
Definition: globaldata.h:57
double motor
Definition: types.h:30
virtual int getMotorNumber() const
return the dimensionality of this motor
Definition: dummymotor.h:41
virtual int set(const motor *values, int length)
sends the action commands to the motor.
Definition: dummymotor.h:49
Definition: dummymotor.h:31
virtual void init(Primitive *own, Joint *joint=0)
initialises motor with body of robot
Definition: dummymotor.h:38