00001
00002
00003 #ifndef _REC_ROBOTINO_COM_MOTOR_H_
00004 #define _REC_ROBOTINO_COM_MOTOR_H_
00005
00006 #include "rec/robotino/com/Actor.h"
00007
00008 namespace rec
00009 {
00010 namespace robotino
00011 {
00012 namespace com
00013 {
00017 class
00018 #ifdef WIN32
00019 # ifdef rec_robotino_com_EXPORTS
00020 __declspec(dllexport)
00021 # endif
00022 # ifdef rec_robotino_com2_EXPORTS
00023 __declspec(dllexport)
00024 # endif
00025 # ifdef rec_robotino_com3_EXPORTS
00026 __declspec(dllexport)
00027 # endif
00028 #else
00029 # ifndef SWIG
00030 __attribute__ ((visibility ("default")))
00031 # endif
00032 #endif
00033 Motor : public Actor
00034 {
00035 public:
00036 Motor();
00037
00038 virtual ~Motor();
00039
00044 static unsigned int numMotors();
00045
00052 void setMotorNumber( unsigned int number );
00053
00060 void setSpeedSetPoint( float speed );
00061
00066 void resetPosition();
00067
00074 void setBrake( bool brake );
00075
00086 void setPID( unsigned char kp, unsigned char ki, unsigned char kd );
00087
00094 float actualVelocity() const;
00095
00102 int actualPosition() const;
00103
00109 float motorCurrent() const;
00110
00117 unsigned short rawCurrentMeasurment() const;
00118
00119 private:
00120 unsigned int _motorNumber;
00121 bool _brake;
00122 };
00123 }
00124 }
00125 }
00126 #endif