dummymotor.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Robot Group Leipzig                             *
00003  *    martius@informatik.uni-leipzig.de                                    *
00004  *    fhesse@informatik.uni-leipzig.de                                     *
00005  *    der@informatik.uni-leipzig.de                                        *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************
00022  ** Started on  Mon Oct 15 18:01:12 2007 Georg Martius
00023  ** Last update Mon Oct 15 18:01:12 2007 Georg Martius
00024  *                                                                         *
00025  *  DESCRIPTION                                                            *
00026  *                                                                         *
00027  *   $Log: dummymotor.h,v $
00028  *   Revision 1.1  2007/11/07 13:17:40  martius
00029  *   motors in a general sense (like sound, light,...)
00030  *
00031  *
00032  *                                                                 *
00033  ***************************************************************************/
00034 #ifndef         DUMMYMOTOR_H_
00035 # define        DUMMYMOTOR_H_
00036 
00037 #include "motor.h"
00038 
00039 namespace lpzrobots {
00040   
00041   class DummyMotor: public Motor {
00042   public: 
00043     DummyMotor(int number=1)
00044       : number(number) {
00045     }
00046     virtual ~DummyMotor() {};
00047     
00048     virtual void init(Primitive* own){
00049     }
00050 
00051     virtual int getMotorNumber() const{
00052       return number;
00053     };
00054 
00055     virtual bool act(GlobalData& globaldata){
00056       return true;
00057     }
00058 
00059     virtual int set(const motor* values, int length){
00060       return number;
00061     };    
00062     
00063   private:
00064     int number;
00065   };
00066 
00067 }
00068 
00069 #endif      /* !DUMMYMOTOR_H_ */

Generated on Fri Oct 30 16:29:01 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7