Go to the documentation of this file.
21 #include "../Util/Message.h"
22 #include "../Util/StopWatch.h"
23 #include "../ComDef/DeviceErrors.h"
24 #include "../ComDef/ModuleErrors.h"
25 #include "../ComDef/IOErrors.h"
26 #include "../Device/ProtocolCommands.h"
54 virtual int reinit(
unsigned char ucBaudRateId) = 0;
55 virtual int write8Bytes(
int iModuleId,
bool ack,
void* pBytes ) = 0;
58 virtual int readChar(
int iModuleId,
int iCommandId,
int iParameterId,
char* pcData) = 0;
59 virtual int readUnsignedChar(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned char* pucData) = 0;
60 virtual int readShort(
int iModuleId,
int iCommandId,
int iParameterId,
short* piData) = 0;
61 virtual int readUnsignedShort(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned short* puiData) = 0;
62 virtual int readLong(
int iModuleId,
int iCommandId,
int iParameterId,
long* piData) = 0;
63 virtual int readUnsignedLong(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned long* puiData) = 0;
64 virtual int readFloat(
int iModuleId,
int iCommandId,
int iParameterId,
float* pfData) = 0;
66 virtual int readLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2) = 0;
67 virtual int readFloatUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
float* pfData,
unsigned char* pucData1,
unsigned char* pucData2) = 0;
69 virtual int writeChar(
int iModuleId,
int iCommandId,
int iParameterId,
char cData) = 0;
70 virtual int writeUnsignedChar(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned char ucData) = 0;
71 virtual int writeShort(
int iModuleId,
int iCommandId,
int iParameterId,
short iData) = 0;
72 virtual int writeUnsignedShort(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned short uiData) = 0;
73 virtual int writeLong(
int iModuleId,
int iCommandId,
int iParameterId,
long iData) = 0;
74 virtual int writeUnsignedLong(
int iModuleId,
int iCommandId,
int iParameterId,
unsigned long uiData) = 0;
75 virtual int writeFloat(
int iModuleId,
int iCommandId,
int iParameterId,
float fData) = 0;
77 virtual int writeAll(
int iCommandId,
int iParameterId) = 0;
78 virtual int writeCommand(
int iModuleId,
int iCommandId) = 0;
79 virtual int writeLongShort(
int iModuleId,
int iCommandId,
int iParameterId,
long iData,
short iTime) = 0;
80 virtual int writeFloatShort(
int iModuleId,
int iCommandId,
int iParameterId,
float fData,
short iTime) = 0;
82 virtual int writeShortReadLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
short iData,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2) = 0;
83 virtual int writeLongReadLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
long iData,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2) = 0;
84 virtual int writeLongShortReadLongUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
long iData1,
short iData2,
long* piData,
unsigned char* pucData1,
unsigned char* pucData2) = 0;
85 virtual int writeFloatReadFloatUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
float fData,
float* pfData,
unsigned char* pucData1,
unsigned char* pucData2) = 0;
86 virtual int writeFloatShortReadFloatUnsignedChars(
int iModuleId,
int iCommandId,
int iParameterId,
float fData,
short iData,
float* pfData,
unsigned char* pucData1,
unsigned char* pucData2) = 0;
131 int getDefConfig(
int iModuleId,
unsigned long* puiValue);
132 int getDefSetup(
int iModuleId,
unsigned long* puiValue);
142 int getDefA0(
int iModuleId,
short* piValue);
143 int getDefC0(
int iModuleId,
short* piValue);
144 int getDefDamp(
int iModuleId,
short* piValue);
154 int getConfig(
int iModuleId,
unsigned long* puiValue);
157 unsigned char* pucDio,
float* pfPos);
158 int getDioData(
int iModuleId,
unsigned long* puiValue);
159 int getA0(
int iModuleId,
short* piValue);
160 int getC0(
int iModuleId,
short* piValue);
161 int getDamp(
int iModuleId,
short* piValue);
164 int getHomeVel(
int iModuleId,
float* pfValue );
166 int getPos(
int iModuleId,
float* pfPos);
167 int getPosInc(
int iModuleId,
long* piValue);
169 int getVel(
int iModuleId,
float* pfVel);
170 int getVelInc(
int iModuleId,
long* piValue);
171 int getIPolVel(
int iModuleId,
float* pValue );
172 int getCur(
int iModuleId,
float* pfCur);
173 int getCurInc(
int iModuleId,
short* piValue);
174 int getMinPos(
int iModuleId,
float* pfValue);
176 int getMaxPos(
int iModuleId,
float* pfValue);
178 int getMaxVel(
int iModuleId,
float* pfValue);
180 int getMaxAcc(
int iModuleId,
float* pfValue);
182 int getMaxCur(
int iModuleId,
float* pfValue);
187 int getSavePos(
int iModuleId,
float* pfValue);
222 virtual int getDataDLR_FTS(std::vector<float>& rafData,
long* piState) = 0;
223 virtual int getDataSCHUNK_FTC(
int iModuleId,
int iChannelTypeId, std::vector<float>& rafData,
short* piState) = 0;
232 void setName(
const char* acNameString);
235 int setConfig(
int iModuleId,
unsigned long puiValue);
236 int setDioData(
int iModuleId,
unsigned long uiValue);
237 int setA0(
int iModuleId,
short iValue);
238 int setC0(
int iModuleId,
short iValue);
239 int setDamp(
int iModuleId,
short iValue);
248 int setMinPos(
int iModuleId,
float fValue);
250 int setMaxPos(
int iModuleId,
float fValue);
252 int setMaxVel(
int iModuleId,
float fValue);
254 int setMaxAcc(
int iModuleId,
float fValue);
256 int setMaxCur(
int iModuleId,
float fValue);
274 int setDefSetup(
int iModuleId,
unsigned long uiValue);
300 virtual int init() = 0;
301 virtual int init(
const char* acInitString) = 0;
302 virtual int exit() = 0;
313 int movePos(
int iModuleId,
float fPos);
316 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos);
317 int moveRamp(
int iModuleId,
float fPos,
float fVel,
float fAcc);
318 int moveRampInc(
int iModuleId,
long iPos,
long iVel,
long iAcc);
320 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos);
321 int moveVel(
int iModuleId,
float fVel);
324 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos);
325 int moveCur(
int iModuleId,
float fCur);
328 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos);
329 int moveStep(
int iModuleId,
float fPos,
unsigned short uiTime);
330 int moveStepInc(
int iModuleId,
long iPos,
unsigned short uiTime);
332 unsigned long* puiState,
unsigned char* pucDio,
float* pfPos);
336 int waitForHomeEnd(
int iModuleId,
unsigned long uiTimeOut = 60000);
338 int waitForRampEnd(
int iModuleId,
unsigned long uiTimeOut = 60000);
339 int waitForRampDec(
int iModuleId,
unsigned long uiTimeOut = 60000);
int getDefLinearRatio(int iModuleId, float *pfValue)
int getDefMaxVel(int iModuleId, float *pfValue)
int getRawTemperature(int iModuleId, short *piValue)
int getDefIncPerTurn(int iModuleId, unsigned long *puiValue)
int setHomeOffset(int iModuleId, float fValue)
int moveStep(int iModuleId, float fPos, unsigned short uiTime)
int moveCur(int iModuleId, float fCur)
int getDefMinPos(int iModuleId, float *pfValue)
virtual int writeChar(int iModuleId, int iCommandId, int iParameterId, char cData)=0
int getDeltaPosInc(int iModuleId, long *piValue)
virtual int waitForStartMotionAll()
int movePos(int iModuleId, float fPos)
int getKpPWMLimit(int iModuleId, long *piValue)
int setMaxPosInc(int iModuleId, long iValue)
int moveRampExtended(int iModuleId, float fPos, float fVel, float fAcc, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int setDefRSBaudRate(int iModuleId, unsigned char uiValue)
int getHomeOffset(int iModuleId, float *pValue)
int getCurInc(int iModuleId, short *piValue)
int setMaxDeltaPosInc(int iModuleId, long iValue)
int getCur(int iModuleId, float *pfCur)
int getDefBaudRate(int iModuleId, unsigned char *pucValue)
int waitForRampSteady(int iModuleId, unsigned long uiTimeOut=60000)
std::vector< int > m_aiModuleId
int getModuleCount(void)
gets the number of modules of the device
int getRawMotorCurrent(int iModuleId, short *piValue)
int getPosCountInc(int iModuleId, long *piValue)
int setNomCurOvershootTime(int iModuleId, long iValue)
int saveParameters(int iModuleId)
int setMaxCur(int iModuleId, float fValue)
int waitForRampDec(int iModuleId, unsigned long uiTimeOut=60000)
int getDefGearRatio(int iModuleId, float *pfValue)
virtual int writeLongReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
int getPosInc(int iModuleId, long *piValue)
const char * getInitString()
gets the init string of the device
int getDefRSBaudRate(int iModuleId, unsigned char *pucValue)
int getRawMotorSupply(int iModuleId, short *piValue)
virtual int writeLong(int iModuleId, int iCommandId, int iParameterId, long iData)=0
int getRawLogicSupply(int iModuleId, short *piValue)
int setMinPos(int iModuleId, float fValue)
virtual int readLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
int getStateInternal(int iModuleId, unsigned long *pBytes)
int setMinLogicVoltage(int iModuleId, float fValue)
virtual int writeShort(int iModuleId, int iCommandId, int iParameterId, short iData)=0
int getNominalMotorCurrent(int iModuleId, float *pfValue)
int getTemperature(int iModuleId, float *pfValue)
virtual int writeLongShort(int iModuleId, int iCommandId, int iParameterId, long iData, short iTime)=0
int setC0(int iModuleId, short iValue)
int setLogicUndershootTime(int iModuleId, long iValue)
int movePosExtended(int iModuleId, float fPos, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int waitForRampEndAll(unsigned long uiTimeOut=60000)
virtual int getCanOpenRawAbsEnc(int iModuleId, short *piValue)=0
int moveRampInc(int iModuleId, long iPos, long iVel, long iAcc)
int setModuleSerialNo(int iModuleId, unsigned long uiValue)
int getVelInc(int iModuleId, long *piValue)
int getDefMaxPos(int iModuleId, float *pfValue)
int getMotorCurrent(int iModuleId, float *pfValue)
virtual int writeLongShortReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long iData1, short iData2, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
int setA0(int iModuleId, short iValue)
int getDefA0(int iModuleId, short *piValue)
int waitForRampEnd(int iModuleId, unsigned long uiTimeOut=60000)
int setMaximumMotorCurrent(int iModuleId, float fValue)
int getMotorSupply(int iModuleId, float *pfValue)
int setMotorUndershootTime(int iModuleId, long iValue)
int getNomCurOvershootTime(int iModuleId, long *piValue)
int moveRamp(int iModuleId, float fPos, float fVel, float fAcc)
int setDamp(int iModuleId, short iValue)
virtual int readShort(int iModuleId, int iCommandId, int iParameterId, short *piData)=0
int setDefIncPerTurn(int iModuleId, unsigned long uiValue)
int setMotorOvershootTime(int iModuleId, long iValue)
int getLoadDeltaTime(int iModuleId, unsigned short *piValue)
int xmit8Bytes(int iModuleId, void *pBytes)
int getMaxVel(int iModuleId, float *pfValue)
int serveWatchdogAll(void)
int resetModule(int iModuleId)
int getMaxVelInc(int iModuleId, long *piValue)
int setNominalMotorCurrent(int iModuleId, float fValue)
virtual int writeFloatShortReadFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float fData, short iData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
int setBaudRateAll(unsigned char ucBaudRateId)
CDevice(void)
default constructor
int getHomeVel(int iModuleId, float *pfValue)
int moveCurExtended(int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int setLoadLimit(int iModuleId, long iValue)
int getModuleType(int iModuleId, unsigned char *pucValue)
virtual int getDataSCHUNK_FTC(int iModuleId, int iChannelTypeId, std::vector< float > &rafData, short *piState)=0
int setRampAcc(int iModuleId, float fValue)
int setDioData(int iModuleId, unsigned long uiValue)
int getPos(int iModuleId, float *pfPos)
int getHomeVelInc(int iModuleId, long *piValue)
int getDefConfig(int iModuleId, unsigned long *puiValue)
int getHMaxCurOvershootTime(int iModuleId, long *piValue)
int getDefCurRatio(int iModuleId, float *pfValue)
virtual int writeShortReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, short iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
int getDamp(int iModuleId, short *piValue)
int getLoadLimit(int iModuleId, long *piValue)
int getLogicOvershootTime(int iModuleId, long *piValue)
virtual int setTaraMP55_IO(int iModuleId, float fTara)=0
int getBaudRate(void)
gets the baud rate of the device
const char * getRevision()
gets the revision string of the class
bool getInitFlag()
gets the init flag
int getMaxPWMOutput(int iModuleId, long *piValue)
int setDefAddress(int iModuleId, unsigned char uiValue)
int getStateDioPos(int iModuleId, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int getModuleVersion(int iModuleId, unsigned short *puiValue)
int getDefSetup(int iModuleId, unsigned long *puiValue)
virtual int getDataDLR_FTS(std::vector< float > &rafData, long *piState)=0
int getMinMotorVoltage(int iModuleId, float *pfValue)
virtual int getDataMP55_IO(int iModuleId, float *pfData)=0
int setMaxMotorVoltage(int iModuleId, float fValue)
int getSyncTime(int iModuleId, short *piValue)
int getMaxMotorVoltage(int iModuleId, float *pfValue)
int movePosInc(int iModuleId, long iPos)
int getLogicSupply(int iModuleId, float *pfValue)
int moveStepExtended(int iModuleId, float fPos, unsigned short uiTime, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int setSyncTime(int iModuleId, short iValue)
virtual int getDataMP55_IO_fast(int iModuleId, float *pfData)=0
virtual int setNullSCHUNK_FTC(int iModuleId, short *piState)=0
virtual int readChar(int iModuleId, int iCommandId, int iParameterId, char *pcData)=0
const char * getName()
gets the name string of the open device
virtual int writeFloat(int iModuleId, int iCommandId, int iParameterId, float fData)=0
int getMotorOvershootTime(int iModuleId, long *piValue)
int getCurrentLimit(int iModuleId, float *pfValue)
int getMaxAcc(int iModuleId, float *pfValue)
int getModuleState(int iModuleId, unsigned long *puiState)
int setLogicOvershootTime(int iModuleId, long iValue)
virtual int writeFloatShort(int iModuleId, int iCommandId, int iParameterId, float fData, short iTime)=0
int getDefBurnCount(int iModuleId, unsigned char *pucValue)
int setDefCurRatio(int iModuleId, float fValue)
virtual int getUnsignedLong(int iModuleId, unsigned long *puiData)=0
virtual int readLong(int iModuleId, int iCommandId, int iParameterId, long *piData)=0
virtual int reinit(unsigned char ucBaudRateId)=0
int getHomeOffsetInc(int iModuleId, long *piValue)
int setDefSetup(int iModuleId, unsigned long uiValue)
int getMinPos(int iModuleId, float *pfValue)
int getMaxAccInc(int iModuleId, long *piValue)
int getDefHomeOffset(int iModuleId, float *pfValue)
virtual int writeUnsignedChar(int iModuleId, int iCommandId, int iParameterId, unsigned char ucData)=0
int setCurrentLimit(int iModuleId, float fValue)
int getA0(int iModuleId, short *piValue)
int moveStepInc(int iModuleId, long iPos, unsigned short uiTime)
int getMaxDeltaPosInc(int iModuleId, long *piValue)
int setDefHomeAcc(int iModuleId, float fValue)
int setDefGearRatio(int iModuleId, float fValue)
virtual int readFloat(int iModuleId, int iCommandId, int iParameterId, float *pfData)=0
int setDefCANBaudRate(int iModuleId, unsigned char uiValue)
virtual int readUnsignedLong(int iModuleId, int iCommandId, int iParameterId, unsigned long *puiData)=0
int setRampVelInc(int iModuleId, long iValue)
void setName(const char *acNameString)
sets the baud rate of the device
virtual int readUnsignedChar(int iModuleId, int iCommandId, int iParameterId, unsigned char *pucData)=0
virtual int readUnsignedShort(int iModuleId, int iCommandId, int iParameterId, unsigned short *puiData)=0
int waitForHomeEnd(int iModuleId, unsigned long uiTimeOut=60000)
int recalcPIDParams(int iModuleId)
int setHMaxCurOvershootTime(int iModuleId, long iValue)
int getMinLogicVoltage(int iModuleId, float *pfValue)
int getDefMaxDeltaPos(int iModuleId, float *pfValue)
int setDefBrakeTimeOut(int iModuleId, unsigned short uiValue)
virtual int initDLR_FTS()=0
int setMaxDeltaPos(int iModuleId, float fValue)
virtual int writeUnsignedShort(int iModuleId, int iCommandId, int iParameterId, unsigned short uiData)=0
virtual ~CDevice()
destructor
int getSavePos(int iModuleId, float *pfValue)
int getModuleSerialNo(int iModuleId, unsigned long *puiValue)
int getDeltaPos(int iModuleId, float *pfValue)
virtual int readFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
int xack8Bytes(int iModuleId, void *pBytes)
int setMinPosInc(int iModuleId, long iValue)
int setHomeVel(int iModuleId, float fValue)
int waitForHomeEndAll(unsigned long uiTimeOut=60000)
int setMinMotorVoltage(int iModuleId, float fValue)
CDevice * newDevice(const char *acInitString)
virtual int write8Bytes(int iModuleId, bool ack, void *pBytes)=0
int setRampVel(int iModuleId, float fValue)
int getMaxLoadGradient(int iModuleId, long *piValue)
int getMaxCur(int iModuleId, float *pfValue)
virtual int writeUnsignedLong(int iModuleId, int iCommandId, int iParameterId, unsigned long uiData)=0
int setMaxAcc(int iModuleId, float fValue)
int moveVel(int iModuleId, float fVel)
int getC0(int iModuleId, short *piValue)
int setRampAccInc(int iModuleId, long iValue)
int moveCurInc(int iModuleId, long iCur)
int setMaxLogicVoltage(int iModuleId, float fValue)
int haltModule(int iModuleId)
int setMaxAccInc(int iModuleId, long iValue)
int setDefLinRatio(int iModuleId, float fValue)
int getDefDamp(int iModuleId, short *piValue)
int doInternal(int iModuleId, void *pBytes)
CDevice & operator=(const CDevice &rclDevice)
int getMaximumMotorCurrent(int iModuleId, float *pfValue)
virtual int writeFloatReadFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float fData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
int setMaxVel(int iModuleId, float fValue)
int setConfig(int iModuleId, unsigned long puiValue)
int getDefMaxCur(int iModuleId, float *pfValue)
int getIPolVel(int iModuleId, float *pValue)
int getMaxPos(int iModuleId, float *pfValue)
int getDefC0(int iModuleId, short *piValue)
int setKpPWMLimit(int iModuleId, long iValue)
int getDefCANBaudRate(int iModuleId, unsigned char *pucValue)
int setMaxLoadGradient(int iModuleId, long iValue)
int setLoadDeltaTime(int iModuleId, unsigned short iValue)
virtual int writeCommand(int iModuleId, int iCommandId)=0
int getMinPosInc(int iModuleId, long *piValue)
int setHomeVelInc(int iModuleId, long iValue)
int getVel(int iModuleId, float *pfVel)
int moveVelExtended(int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
int getDefHomeVel(int iModuleId, float *pfValue)
int getModuleIdMap(std::vector< int > &raiModuleId)
gets the module ID map of the open device
int setMaxVelInc(int iModuleId, long iValue)
virtual int writeAll(int iCommandId, int iParameterId)=0
void charStateToLongState(unsigned char uiShort, unsigned long *puiState)
int getMaxDeltaPos(int iModuleId, float *pfValue)
int setHomeOffsetInc(int iModuleId, long iValue)
int getConfig(int iModuleId, unsigned long *puiValue)
int getMotorUndershootTime(int iModuleId, long *piValue)
int getDioData(int iModuleId, unsigned long *puiValue)
int getDefBrakeTimeOut(int iModuleId, unsigned short *puiValue)
int getMaxLogicVoltage(int iModuleId, float *pfValue)
int getDefMaxAcc(int iModuleId, float *pfValue)
virtual int setInitMP55_IO_fast(int iModuleId)=0
int setMaxPos(int iModuleId, float fValue)
void setInitString(const char *acInitString)
int getIncRatio(int iModuleId, float *pValue)
std::vector< unsigned short > m_auiModuleVersion
int waitForMotionEndAll(unsigned long uiTimeOut=60000)
int getLogicUndershootTime(int iModuleId, long *piValue)
int getMaxPosInc(int iModuleId, long *piValue)
int getDefCurOffset(int iModuleId, float *pfValue)
int homeModule(int iModuleId)
int getDefDioData(int iModuleId, unsigned long *puiValue)
int moveVelInc(int iModuleId, long iVel)
int waitForMotionEnd(int iModuleId, unsigned long uiTimeOut=60000)
schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Sat May 7 2022 02:17:13