libximc  2.2.0
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 #endif
56 
57 #if defined(__cplusplus)
58 extern "C"
59 {
60 #endif
61 
62 
71  typedef int device_t;
72 
81  typedef int result_t;
82 
86  #if defined(_WIN64) || defined(__LP64__) || defined(LABVIEW64_IMPORT)
87  typedef uint64_t device_enumeration_t;
88  #else
89  typedef uint32_t device_enumeration_t;
90  #endif
91  //typedef device_enumeration_t* pdevice_enumeration_t;
92 
101 #define device_undefined -1
102 
111 
120 #define result_ok 0
121 
130 #define result_error -1
131 
140 #define result_not_implemented -2
141 
150 #define result_value_error -3
151 
160 #define result_nodevice -4
161 
163 
172 
181 #define LOGLEVEL_ERROR 0x01
182 
190 #define LOGLEVEL_WARNING 0x02
191 
199 #define LOGLEVEL_INFO 0x03
200 
208 #define LOGLEVEL_DEBUG 0x04
209 
210 
211 
216  typedef struct calibration_t
217  {
218  double A;
219  unsigned int MicrostepMode;
220  } calibration_t;
221 
222 
223 
224 
225 
227 #define LIBXIMC_VERSION 2.2.0
228 
231 /*
232  ------------------------------------------
233  BEGIN OF GENERATED struct declarations
234  ------------------------------------------
235 */
236 
246 #define ENUMERATE_PROBE 0x01
247 #define ENUMERATE_ALL_COM 0x02
249 
250 
266 #define MOVE_STATE_MOVING 0x01
267 #define MOVE_STATE_TARGET_SPEED 0x02
268 #define MOVE_STATE_ANTIPLAY 0x04
270 
271 
285 #define EEPROM_PRECEDENCE 0x01
287 
288 
304 #define PWR_STATE_UNKNOWN 0x00
305 #define PWR_STATE_OFF 0x01
306 #define PWR_STATE_NORM 0x03
307 #define PWR_STATE_REDUCT 0x04
308 #define PWR_STATE_MAX 0x05
310 
311 
329 #define STATE_CONTR 0x0003F
330 #define STATE_ERRC 0x00001
331 #define STATE_ERRD 0x00002
332 #define STATE_ERRV 0x00004
333 #define STATE_EEPROM_CONNECTED 0x00010
334 #define STATE_SECUR 0x3FFC0
335 #define STATE_ALARM 0x00040
336 #define STATE_CTP_ERROR 0x00080
337 #define STATE_POWER_OVERHEAT 0x00100
338 #define STATE_CONTROLLER_OVERHEAT 0x00200
339 #define STATE_OVERLOAD_POWER_VOLTAGE 0x00400
340 #define STATE_OVERLOAD_POWER_CURRENT 0x00800
341 #define STATE_OVERLOAD_USB_VOLTAGE 0x01000
342 #define STATE_LOW_USB_VOLTAGE 0x02000
343 #define STATE_OVERLOAD_USB_CURRENT 0x04000
344 #define STATE_BORDERS_SWAP_MISSET 0x08000
345 #define STATE_LOW_POWER_VOLTAGE 0x10000
346 #define STATE_H_BRIDGE_FAULT 0x20000
348 
349 
367 #define STATE_DIG_SIGNAL 0xFFFF
368 #define STATE_RIGHT_EDGE 0x0001
369 #define STATE_LEFT_EDGE 0x0002
370 #define STATE_BUTTON_RIGHT 0x0004
371 #define STATE_BUTTON_LEFT 0x0008
372 #define STATE_GPIO_PINOUT 0x0010
373 #define STATE_GPIO_LEVEL 0x0020
374 #define STATE_HALL_A 0x0040
375 #define STATE_HALL_B 0x0080
376 #define STATE_HALL_C 0x0100
377 #define STATE_BRAKE 0x0200
378 #define STATE_REV_SENSOR 0x0400
379 #define STATE_SYNC_INPUT 0x0800
380 #define STATE_SYNC_OUTPUT 0x1000
381 #define STATE_ENC_A 0x2000
382 #define STATE_ENC_B 0x4000
384 
385 
401 #define ENC_STATE_ABSENT 0x00
402 #define ENC_STATE_UNKNOWN 0x01
403 #define ENC_STATE_MALFUNC 0x02
404 #define ENC_STATE_REVERS 0x03
405 #define ENC_STATE_OK 0x04
407 
408 
424 #define WIND_A_STATE_ABSENT 0x00
425 #define WIND_A_STATE_UNKNOWN 0x01
426 #define WIND_A_STATE_MALFUNC 0x02
427 #define WIND_A_STATE_OK 0x03
428 #define WIND_B_STATE_ABSENT 0x00
429 #define WIND_B_STATE_UNKNOWN 0x10
430 #define WIND_B_STATE_MALFUNC 0x20
431 #define WIND_B_STATE_OK 0x30
433 
434 
452 #define MVCMD_NAME_BITS 0x3F
453 #define MVCMD_UKNWN 0x00
454 #define MVCMD_MOVE 0x01
455 #define MVCMD_MOVR 0x02
456 #define MVCMD_LEFT 0x03
457 #define MVCMD_RIGHT 0x04
458 #define MVCMD_STOP 0x05
459 #define MVCMD_HOME 0x06
460 #define MVCMD_LOFT 0x07
461 #define MVCMD_SSTP 0x08
462 #define MVCMD_ERROR 0x40
463 #define MVCMD_RUNNING 0x80
465 
466 
485 #define ENGINE_REVERSE 0x01
486 #define ENGINE_MAX_SPEED 0x04
487 #define ENGINE_ANTIPLAY 0x08
488 #define ENGINE_ACCEL_ON 0x10
489 #define ENGINE_LIMIT_VOLT 0x20
490 #define ENGINE_LIMIT_CURR 0x40
491 #define ENGINE_LIMIT_RPM 0x80
493 
494 
513 #define MICROSTEP_MODE_FULL 0x01
514 #define MICROSTEP_MODE_FRAC_2 0x02
515 #define MICROSTEP_MODE_FRAC_4 0x03
516 #define MICROSTEP_MODE_FRAC_8 0x04
517 #define MICROSTEP_MODE_FRAC_16 0x05
518 #define MICROSTEP_MODE_FRAC_32 0x06
519 #define MICROSTEP_MODE_FRAC_64 0x07
520 #define MICROSTEP_MODE_FRAC_128 0x08
521 #define MICROSTEP_MODE_FRAC_256 0x09
523 
524 
543 #define ENGINE_TYPE_NONE 0x00
544 #define ENGINE_TYPE_DC 0x01
545 #define ENGINE_TYPE_2DC 0x02
546 #define ENGINE_TYPE_STEP 0x03
547 #define ENGINE_TYPE_BRUSHLESS 0x05
549 
550 
569 #define DRIVER_TYPE_DISCRETE_FET 0x01
570 #define DRIVER_TYPE_INTEGRATE 0x02
571 #define DRIVER_TYPE_EXTERNAL 0x03
573 
574 
591 #define POWER_REDUCT_ENABLED 0x01
592 #define POWER_OFF_ENABLED 0x02
593 #define POWER_SMOOTH_CURRENT 0x04
595 
596 
613 #define ALARM_ON_DRIVER_OVERHEATING 0x01
614 #define LOW_UPWR_PROTECTION 0x02
615 #define H_BRIDGE_ALERT 0x04
616 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
617 #define ALARM_FLAGS_STICKING 0x10
618 #define USB_BREAK_RECONNECT 0x20
620 
621 
637 #define SETPOS_IGNORE_POSITION 0x01
638 #define SETPOS_IGNORE_ENCODER 0x02
640 
641 
655 #define FEEDBACK_ENCODER 0x01
656 #define FEEDBACK_ENCODERHALL 0x03
657 #define FEEDBACK_EMF 0x04
658 #define FEEDBACK_NONE 0x05
660 
661 
675 #define FEEDBACK_ENC_REVERSE 0x01
676 #define FEEDBACK_HALL_REVERSE 0x02
678 
679 
694 #define SYNCIN_ENABLED 0x01
695 #define SYNCIN_INVERT 0x02
696 #define SYNCIN_GOTOPOSITION 0x04
698 
699 
714 #define SYNCOUT_ENABLED 0x01
715 #define SYNCOUT_STATE 0x02
716 #define SYNCOUT_INVERT 0x04
717 #define SYNCOUT_IN_STEPS 0x08
718 #define SYNCOUT_ONSTART 0x10
719 #define SYNCOUT_ONSTOP 0x20
720 #define SYNCOUT_ONPERIOD 0x40
722 
723 
738 #define EXTIO_SETUP_OUTPUT 0x01
739 #define EXTIO_SETUP_INVERT 0x02
741 
742 
757 #define EXTIO_SETUP_MODE_IN_NOP 0x00
758 #define EXTIO_SETUP_MODE_IN_STOP 0x01
759 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
760 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
761 #define EXTIO_SETUP_MODE_IN_HOME 0x04
762 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
763 #define EXTIO_SETUP_MODE_OUT_ON 0x10
764 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
765 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
766 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
767 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
769 
770 
788 #define BORDER_IS_ENCODER 0x01
789 #define BORDER_STOP_LEFT 0x02
790 #define BORDER_STOP_RIGHT 0x04
791 #define BORDERS_SWAP_MISSET_DETECTION 0x08
793 
794 
812 #define ENDER_SWAP 0x01
813 #define ENDER_SW1_ACTIVE_LOW 0x02
814 #define ENDER_SW2_ACTIVE_LOW 0x04
816 
817 
835 #define BRAKE_ENABLED 0x01
836 #define BRAKE_ENG_PWROFF 0x02
838 
839 
857 #define CONTROL_MODE_BITS 0x03
858 #define CONTROL_MODE_OFF 0x00
859 #define CONTROL_MODE_JOY 0x01
860 #define CONTROL_MODE_LR 0x02
861 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
862 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
864 
865 
881 #define JOY_REVERSE 0x01
883 
884 
902 #define CTP_ENABLED 0x01
903 #define CTP_BASE 0x02
904 #define CTP_ALARM_ON_ERROR 0x04
905 #define REV_SENS_INV 0x08
907 
908 
927 #define HOME_DIR_FIRST 0x01
928 #define HOME_DIR_SECOND 0x02
929 #define HOME_MV_SEC_EN 0x04
930 #define HOME_HALF_MV 0x08
931 #define HOME_STOP_FIRST_BITS 0x30
932 #define HOME_STOP_FIRST_REV 0x10
933 #define HOME_STOP_FIRST_SYN 0x20
934 #define HOME_STOP_FIRST_LIM 0x30
935 #define HOME_STOP_SECOND_BITS 0xC0
936 #define HOME_STOP_SECOND_REV 0x40
937 #define HOME_STOP_SECOND_SYN 0x80
938 #define HOME_STOP_SECOND_LIM 0xC0
940 
941 
953 #define UART_PARITY_BITS 0x03
954 #define UART_PARITY_BIT_EVEN 0x00
955 #define UART_PARITY_BIT_ODD 0x01
956 #define UART_PARITY_BIT_SPACE 0x02
957 #define UART_PARITY_BIT_MARK 0x03
958 #define UART_PARITY_BIT_USE 0x04
959 #define UART_STOP_BIT 0x08
961 
962 
974 #define MOTOR_TYPE_STEP 0x01
975 #define MOTOR_TYPE_DC 0x02
976 #define MOTOR_TYPE_BLDC 0x03
978 
979 
991 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
992 #define ENCSET_PUSHPULL_OUTPUT 0x004
993 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
994 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
995 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
997 
998 
1010 #define MB_AVAILABLE 0x01
1011 #define MB_POWERED_HOLD 0x02
1013 
1014 
1026 #define TS_TYPE_BITS 0x07
1027 #define TS_TYPE_THERMOCOUPLE 0x01
1028 #define TS_TYPE_SEMICONDUCTOR 0x02
1029 #define TS_AVAILABLE 0x08
1031 
1032 
1044 #define LS_ON_SW1_AVAILABLE 0x01
1045 #define LS_ON_SW2_AVAILABLE 0x02
1046 #define LS_SW1_ACTIVE_LOW 0x04
1047 #define LS_SW2_ACTIVE_LOW 0x08
1048 #define LS_SHORTED 0x10
1050 
1051 
1063  typedef struct
1064  {
1065  unsigned int IPS;
1066  unsigned int FeedbackType;
1067  unsigned int FeedbackFlags;
1068  unsigned int HallSPR;
1071 
1087  typedef struct
1088  {
1089  unsigned int FastHome;
1090  unsigned int uFastHome;
1091  unsigned int SlowHome;
1092  unsigned int uSlowHome;
1095  unsigned int HomeFlags;
1096  } home_settings_t;
1097 
1098  typedef struct
1099  {
1100  float FastHome;
1101  float SlowHome;
1102  float HomeDelta;
1103  unsigned int HomeFlags;
1105 
1117  typedef struct
1118  {
1119  unsigned int Speed;
1120  unsigned int uSpeed;
1121  unsigned int Accel;
1122  unsigned int Decel;
1123  unsigned int AntiplaySpeed;
1124  unsigned int uAntiplaySpeed;
1125  } move_settings_t;
1126 
1127  typedef struct
1128  {
1129  float Speed;
1130  float Accel;
1131  float Decel;
1134 
1155  typedef struct
1156  {
1157  unsigned int NomVoltage;
1158  unsigned int NomCurrent;
1159  unsigned int NomSpeed;
1160  unsigned int uNomSpeed;
1161  unsigned int EngineFlags;
1162  int Antiplay;
1163  unsigned int MicrostepMode;
1164  unsigned int StepsPerRev;
1166 
1167  typedef struct
1168  {
1169  unsigned int NomVoltage;
1170  unsigned int NomCurrent;
1171  float NomSpeed;
1172  unsigned int EngineFlags;
1173  float Antiplay;
1174  unsigned int MicrostepMode;
1175  unsigned int StepsPerRev;
1177 
1194  typedef struct
1195  {
1196  unsigned int EngineType;
1197  unsigned int DriverType;
1199 
1211  typedef struct
1212  {
1213  unsigned int HoldCurrent;
1214  unsigned int CurrReductDelay;
1215  unsigned int PowerOffDelay;
1216  unsigned int CurrentSetTime;
1217  unsigned int PowerFlags;
1218  } power_settings_t;
1219 
1233  typedef struct
1234  {
1235  unsigned int LowUpwrOff;
1236  unsigned int CriticalIpwr;
1237  unsigned int CriticalUpwr;
1238  unsigned int CriticalT;
1239  unsigned int CriticalIusb;
1240  unsigned int CriticalUusb;
1241  unsigned int MinimumUusb;
1242  unsigned int Flags;
1244 
1262  typedef struct
1263  {
1264  unsigned int BorderFlags;
1265  unsigned int EnderFlags;
1270  } edges_settings_t;
1271 
1272  typedef struct
1273  {
1274  unsigned int BorderFlags;
1275  unsigned int EnderFlags;
1276  float LeftBorder;
1277  float RightBorder;
1279 
1305  typedef struct
1306  {
1307  unsigned int KpU;
1308  unsigned int KiU;
1309  unsigned int KdU;
1310  } pid_settings_t;
1311 
1327  typedef struct
1328  {
1329  unsigned int SyncInFlags;
1330  unsigned int ClutterTime;
1331  int Position;
1333  unsigned int Speed;
1334  unsigned int uSpeed;
1336 
1337  typedef struct
1338  {
1339  unsigned int SyncInFlags;
1340  unsigned int ClutterTime;
1341  float Position;
1342  float Speed;
1344 
1360  typedef struct
1361  {
1362  unsigned int SyncOutFlags;
1363  unsigned int SyncOutPulseSteps;
1364  unsigned int SyncOutPeriod;
1365  unsigned int Accuracy;
1366  unsigned int uAccuracy;
1368 
1369  typedef struct
1370  {
1371  unsigned int SyncOutFlags;
1372  unsigned int SyncOutPulseSteps;
1373  unsigned int SyncOutPeriod;
1374  float Accuracy;
1376 
1393  typedef struct
1394  {
1395  unsigned int EXTIOSetupFlags;
1396  unsigned int EXTIOModeFlags;
1397  } extio_settings_t;
1398 
1412  typedef struct
1413  {
1414  unsigned int t1;
1415  unsigned int t2;
1416  unsigned int t3;
1417  unsigned int t4;
1418  unsigned int BrakeFlags;
1419  } brake_settings_t;
1420 
1450  typedef struct
1451  {
1452  unsigned int MaxSpeed[10];
1453  unsigned int uMaxSpeed[10];
1454  unsigned int Timeout[9];
1455  unsigned int MaxClickTime;
1456  unsigned int Flags;
1460 
1461  typedef struct
1462  {
1463  float MaxSpeed[10];
1464  unsigned int Timeout[9];
1465  unsigned int MaxClickTime;
1466  unsigned int Flags;
1469 
1498  typedef struct
1499  {
1500  unsigned int JoyLowEnd;
1501  unsigned int JoyCenter;
1502  unsigned int JoyHighEnd;
1503  unsigned int ExpFactor;
1504  unsigned int DeadZone;
1505  unsigned int JoyFlags;
1507 
1541  typedef struct
1542  {
1543  unsigned int CTPMinError;
1544  unsigned int CTPFlags;
1545  } ctp_settings_t;
1546 
1560  typedef struct
1561  {
1562  unsigned int Speed;
1563  unsigned int UARTSetupFlags;
1564  } uart_settings_t;
1565 
1575  typedef struct
1576  {
1577  char ControllerName[17];
1578  unsigned int CtrlFlags;
1580 
1590  typedef struct
1591  {
1592  int Position;
1594  unsigned int Speed;
1595  unsigned int uSpeed;
1597 
1598  typedef struct
1599  {
1600  float Position;
1601  float Speed;
1603 
1618  typedef struct
1619  {
1620  int Position;
1622  long long EncPosition;
1623  } get_position_t;
1624 
1625  typedef struct
1626  {
1627  float Position;
1628  long long EncPosition;
1630 
1645  typedef struct
1646  {
1647  int Position;
1649  long long EncPosition;
1650  unsigned int PosFlags;
1651  } set_position_t;
1652 
1653  typedef struct
1654  {
1655  float Position;
1656  long long EncPosition;
1657  unsigned int PosFlags;
1659 
1671  typedef struct
1672  {
1673  unsigned int MoveSts;
1674  unsigned int MvCmdSts;
1675  unsigned int PWRSts;
1676  unsigned int EncSts;
1677  unsigned int WindSts;
1680  long long EncPosition;
1681  int CurSpeed;
1683  int Ipwr;
1684  int Upwr;
1685  int Iusb;
1686  int Uusb;
1687  int CurT;
1688  unsigned int Flags;
1689  unsigned int GPIOFlags;
1690  unsigned int CmdBufFreeSpace;
1691  } status_t;
1692 
1693  typedef struct
1694  {
1695  unsigned int MoveSts;
1696  unsigned int MvCmdSts;
1697  unsigned int PWRSts;
1698  unsigned int EncSts;
1699  unsigned int WindSts;
1700  float CurPosition;
1701  long long EncPosition;
1702  float 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_calb_t;
1712 
1725  typedef struct
1726  {
1733  unsigned int Pot;
1734  unsigned int Joy;
1736  } chart_data_t;
1737 
1754  typedef struct
1755  {
1756  char Manufacturer[5];
1757  char ManufacturerId[3];
1758  char ProductDescription[9];
1760 
1776  typedef struct
1777  {
1778  unsigned int SN;
1779  unsigned int Key[32];
1780  } serial_number_t;
1781 
1796  typedef struct
1797  {
1798  unsigned int A1Voltage_ADC;
1799  unsigned int A2Voltage_ADC;
1800  unsigned int B1Voltage_ADC;
1801  unsigned int B2Voltage_ADC;
1802  unsigned int SupVoltage_ADC;
1803  unsigned int ACurrent_ADC;
1804  unsigned int BCurrent_ADC;
1805  unsigned int FullCurrent_ADC;
1806  unsigned int Temp_ADC;
1807  unsigned int Joy_ADC;
1808  unsigned int Pot_ADC;
1809  unsigned int L5_ADC;
1810  unsigned int H5_ADC;
1816  int ACurrent;
1817  int BCurrent;
1819  int Temp;
1820  int Joy;
1821  int Pot;
1822  int L5;
1823  int H5;
1824  unsigned int deprecated;
1825  int R;
1826  int L;
1827  } analog_data_t;
1828 
1840  typedef struct
1841  {
1842  unsigned int DebugData[128];
1843  } debug_read_t;
1844 
1854  typedef struct
1855  {
1856  char PositionerName[17];
1857  } stage_name_t;
1858 
1870  typedef struct
1871  {
1872  char Manufacturer[17];
1873  char PartNumber[25];
1875 
1887  typedef struct
1888  {
1890  char Units[9];
1891  float MaxSpeed;
1892  float TravelRange;
1898  } stage_settings_t;
1899 
1911  typedef struct
1912  {
1913  char Manufacturer[17];
1914  char PartNumber[25];
1916 
1928  typedef struct
1929  {
1930  unsigned int MotorType;
1931  unsigned int ReservedField;
1932  unsigned int Poles;
1933  unsigned int Phases;
1942  float StallTorque;
1948  float MaxSpeed;
1949  float MaxCurrent;
1952  float NoLoadSpeed;
1953  } motor_settings_t;
1954 
1966  typedef struct
1967  {
1968  char Manufacturer[17];
1969  char PartNumber[25];
1971 
1983  typedef struct
1984  {
1989  unsigned int PPR;
1990  unsigned int EncoderSettings;
1992 
2004  typedef struct
2005  {
2006  char Manufacturer[17];
2007  char PartNumber[25];
2009 
2021  typedef struct
2022  {
2027  unsigned int PPR;
2029 
2041  typedef struct
2042  {
2043  char Manufacturer[17];
2044  char PartNumber[25];
2046 
2058  typedef struct
2059  {
2060  float ReductionIn;
2066  float Efficiency;
2067  } gear_settings_t;
2068 
2080  typedef struct
2081  {
2082  char MagneticBrakeInfo[25];
2085  float MBTorque;
2086  unsigned int MBSettings;
2087  char TemperatureSensorInfo[25];
2088  float TSMin;
2089  float TSMax;
2090  float TSGrad;
2091  unsigned int TSSettings;
2092  unsigned int LimitSwitchesSettings;
2094 
2095 /*
2096  --------------------------------------------
2097  BEGIN OF GENERATED function declarations
2098  --------------------------------------------
2099 */
2100 
2113 
2130  result_t XIMC_API set_feedback_settings (device_t id, const feedback_settings_t* feedback_settings);
2131 
2148  result_t XIMC_API get_feedback_settings (device_t id, feedback_settings_t* feedback_settings);
2149 
2166  result_t XIMC_API set_home_settings (device_t id, const home_settings_t* home_settings);
2167 
2168  result_t XIMC_API set_home_settings_calb (device_t id, const home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2169 
2186  result_t XIMC_API get_home_settings (device_t id, home_settings_t* home_settings);
2187 
2188  result_t XIMC_API get_home_settings_calb (device_t id, home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2189 
2202  result_t XIMC_API set_move_settings (device_t id, const move_settings_t* move_settings);
2203 
2204  result_t XIMC_API set_move_settings_calb (device_t id, const move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2205 
2218  result_t XIMC_API get_move_settings (device_t id, move_settings_t* move_settings);
2219 
2220  result_t XIMC_API get_move_settings_calb (device_t id, move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2221 
2243  result_t XIMC_API set_engine_settings (device_t id, const engine_settings_t* engine_settings);
2244 
2245  result_t XIMC_API set_engine_settings_calb (device_t id, const engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2246 
2266  result_t XIMC_API get_engine_settings (device_t id, engine_settings_t* engine_settings);
2267 
2268  result_t XIMC_API get_engine_settings_calb (device_t id, engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2269 
2284  result_t XIMC_API set_entype_settings (device_t id, const entype_settings_t* entype_settings);
2285 
2300  result_t XIMC_API get_entype_settings (device_t id, entype_settings_t* entype_settings);
2301 
2315  result_t XIMC_API set_power_settings (device_t id, const power_settings_t* power_settings);
2316 
2331  result_t XIMC_API get_power_settings (device_t id, power_settings_t* power_settings);
2332 
2346  result_t XIMC_API set_secure_settings (device_t id, const secure_settings_t* secure_settings);
2347 
2361  result_t XIMC_API get_secure_settings (device_t id, secure_settings_t* secure_settings);
2362 
2377  result_t XIMC_API set_edges_settings (device_t id, const edges_settings_t* edges_settings);
2378 
2379  result_t XIMC_API set_edges_settings_calb (device_t id, const edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2380 
2395  result_t XIMC_API get_edges_settings (device_t id, edges_settings_t* edges_settings);
2396 
2397  result_t XIMC_API get_edges_settings_calb (device_t id, edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2398 
2422  result_t XIMC_API set_pid_settings (device_t id, const pid_settings_t* pid_settings);
2423 
2444  result_t XIMC_API get_pid_settings (device_t id, pid_settings_t* pid_settings);
2445 
2463  result_t XIMC_API set_sync_in_settings (device_t id, const sync_in_settings_t* sync_in_settings);
2464 
2465  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);
2466 
2484  result_t XIMC_API get_sync_in_settings (device_t id, sync_in_settings_t* sync_in_settings);
2485 
2486  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);
2487 
2505  result_t XIMC_API set_sync_out_settings (device_t id, const sync_out_settings_t* sync_out_settings);
2506 
2507  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);
2508 
2523  result_t XIMC_API get_sync_out_settings (device_t id, sync_out_settings_t* sync_out_settings);
2524 
2525  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);
2526 
2545  result_t XIMC_API set_extio_settings (device_t id, const extio_settings_t* extio_settings);
2546 
2562  result_t XIMC_API get_extio_settings (device_t id, extio_settings_t* extio_settings);
2563 
2576  result_t XIMC_API set_brake_settings (device_t id, const brake_settings_t* brake_settings);
2577 
2590  result_t XIMC_API get_brake_settings (device_t id, brake_settings_t* brake_settings);
2591 
2620  result_t XIMC_API set_control_settings (device_t id, const control_settings_t* control_settings);
2621 
2622  result_t XIMC_API set_control_settings_calb (device_t id, const control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2623 
2652  result_t XIMC_API get_control_settings (device_t id, control_settings_t* control_settings);
2653 
2654  result_t XIMC_API get_control_settings_calb (device_t id, control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2655 
2691  result_t XIMC_API set_joystick_settings (device_t id, const joystick_settings_t* joystick_settings);
2692 
2728  result_t XIMC_API get_joystick_settings (device_t id, joystick_settings_t* joystick_settings);
2729 
2764  result_t XIMC_API set_ctp_settings (device_t id, const ctp_settings_t* ctp_settings);
2765 
2800  result_t XIMC_API get_ctp_settings (device_t id, ctp_settings_t* ctp_settings);
2801 
2818  result_t XIMC_API set_uart_settings (device_t id, const uart_settings_t* uart_settings);
2819 
2836  result_t XIMC_API get_uart_settings (device_t id, uart_settings_t* uart_settings);
2837 
2850  result_t XIMC_API set_controller_name (device_t id, const controller_name_t* controller_name);
2851 
2864  result_t XIMC_API get_controller_name (device_t id, controller_name_t* controller_name);
2865 
2866 
2868 
2881 
2899  result_t XIMC_API command_stop (device_t id);
2900 
2920  result_t XIMC_API set_add_sync_in_action (device_t id, const add_sync_in_action_t* add_sync_in_action);
2921 
2922  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);
2923 
2942  result_t XIMC_API command_power_off (device_t id);
2943 
2963  result_t XIMC_API command_move (device_t id, int Position, int uPosition);
2964 
2965  result_t XIMC_API command_move_calb (device_t id, float Position, const calibration_t* calibration);
2966 
2988  result_t XIMC_API command_movr (device_t id, int DeltaPosition, int uDeltaPosition);
2989 
2990  result_t XIMC_API command_movr_calb (device_t id, float DeltaPosition, const calibration_t* calibration);
2991 
3031  result_t XIMC_API command_home (device_t id);
3032 
3043  result_t XIMC_API command_left (device_t id);
3044 
3055  result_t XIMC_API command_right (device_t id);
3056 
3069  result_t XIMC_API command_loft (device_t id);
3070 
3081  result_t XIMC_API command_sstp (device_t id);
3082 
3097  result_t XIMC_API get_position (device_t id, get_position_t* the_get_position);
3098 
3099  result_t XIMC_API get_position_calb (device_t id, get_position_calb_t* the_get_position_calb, const calibration_t* calibration);
3100 
3117  result_t XIMC_API set_position (device_t id, const set_position_t* the_set_position);
3118 
3119  result_t XIMC_API set_position_calb (device_t id, const set_position_calb_t* the_set_position_calb, const calibration_t* calibration);
3120 
3143  result_t XIMC_API command_zero (device_t id);
3144 
3145 
3147 
3160 
3171  result_t XIMC_API command_save_settings (device_t id);
3172 
3183  result_t XIMC_API command_read_settings (device_t id);
3184 
3197  result_t XIMC_API command_eesave_settings (device_t id);
3198 
3210  result_t XIMC_API command_eeread_settings (device_t id);
3211 
3228  result_t XIMC_API get_chart_data (device_t id, chart_data_t* chart_data);
3229 
3242  result_t XIMC_API get_serial_number (device_t id, unsigned int* SerialNumber);
3243 
3260  result_t XIMC_API get_firmware_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3261 
3272  result_t XIMC_API service_command_updf (device_t id);
3273 
3274 
3276 
3289 
3308  result_t XIMC_API set_serial_number (device_t id, const serial_number_t* serial_number);
3309 
3324  result_t XIMC_API get_analog_data (device_t id, analog_data_t* analog_data);
3325 
3340  result_t XIMC_API get_debug_read (device_t id, debug_read_t* debug_read);
3341 
3342 
3344 
3357 
3370  result_t XIMC_API set_stage_name (device_t id, const stage_name_t* stage_name);
3371 
3384  result_t XIMC_API get_stage_name (device_t id, stage_name_t* stage_name);
3385 
3400  result_t XIMC_API set_stage_information (device_t id, const stage_information_t* stage_information);
3401 
3414  result_t XIMC_API get_stage_information (device_t id, stage_information_t* stage_information);
3415 
3430  result_t XIMC_API set_stage_settings (device_t id, const stage_settings_t* stage_settings);
3431 
3444  result_t XIMC_API get_stage_settings (device_t id, stage_settings_t* stage_settings);
3445 
3460  result_t XIMC_API set_motor_information (device_t id, const motor_information_t* motor_information);
3461 
3474  result_t XIMC_API get_motor_information (device_t id, motor_information_t* motor_information);
3475 
3490  result_t XIMC_API set_motor_settings (device_t id, const motor_settings_t* motor_settings);
3491 
3504  result_t XIMC_API get_motor_settings (device_t id, motor_settings_t* motor_settings);
3505 
3520  result_t XIMC_API set_encoder_information (device_t id, const encoder_information_t* encoder_information);
3521 
3534  result_t XIMC_API get_encoder_information (device_t id, encoder_information_t* encoder_information);
3535 
3550  result_t XIMC_API set_encoder_settings (device_t id, const encoder_settings_t* encoder_settings);
3551 
3564  result_t XIMC_API get_encoder_settings (device_t id, encoder_settings_t* encoder_settings);
3565 
3580  result_t XIMC_API set_hallsensor_information (device_t id, const hallsensor_information_t* hallsensor_information);
3581 
3594  result_t XIMC_API get_hallsensor_information (device_t id, hallsensor_information_t* hallsensor_information);
3595 
3610  result_t XIMC_API set_hallsensor_settings (device_t id, const hallsensor_settings_t* hallsensor_settings);
3611 
3624  result_t XIMC_API get_hallsensor_settings (device_t id, hallsensor_settings_t* hallsensor_settings);
3625 
3640  result_t XIMC_API set_gear_information (device_t id, const gear_information_t* gear_information);
3641 
3654  result_t XIMC_API get_gear_information (device_t id, gear_information_t* gear_information);
3655 
3670  result_t XIMC_API set_gear_settings (device_t id, const gear_settings_t* gear_settings);
3671 
3684  result_t XIMC_API get_gear_settings (device_t id, gear_settings_t* gear_settings);
3685 
3700  result_t XIMC_API set_accessories_settings (device_t id, const accessories_settings_t* accessories_settings);
3701 
3714  result_t XIMC_API get_accessories_settings (device_t id, accessories_settings_t* accessories_settings);
3715 
3732  result_t XIMC_API get_bootloader_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3733 
3734 
3735 /*
3736  -------------------------
3737  END OF GENERATED CODE
3738  -------------------------
3739 */
3740 
3741 /* hand-crafted functions begin */
3742 
3755  result_t XIMC_API goto_firmware(device_t id, uint8_t* ret);
3756 
3769  result_t XIMC_API has_firmware(const char* name, uint8_t* ret);
3770 
3786  result_t XIMC_API command_update_firmware(const char* name, const uint8_t* data, uint32_t data_size);
3787 
3804  result_t XIMC_API write_key (const char* name, uint8_t* key);
3805 
3818  result_t XIMC_API command_reset(device_t id);
3819 
3832  result_t XIMC_API command_clear_fram(device_t id);
3833 
3835 
3836  // ------------------------------------
3837 
3849 
3860  device_t XIMC_API open_device (const char* name);
3861 
3872  result_t XIMC_API close_device (device_t* id);
3873 
3886  result_t XIMC_API probe_device (const char* name);
3887 
3898  device_enumeration_t XIMC_API enumerate_devices(int probe_flags);
3899 
3910  result_t XIMC_API free_enumerate_devices(device_enumeration_t device_enumeration);
3911 
3922  int XIMC_API get_device_count(device_enumeration_t device_enumeration);
3923 
3932  typedef char* pchar;
3933 
3948  pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index);
3949 
3950 
3967  result_t XIMC_API get_enumerate_device_serial(device_enumeration_t device_enumeration, int device_index, uint32_t* serial);
3968 
3985  result_t XIMC_API get_enumerate_device_information(device_enumeration_t device_enumeration, int device_index, device_information_t* device_information);
3986 
3994  result_t XIMC_API reset_locks ();
3995 
4005  result_t XIMC_API ximc_fix_usbser_sys(const char* device_name);
4006 
4007 
4017  void XIMC_API msec_sleep (unsigned int msec);
4018 
4028  void XIMC_API ximc_version (char* version);
4029 
4041  typedef void (XIMC_CALLCONV *logging_callback_t)(int loglevel, const wchar_t* message);
4042 
4054  void XIMC_API logging_callback_stderr_wide(int loglevel, const wchar_t* message);
4055 
4067  void XIMC_API logging_callback_stderr_narrow(int loglevel, const wchar_t* message);
4068 
4081  void XIMC_API set_logging_callback(logging_callback_t logging_callback);
4082 
4106  result_t XIMC_API get_status (device_t id, status_t* status);
4107 
4119  result_t XIMC_API get_status_calb (device_t id, status_calb_t* status, const calibration_t* calibration);
4120 
4146  result_t XIMC_API get_device_information (device_t id, device_information_t* device_information);
4147 
4149 
4150 #if defined(__cplusplus)
4151 };
4152 #endif
4153 
4154 #endif
4155 
4156 // vim: ts=4 shiftwidth=4
4157