00001
00002
00003 #ifndef _REC_ROBOTINO_COM_C_MOTOR_H_
00004 #define _REC_ROBOTINO_COM_C_MOTOR_H_
00005
00006 #include "rec/robotino/com/c/globals.h"
00007 #include "rec/robotino/com/c/Com.h"
00008
00016 typedef int MotorId;
00017
00018 #define INVALID_MOTORID -1
00019
00025 DLLEXPORT MotorId Motor_construct( unsigned int number );
00026
00032 DLLEXPORT BOOL Motor_destroy( MotorId id );
00033
00038 DLLEXPORT BOOL Motor_setComId( MotorId id, ComId comId );
00039
00047 DLLEXPORT BOOL Motor_setMotorNumber( MotorId id, unsigned int number );
00048
00052 DLLEXPORT unsigned int numMotors();
00053
00060 DLLEXPORT BOOL Motor_setSetPointSpeed( MotorId id, float speed );
00061
00067 DLLEXPORT BOOL Motor_resetPosition( MotorId id );
00068
00075 DLLEXPORT BOOL Motor_setBrake( MotorId id, BOOL brake );
00076
00085 DLLEXPORT BOOL Motor_setPID( MotorId id, float kp, float ki, float kd );
00086
00093 DLLEXPORT float Motor_actualSpeed( MotorId id );
00094
00100 DLLEXPORT int Motor_actualPosition( MotorId id );
00101
00107 DLLEXPORT float Motor_motorCurrent( MotorId id );
00108
00114 DLLEXPORT float Motor_rawCurrentMeasurment( MotorId id );
00115
00116 #endif //_REC_ROBOTINO_COM_C_MOTOR_H_