libximc  2.3.2
ximc.h
Go to the documentation of this file.
1 #ifndef INC_XIMC_H
2 #define INC_XIMC_H
3 
19 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
20  #define XIMC_API __stdcall
21 #else
22  #ifdef LIBXIMC_EXPORTS
23  #define XIMC_API __attribute__((visibility("default")))
24  #else
25  #define XIMC_API
26  #endif
27 #endif
28 
33 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
34  #define XIMC_CALLCONV __stdcall
35 #else
36  #define XIMC_CALLCONV
37 #endif
38 
39 #if !defined(XIMC_NO_STDINT)
40 
41 #if defined(_MSC_VER) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
42 // msvc types burden
43 typedef __int8 int8_t;
44 typedef __int16 int16_t;
45 typedef __int32 int32_t;
46 typedef __int64 int64_t;
47 typedef unsigned __int8 uint8_t;
48 typedef unsigned __int16 uint16_t;
49 typedef unsigned __int32 uint32_t;
50 typedef unsigned __int64 uint64_t;
51 #else
52 #include <stdint.h>
53 #endif
54 
55 /* labview doesn't speak C99 */
56 #if defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
57 typedef unsigned __int64 ulong_t;
58 typedef __int64 long_t;
59 #else
60 typedef unsigned long long ulong_t;
61 typedef long long long_t;
62 #endif
63 
64 #endif
65 
66 #if defined(__cplusplus)
67 extern "C"
68 {
69 #endif
70 
71 
80  typedef int device_t;
81 
90  typedef int result_t;
91 
100  #if defined(_WIN64) || defined(__LP64__) || defined(LABVIEW64_IMPORT)
101  typedef uint64_t device_enumeration_t;
102  #else
103  typedef uint32_t device_enumeration_t;
104  #endif
105  //typedef device_enumeration_t* pdevice_enumeration_t;
106 
115 #define device_undefined -1
116 
125 
134 #define result_ok 0
135 
144 #define result_error -1
145 
154 #define result_not_implemented -2
155 
164 #define result_value_error -3
165 
174 #define result_nodevice -4
175 
177 
186 
195 #define LOGLEVEL_ERROR 0x01
196 
204 #define LOGLEVEL_WARNING 0x02
205 
213 #define LOGLEVEL_INFO 0x03
214 
222 #define LOGLEVEL_DEBUG 0x04
223 
224 
225 
233  typedef struct calibration_t
234  {
235  double A;
236  unsigned int MicrostepMode;
237  } calibration_t;
238 
239 
240 
241 
242 
244 #define LIBXIMC_VERSION 2.3.2
245 
248 /*
249  ------------------------------------------
250  BEGIN OF GENERATED struct declarations
251  ------------------------------------------
252 */
253 
263 #define ENUMERATE_PROBE 0x01
264 #define ENUMERATE_ALL_COM 0x02
266 
267 
283 #define MOVE_STATE_MOVING 0x01
284 #define MOVE_STATE_TARGET_SPEED 0x02
285 #define MOVE_STATE_ANTIPLAY 0x04
287 
288 
302 #define EEPROM_PRECEDENCE 0x01
304 
305 
321 #define PWR_STATE_UNKNOWN 0x00
322 #define PWR_STATE_OFF 0x01
323 #define PWR_STATE_NORM 0x03
324 #define PWR_STATE_REDUCT 0x04
325 #define PWR_STATE_MAX 0x05
327 
328 
346 #define STATE_CONTR 0x0003F
347 #define STATE_ERRC 0x00001
348 #define STATE_ERRD 0x00002
349 #define STATE_ERRV 0x00004
350 #define STATE_EEPROM_CONNECTED 0x00010
351 #define STATE_SECUR 0x3FFC0
352 #define STATE_ALARM 0x00040
353 #define STATE_CTP_ERROR 0x00080
354 #define STATE_POWER_OVERHEAT 0x00100
355 #define STATE_CONTROLLER_OVERHEAT 0x00200
356 #define STATE_OVERLOAD_POWER_VOLTAGE 0x00400
357 #define STATE_OVERLOAD_POWER_CURRENT 0x00800
358 #define STATE_OVERLOAD_USB_VOLTAGE 0x01000
359 #define STATE_LOW_USB_VOLTAGE 0x02000
360 #define STATE_OVERLOAD_USB_CURRENT 0x04000
361 #define STATE_BORDERS_SWAP_MISSET 0x08000
362 #define STATE_LOW_POWER_VOLTAGE 0x10000
363 #define STATE_H_BRIDGE_FAULT 0x20000
365 
366 
384 #define STATE_DIG_SIGNAL 0xFFFF
385 #define STATE_RIGHT_EDGE 0x0001
386 #define STATE_LEFT_EDGE 0x0002
387 #define STATE_BUTTON_RIGHT 0x0004
388 #define STATE_BUTTON_LEFT 0x0008
389 #define STATE_GPIO_PINOUT 0x0010
390 #define STATE_GPIO_LEVEL 0x0020
391 #define STATE_HALL_A 0x0040
392 #define STATE_HALL_B 0x0080
393 #define STATE_HALL_C 0x0100
394 #define STATE_BRAKE 0x0200
395 #define STATE_REV_SENSOR 0x0400
396 #define STATE_SYNC_INPUT 0x0800
397 #define STATE_SYNC_OUTPUT 0x1000
398 #define STATE_ENC_A 0x2000
399 #define STATE_ENC_B 0x4000
401 
402 
418 #define ENC_STATE_ABSENT 0x00
419 #define ENC_STATE_UNKNOWN 0x01
420 #define ENC_STATE_MALFUNC 0x02
421 #define ENC_STATE_REVERS 0x03
422 #define ENC_STATE_OK 0x04
424 
425 
441 #define WIND_A_STATE_ABSENT 0x00
442 #define WIND_A_STATE_UNKNOWN 0x01
443 #define WIND_A_STATE_MALFUNC 0x02
444 #define WIND_A_STATE_OK 0x03
445 #define WIND_B_STATE_ABSENT 0x00
446 #define WIND_B_STATE_UNKNOWN 0x10
447 #define WIND_B_STATE_MALFUNC 0x20
448 #define WIND_B_STATE_OK 0x30
450 
451 
469 #define MVCMD_NAME_BITS 0x3F
470 #define MVCMD_UKNWN 0x00
471 #define MVCMD_MOVE 0x01
472 #define MVCMD_MOVR 0x02
473 #define MVCMD_LEFT 0x03
474 #define MVCMD_RIGHT 0x04
475 #define MVCMD_STOP 0x05
476 #define MVCMD_HOME 0x06
477 #define MVCMD_LOFT 0x07
478 #define MVCMD_SSTP 0x08
479 #define MVCMD_ERROR 0x40
480 #define MVCMD_RUNNING 0x80
482 
483 
502 #define ENGINE_REVERSE 0x01
503 #define ENGINE_MAX_SPEED 0x04
504 #define ENGINE_ANTIPLAY 0x08
505 #define ENGINE_ACCEL_ON 0x10
506 #define ENGINE_LIMIT_VOLT 0x20
507 #define ENGINE_LIMIT_CURR 0x40
508 #define ENGINE_LIMIT_RPM 0x80
510 
511 
530 #define MICROSTEP_MODE_FULL 0x01
531 #define MICROSTEP_MODE_FRAC_2 0x02
532 #define MICROSTEP_MODE_FRAC_4 0x03
533 #define MICROSTEP_MODE_FRAC_8 0x04
534 #define MICROSTEP_MODE_FRAC_16 0x05
535 #define MICROSTEP_MODE_FRAC_32 0x06
536 #define MICROSTEP_MODE_FRAC_64 0x07
537 #define MICROSTEP_MODE_FRAC_128 0x08
538 #define MICROSTEP_MODE_FRAC_256 0x09
540 
541 
560 #define ENGINE_TYPE_NONE 0x00
561 #define ENGINE_TYPE_DC 0x01
562 #define ENGINE_TYPE_2DC 0x02
563 #define ENGINE_TYPE_STEP 0x03
564 #define ENGINE_TYPE_TEST 0x04
565 #define ENGINE_TYPE_BRUSHLESS 0x05
567 
568 
587 #define DRIVER_TYPE_DISCRETE_FET 0x01
588 #define DRIVER_TYPE_INTEGRATE 0x02
589 #define DRIVER_TYPE_EXTERNAL 0x03
591 
592 
609 #define POWER_REDUCT_ENABLED 0x01
610 #define POWER_OFF_ENABLED 0x02
611 #define POWER_SMOOTH_CURRENT 0x04
613 
614 
631 #define ALARM_ON_DRIVER_OVERHEATING 0x01
632 #define LOW_UPWR_PROTECTION 0x02
633 #define H_BRIDGE_ALERT 0x04
634 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
635 #define ALARM_FLAGS_STICKING 0x10
636 #define USB_BREAK_RECONNECT 0x20
638 
639 
655 #define SETPOS_IGNORE_POSITION 0x01
656 #define SETPOS_IGNORE_ENCODER 0x02
658 
659 
673 #define FEEDBACK_ENCODER 0x01
674 #define FEEDBACK_ENCODERHALL 0x03
675 #define FEEDBACK_EMF 0x04
676 #define FEEDBACK_NONE 0x05
678 
679 
693 #define FEEDBACK_ENC_REVERSE 0x01
694 #define FEEDBACK_HALL_REVERSE 0x02
696 
697 
712 #define SYNCIN_ENABLED 0x01
713 #define SYNCIN_INVERT 0x02
714 #define SYNCIN_GOTOPOSITION 0x04
716 
717 
732 #define SYNCOUT_ENABLED 0x01
733 #define SYNCOUT_STATE 0x02
734 #define SYNCOUT_INVERT 0x04
735 #define SYNCOUT_IN_STEPS 0x08
736 #define SYNCOUT_ONSTART 0x10
737 #define SYNCOUT_ONSTOP 0x20
738 #define SYNCOUT_ONPERIOD 0x40
740 
741 
756 #define EXTIO_SETUP_OUTPUT 0x01
757 #define EXTIO_SETUP_INVERT 0x02
759 
760 
775 #define EXTIO_SETUP_MODE_IN_NOP 0x00
776 #define EXTIO_SETUP_MODE_IN_STOP 0x01
777 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
778 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
779 #define EXTIO_SETUP_MODE_IN_HOME 0x04
780 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
781 #define EXTIO_SETUP_MODE_OUT_ON 0x10
782 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
783 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
784 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
785 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
787 
788 
806 #define BORDER_IS_ENCODER 0x01
807 #define BORDER_STOP_LEFT 0x02
808 #define BORDER_STOP_RIGHT 0x04
809 #define BORDERS_SWAP_MISSET_DETECTION 0x08
811 
812 
830 #define ENDER_SWAP 0x01
831 #define ENDER_SW1_ACTIVE_LOW 0x02
832 #define ENDER_SW2_ACTIVE_LOW 0x04
834 
835 
853 #define BRAKE_ENABLED 0x01
854 #define BRAKE_ENG_PWROFF 0x02
856 
857 
875 #define CONTROL_MODE_BITS 0x03
876 #define CONTROL_MODE_OFF 0x00
877 #define CONTROL_MODE_JOY 0x01
878 #define CONTROL_MODE_LR 0x02
879 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
880 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
882 
883 
899 #define JOY_REVERSE 0x01
901 
902 
920 #define CTP_ENABLED 0x01
921 #define CTP_BASE 0x02
922 #define CTP_ALARM_ON_ERROR 0x04
923 #define REV_SENS_INV 0x08
925 
926 
945 #define HOME_DIR_FIRST 0x01
946 #define HOME_DIR_SECOND 0x02
947 #define HOME_MV_SEC_EN 0x04
948 #define HOME_HALF_MV 0x08
949 #define HOME_STOP_FIRST_BITS 0x30
950 #define HOME_STOP_FIRST_REV 0x10
951 #define HOME_STOP_FIRST_SYN 0x20
952 #define HOME_STOP_FIRST_LIM 0x30
953 #define HOME_STOP_SECOND_BITS 0xC0
954 #define HOME_STOP_SECOND_REV 0x40
955 #define HOME_STOP_SECOND_SYN 0x80
956 #define HOME_STOP_SECOND_LIM 0xC0
958 
959 
971 #define UART_PARITY_BITS 0x03
972 #define UART_PARITY_BIT_EVEN 0x00
973 #define UART_PARITY_BIT_ODD 0x01
974 #define UART_PARITY_BIT_SPACE 0x02
975 #define UART_PARITY_BIT_MARK 0x03
976 #define UART_PARITY_BIT_USE 0x04
977 #define UART_STOP_BIT 0x08
979 
980 
992 #define MOTOR_TYPE_UNKNOWN 0x00
993 #define MOTOR_TYPE_STEP 0x01
994 #define MOTOR_TYPE_DC 0x02
995 #define MOTOR_TYPE_BLDC 0x03
997 
998 
1010 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1011 #define ENCSET_PUSHPULL_OUTPUT 0x004
1012 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
1013 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1014 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1016 
1017 
1029 #define MB_AVAILABLE 0x01
1030 #define MB_POWERED_HOLD 0x02
1032 
1033 
1045 #define TS_TYPE_BITS 0x07
1046 #define TS_TYPE_UNKNOWN 0x00
1047 #define TS_TYPE_THERMOCOUPLE 0x01
1048 #define TS_TYPE_SEMICONDUCTOR 0x02
1049 #define TS_AVAILABLE 0x08
1051 
1052 
1064 #define LS_ON_SW1_AVAILABLE 0x01
1065 #define LS_ON_SW2_AVAILABLE 0x02
1066 #define LS_SW1_ACTIVE_LOW 0x04
1067 #define LS_SW2_ACTIVE_LOW 0x08
1068 #define LS_SHORTED 0x10
1070 
1071 
1083  typedef struct
1084  {
1085  unsigned int IPS;
1086  unsigned int FeedbackType;
1087  unsigned int FeedbackFlags;
1088  unsigned int HallSPR;
1091 
1107  typedef struct
1108  {
1109  unsigned int FastHome;
1110  unsigned int uFastHome;
1111  unsigned int SlowHome;
1112  unsigned int uSlowHome;
1115  unsigned int HomeFlags;
1116  } home_settings_t;
1117 
1118  typedef struct
1119  {
1120  float FastHome;
1121  float SlowHome;
1122  float HomeDelta;
1123  unsigned int HomeFlags;
1125 
1137  typedef struct
1138  {
1139  unsigned int Speed;
1140  unsigned int uSpeed;
1141  unsigned int Accel;
1142  unsigned int Decel;
1143  unsigned int AntiplaySpeed;
1144  unsigned int uAntiplaySpeed;
1145  } move_settings_t;
1146 
1147  typedef struct
1148  {
1149  float Speed;
1150  float Accel;
1151  float Decel;
1154 
1175  typedef struct
1176  {
1177  unsigned int NomVoltage;
1178  unsigned int NomCurrent;
1179  unsigned int NomSpeed;
1180  unsigned int uNomSpeed;
1181  unsigned int EngineFlags;
1182  int Antiplay;
1183  unsigned int MicrostepMode;
1184  unsigned int StepsPerRev;
1186 
1187  typedef struct
1188  {
1189  unsigned int NomVoltage;
1190  unsigned int NomCurrent;
1191  float NomSpeed;
1192  unsigned int EngineFlags;
1193  float Antiplay;
1194  unsigned int MicrostepMode;
1195  unsigned int StepsPerRev;
1197 
1214  typedef struct
1215  {
1216  unsigned int EngineType;
1217  unsigned int DriverType;
1219 
1231  typedef struct
1232  {
1233  unsigned int HoldCurrent;
1234  unsigned int CurrReductDelay;
1235  unsigned int PowerOffDelay;
1236  unsigned int CurrentSetTime;
1237  unsigned int PowerFlags;
1238  } power_settings_t;
1239 
1253  typedef struct
1254  {
1255  unsigned int LowUpwrOff;
1256  unsigned int CriticalIpwr;
1257  unsigned int CriticalUpwr;
1258  unsigned int CriticalT;
1259  unsigned int CriticalIusb;
1260  unsigned int CriticalUusb;
1261  unsigned int MinimumUusb;
1262  unsigned int Flags;
1264 
1282  typedef struct
1283  {
1284  unsigned int BorderFlags;
1285  unsigned int EnderFlags;
1290  } edges_settings_t;
1291 
1292  typedef struct
1293  {
1294  unsigned int BorderFlags;
1295  unsigned int EnderFlags;
1296  float LeftBorder;
1297  float RightBorder;
1299 
1325  typedef struct
1326  {
1327  unsigned int KpU;
1328  unsigned int KiU;
1329  unsigned int KdU;
1330  } pid_settings_t;
1331 
1347  typedef struct
1348  {
1349  unsigned int SyncInFlags;
1350  unsigned int ClutterTime;
1351  int Position;
1353  unsigned int Speed;
1354  unsigned int uSpeed;
1356 
1357  typedef struct
1358  {
1359  unsigned int SyncInFlags;
1360  unsigned int ClutterTime;
1361  float Position;
1362  float Speed;
1364 
1380  typedef struct
1381  {
1382  unsigned int SyncOutFlags;
1383  unsigned int SyncOutPulseSteps;
1384  unsigned int SyncOutPeriod;
1385  unsigned int Accuracy;
1386  unsigned int uAccuracy;
1388 
1389  typedef struct
1390  {
1391  unsigned int SyncOutFlags;
1392  unsigned int SyncOutPulseSteps;
1393  unsigned int SyncOutPeriod;
1394  float Accuracy;
1396 
1413  typedef struct
1414  {
1415  unsigned int EXTIOSetupFlags;
1416  unsigned int EXTIOModeFlags;
1417  } extio_settings_t;
1418 
1432  typedef struct
1433  {
1434  unsigned int t1;
1435  unsigned int t2;
1436  unsigned int t3;
1437  unsigned int t4;
1438  unsigned int BrakeFlags;
1439  } brake_settings_t;
1440 
1470  typedef struct
1471  {
1472  unsigned int MaxSpeed[10];
1473  unsigned int uMaxSpeed[10];
1474  unsigned int Timeout[9];
1475  unsigned int MaxClickTime;
1476  unsigned int Flags;
1480 
1481  typedef struct
1482  {
1483  float MaxSpeed[10];
1484  unsigned int Timeout[9];
1485  unsigned int MaxClickTime;
1486  unsigned int Flags;
1489 
1518  typedef struct
1519  {
1520  unsigned int JoyLowEnd;
1521  unsigned int JoyCenter;
1522  unsigned int JoyHighEnd;
1523  unsigned int ExpFactor;
1524  unsigned int DeadZone;
1525  unsigned int JoyFlags;
1527 
1561  typedef struct
1562  {
1563  unsigned int CTPMinError;
1564  unsigned int CTPFlags;
1565  } ctp_settings_t;
1566 
1580  typedef struct
1581  {
1582  unsigned int Speed;
1583  unsigned int UARTSetupFlags;
1584  } uart_settings_t;
1585 
1595  typedef struct
1596  {
1597  char ControllerName[17];
1598  unsigned int CtrlFlags;
1600 
1610  typedef struct
1611  {
1612  int Position;
1614  unsigned int Speed;
1615  unsigned int uSpeed;
1617 
1618  typedef struct
1619  {
1620  float Position;
1621  float Speed;
1623 
1638  typedef struct
1639  {
1640  int Position;
1642  long_t EncPosition;
1643  } get_position_t;
1644 
1645  typedef struct
1646  {
1647  float Position;
1648  long_t EncPosition;
1650 
1665  typedef struct
1666  {
1667  int Position;
1669  long_t EncPosition;
1670  unsigned int PosFlags;
1671  } set_position_t;
1672 
1673  typedef struct
1674  {
1675  float Position;
1676  long_t EncPosition;
1677  unsigned int PosFlags;
1679 
1691  typedef struct
1692  {
1693  unsigned int MoveSts;
1694  unsigned int MvCmdSts;
1695  unsigned int PWRSts;
1696  unsigned int EncSts;
1697  unsigned int WindSts;
1700  long_t EncPosition;
1701  int CurSpeed;
1703  int Ipwr;
1704  int Upwr;
1705  int Iusb;
1706  int Uusb;
1707  int CurT;
1708  unsigned int Flags;
1709  unsigned int GPIOFlags;
1710  unsigned int CmdBufFreeSpace;
1711  } status_t;
1712 
1713  typedef struct
1714  {
1715  unsigned int MoveSts;
1716  unsigned int MvCmdSts;
1717  unsigned int PWRSts;
1718  unsigned int EncSts;
1719  unsigned int WindSts;
1720  float CurPosition;
1721  long_t EncPosition;
1722  float CurSpeed;
1723  int Ipwr;
1724  int Upwr;
1725  int Iusb;
1726  int Uusb;
1727  int CurT;
1728  unsigned int Flags;
1729  unsigned int GPIOFlags;
1730  unsigned int CmdBufFreeSpace;
1731  } status_calb_t;
1732 
1745  typedef struct
1746  {
1753  unsigned int Pot;
1754  unsigned int Joy;
1756  } chart_data_t;
1757 
1774  typedef struct
1775  {
1776  char Manufacturer[5];
1777  char ManufacturerId[3];
1778  char ProductDescription[9];
1780 
1796  typedef struct
1797  {
1798  unsigned int SN;
1799  unsigned int Key[32];
1800  } serial_number_t;
1801 
1816  typedef struct
1817  {
1818  unsigned int A1Voltage_ADC;
1819  unsigned int A2Voltage_ADC;
1820  unsigned int B1Voltage_ADC;
1821  unsigned int B2Voltage_ADC;
1822  unsigned int SupVoltage_ADC;
1823  unsigned int ACurrent_ADC;
1824  unsigned int BCurrent_ADC;
1825  unsigned int FullCurrent_ADC;
1826  unsigned int Temp_ADC;
1827  unsigned int Joy_ADC;
1828  unsigned int Pot_ADC;
1829  unsigned int L5_ADC;
1830  unsigned int H5_ADC;
1836  int ACurrent;
1837  int BCurrent;
1839  int Temp;
1840  int Joy;
1841  int Pot;
1842  int L5;
1843  int H5;
1844  unsigned int deprecated;
1845  int R;
1846  int L;
1847  } analog_data_t;
1848 
1860  typedef struct
1861  {
1862  unsigned int DebugData[128];
1863  } debug_read_t;
1864 
1874  typedef struct
1875  {
1876  char PositionerName[17];
1877  } stage_name_t;
1878 
1890  typedef struct
1891  {
1892  char Manufacturer[17];
1893  char PartNumber[25];
1895 
1907  typedef struct
1908  {
1910  char Units[9];
1911  float MaxSpeed;
1912  float TravelRange;
1918  } stage_settings_t;
1919 
1931  typedef struct
1932  {
1933  char Manufacturer[17];
1934  char PartNumber[25];
1936 
1948  typedef struct
1949  {
1950  unsigned int MotorType;
1951  unsigned int ReservedField;
1952  unsigned int Poles;
1953  unsigned int Phases;
1962  float StallTorque;
1968  float MaxSpeed;
1969  float MaxCurrent;
1972  float NoLoadSpeed;
1973  } motor_settings_t;
1974 
1986  typedef struct
1987  {
1988  char Manufacturer[17];
1989  char PartNumber[25];
1991 
2003  typedef struct
2004  {
2009  unsigned int PPR;
2010  unsigned int EncoderSettings;
2012 
2024  typedef struct
2025  {
2026  char Manufacturer[17];
2027  char PartNumber[25];
2029 
2041  typedef struct
2042  {
2047  unsigned int PPR;
2049 
2061  typedef struct
2062  {
2063  char Manufacturer[17];
2064  char PartNumber[25];
2066 
2078  typedef struct
2079  {
2080  float ReductionIn;
2086  float Efficiency;
2087  } gear_settings_t;
2088 
2100  typedef struct
2101  {
2102  char MagneticBrakeInfo[25];
2105  float MBTorque;
2106  unsigned int MBSettings;
2107  char TemperatureSensorInfo[25];
2108  float TSMin;
2109  float TSMax;
2110  float TSGrad;
2111  unsigned int TSSettings;
2112  unsigned int LimitSwitchesSettings;
2114 
2115 /*
2116  --------------------------------------------
2117  BEGIN OF GENERATED function declarations
2118  --------------------------------------------
2119 */
2120 
2133 
2150  result_t XIMC_API set_feedback_settings (device_t id, const feedback_settings_t* feedback_settings);
2151 
2168  result_t XIMC_API get_feedback_settings (device_t id, feedback_settings_t* feedback_settings);
2169 
2186  result_t XIMC_API set_home_settings (device_t id, const home_settings_t* home_settings);
2187 
2188  result_t XIMC_API set_home_settings_calb (device_t id, const home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2189 
2206  result_t XIMC_API get_home_settings (device_t id, home_settings_t* home_settings);
2207 
2208  result_t XIMC_API get_home_settings_calb (device_t id, home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2209 
2222  result_t XIMC_API set_move_settings (device_t id, const move_settings_t* move_settings);
2223 
2224  result_t XIMC_API set_move_settings_calb (device_t id, const move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2225 
2238  result_t XIMC_API get_move_settings (device_t id, move_settings_t* move_settings);
2239 
2240  result_t XIMC_API get_move_settings_calb (device_t id, move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2241 
2263  result_t XIMC_API set_engine_settings (device_t id, const engine_settings_t* engine_settings);
2264 
2265  result_t XIMC_API set_engine_settings_calb (device_t id, const engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2266 
2286  result_t XIMC_API get_engine_settings (device_t id, engine_settings_t* engine_settings);
2287 
2288  result_t XIMC_API get_engine_settings_calb (device_t id, engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2289 
2304  result_t XIMC_API set_entype_settings (device_t id, const entype_settings_t* entype_settings);
2305 
2320  result_t XIMC_API get_entype_settings (device_t id, entype_settings_t* entype_settings);
2321 
2335  result_t XIMC_API set_power_settings (device_t id, const power_settings_t* power_settings);
2336 
2351  result_t XIMC_API get_power_settings (device_t id, power_settings_t* power_settings);
2352 
2366  result_t XIMC_API set_secure_settings (device_t id, const secure_settings_t* secure_settings);
2367 
2381  result_t XIMC_API get_secure_settings (device_t id, secure_settings_t* secure_settings);
2382 
2397  result_t XIMC_API set_edges_settings (device_t id, const edges_settings_t* edges_settings);
2398 
2399  result_t XIMC_API set_edges_settings_calb (device_t id, const edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2400 
2415  result_t XIMC_API get_edges_settings (device_t id, edges_settings_t* edges_settings);
2416 
2417  result_t XIMC_API get_edges_settings_calb (device_t id, edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2418 
2442  result_t XIMC_API set_pid_settings (device_t id, const pid_settings_t* pid_settings);
2443 
2464  result_t XIMC_API get_pid_settings (device_t id, pid_settings_t* pid_settings);
2465 
2483  result_t XIMC_API set_sync_in_settings (device_t id, const sync_in_settings_t* sync_in_settings);
2484 
2485  result_t XIMC_API set_sync_in_settings_calb (device_t id, const sync_in_settings_calb_t* sync_in_settings_calb, const calibration_t* calibration);
2486 
2504  result_t XIMC_API get_sync_in_settings (device_t id, sync_in_settings_t* sync_in_settings);
2505 
2506  result_t XIMC_API get_sync_in_settings_calb (device_t id, sync_in_settings_calb_t* sync_in_settings_calb, const calibration_t* calibration);
2507 
2525  result_t XIMC_API set_sync_out_settings (device_t id, const sync_out_settings_t* sync_out_settings);
2526 
2527  result_t XIMC_API set_sync_out_settings_calb (device_t id, const sync_out_settings_calb_t* sync_out_settings_calb, const calibration_t* calibration);
2528 
2543  result_t XIMC_API get_sync_out_settings (device_t id, sync_out_settings_t* sync_out_settings);
2544 
2545  result_t XIMC_API get_sync_out_settings_calb (device_t id, sync_out_settings_calb_t* sync_out_settings_calb, const calibration_t* calibration);
2546 
2565  result_t XIMC_API set_extio_settings (device_t id, const extio_settings_t* extio_settings);
2566 
2582  result_t XIMC_API get_extio_settings (device_t id, extio_settings_t* extio_settings);
2583 
2596  result_t XIMC_API set_brake_settings (device_t id, const brake_settings_t* brake_settings);
2597 
2610  result_t XIMC_API get_brake_settings (device_t id, brake_settings_t* brake_settings);
2611 
2640  result_t XIMC_API set_control_settings (device_t id, const control_settings_t* control_settings);
2641 
2642  result_t XIMC_API set_control_settings_calb (device_t id, const control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2643 
2672  result_t XIMC_API get_control_settings (device_t id, control_settings_t* control_settings);
2673 
2674  result_t XIMC_API get_control_settings_calb (device_t id, control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2675 
2711  result_t XIMC_API set_joystick_settings (device_t id, const joystick_settings_t* joystick_settings);
2712 
2748  result_t XIMC_API get_joystick_settings (device_t id, joystick_settings_t* joystick_settings);
2749 
2784  result_t XIMC_API set_ctp_settings (device_t id, const ctp_settings_t* ctp_settings);
2785 
2820  result_t XIMC_API get_ctp_settings (device_t id, ctp_settings_t* ctp_settings);
2821 
2838  result_t XIMC_API set_uart_settings (device_t id, const uart_settings_t* uart_settings);
2839 
2856  result_t XIMC_API get_uart_settings (device_t id, uart_settings_t* uart_settings);
2857 
2870  result_t XIMC_API set_controller_name (device_t id, const controller_name_t* controller_name);
2871 
2884  result_t XIMC_API get_controller_name (device_t id, controller_name_t* controller_name);
2885 
2886 
2888 
2901 
2919  result_t XIMC_API command_stop (device_t id);
2920 
2940  result_t XIMC_API set_add_sync_in_action (device_t id, const add_sync_in_action_t* add_sync_in_action);
2941 
2942  result_t XIMC_API set_add_sync_in_action_calb (device_t id, const add_sync_in_action_calb_t* add_sync_in_action_calb, const calibration_t* calibration);
2943 
2962  result_t XIMC_API command_power_off (device_t id);
2963 
2983  result_t XIMC_API command_move (device_t id, int Position, int uPosition);
2984 
2985  result_t XIMC_API command_move_calb (device_t id, float Position, const calibration_t* calibration);
2986 
3008  result_t XIMC_API command_movr (device_t id, int DeltaPosition, int uDeltaPosition);
3009 
3010  result_t XIMC_API command_movr_calb (device_t id, float DeltaPosition, const calibration_t* calibration);
3011 
3051  result_t XIMC_API command_home (device_t id);
3052 
3063  result_t XIMC_API command_left (device_t id);
3064 
3075  result_t XIMC_API command_right (device_t id);
3076 
3089  result_t XIMC_API command_loft (device_t id);
3090 
3101  result_t XIMC_API command_sstp (device_t id);
3102 
3117  result_t XIMC_API get_position (device_t id, get_position_t* the_get_position);
3118 
3119  result_t XIMC_API get_position_calb (device_t id, get_position_calb_t* the_get_position_calb, const calibration_t* calibration);
3120 
3137  result_t XIMC_API set_position (device_t id, const set_position_t* the_set_position);
3138 
3139  result_t XIMC_API set_position_calb (device_t id, const set_position_calb_t* the_set_position_calb, const calibration_t* calibration);
3140 
3163  result_t XIMC_API command_zero (device_t id);
3164 
3165 
3167 
3180 
3191  result_t XIMC_API command_save_settings (device_t id);
3192 
3203  result_t XIMC_API command_read_settings (device_t id);
3204 
3217  result_t XIMC_API command_eesave_settings (device_t id);
3218 
3230  result_t XIMC_API command_eeread_settings (device_t id);
3231 
3248  result_t XIMC_API get_chart_data (device_t id, chart_data_t* chart_data);
3249 
3262  result_t XIMC_API get_serial_number (device_t id, unsigned int* SerialNumber);
3263 
3280  result_t XIMC_API get_firmware_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3281 
3292  result_t XIMC_API service_command_updf (device_t id);
3293 
3294 
3296 
3309 
3328  result_t XIMC_API set_serial_number (device_t id, const serial_number_t* serial_number);
3329 
3344  result_t XIMC_API get_analog_data (device_t id, analog_data_t* analog_data);
3345 
3360  result_t XIMC_API get_debug_read (device_t id, debug_read_t* debug_read);
3361 
3362 
3364 
3377 
3390  result_t XIMC_API set_stage_name (device_t id, const stage_name_t* stage_name);
3391 
3404  result_t XIMC_API get_stage_name (device_t id, stage_name_t* stage_name);
3405 
3420  result_t XIMC_API set_stage_information (device_t id, const stage_information_t* stage_information);
3421 
3434  result_t XIMC_API get_stage_information (device_t id, stage_information_t* stage_information);
3435 
3450  result_t XIMC_API set_stage_settings (device_t id, const stage_settings_t* stage_settings);
3451 
3464  result_t XIMC_API get_stage_settings (device_t id, stage_settings_t* stage_settings);
3465 
3480  result_t XIMC_API set_motor_information (device_t id, const motor_information_t* motor_information);
3481 
3494  result_t XIMC_API get_motor_information (device_t id, motor_information_t* motor_information);
3495 
3510  result_t XIMC_API set_motor_settings (device_t id, const motor_settings_t* motor_settings);
3511 
3524  result_t XIMC_API get_motor_settings (device_t id, motor_settings_t* motor_settings);
3525 
3540  result_t XIMC_API set_encoder_information (device_t id, const encoder_information_t* encoder_information);
3541 
3554  result_t XIMC_API get_encoder_information (device_t id, encoder_information_t* encoder_information);
3555 
3570  result_t XIMC_API set_encoder_settings (device_t id, const encoder_settings_t* encoder_settings);
3571 
3584  result_t XIMC_API get_encoder_settings (device_t id, encoder_settings_t* encoder_settings);
3585 
3600  result_t XIMC_API set_hallsensor_information (device_t id, const hallsensor_information_t* hallsensor_information);
3601 
3614  result_t XIMC_API get_hallsensor_information (device_t id, hallsensor_information_t* hallsensor_information);
3615 
3630  result_t XIMC_API set_hallsensor_settings (device_t id, const hallsensor_settings_t* hallsensor_settings);
3631 
3644  result_t XIMC_API get_hallsensor_settings (device_t id, hallsensor_settings_t* hallsensor_settings);
3645 
3660  result_t XIMC_API set_gear_information (device_t id, const gear_information_t* gear_information);
3661 
3674  result_t XIMC_API get_gear_information (device_t id, gear_information_t* gear_information);
3675 
3690  result_t XIMC_API set_gear_settings (device_t id, const gear_settings_t* gear_settings);
3691 
3704  result_t XIMC_API get_gear_settings (device_t id, gear_settings_t* gear_settings);
3705 
3720  result_t XIMC_API set_accessories_settings (device_t id, const accessories_settings_t* accessories_settings);
3721 
3734  result_t XIMC_API get_accessories_settings (device_t id, accessories_settings_t* accessories_settings);
3735 
3752  result_t XIMC_API get_bootloader_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3753 
3754 
3755 /*
3756  -------------------------
3757  END OF GENERATED CODE
3758  -------------------------
3759 */
3760 
3761 /* hand-crafted functions begin */
3762 
3775  result_t XIMC_API goto_firmware(device_t id, uint8_t* ret);
3776 
3789  result_t XIMC_API has_firmware(const char* name, uint8_t* ret);
3790 
3806  result_t XIMC_API command_update_firmware(const char* name, const uint8_t* data, uint32_t data_size);
3807 
3822  result_t XIMC_API write_key (const char* name, uint8_t* key);
3823 
3836  result_t XIMC_API command_reset(device_t id);
3837 
3850  result_t XIMC_API command_clear_fram(device_t id);
3851 
3853 
3854  // ------------------------------------
3855 
3867 
3878  device_t XIMC_API open_device (const char* name);
3879 
3890  result_t XIMC_API close_device (device_t* id);
3891 
3904  result_t XIMC_API probe_device (const char* name);
3905 
3916  device_enumeration_t XIMC_API enumerate_devices(int probe_flags);
3917 
3928  result_t XIMC_API free_enumerate_devices(device_enumeration_t device_enumeration);
3929 
3940  int XIMC_API get_device_count(device_enumeration_t device_enumeration);
3941 
3950  typedef char* pchar;
3951 
3966  pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index);
3967 
3968 
3985  result_t XIMC_API get_enumerate_device_serial(device_enumeration_t device_enumeration, int device_index, uint32_t* serial);
3986 
4003  result_t XIMC_API get_enumerate_device_information(device_enumeration_t device_enumeration, int device_index, device_information_t* device_information);
4004 
4012  result_t XIMC_API reset_locks ();
4013 
4023  result_t XIMC_API ximc_fix_usbser_sys(const char* device_name);
4024 
4025 
4035  void XIMC_API msec_sleep (unsigned int msec);
4036 
4046  void XIMC_API ximc_version (char* version);
4047 
4059  typedef void (XIMC_CALLCONV *logging_callback_t)(int loglevel, const wchar_t* message);
4060 
4072  void XIMC_API logging_callback_stderr_wide(int loglevel, const wchar_t* message);
4073 
4085  void XIMC_API logging_callback_stderr_narrow(int loglevel, const wchar_t* message);
4086 
4099  void XIMC_API set_logging_callback(logging_callback_t logging_callback);
4100 
4124  result_t XIMC_API get_status (device_t id, status_t* status);
4125 
4137  result_t XIMC_API get_status_calb (device_t id, status_calb_t* status, const calibration_t* calibration);
4138 
4164  result_t XIMC_API get_device_information (device_t id, device_information_t* device_information);
4165 
4167 
4168 #if defined(__cplusplus)
4169 };
4170 #endif
4171 
4172 #endif
4173 
4174 // vim: ts=4 shiftwidth=4
4175