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 #endif
00029 Motor : public Actor
00030 {
00031 public:
00032 Motor();
00033
00034 virtual ~Motor();
00035
00040 static unsigned int numMotors();
00041
00048 void setMotorNumber( unsigned int number );
00049
00056 void setSpeedSetPoint( float speed );
00057
00062 void resetPosition();
00063
00070 void setBrake( bool brake );
00071
00082 void setPID( unsigned char kp, unsigned char ki, unsigned char kd );
00083
00090 float actualVelocity() const;
00091
00098 int actualPosition() const;
00099
00105 float motorCurrent() const;
00106
00113 unsigned short rawCurrentMeasurment() const;
00114
00115 private:
00116 unsigned int _motorNumber;
00117 bool _brake;
00118 };
00119 }
00120 }
00121 }
00122 #endif