Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #ifndef CANDRIVEITF_INCLUDEDEF_H
00056 #define CANDRIVEITF_INCLUDEDEF_H
00057
00058
00059 #include <cob_generic_can/CanItf.h>
00060 #include <cob_canopen_motor/DriveParam.h>
00061 #include <cob_canopen_motor/SDOSegmented.h>
00062
00063
00068 class CanDriveItf
00069 {
00070 public:
00074 enum MotionType
00075 {
00076 MOTIONTYPE_VELCTRL,
00077 MOTIONTYPE_TORQUECTRL,
00078 MOTIONTYPE_POSCTRL
00079 };
00080
00084 virtual void setCanItf(CanItf* pCanItf) = 0;
00085
00090 virtual bool init() = 0;
00091
00097 virtual bool isInitialized() = 0;
00098
00103 virtual bool start() = 0;
00104
00109 virtual bool stop() = 0;
00110
00115 virtual bool reset() = 0;
00116
00120 virtual bool shutdown() = 0;
00121
00128 virtual bool disableBrake(bool bDisabled) = 0;
00129
00134 virtual bool initHoming() = 0;
00135
00140 virtual bool execHoming() = 0;
00141
00145 virtual double getTimeToLastMsg() = 0;
00146
00151 virtual bool getStatusLimitSwitch() = 0;
00152
00160 virtual bool startWatchdog(bool bStarted) = 0;
00161
00167 virtual bool evalReceivedMsg(CanMsg& msg) = 0;
00168
00174 virtual bool evalReceivedMsg() = 0;
00175
00181 virtual void setGearPosVelRadS(double dPosRad, double dVelRadS) = 0;
00182
00187 virtual void setGearVelRadS(double dVelRadS) = 0;
00188
00194 virtual bool setTypeMotion(int iType) = 0;
00195
00199 virtual void getGearPosVelRadS(double* pdAngleGearRad, double* pdVelGearRadS) = 0;
00200
00205 virtual void getGearDeltaPosVelRadS(double* pdDeltaAngleGearRad, double* pdVelGearRadS) = 0;
00206
00210 virtual void getGearPosRad(double* pdPosGearRad) = 0;
00211
00215 virtual void setDriveParam(DriveParam driveParam) = 0;
00216
00220 virtual bool isError() = 0;
00221
00225 virtual unsigned int getError() = 0;
00226
00230 virtual void requestPosVel() = 0;
00231
00235 virtual void requestStatus() = 0;
00236
00240 virtual void getStatus(int* piStatus, int* piTempCel) = 0;
00241
00245 virtual bool setEMStop() = 0;
00246
00250 virtual bool resetEMStop() = 0;
00251
00255 virtual void IntprtSetInt(int iDataLen, char cCmdChar1, char cCmdChar2, int iIndex, int iData) = 0;
00256
00260 virtual int setRecorder(int iFlag, int iParam = 0, std::string sParam = "/home/MyLog") = 0;
00261
00265 virtual void requestMotorTorque() = 0;
00266
00272 virtual void getMotorTorque(double* dTorqueNm) = 0;
00273
00277 virtual void setMotorTorque(double dTorqueNm) = 0;
00278 };
00279
00280
00281
00282 #endif
00283