motor_driver_interface.h
Go to the documentation of this file.
00001 #ifndef __MOTOR_DRIVER_INTERFACE_H__
00002 #define __MOTOR_DRIVER_INTERFACE_H__
00003 
00027 #include "mcdc3006s_data.h"
00028 
00029 class MotorDriverInterface {
00030     public:
00034         MotorDriverInterface()
00035         {
00036         }
00037 
00041         virtual ~MotorDriverInterface()
00042         {
00043         }
00044 
00048         virtual int init(int baudrate, char *dev, char *sem) = 0;
00049 
00055         virtual int enable_driver() = 0;
00056 
00062         virtual int disable_driver() = 0;
00063 
00075         virtual int get_config(driverConf_t *dc) = 0;
00076 
00087         virtual long int get_max_pos() = 0;
00088 
00097         virtual long int get_min_pos() = 0;
00098 
00108         virtual long int get_max_vel() = 0;
00109 
00118         virtual long int get_max_acc() = 0;
00119 
00130         virtual long int get_max_dec() = 0;
00131 
00142         virtual int get_cur_lim() = 0;
00143 
00154         virtual int get_peak_cur_lim() = 0;
00155 
00162         virtual int get_status(driverStatus_t * drvStatus) = 0;
00163 
00170         virtual int get_sensor(driverSensor_t *sensor) = 0;
00171 
00178         virtual int get_instant_pos(long int *positon) = 0;
00179 
00186         virtual int get_instant_vel(long int *velocity) = 0;
00187 
00195         virtual int get_instant_current(int *current) = 0;
00196 
00203         virtual int set_config(driverConf_t dc) = 0;
00204 
00213         virtual int set_max_pos(long int maxPos) = 0;
00214 
00223         virtual int set_min_pos(long int minPos) = 0;
00224 
00231         virtual int set_max_vel(long int maxVel) = 0;
00232 
00239         virtual int set_max_acc(long int maxAcc) = 0;
00240 
00248         virtual int set_max_dec(long int maxDec) = 0;
00249 
00256         virtual int set_cur_lim(int cl) = 0;
00257 
00264         virtual int set_peak_cur_lim(int pcl) = 0;
00265 
00273         virtual int set_baudrate(int baud) = 0;
00274 
00281         virtual int move_abs_pos(long int pos) = 0;
00282 
00289         virtual int move_rel_pos(long int pos) = 0;
00290 
00297         virtual int move_vel(long int vel) = 0;
00298 
00312         virtual int save_to_flash() = 0;
00313 
00324         virtual int activate_limits(int action) = 0;
00325 
00336         virtual int set_home_position(long int home) = 0;
00337 
00352         virtual int calibrate(int limit) = 0;
00353 };
00354 
00355 #endif


maggie_motor_drivers
Author(s): Raul Perula-Martinez
autogenerated on Mon Sep 14 2015 03:06:39