Device.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 SCHUNK GmbH & Co. KG
3  * Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10 
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef CDEVICE_H
19 #define CDEVICE_H
20 
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"
27 
28 class CDevice : public CMessage
29 {
30  private:
31 
32  // ---- private data ---------------------------------------------------- ;
33 
34  // ---- private auxiliary functions ------------------------------------- ;
35 
36  protected:
37 
38  // ---- protected data -------------------------------------------------- ;
39 
41  char m_acName[128];
42  char m_acInitString[128];
43  char m_acRevision[20];
47  std::vector<int> m_aiModuleId;
48  std::vector<unsigned short> m_auiModuleVersion;
51 
52  // ---- protected auxiliary functions ----------------------------------- ;
53 
54  virtual int reinit(unsigned char ucBaudRateId) = 0;
55  virtual int write8Bytes(int iModuleId, bool ack, void* pBytes ) = 0;
56  virtual int getUnsignedLong(int iModuleId, unsigned long* puiData) = 0;
57 
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;
65 
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;
68 
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;
76 
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;
81 
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;
87 
88  void charStateToLongState(unsigned char uiShort, unsigned long* puiState);
89 
90  public:
91 
92  // ---- public data ----------------------------------------------------- ;
93 
94 
95  // ---- constructors / destructor --------------------------------------- ;
96 
98  CDevice(void);
100  CDevice(const CDevice& rclDevice);
102  virtual ~CDevice();
103 
104  // ---- operators ------------------------------------------------------- ;
105 
106  // assignment operator
107  CDevice& operator=(const CDevice& rclDevice);
108 
109  // ---- query functions ------------------------------------------------- ;
110 
112  bool getInitFlag();
114  const char* getRevision();
116  const char* getName();
118  const char* getInitString();
120  int getBaudRate(void);
122  int getModuleCount(void);
124  int getModuleIdMap(std::vector<int>& raiModuleId);
125 
126  int getModuleState(int iModuleId, unsigned long* puiState);
127  int getModuleType(int iModuleId, unsigned char* pucValue);
128  int getModuleVersion(int iModuleId, unsigned short* puiValue);
129  int getModuleSerialNo(int iModuleId, unsigned long* puiValue);
130 
131  int getDefConfig(int iModuleId, unsigned long* puiValue);
132  int getDefSetup(int iModuleId, unsigned long* puiValue);
133  int getDefBaudRate(int iModuleId, unsigned char* pucValue);
134  int getDefBurnCount(int iModuleId, unsigned char* pucValue);
135  int getDefGearRatio(int iModuleId, float* pfValue);
136  int getDefLinearRatio(int iModuleId, float* pfValue);
137  int getDefCurOffset(int iModuleId, float* pfValue);
138  int getDefCurRatio(int iModuleId, float* pfValue);
139  int getDefBrakeTimeOut(int iModuleId, unsigned short* puiValue);
140  int getDefIncPerTurn(int iModuleId, unsigned long* puiValue);
141  int getDefDioData(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);
145  int getDefHomeOffset(int iModuleId, float* pfValue);
146  int getDefHomeVel(int iModuleId, float* pfValue);
147  int getDefMinPos(int iModuleId, float* pfValue);
148  int getDefMaxPos(int iModuleId, float* pfValue);
149  int getDefMaxVel(int iModuleId, float* pfValue);
150  int getDefMaxAcc(int iModuleId, float* pfValue);
151  int getDefMaxCur(int iModuleId, float* pfValue);
152  int getDefMaxDeltaPos(int iModuleId, float* pfValue);
153 
154  int getConfig(int iModuleId, unsigned long* puiValue);
155  int getIncRatio(int iModuleId, float* pValue );
156  int getStateDioPos(int iModuleId, unsigned long* puiState,
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);
162  int getHomeOffset(int iModuleId, float* pValue );
163  int getHomeOffsetInc(int iModuleId, long* piValue );
164  int getHomeVel(int iModuleId, float* pfValue );
165  int getHomeVelInc(int iModuleId, long* piValue);
166  int getPos(int iModuleId, float* pfPos);
167  int getPosInc(int iModuleId, long* piValue);
168  int getPosCountInc(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);
175  int getMinPosInc(int iModuleId, long* piValue);
176  int getMaxPos(int iModuleId, float* pfValue);
177  int getMaxPosInc(int iModuleId, long* piValue);
178  int getMaxVel(int iModuleId, float* pfValue);
179  int getMaxVelInc(int iModuleId, long* piValue);
180  int getMaxAcc(int iModuleId, float* pfValue);
181  int getMaxAccInc(int iModuleId, long* piValue);
182  int getMaxCur(int iModuleId, float* pfValue);
183  int getDeltaPos(int iModuleId, float* pfValue);
184  int getDeltaPosInc(int iModuleId, long* piValue);
185  int getMaxDeltaPos(int iModuleId, float* pfValue);
186  int getMaxDeltaPosInc(int iModuleId, long* piValue);
187  int getSavePos(int iModuleId, float* pfValue);
188  int getSyncTime(int iModuleId, short* piValue);
189  int getRawMotorCurrent(int iModuleId, short* piValue);
190  int getRawMotorSupply(int iModuleId, short* piValue);
191  int getRawTemperature(int iModuleId, short* piValue);
192  int getRawLogicSupply(int iModuleId, short* piValue);
193  int getLoadLimit(int iModuleId, long* piValue);
194  int getMaxLoadGradient(int iModuleId, long* piValue);
195  int getLoadDeltaTime(int iModuleId, unsigned short* piValue);
196 
197  int getMotorCurrent(int iModuleId, float* pfValue);
198  int getMotorSupply(int iModuleId, float* pfValue);
199  int getTemperature(int iModuleId, float* pfValue);
200  int getLogicSupply(int iModuleId, float* pfValue);
201 
202  int getMinLogicVoltage(int iModuleId, float* pfValue);
203  int getMaxLogicVoltage(int iModuleId, float* pfValue);
204  int getMinMotorVoltage(int iModuleId, float* pfValue);
205  int getMaxMotorVoltage(int iModuleId, float* pfValue);
206  int getNominalMotorCurrent(int iModuleId, float* pfValue);
207  int getMaximumMotorCurrent(int iModuleId, float* pfValue);
208  int getLogicUndershootTime(int iModuleId, long* piValue);
209  int getLogicOvershootTime(int iModuleId, long* piValue);
210  int getMotorUndershootTime(int iModuleId, long* piValue);
211  int getMotorOvershootTime(int iModuleId, long* piValue);
212  int getNomCurOvershootTime(int iModuleId, long* piValue);
213  int getHMaxCurOvershootTime(int iModuleId, long* piValue);
214 
215  int getDefCANBaudRate(int iModuleId, unsigned char* pucValue);
216  int getDefRSBaudRate(int iModuleId, unsigned char* pucValue);
217 
218  int getKpPWMLimit(int iModuleId, long* piValue);
219  int getCurrentLimit(int iModuleId, float* pfValue);
220  int getMaxPWMOutput(int iModuleId, long* piValue);
221 
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;
224  virtual int getDataMP55_IO(int iModuleId, float* pfData) = 0;
225  virtual int getDataMP55_IO_fast(int iModuleId, float* pfData) = 0;
226  virtual int getCanOpenRawAbsEnc(int iModuleId, short* piValue) = 0;
227 
228 
229  // ---- modify functions ------------------------------------------------ ;
230 
232  void setName(const char* acNameString);
233  void setInitString(const char* acInitString);
234 
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);
240  int setHomeOffset(int iModuleId, float fValue );
241  int setHomeOffsetInc(int iModuleId, long iValue );
242  int setHomeVel(int iModuleId, float fValue);
243  int setHomeVelInc(int iModuleId, long iValue);
244  int setRampVel(int iModuleId, float fValue );
245  int setRampAcc(int iModuleId, float fValue );
246  int setRampVelInc(int iModuleId, long iValue );
247  int setRampAccInc(int iModuleId, long iValue );
248  int setMinPos(int iModuleId, float fValue);
249  int setMinPosInc(int iModuleId, long iValue);
250  int setMaxPos(int iModuleId, float fValue);
251  int setMaxPosInc(int iModuleId, long iValue);
252  int setMaxVel(int iModuleId, float fValue);
253  int setMaxVelInc(int iModuleId, long iValue);
254  int setMaxAcc(int iModuleId, float fValue);
255  int setMaxAccInc(int iModuleId, long iValue);
256  int setMaxCur(int iModuleId, float fValue);
257  int setMaxDeltaPos(int iModuleId, float fValue);
258  int setMaxDeltaPosInc(int iModuleId, long iValue);
259  int setSyncTime(int iModuleId, short iValue);
260  int setLoadLimit(int iModuleId, long iValue);
261  int setMaxLoadGradient(int iModuleId, long iValue);
262  int setLoadDeltaTime(int iModuleId, unsigned short iValue);
263 
264  int setDefGearRatio(int iModuleId, float fValue);
265  int setDefLinRatio(int iModuleId, float fValue);
266  int setDefCurRatio(int iModuleId, float fValue);
267  int setDefHomeAcc(int iModuleId, float fValue);
268  int setModuleSerialNo(int iModuleId, unsigned long uiValue);
269  int setDefIncPerTurn(int iModuleId, unsigned long uiValue);
270  int setDefBrakeTimeOut(int iModuleId, unsigned short uiValue);
271  int setDefAddress(int iModuleId, unsigned char uiValue);
272  int setDefCANBaudRate(int iModuleId, unsigned char uiValue);
273  int setDefRSBaudRate(int iModuleId, unsigned char uiValue);
274  int setDefSetup(int iModuleId, unsigned long uiValue);
275 
276  int setMinLogicVoltage(int iModuleId, float fValue);
277  int setMaxLogicVoltage(int iModuleId, float fValue);
278  int setMinMotorVoltage(int iModuleId, float fValue);
279  int setMaxMotorVoltage(int iModuleId, float fValue);
280  int setNominalMotorCurrent(int iModuleId, float fValue);
281  int setMaximumMotorCurrent(int iModuleId, float fValue);
282  int setLogicUndershootTime(int iModuleId, long iValue);
283  int setLogicOvershootTime(int iModuleId, long iValue);
284  int setMotorUndershootTime(int iModuleId, long iValue);
285  int setMotorOvershootTime(int iModuleId, long iValue);
286  int setNomCurOvershootTime(int iModuleId, long iValue);
287  int setHMaxCurOvershootTime(int iModuleId, long iValue);
288 
289  int setKpPWMLimit(int iModuleId, long iValue);
290  int setCurrentLimit(int iModuleId, float fValue);
291 
292  virtual int setNullSCHUNK_FTC(int iModuleId, short* piState) = 0;
293  virtual int setTaraMP55_IO(int iModuleId, float fTara) = 0;
294  virtual int setInitMP55_IO_fast(int iModuleId) = 0;
295 
296  // ---- I/O functions --------------------------------------------------- ;
297 
298  // ---- exec functions -------------------------------------------------- ;
299 
300  virtual int init() = 0;
301  virtual int init(const char* acInitString) = 0;
302  virtual int exit() = 0;
303 
304  virtual int initDLR_FTS() = 0;
305  int updateModuleIdMap();
306 
307  int homeModule(int iModuleId);
308  int resetModule(int iModuleId);
309  int haltModule(int iModuleId);
310  int recalcPIDParams(int iModuleId);
311  int saveParameters(int iModuleId);
312 
313  int movePos(int iModuleId, float fPos);
314  int movePosInc(int iModuleId, long iPos);
315  int movePosExtended(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);
319  int moveRampExtended(int iModuleId, float fPos, float fVel, float fAcc,
320  unsigned long* puiState, unsigned char* pucDio, float* pfPos);
321  int moveVel(int iModuleId, float fVel);
322  int moveVelInc(int iModuleId, long iVel);
323  int moveVelExtended(int iModuleId, float fCur,
324  unsigned long* puiState, unsigned char* pucDio, float* pfPos);
325  int moveCur(int iModuleId, float fCur);
326  int moveCurInc(int iModuleId, long iCur);
327  int moveCurExtended(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);
331  int moveStepExtended(int iModuleId, float fPos, unsigned short uiTime,
332  unsigned long* puiState, unsigned char* pucDio, float* pfPos);
333 
334  // ---- wait functions -------------------------------------------------- ;
335 
336  int waitForHomeEnd(int iModuleId, unsigned long uiTimeOut = 60000);
337  int waitForMotionEnd(int iModuleId, unsigned long uiTimeOut = 60000);
338  int waitForRampEnd(int iModuleId, unsigned long uiTimeOut = 60000);
339  int waitForRampDec(int iModuleId, unsigned long uiTimeOut = 60000);
340  int waitForRampSteady(int iModuleId, unsigned long uiTimeOut = 60000);
341  int waitForHomeEndAll(unsigned long uiTimeOut = 60000);
342  int waitForMotionEndAll(unsigned long uiTimeOut = 60000);
343  int waitForRampEndAll(unsigned long uiTimeOut = 60000);
344  virtual int waitForStartMotionAll();
345 
346  // ---- broadcast functions -------------------------------------------------- ;
347 
348  int homeAll(void);
349  int resetAll(void);
350  int haltAll(void);
351  int serveWatchdogAll(void);
352  int setBaudRateAll(unsigned char ucBaudRateId);
353  int startMotionAll(void);
354  int savePosAll(void);
355 
356  // ---- Special functions -------------------------------------------------- ;
357 
358  int xmit8Bytes(int iModuleId, void* pBytes );
359  int xack8Bytes(int iModuleId, void* pBytes );
360  int doInternal(int iModuleId, void* pBytes );
361  int getStateInternal(int iModuleId, unsigned long* pBytes );
362 
363 };
364 
365 CDevice* newDevice(const char* acInitString);
366 
367 #endif
int getMinMotorVoltage(int iModuleId, float *pfValue)
Definition: Device.cpp:1904
int getMaxLogicVoltage(int iModuleId, float *pfValue)
Definition: Device.cpp:1872
int homeModule(int iModuleId)
Definition: Device.cpp:3811
int serveWatchdogAll(void)
Definition: Device.cpp:4650
int getDefDamp(int iModuleId, short *piValue)
Definition: Device.cpp:565
int getHomeVel(int iModuleId, float *pfValue)
Definition: Device.cpp:1392
virtual int getDataDLR_FTS(std::vector< float > &rafData, long *piState)=0
virtual int writeFloatReadFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float fData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
int setMaxDeltaPos(int iModuleId, float fValue)
Definition: Device.cpp:2576
int getDioData(int iModuleId, unsigned long *puiValue)
Definition: Device.cpp:825
int getMinPos(int iModuleId, float *pfValue)
Definition: Device.cpp:965
int setDefBrakeTimeOut(int iModuleId, unsigned short uiValue)
Definition: Device.cpp:3160
CDevice(void)
default constructor
Definition: Device.cpp:72
char m_acName[128]
Definition: Device.h:41
int getDefBrakeTimeOut(int iModuleId, unsigned short *puiValue)
Definition: Device.cpp:464
int waitForMotionEndAll(unsigned long uiTimeOut=60000)
Definition: Device.cpp:4505
int getDamp(int iModuleId, short *piValue)
Definition: Device.cpp:885
const char * getRevision()
gets the revision string of the class
Definition: Device.cpp:116
int getDefBurnCount(int iModuleId, unsigned char *pucValue)
Definition: Device.cpp:364
int setDefIncPerTurn(int iModuleId, unsigned long uiValue)
Definition: Device.cpp:3128
int xack8Bytes(int iModuleId, void *pBytes)
Definition: Device.cpp:4721
int getSavePos(int iModuleId, float *pfValue)
Definition: Device.cpp:1106
int getDefMaxCur(int iModuleId, float *pfValue)
Definition: Device.cpp:705
int updateModuleIdMap()
Definition: Device.cpp:3779
int getLogicSupply(int iModuleId, float *pfValue)
Definition: Device.cpp:1808
int getIPolVel(int iModuleId, float *pValue)
Definition: Device.cpp:1138
int setRampAcc(int iModuleId, float fValue)
Definition: Device.cpp:2800
int setMaxMotorVoltage(int iModuleId, float fValue)
Definition: Device.cpp:3416
int setMinPos(int iModuleId, float fValue)
Definition: Device.cpp:2476
int setModuleSerialNo(int iModuleId, unsigned long uiValue)
Definition: Device.cpp:3096
int setDefCANBaudRate(int iModuleId, unsigned char uiValue)
Definition: Device.cpp:3224
virtual int writeLong(int iModuleId, int iCommandId, int iParameterId, long iData)=0
int getHMaxCurOvershootTime(int iModuleId, long *piValue)
Definition: Device.cpp:2192
int getTemperature(int iModuleId, float *pfValue)
Definition: Device.cpp:1776
int xmit8Bytes(int iModuleId, void *pBytes)
Definition: Device.cpp:4708
int setConfig(int iModuleId, unsigned long puiValue)
Definition: Device.cpp:2336
int waitForHomeEnd(int iModuleId, unsigned long uiTimeOut=60000)
Definition: Device.cpp:4242
bool getInitFlag()
gets the init flag
Definition: Device.cpp:111
int setHMaxCurOvershootTime(int iModuleId, long iValue)
Definition: Device.cpp:3672
int setA0(int iModuleId, short iValue)
Definition: Device.cpp:2416
int haltModule(int iModuleId)
Definition: Device.cpp:3831
int setMinLogicVoltage(int iModuleId, float fValue)
Definition: Device.cpp:3320
int getMaxVelInc(int iModuleId, long *piValue)
Definition: Device.cpp:1278
virtual int reinit(unsigned char ucBaudRateId)=0
virtual int writeShortReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, short iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
int setDefGearRatio(int iModuleId, float fValue)
Definition: Device.cpp:2968
char m_acRevision[20]
Definition: Device.h:43
int getCur(int iModuleId, float *pfCur)
Definition: Device.cpp:945
int setNominalMotorCurrent(int iModuleId, float fValue)
Definition: Device.cpp:3448
int m_iModuleCountMax
Definition: Device.h:46
int waitForMotionEnd(int iModuleId, unsigned long uiTimeOut=60000)
Definition: Device.cpp:4286
int getRawMotorCurrent(int iModuleId, short *piValue)
Definition: Device.cpp:1488
virtual int readFloat(int iModuleId, int iCommandId, int iParameterId, float *pfData)=0
int getDefDioData(int iModuleId, unsigned long *puiValue)
Definition: Device.cpp:504
int setDamp(int iModuleId, short iValue)
Definition: Device.cpp:2456
int getDeltaPos(int iModuleId, float *pfValue)
Definition: Device.cpp:1066
int getMaxPos(int iModuleId, float *pfValue)
Definition: Device.cpp:985
int waitForRampEnd(int iModuleId, unsigned long uiTimeOut=60000)
Definition: Device.cpp:4330
int getDeltaPosInc(int iModuleId, long *piValue)
Definition: Device.cpp:1318
std::vector< int > m_aiModuleId
Definition: Device.h:47
int getLoadDeltaTime(int iModuleId, unsigned short *piValue)
Definition: Device.cpp:1680
int getMotorOvershootTime(int iModuleId, long *piValue)
Definition: Device.cpp:2128
int getMinPosInc(int iModuleId, long *piValue)
Definition: Device.cpp:1238
int getLogicUndershootTime(int iModuleId, long *piValue)
Definition: Device.cpp:2032
int setMinMotorVoltage(int iModuleId, float fValue)
Definition: Device.cpp:3384
int setDefSetup(int iModuleId, unsigned long uiValue)
Definition: Device.cpp:3288
int getMotorSupply(int iModuleId, float *pfValue)
Definition: Device.cpp:1744
virtual int getDataSCHUNK_FTC(int iModuleId, int iChannelTypeId, std::vector< float > &rafData, short *piState)=0
int setMotorOvershootTime(int iModuleId, long iValue)
Definition: Device.cpp:3608
virtual int writeFloat(int iModuleId, int iCommandId, int iParameterId, float fData)=0
virtual int readFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
int getIncRatio(int iModuleId, float *pValue)
Definition: Device.cpp:805
virtual int readLong(int iModuleId, int iCommandId, int iParameterId, long *piData)=0
int moveVelInc(int iModuleId, long iVel)
Definition: Device.cpp:4055
int setC0(int iModuleId, short iValue)
Definition: Device.cpp:2436
virtual int readChar(int iModuleId, int iCommandId, int iParameterId, char *pcData)=0
int getDefMinPos(int iModuleId, float *pfValue)
Definition: Device.cpp:625
int moveVelExtended(int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
Definition: Device.cpp:4165
int getDefHomeOffset(int iModuleId, float *pfValue)
Definition: Device.cpp:585
int getMaxPWMOutput(int iModuleId, long *piValue)
Definition: Device.cpp:2288
int getDefSetup(int iModuleId, unsigned long *puiValue)
Definition: Device.cpp:272
int setHomeVel(int iModuleId, float fValue)
Definition: Device.cpp:2696
int getDefIncPerTurn(int iModuleId, unsigned long *puiValue)
Definition: Device.cpp:484
int setMaxDeltaPosInc(int iModuleId, long iValue)
Definition: Device.cpp:2676
int waitForRampEndAll(unsigned long uiTimeOut=60000)
Definition: Device.cpp:4548
CDevice & operator=(const CDevice &rclDevice)
Definition: Device.cpp:99
int getMotorCurrent(int iModuleId, float *pfValue)
Definition: Device.cpp:1712
int getDefLinearRatio(int iModuleId, float *pfValue)
Definition: Device.cpp:404
int getDefC0(int iModuleId, short *piValue)
Definition: Device.cpp:545
int moveVel(int iModuleId, float fVel)
Definition: Device.cpp:3953
int getDefGearRatio(int iModuleId, float *pfValue)
Definition: Device.cpp:384
int getVel(int iModuleId, float *pfVel)
Definition: Device.cpp:925
void setInitString(const char *acInitString)
Definition: Device.cpp:2331
int setDefHomeAcc(int iModuleId, float fValue)
Definition: Device.cpp:3064
int getMaxVel(int iModuleId, float *pfValue)
Definition: Device.cpp:1006
virtual int getDataMP55_IO_fast(int iModuleId, float *pfData)=0
int getStateDioPos(int iModuleId, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
Definition: Device.cpp:1358
int setMaxPosInc(int iModuleId, long iValue)
Definition: Device.cpp:2616
int getC0(int iModuleId, short *piValue)
Definition: Device.cpp:865
int getRawTemperature(int iModuleId, short *piValue)
Definition: Device.cpp:1552
int setLogicOvershootTime(int iModuleId, long iValue)
Definition: Device.cpp:3544
int saveParameters(int iModuleId)
Definition: Device.cpp:3891
virtual int writeAll(int iCommandId, int iParameterId)=0
int setDefAddress(int iModuleId, unsigned char uiValue)
Definition: Device.cpp:3192
int haltAll(void)
Definition: Device.cpp:4637
int getMaxMotorVoltage(int iModuleId, float *pfValue)
Definition: Device.cpp:1936
void charStateToLongState(unsigned char uiShort, unsigned long *puiState)
Definition: Device.cpp:45
std::vector< unsigned short > m_auiModuleVersion
Definition: Device.h:48
int setBaudRateAll(unsigned char ucBaudRateId)
Definition: Device.cpp:4663
int setDioData(int iModuleId, unsigned long uiValue)
Definition: Device.cpp:2396
int getSyncTime(int iModuleId, short *piValue)
Definition: Device.cpp:1456
int getModuleSerialNo(int iModuleId, unsigned long *puiValue)
Definition: Device.cpp:231
int getDefMaxDeltaPos(int iModuleId, float *pfValue)
Definition: Device.cpp:725
int getVelInc(int iModuleId, long *piValue)
Definition: Device.cpp:1198
virtual int writeLongReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long iData, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
int movePosExtended(int iModuleId, float fPos, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
Definition: Device.cpp:4115
int getHomeOffsetInc(int iModuleId, long *piValue)
Definition: Device.cpp:785
int getNomCurOvershootTime(int iModuleId, long *piValue)
Definition: Device.cpp:2160
int getMotorUndershootTime(int iModuleId, long *piValue)
Definition: Device.cpp:2096
int moveCurExtended(int iModuleId, float fCur, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
Definition: Device.cpp:4189
int setCurrentLimit(int iModuleId, float fValue)
Definition: Device.cpp:3736
virtual int getDataMP55_IO(int iModuleId, float *pfData)=0
int getDefMaxVel(int iModuleId, float *pfValue)
Definition: Device.cpp:665
virtual ~CDevice()
destructor
Definition: Device.cpp:89
int getDefA0(int iModuleId, short *piValue)
Definition: Device.cpp:525
int setSyncTime(int iModuleId, short iValue)
Definition: Device.cpp:2840
int setRampVelInc(int iModuleId, long iValue)
Definition: Device.cpp:2780
int getLoadLimit(int iModuleId, long *piValue)
Definition: Device.cpp:1616
int getKpPWMLimit(int iModuleId, long *piValue)
Definition: Device.cpp:2224
int setNomCurOvershootTime(int iModuleId, long iValue)
Definition: Device.cpp:3640
int getRawLogicSupply(int iModuleId, short *piValue)
Definition: Device.cpp:1584
int getDefCurOffset(int iModuleId, float *pfValue)
Definition: Device.cpp:424
int moveCurInc(int iModuleId, long iCur)
Definition: Device.cpp:4075
int getMaxAccInc(int iModuleId, long *piValue)
Definition: Device.cpp:1298
int setLoadDeltaTime(int iModuleId, unsigned short iValue)
Definition: Device.cpp:2936
virtual int writeCommand(int iModuleId, int iCommandId)=0
int setMaxAccInc(int iModuleId, long iValue)
Definition: Device.cpp:2656
bool m_bInitFlag
Definition: Device.h:40
int getDefBaudRate(int iModuleId, unsigned char *pucValue)
Definition: Device.cpp:304
int setMaxVelInc(int iModuleId, long iValue)
Definition: Device.cpp:2636
int moveRampInc(int iModuleId, long iPos, long iVel, long iAcc)
Definition: Device.cpp:4033
int getDefHomeVel(int iModuleId, float *pfValue)
Definition: Device.cpp:605
int recalcPIDParams(int iModuleId)
Definition: Device.cpp:3871
int setDefLinRatio(int iModuleId, float fValue)
Definition: Device.cpp:3000
int getPos(int iModuleId, float *pfPos)
Definition: Device.cpp:905
int getMaxPosInc(int iModuleId, long *piValue)
Definition: Device.cpp:1258
int setRampAccInc(int iModuleId, long iValue)
Definition: Device.cpp:2820
int setKpPWMLimit(int iModuleId, long iValue)
Definition: Device.cpp:3704
int getMaximumMotorCurrent(int iModuleId, float *pfValue)
Definition: Device.cpp:2000
int homeAll(void)
Definition: Device.cpp:4611
virtual int writeUnsignedChar(int iModuleId, int iCommandId, int iParameterId, unsigned char ucData)=0
int getModuleVersion(int iModuleId, unsigned short *puiValue)
Definition: Device.cpp:211
virtual int writeFloatShort(int iModuleId, int iCommandId, int iParameterId, float fData, short iTime)=0
int getMaxDeltaPosInc(int iModuleId, long *piValue)
Definition: Device.cpp:1338
virtual int setInitMP55_IO_fast(int iModuleId)=0
CStopWatch m_clTimer
Definition: Device.h:49
int getMaxAcc(int iModuleId, float *pfValue)
Definition: Device.cpp:1026
int moveStepExtended(int iModuleId, float fPos, unsigned short uiTime, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
Definition: Device.cpp:4213
Definition: Device.h:28
int getPosCountInc(int iModuleId, long *piValue)
Definition: Device.cpp:1158
virtual int writeFloatShortReadFloatUnsignedChars(int iModuleId, int iCommandId, int iParameterId, float fData, short iData, float *pfData, unsigned char *pucData1, unsigned char *pucData2)=0
int getStateInternal(int iModuleId, unsigned long *pBytes)
Definition: Device.cpp:4750
int resetAll(void)
Definition: Device.cpp:4624
int setHomeVelInc(int iModuleId, long iValue)
Definition: Device.cpp:2728
int waitForRampSteady(int iModuleId, unsigned long uiTimeOut=60000)
Definition: Device.cpp:4418
int waitForHomeEndAll(unsigned long uiTimeOut=60000)
Definition: Device.cpp:4462
const char * getInitString()
gets the init string of the device
Definition: Device.cpp:126
int getCurrentLimit(int iModuleId, float *pfValue)
Definition: Device.cpp:2256
int m_iModuleCount
Definition: Device.h:45
int setHomeOffset(int iModuleId, float fValue)
Definition: Device.cpp:2356
virtual int setNullSCHUNK_FTC(int iModuleId, short *piState)=0
int movePosInc(int iModuleId, long iPos)
Definition: Device.cpp:4013
int getDefCurRatio(int iModuleId, float *pfValue)
Definition: Device.cpp:444
int moveCur(int iModuleId, float fCur)
Definition: Device.cpp:3973
int setMaxAcc(int iModuleId, float fValue)
Definition: Device.cpp:2536
virtual int waitForStartMotionAll()
Definition: Device.cpp:4591
virtual int initDLR_FTS()=0
int getLogicOvershootTime(int iModuleId, long *piValue)
Definition: Device.cpp:2064
int getBaudRate(void)
gets the baud rate of the device
Definition: Device.cpp:131
int getPosInc(int iModuleId, long *piValue)
Definition: Device.cpp:1178
virtual int readLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
virtual int write8Bytes(int iModuleId, bool ack, void *pBytes)=0
int getDefRSBaudRate(int iModuleId, unsigned char *pucValue)
Definition: Device.cpp:344
virtual int exit()=0
virtual int writeUnsignedShort(int iModuleId, int iCommandId, int iParameterId, unsigned short uiData)=0
int getDefCANBaudRate(int iModuleId, unsigned char *pucValue)
Definition: Device.cpp:324
int waitForRampDec(int iModuleId, unsigned long uiTimeOut=60000)
Definition: Device.cpp:4374
virtual int readShort(int iModuleId, int iCommandId, int iParameterId, short *piData)=0
virtual int readUnsignedShort(int iModuleId, int iCommandId, int iParameterId, unsigned short *puiData)=0
virtual int writeLongShort(int iModuleId, int iCommandId, int iParameterId, long iData, short iTime)=0
CDevice * newDevice(const char *acInitString)
Definition: Device.cpp:4768
int setRampVel(int iModuleId, float fValue)
Definition: Device.cpp:2760
int setHomeOffsetInc(int iModuleId, long iValue)
Definition: Device.cpp:2376
int getRawMotorSupply(int iModuleId, short *piValue)
Definition: Device.cpp:1520
virtual int writeChar(int iModuleId, int iCommandId, int iParameterId, char cData)=0
int getMaxDeltaPos(int iModuleId, float *pfValue)
Definition: Device.cpp:1086
int setMotorUndershootTime(int iModuleId, long iValue)
Definition: Device.cpp:3576
int moveStep(int iModuleId, float fPos, unsigned short uiTime)
Definition: Device.cpp:3993
int getMinLogicVoltage(int iModuleId, float *pfValue)
Definition: Device.cpp:1840
virtual int writeShort(int iModuleId, int iCommandId, int iParameterId, short iData)=0
int getModuleIdMap(std::vector< int > &raiModuleId)
gets the module ID map of the open device
Definition: Device.cpp:148
int moveRampExtended(int iModuleId, float fPos, float fVel, float fAcc, unsigned long *puiState, unsigned char *pucDio, float *pfPos)
Definition: Device.cpp:4139
int getModuleType(int iModuleId, unsigned char *pucValue)
Definition: Device.cpp:184
int getCurInc(int iModuleId, short *piValue)
Definition: Device.cpp:1218
int startMotionAll(void)
Definition: Device.cpp:4677
int m_iErrorState
Definition: Device.h:50
int setMaxVel(int iModuleId, float fValue)
Definition: Device.cpp:2516
virtual int readUnsignedLong(int iModuleId, int iCommandId, int iParameterId, unsigned long *puiData)=0
int getMaxCur(int iModuleId, float *pfValue)
Definition: Device.cpp:1046
int getA0(int iModuleId, short *piValue)
Definition: Device.cpp:845
int setMaxCur(int iModuleId, float fValue)
Definition: Device.cpp:2556
int getConfig(int iModuleId, unsigned long *puiValue)
Definition: Device.cpp:745
virtual int writeLongShortReadLongUnsignedChars(int iModuleId, int iCommandId, int iParameterId, long iData1, short iData2, long *piData, unsigned char *pucData1, unsigned char *pucData2)=0
virtual int writeUnsignedLong(int iModuleId, int iCommandId, int iParameterId, unsigned long uiData)=0
int setMaxLogicVoltage(int iModuleId, float fValue)
Definition: Device.cpp:3352
int getModuleState(int iModuleId, unsigned long *puiState)
Definition: Device.cpp:164
virtual int getCanOpenRawAbsEnc(int iModuleId, short *piValue)=0
int moveStepInc(int iModuleId, long iPos, unsigned short uiTime)
Definition: Device.cpp:4095
int setLogicUndershootTime(int iModuleId, long iValue)
Definition: Device.cpp:3512
int getMaxLoadGradient(int iModuleId, long *piValue)
Definition: Device.cpp:1648
int setMinPosInc(int iModuleId, long iValue)
Definition: Device.cpp:2596
virtual int setTaraMP55_IO(int iModuleId, float fTara)=0
int doInternal(int iModuleId, void *pBytes)
Definition: Device.cpp:4734
virtual int readUnsignedChar(int iModuleId, int iCommandId, int iParameterId, unsigned char *pucData)=0
int setMaxPos(int iModuleId, float fValue)
Definition: Device.cpp:2496
virtual int getUnsignedLong(int iModuleId, unsigned long *puiData)=0
void setName(const char *acNameString)
sets the baud rate of the device
Definition: Device.cpp:2326
int moveRamp(int iModuleId, float fPos, float fVel, float fAcc)
Definition: Device.cpp:3931
int setDefRSBaudRate(int iModuleId, unsigned char uiValue)
Definition: Device.cpp:3256
virtual int init()=0
char m_acInitString[128]
Definition: Device.h:42
int getDefMaxAcc(int iModuleId, float *pfValue)
Definition: Device.cpp:685
int setDefCurRatio(int iModuleId, float fValue)
Definition: Device.cpp:3032
int getHomeOffset(int iModuleId, float *pValue)
Definition: Device.cpp:765
int setLoadLimit(int iModuleId, long iValue)
Definition: Device.cpp:2872
int getModuleCount(void)
gets the number of modules of the device
Definition: Device.cpp:136
int getDefMaxPos(int iModuleId, float *pfValue)
Definition: Device.cpp:645
int resetModule(int iModuleId)
Definition: Device.cpp:3851
int setMaximumMotorCurrent(int iModuleId, float fValue)
Definition: Device.cpp:3480
int savePosAll(void)
Definition: Device.cpp:4690
int getNominalMotorCurrent(int iModuleId, float *pfValue)
Definition: Device.cpp:1968
int m_iBaudRate
Definition: Device.h:44
int movePos(int iModuleId, float fPos)
Definition: Device.cpp:3911
int getHomeVelInc(int iModuleId, long *piValue)
Definition: Device.cpp:1424
int setMaxLoadGradient(int iModuleId, long iValue)
Definition: Device.cpp:2904
int getDefConfig(int iModuleId, unsigned long *puiValue)
Definition: Device.cpp:252
const char * getName()
gets the name string of the open device
Definition: Device.cpp:121


schunk_libm5api
Author(s): Florian Weisshardt
autogenerated on Mon Nov 25 2019 03:48:19