libximc  2.2.1
ximc.h
См. документацию.
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.1
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_TEST 0x04
548 #define ENGINE_TYPE_BRUSHLESS 0x05
550 
551 
570 #define DRIVER_TYPE_DISCRETE_FET 0x01
571 #define DRIVER_TYPE_INTEGRATE 0x02
572 #define DRIVER_TYPE_EXTERNAL 0x03
574 
575 
592 #define POWER_REDUCT_ENABLED 0x01
593 #define POWER_OFF_ENABLED 0x02
594 #define POWER_SMOOTH_CURRENT 0x04
596 
597 
614 #define ALARM_ON_DRIVER_OVERHEATING 0x01
615 #define LOW_UPWR_PROTECTION 0x02
616 #define H_BRIDGE_ALERT 0x04
617 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
618 #define ALARM_FLAGS_STICKING 0x10
619 #define USB_BREAK_RECONNECT 0x20
621 
622 
638 #define SETPOS_IGNORE_POSITION 0x01
639 #define SETPOS_IGNORE_ENCODER 0x02
641 
642 
656 #define FEEDBACK_ENCODER 0x01
657 #define FEEDBACK_ENCODERHALL 0x03
658 #define FEEDBACK_EMF 0x04
659 #define FEEDBACK_NONE 0x05
661 
662 
676 #define FEEDBACK_ENC_REVERSE 0x01
677 #define FEEDBACK_HALL_REVERSE 0x02
679 
680 
695 #define SYNCIN_ENABLED 0x01
696 #define SYNCIN_INVERT 0x02
697 #define SYNCIN_GOTOPOSITION 0x04
699 
700 
715 #define SYNCOUT_ENABLED 0x01
716 #define SYNCOUT_STATE 0x02
717 #define SYNCOUT_INVERT 0x04
718 #define SYNCOUT_IN_STEPS 0x08
719 #define SYNCOUT_ONSTART 0x10
720 #define SYNCOUT_ONSTOP 0x20
721 #define SYNCOUT_ONPERIOD 0x40
723 
724 
739 #define EXTIO_SETUP_OUTPUT 0x01
740 #define EXTIO_SETUP_INVERT 0x02
742 
743 
758 #define EXTIO_SETUP_MODE_IN_NOP 0x00
759 #define EXTIO_SETUP_MODE_IN_STOP 0x01
760 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
761 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
762 #define EXTIO_SETUP_MODE_IN_HOME 0x04
763 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
764 #define EXTIO_SETUP_MODE_OUT_ON 0x10
765 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
766 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
767 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
768 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
770 
771 
789 #define BORDER_IS_ENCODER 0x01
790 #define BORDER_STOP_LEFT 0x02
791 #define BORDER_STOP_RIGHT 0x04
792 #define BORDERS_SWAP_MISSET_DETECTION 0x08
794 
795 
813 #define ENDER_SWAP 0x01
814 #define ENDER_SW1_ACTIVE_LOW 0x02
815 #define ENDER_SW2_ACTIVE_LOW 0x04
817 
818 
836 #define BRAKE_ENABLED 0x01
837 #define BRAKE_ENG_PWROFF 0x02
839 
840 
858 #define CONTROL_MODE_BITS 0x03
859 #define CONTROL_MODE_OFF 0x00
860 #define CONTROL_MODE_JOY 0x01
861 #define CONTROL_MODE_LR 0x02
862 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
863 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
865 
866 
882 #define JOY_REVERSE 0x01
884 
885 
903 #define CTP_ENABLED 0x01
904 #define CTP_BASE 0x02
905 #define CTP_ALARM_ON_ERROR 0x04
906 #define REV_SENS_INV 0x08
908 
909 
928 #define HOME_DIR_FIRST 0x01
929 #define HOME_DIR_SECOND 0x02
930 #define HOME_MV_SEC_EN 0x04
931 #define HOME_HALF_MV 0x08
932 #define HOME_STOP_FIRST_BITS 0x30
933 #define HOME_STOP_FIRST_REV 0x10
934 #define HOME_STOP_FIRST_SYN 0x20
935 #define HOME_STOP_FIRST_LIM 0x30
936 #define HOME_STOP_SECOND_BITS 0xC0
937 #define HOME_STOP_SECOND_REV 0x40
938 #define HOME_STOP_SECOND_SYN 0x80
939 #define HOME_STOP_SECOND_LIM 0xC0
941 
942 
954 #define UART_PARITY_BITS 0x03
955 #define UART_PARITY_BIT_EVEN 0x00
956 #define UART_PARITY_BIT_ODD 0x01
957 #define UART_PARITY_BIT_SPACE 0x02
958 #define UART_PARITY_BIT_MARK 0x03
959 #define UART_PARITY_BIT_USE 0x04
960 #define UART_STOP_BIT 0x08
962 
963 
975 #define MOTOR_TYPE_STEP 0x01
976 #define MOTOR_TYPE_DC 0x02
977 #define MOTOR_TYPE_BLDC 0x03
979 
980 
992 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
993 #define ENCSET_PUSHPULL_OUTPUT 0x004
994 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
995 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
996 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
998 
999 
1011 #define MB_AVAILABLE 0x01
1012 #define MB_POWERED_HOLD 0x02
1014 
1015 
1027 #define TS_TYPE_BITS 0x07
1028 #define TS_TYPE_THERMOCOUPLE 0x01
1029 #define TS_TYPE_SEMICONDUCTOR 0x02
1030 #define TS_AVAILABLE 0x08
1032 
1033 
1045 #define LS_ON_SW1_AVAILABLE 0x01
1046 #define LS_ON_SW2_AVAILABLE 0x02
1047 #define LS_SW1_ACTIVE_LOW 0x04
1048 #define LS_SW2_ACTIVE_LOW 0x08
1049 #define LS_SHORTED 0x10
1051 
1052 
1064  typedef struct
1065  {
1066  unsigned int IPS;
1067  unsigned int FeedbackType;
1068  unsigned int FeedbackFlags;
1069  unsigned int HallSPR;
1072 
1088  typedef struct
1089  {
1090  unsigned int FastHome;
1091  unsigned int uFastHome;
1092  unsigned int SlowHome;
1093  unsigned int uSlowHome;
1096  unsigned int HomeFlags;
1097  } home_settings_t;
1098 
1099  typedef struct
1100  {
1101  float FastHome;
1102  float SlowHome;
1103  float HomeDelta;
1104  unsigned int HomeFlags;
1106 
1118  typedef struct
1119  {
1120  unsigned int Speed;
1121  unsigned int uSpeed;
1122  unsigned int Accel;
1123  unsigned int Decel;
1124  unsigned int AntiplaySpeed;
1125  unsigned int uAntiplaySpeed;
1126  } move_settings_t;
1127 
1128  typedef struct
1129  {
1130  float Speed;
1131  float Accel;
1132  float Decel;
1135 
1156  typedef struct
1157  {
1158  unsigned int NomVoltage;
1159  unsigned int NomCurrent;
1160  unsigned int NomSpeed;
1161  unsigned int uNomSpeed;
1162  unsigned int EngineFlags;
1163  int Antiplay;
1164  unsigned int MicrostepMode;
1165  unsigned int StepsPerRev;
1167 
1168  typedef struct
1169  {
1170  unsigned int NomVoltage;
1171  unsigned int NomCurrent;
1172  float NomSpeed;
1173  unsigned int EngineFlags;
1174  float Antiplay;
1175  unsigned int MicrostepMode;
1176  unsigned int StepsPerRev;
1178 
1195  typedef struct
1196  {
1197  unsigned int EngineType;
1198  unsigned int DriverType;
1200 
1212  typedef struct
1213  {
1214  unsigned int HoldCurrent;
1215  unsigned int CurrReductDelay;
1216  unsigned int PowerOffDelay;
1217  unsigned int CurrentSetTime;
1218  unsigned int PowerFlags;
1219  } power_settings_t;
1220 
1234  typedef struct
1235  {
1236  unsigned int LowUpwrOff;
1237  unsigned int CriticalIpwr;
1238  unsigned int CriticalUpwr;
1239  unsigned int CriticalT;
1240  unsigned int CriticalIusb;
1241  unsigned int CriticalUusb;
1242  unsigned int MinimumUusb;
1243  unsigned int Flags;
1245 
1263  typedef struct
1264  {
1265  unsigned int BorderFlags;
1266  unsigned int EnderFlags;
1271  } edges_settings_t;
1272 
1273  typedef struct
1274  {
1275  unsigned int BorderFlags;
1276  unsigned int EnderFlags;
1277  float LeftBorder;
1278  float RightBorder;
1280 
1306  typedef struct
1307  {
1308  unsigned int KpU;
1309  unsigned int KiU;
1310  unsigned int KdU;
1311  } pid_settings_t;
1312 
1328  typedef struct
1329  {
1330  unsigned int SyncInFlags;
1331  unsigned int ClutterTime;
1332  int Position;
1334  unsigned int Speed;
1335  unsigned int uSpeed;
1337 
1338  typedef struct
1339  {
1340  unsigned int SyncInFlags;
1341  unsigned int ClutterTime;
1342  float Position;
1343  float Speed;
1345 
1361  typedef struct
1362  {
1363  unsigned int SyncOutFlags;
1364  unsigned int SyncOutPulseSteps;
1365  unsigned int SyncOutPeriod;
1366  unsigned int Accuracy;
1367  unsigned int uAccuracy;
1369 
1370  typedef struct
1371  {
1372  unsigned int SyncOutFlags;
1373  unsigned int SyncOutPulseSteps;
1374  unsigned int SyncOutPeriod;
1375  float Accuracy;
1377 
1394  typedef struct
1395  {
1396  unsigned int EXTIOSetupFlags;
1397  unsigned int EXTIOModeFlags;
1398  } extio_settings_t;
1399 
1413  typedef struct
1414  {
1415  unsigned int t1;
1416  unsigned int t2;
1417  unsigned int t3;
1418  unsigned int t4;
1419  unsigned int BrakeFlags;
1420  } brake_settings_t;
1421 
1451  typedef struct
1452  {
1453  unsigned int MaxSpeed[10];
1454  unsigned int uMaxSpeed[10];
1455  unsigned int Timeout[9];
1456  unsigned int MaxClickTime;
1457  unsigned int Flags;
1461 
1462  typedef struct
1463  {
1464  float MaxSpeed[10];
1465  unsigned int Timeout[9];
1466  unsigned int MaxClickTime;
1467  unsigned int Flags;
1470 
1499  typedef struct
1500  {
1501  unsigned int JoyLowEnd;
1502  unsigned int JoyCenter;
1503  unsigned int JoyHighEnd;
1504  unsigned int ExpFactor;
1505  unsigned int DeadZone;
1506  unsigned int JoyFlags;
1508 
1542  typedef struct
1543  {
1544  unsigned int CTPMinError;
1545  unsigned int CTPFlags;
1546  } ctp_settings_t;
1547 
1561  typedef struct
1562  {
1563  unsigned int Speed;
1564  unsigned int UARTSetupFlags;
1565  } uart_settings_t;
1566 
1576  typedef struct
1577  {
1578  char ControllerName[17];
1579  unsigned int CtrlFlags;
1581 
1591  typedef struct
1592  {
1593  int Position;
1595  unsigned int Speed;
1596  unsigned int uSpeed;
1598 
1599  typedef struct
1600  {
1601  float Position;
1602  float Speed;
1604 
1619  typedef struct
1620  {
1621  int Position;
1623  long long EncPosition;
1624  } get_position_t;
1625 
1626  typedef struct
1627  {
1628  float Position;
1629  long long EncPosition;
1631 
1646  typedef struct
1647  {
1648  int Position;
1650  long long EncPosition;
1651  unsigned int PosFlags;
1652  } set_position_t;
1653 
1654  typedef struct
1655  {
1656  float Position;
1657  long long EncPosition;
1658  unsigned int PosFlags;
1660 
1672  typedef struct
1673  {
1674  unsigned int MoveSts;
1675  unsigned int MvCmdSts;
1676  unsigned int PWRSts;
1677  unsigned int EncSts;
1678  unsigned int WindSts;
1681  long long EncPosition;
1682  int CurSpeed;
1684  int Ipwr;
1685  int Upwr;
1686  int Iusb;
1687  int Uusb;
1688  int CurT;
1689  unsigned int Flags;
1690  unsigned int GPIOFlags;
1691  unsigned int CmdBufFreeSpace;
1692  } status_t;
1693 
1694  typedef struct
1695  {
1696  unsigned int MoveSts;
1697  unsigned int MvCmdSts;
1698  unsigned int PWRSts;
1699  unsigned int EncSts;
1700  unsigned int WindSts;
1701  float CurPosition;
1702  long long EncPosition;
1703  float CurSpeed;
1704  int Ipwr;
1705  int Upwr;
1706  int Iusb;
1707  int Uusb;
1708  int CurT;
1709  unsigned int Flags;
1710  unsigned int GPIOFlags;
1711  unsigned int CmdBufFreeSpace;
1712  } status_calb_t;
1713 
1726  typedef struct
1727  {
1734  unsigned int Pot;
1735  unsigned int Joy;
1737  } chart_data_t;
1738 
1755  typedef struct
1756  {
1757  char Manufacturer[5];
1758  char ManufacturerId[3];
1759  char ProductDescription[9];
1761 
1777  typedef struct
1778  {
1779  unsigned int SN;
1780  unsigned int Key[32];
1781  } serial_number_t;
1782 
1797  typedef struct
1798  {
1799  unsigned int A1Voltage_ADC;
1800  unsigned int A2Voltage_ADC;
1801  unsigned int B1Voltage_ADC;
1802  unsigned int B2Voltage_ADC;
1803  unsigned int SupVoltage_ADC;
1804  unsigned int ACurrent_ADC;
1805  unsigned int BCurrent_ADC;
1806  unsigned int FullCurrent_ADC;
1807  unsigned int Temp_ADC;
1808  unsigned int Joy_ADC;
1809  unsigned int Pot_ADC;
1810  unsigned int L5_ADC;
1811  unsigned int H5_ADC;
1817  int ACurrent;
1818  int BCurrent;
1820  int Temp;
1821  int Joy;
1822  int Pot;
1823  int L5;
1824  int H5;
1825  unsigned int deprecated;
1826  int R;
1827  int L;
1828  } analog_data_t;
1829 
1841  typedef struct
1842  {
1843  unsigned int DebugData[128];
1844  } debug_read_t;
1845 
1855  typedef struct
1856  {
1857  char PositionerName[17];
1858  } stage_name_t;
1859 
1871  typedef struct
1872  {
1873  char Manufacturer[17];
1874  char PartNumber[25];
1876 
1888  typedef struct
1889  {
1891  char Units[9];
1892  float MaxSpeed;
1893  float TravelRange;
1899  } stage_settings_t;
1900 
1912  typedef struct
1913  {
1914  char Manufacturer[17];
1915  char PartNumber[25];
1917 
1929  typedef struct
1930  {
1931  unsigned int MotorType;
1932  unsigned int ReservedField;
1933  unsigned int Poles;
1934  unsigned int Phases;
1943  float StallTorque;
1949  float MaxSpeed;
1950  float MaxCurrent;
1953  float NoLoadSpeed;
1954  } motor_settings_t;
1955 
1967  typedef struct
1968  {
1969  char Manufacturer[17];
1970  char PartNumber[25];
1972 
1984  typedef struct
1985  {
1990  unsigned int PPR;
1991  unsigned int EncoderSettings;
1993 
2005  typedef struct
2006  {
2007  char Manufacturer[17];
2008  char PartNumber[25];
2010 
2022  typedef struct
2023  {
2028  unsigned int PPR;
2030 
2042  typedef struct
2043  {
2044  char Manufacturer[17];
2045  char PartNumber[25];
2047 
2059  typedef struct
2060  {
2061  float ReductionIn;
2067  float Efficiency;
2068  } gear_settings_t;
2069 
2081  typedef struct
2082  {
2083  char MagneticBrakeInfo[25];
2086  float MBTorque;
2087  unsigned int MBSettings;
2088  char TemperatureSensorInfo[25];
2089  float TSMin;
2090  float TSMax;
2091  float TSGrad;
2092  unsigned int TSSettings;
2093  unsigned int LimitSwitchesSettings;
2095 
2096 /*
2097  --------------------------------------------
2098  BEGIN OF GENERATED function declarations
2099  --------------------------------------------
2100 */
2101 
2114 
2131  result_t XIMC_API set_feedback_settings (device_t id, const feedback_settings_t* feedback_settings);
2132 
2149  result_t XIMC_API get_feedback_settings (device_t id, feedback_settings_t* feedback_settings);
2150 
2167  result_t XIMC_API set_home_settings (device_t id, const home_settings_t* home_settings);
2168 
2169  result_t XIMC_API set_home_settings_calb (device_t id, const home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2170 
2187  result_t XIMC_API get_home_settings (device_t id, home_settings_t* home_settings);
2188 
2189  result_t XIMC_API get_home_settings_calb (device_t id, home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2190 
2203  result_t XIMC_API set_move_settings (device_t id, const move_settings_t* move_settings);
2204 
2205  result_t XIMC_API set_move_settings_calb (device_t id, const move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2206 
2219  result_t XIMC_API get_move_settings (device_t id, move_settings_t* move_settings);
2220 
2221  result_t XIMC_API get_move_settings_calb (device_t id, move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2222 
2244  result_t XIMC_API set_engine_settings (device_t id, const engine_settings_t* engine_settings);
2245 
2246  result_t XIMC_API set_engine_settings_calb (device_t id, const engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2247 
2267  result_t XIMC_API get_engine_settings (device_t id, engine_settings_t* engine_settings);
2268 
2269  result_t XIMC_API get_engine_settings_calb (device_t id, engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2270 
2285  result_t XIMC_API set_entype_settings (device_t id, const entype_settings_t* entype_settings);
2286 
2301  result_t XIMC_API get_entype_settings (device_t id, entype_settings_t* entype_settings);
2302 
2316  result_t XIMC_API set_power_settings (device_t id, const power_settings_t* power_settings);
2317 
2332  result_t XIMC_API get_power_settings (device_t id, power_settings_t* power_settings);
2333 
2347  result_t XIMC_API set_secure_settings (device_t id, const secure_settings_t* secure_settings);
2348 
2362  result_t XIMC_API get_secure_settings (device_t id, secure_settings_t* secure_settings);
2363 
2378  result_t XIMC_API set_edges_settings (device_t id, const edges_settings_t* edges_settings);
2379 
2380  result_t XIMC_API set_edges_settings_calb (device_t id, const edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2381 
2396  result_t XIMC_API get_edges_settings (device_t id, edges_settings_t* edges_settings);
2397 
2398  result_t XIMC_API get_edges_settings_calb (device_t id, edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2399 
2423  result_t XIMC_API set_pid_settings (device_t id, const pid_settings_t* pid_settings);
2424 
2445  result_t XIMC_API get_pid_settings (device_t id, pid_settings_t* pid_settings);
2446 
2464  result_t XIMC_API set_sync_in_settings (device_t id, const sync_in_settings_t* sync_in_settings);
2465 
2466  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);
2467 
2485  result_t XIMC_API get_sync_in_settings (device_t id, sync_in_settings_t* sync_in_settings);
2486 
2487  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);
2488 
2506  result_t XIMC_API set_sync_out_settings (device_t id, const sync_out_settings_t* sync_out_settings);
2507 
2508  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);
2509 
2524  result_t XIMC_API get_sync_out_settings (device_t id, sync_out_settings_t* sync_out_settings);
2525 
2526  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);
2527 
2546  result_t XIMC_API set_extio_settings (device_t id, const extio_settings_t* extio_settings);
2547 
2563  result_t XIMC_API get_extio_settings (device_t id, extio_settings_t* extio_settings);
2564 
2577  result_t XIMC_API set_brake_settings (device_t id, const brake_settings_t* brake_settings);
2578 
2591  result_t XIMC_API get_brake_settings (device_t id, brake_settings_t* brake_settings);
2592 
2621  result_t XIMC_API set_control_settings (device_t id, const control_settings_t* control_settings);
2622 
2623  result_t XIMC_API set_control_settings_calb (device_t id, const control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2624 
2653  result_t XIMC_API get_control_settings (device_t id, control_settings_t* control_settings);
2654 
2655  result_t XIMC_API get_control_settings_calb (device_t id, control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2656 
2692  result_t XIMC_API set_joystick_settings (device_t id, const joystick_settings_t* joystick_settings);
2693 
2729  result_t XIMC_API get_joystick_settings (device_t id, joystick_settings_t* joystick_settings);
2730 
2765  result_t XIMC_API set_ctp_settings (device_t id, const ctp_settings_t* ctp_settings);
2766 
2801  result_t XIMC_API get_ctp_settings (device_t id, ctp_settings_t* ctp_settings);
2802 
2819  result_t XIMC_API set_uart_settings (device_t id, const uart_settings_t* uart_settings);
2820 
2837  result_t XIMC_API get_uart_settings (device_t id, uart_settings_t* uart_settings);
2838 
2851  result_t XIMC_API set_controller_name (device_t id, const controller_name_t* controller_name);
2852 
2865  result_t XIMC_API get_controller_name (device_t id, controller_name_t* controller_name);
2866 
2867 
2869 
2882 
2900  result_t XIMC_API command_stop (device_t id);
2901 
2921  result_t XIMC_API set_add_sync_in_action (device_t id, const add_sync_in_action_t* add_sync_in_action);
2922 
2923  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);
2924 
2943  result_t XIMC_API command_power_off (device_t id);
2944 
2964  result_t XIMC_API command_move (device_t id, int Position, int uPosition);
2965 
2966  result_t XIMC_API command_move_calb (device_t id, float Position, const calibration_t* calibration);
2967 
2989  result_t XIMC_API command_movr (device_t id, int DeltaPosition, int uDeltaPosition);
2990 
2991  result_t XIMC_API command_movr_calb (device_t id, float DeltaPosition, const calibration_t* calibration);
2992 
3032  result_t XIMC_API command_home (device_t id);
3033 
3044  result_t XIMC_API command_left (device_t id);
3045 
3056  result_t XIMC_API command_right (device_t id);
3057 
3070  result_t XIMC_API command_loft (device_t id);
3071 
3082  result_t XIMC_API command_sstp (device_t id);
3083 
3098  result_t XIMC_API get_position (device_t id, get_position_t* the_get_position);
3099 
3100  result_t XIMC_API get_position_calb (device_t id, get_position_calb_t* the_get_position_calb, const calibration_t* calibration);
3101 
3118  result_t XIMC_API set_position (device_t id, const set_position_t* the_set_position);
3119 
3120  result_t XIMC_API set_position_calb (device_t id, const set_position_calb_t* the_set_position_calb, const calibration_t* calibration);
3121 
3144  result_t XIMC_API command_zero (device_t id);
3145 
3146 
3148 
3161 
3172  result_t XIMC_API command_save_settings (device_t id);
3173 
3184  result_t XIMC_API command_read_settings (device_t id);
3185 
3198  result_t XIMC_API command_eesave_settings (device_t id);
3199 
3211  result_t XIMC_API command_eeread_settings (device_t id);
3212 
3229  result_t XIMC_API get_chart_data (device_t id, chart_data_t* chart_data);
3230 
3243  result_t XIMC_API get_serial_number (device_t id, unsigned int* SerialNumber);
3244 
3261  result_t XIMC_API get_firmware_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3262 
3273  result_t XIMC_API service_command_updf (device_t id);
3274 
3275 
3277 
3290 
3309  result_t XIMC_API set_serial_number (device_t id, const serial_number_t* serial_number);
3310 
3325  result_t XIMC_API get_analog_data (device_t id, analog_data_t* analog_data);
3326 
3341  result_t XIMC_API get_debug_read (device_t id, debug_read_t* debug_read);
3342 
3343 
3345 
3358 
3371  result_t XIMC_API set_stage_name (device_t id, const stage_name_t* stage_name);
3372 
3385  result_t XIMC_API get_stage_name (device_t id, stage_name_t* stage_name);
3386 
3401  result_t XIMC_API set_stage_information (device_t id, const stage_information_t* stage_information);
3402 
3415  result_t XIMC_API get_stage_information (device_t id, stage_information_t* stage_information);
3416 
3431  result_t XIMC_API set_stage_settings (device_t id, const stage_settings_t* stage_settings);
3432 
3445  result_t XIMC_API get_stage_settings (device_t id, stage_settings_t* stage_settings);
3446 
3461  result_t XIMC_API set_motor_information (device_t id, const motor_information_t* motor_information);
3462 
3475  result_t XIMC_API get_motor_information (device_t id, motor_information_t* motor_information);
3476 
3491  result_t XIMC_API set_motor_settings (device_t id, const motor_settings_t* motor_settings);
3492 
3505  result_t XIMC_API get_motor_settings (device_t id, motor_settings_t* motor_settings);
3506 
3521  result_t XIMC_API set_encoder_information (device_t id, const encoder_information_t* encoder_information);
3522 
3535  result_t XIMC_API get_encoder_information (device_t id, encoder_information_t* encoder_information);
3536 
3551  result_t XIMC_API set_encoder_settings (device_t id, const encoder_settings_t* encoder_settings);
3552 
3565  result_t XIMC_API get_encoder_settings (device_t id, encoder_settings_t* encoder_settings);
3566 
3581  result_t XIMC_API set_hallsensor_information (device_t id, const hallsensor_information_t* hallsensor_information);
3582 
3595  result_t XIMC_API get_hallsensor_information (device_t id, hallsensor_information_t* hallsensor_information);
3596 
3611  result_t XIMC_API set_hallsensor_settings (device_t id, const hallsensor_settings_t* hallsensor_settings);
3612 
3625  result_t XIMC_API get_hallsensor_settings (device_t id, hallsensor_settings_t* hallsensor_settings);
3626 
3641  result_t XIMC_API set_gear_information (device_t id, const gear_information_t* gear_information);
3642 
3655  result_t XIMC_API get_gear_information (device_t id, gear_information_t* gear_information);
3656 
3671  result_t XIMC_API set_gear_settings (device_t id, const gear_settings_t* gear_settings);
3672 
3685  result_t XIMC_API get_gear_settings (device_t id, gear_settings_t* gear_settings);
3686 
3701  result_t XIMC_API set_accessories_settings (device_t id, const accessories_settings_t* accessories_settings);
3702 
3715  result_t XIMC_API get_accessories_settings (device_t id, accessories_settings_t* accessories_settings);
3716 
3733  result_t XIMC_API get_bootloader_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3734 
3735 
3736 /*
3737  -------------------------
3738  END OF GENERATED CODE
3739  -------------------------
3740 */
3741 
3742 /* hand-crafted functions begin */
3743 
3756  result_t XIMC_API goto_firmware(device_t id, uint8_t* ret);
3757 
3770  result_t XIMC_API has_firmware(const char* name, uint8_t* ret);
3771 
3787  result_t XIMC_API command_update_firmware(const char* name, const uint8_t* data, uint32_t data_size);
3788 
3805  result_t XIMC_API write_key (const char* name, uint8_t* key);
3806 
3819  result_t XIMC_API command_reset(device_t id);
3820 
3833  result_t XIMC_API command_clear_fram(device_t id);
3834 
3836 
3837  // ------------------------------------
3838 
3850 
3861  device_t XIMC_API open_device (const char* name);
3862 
3873  result_t XIMC_API close_device (device_t* id);
3874 
3887  result_t XIMC_API probe_device (const char* name);
3888 
3899  device_enumeration_t XIMC_API enumerate_devices(int probe_flags);
3900 
3911  result_t XIMC_API free_enumerate_devices(device_enumeration_t device_enumeration);
3912 
3923  int XIMC_API get_device_count(device_enumeration_t device_enumeration);
3924 
3933  typedef char* pchar;
3934 
3949  pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index);
3950 
3951 
3968  result_t XIMC_API get_enumerate_device_serial(device_enumeration_t device_enumeration, int device_index, uint32_t* serial);
3969 
3986  result_t XIMC_API get_enumerate_device_information(device_enumeration_t device_enumeration, int device_index, device_information_t* device_information);
3987 
3995  result_t XIMC_API reset_locks ();
3996 
4006  result_t XIMC_API ximc_fix_usbser_sys(const char* device_name);
4007 
4008 
4018  void XIMC_API msec_sleep (unsigned int msec);
4019 
4029  void XIMC_API ximc_version (char* version);
4030 
4042  typedef void (XIMC_CALLCONV *logging_callback_t)(int loglevel, const wchar_t* message);
4043 
4055  void XIMC_API logging_callback_stderr_wide(int loglevel, const wchar_t* message);
4056 
4068  void XIMC_API logging_callback_stderr_narrow(int loglevel, const wchar_t* message);
4069 
4082  void XIMC_API set_logging_callback(logging_callback_t logging_callback);
4083 
4107  result_t XIMC_API get_status (device_t id, status_t* status);
4108 
4120  result_t XIMC_API get_status_calb (device_t id, status_calb_t* status, const calibration_t* calibration);
4121 
4147  result_t XIMC_API get_device_information (device_t id, device_information_t* device_information);
4148 
4150 
4151 #if defined(__cplusplus)
4152 };
4153 #endif
4154 
4155 #endif
4156 
4157 // vim: ts=4 shiftwidth=4
4158