CanDriveItf.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef CANDRIVEITF_INCLUDEDEF_H
00019 #define CANDRIVEITF_INCLUDEDEF_H
00020 
00021 //-----------------------------------------------
00022 #include <cob_generic_can/CanItf.h>
00023 #include <cob_canopen_motor/DriveParam.h>
00024 #include <cob_canopen_motor/SDOSegmented.h>
00025 //-----------------------------------------------
00026 
00031 class CanDriveItf
00032 {
00033 public:
00037         enum MotionType
00038         {
00039                 MOTIONTYPE_VELCTRL,
00040         MOTIONTYPE_TORQUECTRL,
00041                 MOTIONTYPE_POSCTRL
00042         };
00043 
00047         virtual void setCanItf(CanItf* pCanItf) = 0;
00048 
00053         virtual bool init() = 0;
00054 
00060         virtual bool isInitialized() = 0;
00061 
00066         virtual bool start() = 0;
00067 
00072         virtual bool stop() = 0;
00073 
00078         virtual bool reset() = 0;
00079 
00083         virtual bool shutdown() = 0;
00084 
00091         virtual bool disableBrake(bool bDisabled) = 0;
00092 
00097         virtual bool initHoming() = 0;
00098 
00103         virtual bool execHoming() = 0;
00104 
00108         virtual double getTimeToLastMsg() = 0;
00109 
00114         virtual bool getStatusLimitSwitch() = 0;
00115 
00123         virtual bool startWatchdog(bool bStarted) = 0;
00124 
00130         virtual bool evalReceivedMsg(CanMsg& msg) = 0;
00131 
00137         virtual bool evalReceivedMsg() = 0;
00138 
00144         virtual void setGearPosVelRadS(double dPosRad, double dVelRadS) = 0;
00145 
00150         virtual void setGearVelRadS(double dVelRadS) = 0;
00151 
00157         virtual bool setTypeMotion(int iType) = 0;
00158 
00162         virtual void getGearPosVelRadS(double* pdAngleGearRad, double* pdVelGearRadS) = 0;
00163 
00168         virtual void getGearDeltaPosVelRadS(double* pdDeltaAngleGearRad, double* pdVelGearRadS) = 0;
00169 
00173         virtual void getGearPosRad(double* pdPosGearRad) = 0;
00174 
00178         virtual void setDriveParam(DriveParam driveParam) = 0;
00179 
00183         virtual bool isError() = 0;
00184 
00188         virtual unsigned int getError() = 0;
00189 
00193         virtual void requestPosVel() = 0;
00194 
00198         virtual void requestStatus() = 0;
00199 
00203         virtual void getStatus(int* piStatus, int* piTempCel) = 0;
00204 
00208         virtual bool setEMStop() = 0;
00209 
00213         virtual bool resetEMStop() = 0;
00214 
00218         virtual void IntprtSetInt(int iDataLen, char cCmdChar1, char cCmdChar2, int iIndex, int iData) = 0;
00219 
00223     virtual     int setRecorder(int iFlag, int iParam = 0, std::string sParam = "/home/MyLog") = 0;
00224 
00228         virtual void requestMotorTorque() = 0;
00229 
00235         virtual void getMotorTorque(double* dTorqueNm) = 0;
00236 
00240     virtual void setMotorTorque(double dTorqueNm) = 0;
00241 };
00242 
00243 
00244 //-----------------------------------------------
00245 #endif
00246 


cob_canopen_motor
Author(s): Christian Connette
autogenerated on Sat Jun 8 2019 21:02:28