libximc  2.8.9
ximc.h
См. документацию.
1 #ifndef INC_XIMC_H
2 #define INC_XIMC_H
3 
19 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_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) || defined(MATLAB_IMPORT)
34  #define XIMC_CALLCONV __stdcall
35 #else
36  #define XIMC_CALLCONV
37 #endif
38 
43 #if defined(_WIN32) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT) || defined(MATLAB_IMPORT)
44 #define XIMC_RETTYPE unsigned int
45 #else
46 #define XIMC_RETTYPE void*
47 #endif
48 
49 
50 #if !defined(XIMC_NO_STDINT)
51 
52 #if (defined(_MSC_VER) || defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)) && !defined(MATLAB_IMPORT)
53 // msvc types burden
54 typedef __int8 int8_t;
55 typedef __int16 int16_t;
56 typedef __int32 int32_t;
57 typedef __int64 int64_t;
58 typedef unsigned __int8 uint8_t;
59 typedef unsigned __int16 uint16_t;
60 typedef unsigned __int32 uint32_t;
61 typedef unsigned __int64 uint64_t;
62 #else
63 #include <stdint.h>
64 #endif
65 
66 /* labview doesn't speak C99 */
67 #if defined(LABVIEW64_IMPORT) || defined(LABVIEW32_IMPORT)
68 typedef unsigned __int64 ulong_t;
69 typedef __int64 long_t;
70 #else
71 typedef unsigned long long ulong_t;
72 typedef long long long_t;
73 #endif
74 
75 #endif
76 
77 #include <time.h>
78 
79 #if defined(__cplusplus)
80 extern "C"
81 {
82 #endif
83 
84 
93  typedef int device_t;
94 
103  typedef int result_t;
104 
113  #if defined(_WIN64) || defined(__LP64__) || defined(LABVIEW64_IMPORT)
114  typedef uint64_t device_enumeration_t;
115  #else
116  typedef uint32_t device_enumeration_t;
117  #endif
118  //typedef device_enumeration_t* pdevice_enumeration_t;
119 
128 #define device_undefined -1
129 
138 
147 #define result_ok 0
148 
157 #define result_error -1
158 
167 #define result_not_implemented -2
168 
177 #define result_value_error -3
178 
187 #define result_nodevice -4
188 
190 
199 
208 #define LOGLEVEL_ERROR 0x01
209 
217 #define LOGLEVEL_WARNING 0x02
218 
226 #define LOGLEVEL_INFO 0x03
227 
235 #define LOGLEVEL_DEBUG 0x04
236 
237 
238 
246  typedef struct calibration_t
247  {
248  double A;
249  unsigned int MicrostepMode;
250  } calibration_t;
251 
260  {
261  uint32_t ipv4;
262  char nodename[16];
263  uint32_t axis_state;
264  char locker_username[16];
265  char locker_nodename[16];
266  time_t locked_time;
268 
269 
270 
272 #define LIBXIMC_VERSION 2.8.9
273 
277 #define LIBXIMC_PROTOCOL_VERSION 16.11
278 
281 /*
282  ------------------------------------------
283  BEGIN OF GENERATED struct declarations
284  ------------------------------------------
285 */
286 
296 #define ENUMERATE_PROBE 0x01
297 #define ENUMERATE_ALL_COM 0x02
298 #define ENUMERATE_NETWORK 0x04
300 
301 
317 #define MOVE_STATE_MOVING 0x01
318 #define MOVE_STATE_TARGET_SPEED 0x02
319 #define MOVE_STATE_ANTIPLAY 0x04
321 
322 
336 #define EEPROM_PRECEDENCE 0x01
338 
339 
355 #define PWR_STATE_UNKNOWN 0x00
356 #define PWR_STATE_OFF 0x01
357 #define PWR_STATE_NORM 0x03
358 #define PWR_STATE_REDUCT 0x04
359 #define PWR_STATE_MAX 0x05
361 
362 
380 #define STATE_CONTR 0x0003F
381 #define STATE_ERRC 0x00001
382 #define STATE_ERRD 0x00002
383 #define STATE_ERRV 0x00004
384 #define STATE_EEPROM_CONNECTED 0x00010
385 #define STATE_IS_HOMED 0x00020
386 #define STATE_SECUR 0x3FFC0
387 #define STATE_ALARM 0x00040
388 #define STATE_CTP_ERROR 0x00080
389 #define STATE_POWER_OVERHEAT 0x00100
390 #define STATE_CONTROLLER_OVERHEAT 0x00200
391 #define STATE_OVERLOAD_POWER_VOLTAGE 0x00400
392 #define STATE_OVERLOAD_POWER_CURRENT 0x00800
393 #define STATE_OVERLOAD_USB_VOLTAGE 0x01000
394 #define STATE_LOW_USB_VOLTAGE 0x02000
395 #define STATE_OVERLOAD_USB_CURRENT 0x04000
396 #define STATE_BORDERS_SWAP_MISSET 0x08000
397 #define STATE_LOW_POWER_VOLTAGE 0x10000
398 #define STATE_H_BRIDGE_FAULT 0x20000
400 
401 
419 #define STATE_DIG_SIGNAL 0xFFFF
420 #define STATE_RIGHT_EDGE 0x0001
421 #define STATE_LEFT_EDGE 0x0002
422 #define STATE_BUTTON_RIGHT 0x0004
423 #define STATE_BUTTON_LEFT 0x0008
424 #define STATE_GPIO_PINOUT 0x0010
425 #define STATE_GPIO_LEVEL 0x0020
426 #define STATE_HALL_A 0x0040
427 #define STATE_HALL_B 0x0080
428 #define STATE_HALL_C 0x0100
429 #define STATE_BRAKE 0x0200
430 #define STATE_REV_SENSOR 0x0400
431 #define STATE_SYNC_INPUT 0x0800
432 #define STATE_SYNC_OUTPUT 0x1000
433 #define STATE_ENC_A 0x2000
434 #define STATE_ENC_B 0x4000
436 
437 
453 #define ENC_STATE_ABSENT 0x00
454 #define ENC_STATE_UNKNOWN 0x01
455 #define ENC_STATE_MALFUNC 0x02
456 #define ENC_STATE_REVERS 0x03
457 #define ENC_STATE_OK 0x04
459 
460 
476 #define WIND_A_STATE_ABSENT 0x00
477 #define WIND_A_STATE_UNKNOWN 0x01
478 #define WIND_A_STATE_MALFUNC 0x02
479 #define WIND_A_STATE_OK 0x03
480 #define WIND_B_STATE_ABSENT 0x00
481 #define WIND_B_STATE_UNKNOWN 0x10
482 #define WIND_B_STATE_MALFUNC 0x20
483 #define WIND_B_STATE_OK 0x30
485 
486 
504 #define MVCMD_NAME_BITS 0x3F
505 #define MVCMD_UKNWN 0x00
506 #define MVCMD_MOVE 0x01
507 #define MVCMD_MOVR 0x02
508 #define MVCMD_LEFT 0x03
509 #define MVCMD_RIGHT 0x04
510 #define MVCMD_STOP 0x05
511 #define MVCMD_HOME 0x06
512 #define MVCMD_LOFT 0x07
513 #define MVCMD_SSTP 0x08
514 #define MVCMD_ERROR 0x40
515 #define MVCMD_RUNNING 0x80
517 
518 
537 #define ENGINE_REVERSE 0x01
538 #define ENGINE_MAX_SPEED 0x04
539 #define ENGINE_ANTIPLAY 0x08
540 #define ENGINE_ACCEL_ON 0x10
541 #define ENGINE_LIMIT_VOLT 0x20
542 #define ENGINE_LIMIT_CURR 0x40
543 #define ENGINE_LIMIT_RPM 0x80
545 
546 
565 #define MICROSTEP_MODE_FULL 0x01
566 #define MICROSTEP_MODE_FRAC_2 0x02
567 #define MICROSTEP_MODE_FRAC_4 0x03
568 #define MICROSTEP_MODE_FRAC_8 0x04
569 #define MICROSTEP_MODE_FRAC_16 0x05
570 #define MICROSTEP_MODE_FRAC_32 0x06
571 #define MICROSTEP_MODE_FRAC_64 0x07
572 #define MICROSTEP_MODE_FRAC_128 0x08
573 #define MICROSTEP_MODE_FRAC_256 0x09
575 
576 
595 #define ENGINE_TYPE_NONE 0x00
596 #define ENGINE_TYPE_DC 0x01
597 #define ENGINE_TYPE_2DC 0x02
598 #define ENGINE_TYPE_STEP 0x03
599 #define ENGINE_TYPE_TEST 0x04
600 #define ENGINE_TYPE_BRUSHLESS 0x05
602 
603 
622 #define DRIVER_TYPE_DISCRETE_FET 0x01
623 #define DRIVER_TYPE_INTEGRATE 0x02
624 #define DRIVER_TYPE_EXTERNAL 0x03
626 
627 
644 #define POWER_REDUCT_ENABLED 0x01
645 #define POWER_OFF_ENABLED 0x02
646 #define POWER_SMOOTH_CURRENT 0x04
648 
649 
666 #define ALARM_ON_DRIVER_OVERHEATING 0x01
667 #define LOW_UPWR_PROTECTION 0x02
668 #define H_BRIDGE_ALERT 0x04
669 #define ALARM_ON_BORDERS_SWAP_MISSET 0x08
670 #define ALARM_FLAGS_STICKING 0x10
671 #define USB_BREAK_RECONNECT 0x20
673 
674 
690 #define SETPOS_IGNORE_POSITION 0x01
691 #define SETPOS_IGNORE_ENCODER 0x02
693 
694 
708 #define FEEDBACK_ENCODER 0x01
709 #define FEEDBACK_ENCODERHALL 0x03
710 #define FEEDBACK_EMF 0x04
711 #define FEEDBACK_NONE 0x05
713 
714 
728 #define FEEDBACK_ENC_REVERSE 0x01
729 #define FEEDBACK_HALL_REVERSE 0x02
731 
732 
747 #define SYNCIN_ENABLED 0x01
748 #define SYNCIN_INVERT 0x02
749 #define SYNCIN_GOTOPOSITION 0x04
751 
752 
767 #define SYNCOUT_ENABLED 0x01
768 #define SYNCOUT_STATE 0x02
769 #define SYNCOUT_INVERT 0x04
770 #define SYNCOUT_IN_STEPS 0x08
771 #define SYNCOUT_ONSTART 0x10
772 #define SYNCOUT_ONSTOP 0x20
773 #define SYNCOUT_ONPERIOD 0x40
775 
776 
791 #define EXTIO_SETUP_OUTPUT 0x01
792 #define EXTIO_SETUP_INVERT 0x02
794 
795 
810 #define EXTIO_SETUP_MODE_IN_BITS 0x0F
811 #define EXTIO_SETUP_MODE_IN_NOP 0x00
812 #define EXTIO_SETUP_MODE_IN_STOP 0x01
813 #define EXTIO_SETUP_MODE_IN_PWOF 0x02
814 #define EXTIO_SETUP_MODE_IN_MOVR 0x03
815 #define EXTIO_SETUP_MODE_IN_HOME 0x04
816 #define EXTIO_SETUP_MODE_IN_ALARM 0x05
817 #define EXTIO_SETUP_MODE_OUT_BITS 0xF0
818 #define EXTIO_SETUP_MODE_OUT_OFF 0x00
819 #define EXTIO_SETUP_MODE_OUT_ON 0x10
820 #define EXTIO_SETUP_MODE_OUT_MOVING 0x20
821 #define EXTIO_SETUP_MODE_OUT_ALARM 0x30
822 #define EXTIO_SETUP_MODE_OUT_MOTOR_ON 0x40
823 #define EXTIO_SETUP_MODE_OUT_MOTOR_FOUND 0x50
825 
826 
844 #define BORDER_IS_ENCODER 0x01
845 #define BORDER_STOP_LEFT 0x02
846 #define BORDER_STOP_RIGHT 0x04
847 #define BORDERS_SWAP_MISSET_DETECTION 0x08
849 
850 
868 #define ENDER_SWAP 0x01
869 #define ENDER_SW1_ACTIVE_LOW 0x02
870 #define ENDER_SW2_ACTIVE_LOW 0x04
872 
873 
891 #define BRAKE_ENABLED 0x01
892 #define BRAKE_ENG_PWROFF 0x02
894 
895 
913 #define CONTROL_MODE_BITS 0x03
914 #define CONTROL_MODE_OFF 0x00
915 #define CONTROL_MODE_JOY 0x01
916 #define CONTROL_MODE_LR 0x02
917 #define CONTROL_BTN_LEFT_PUSHED_OPEN 0x04
918 #define CONTROL_BTN_RIGHT_PUSHED_OPEN 0x08
920 
921 
937 #define JOY_REVERSE 0x01
939 
940 
958 #define CTP_ENABLED 0x01
959 #define CTP_BASE 0x02
960 #define CTP_ALARM_ON_ERROR 0x04
961 #define REV_SENS_INV 0x08
962 #define CTP_ERROR_CORRECTION 0x10
964 
965 
984 #define HOME_DIR_FIRST 0x01
985 #define HOME_DIR_SECOND 0x02
986 #define HOME_MV_SEC_EN 0x04
987 #define HOME_HALF_MV 0x08
988 #define HOME_STOP_FIRST_BITS 0x30
989 #define HOME_STOP_FIRST_REV 0x10
990 #define HOME_STOP_FIRST_SYN 0x20
991 #define HOME_STOP_FIRST_LIM 0x30
992 #define HOME_STOP_SECOND_BITS 0xC0
993 #define HOME_STOP_SECOND_REV 0x40
994 #define HOME_STOP_SECOND_SYN 0x80
995 #define HOME_STOP_SECOND_LIM 0xC0
997 
998 
1010 #define UART_PARITY_BITS 0x03
1011 #define UART_PARITY_BIT_EVEN 0x00
1012 #define UART_PARITY_BIT_ODD 0x01
1013 #define UART_PARITY_BIT_SPACE 0x02
1014 #define UART_PARITY_BIT_MARK 0x03
1015 #define UART_PARITY_BIT_USE 0x04
1016 #define UART_STOP_BIT 0x08
1018 
1019 
1031 #define MOTOR_TYPE_UNKNOWN 0x00
1032 #define MOTOR_TYPE_STEP 0x01
1033 #define MOTOR_TYPE_DC 0x02
1034 #define MOTOR_TYPE_BLDC 0x03
1036 
1037 
1049 #define ENCSET_DIFFERENTIAL_OUTPUT 0x001
1050 #define ENCSET_PUSHPULL_OUTPUT 0x004
1051 #define ENCSET_INDEXCHANNEL_PRESENT 0x010
1052 #define ENCSET_REVOLUTIONSENSOR_PRESENT 0x040
1053 #define ENCSET_REVOLUTIONSENSOR_ACTIVE_HIGH 0x100
1055 
1056 
1068 #define MB_AVAILABLE 0x01
1069 #define MB_POWERED_HOLD 0x02
1071 
1072 
1084 #define TS_TYPE_BITS 0x07
1085 #define TS_TYPE_UNKNOWN 0x00
1086 #define TS_TYPE_THERMOCOUPLE 0x01
1087 #define TS_TYPE_SEMICONDUCTOR 0x02
1088 #define TS_AVAILABLE 0x08
1090 
1091 
1103 #define LS_ON_SW1_AVAILABLE 0x01
1104 #define LS_ON_SW2_AVAILABLE 0x02
1105 #define LS_SW1_ACTIVE_LOW 0x04
1106 #define LS_SW2_ACTIVE_LOW 0x08
1107 #define LS_SHORTED 0x10
1109 
1110 
1122  typedef struct
1123  {
1124  unsigned int IPS;
1125  unsigned int FeedbackType;
1126  unsigned int FeedbackFlags;
1127  unsigned int HallSPR;
1130 
1146  typedef struct
1147  {
1148  unsigned int FastHome;
1149  unsigned int uFastHome;
1150  unsigned int SlowHome;
1151  unsigned int uSlowHome;
1154  unsigned int HomeFlags;
1155  } home_settings_t;
1156 
1157  typedef struct
1158  {
1159  float FastHome;
1160  float SlowHome;
1161  float HomeDelta;
1162  unsigned int HomeFlags;
1164 
1176  typedef struct
1177  {
1178  unsigned int Speed;
1179  unsigned int uSpeed;
1180  unsigned int Accel;
1181  unsigned int Decel;
1182  unsigned int AntiplaySpeed;
1183  unsigned int uAntiplaySpeed;
1184  } move_settings_t;
1185 
1186  typedef struct
1187  {
1188  float Speed;
1189  float Accel;
1190  float Decel;
1193 
1214  typedef struct
1215  {
1216  unsigned int NomVoltage;
1217  unsigned int NomCurrent;
1218  unsigned int NomSpeed;
1219  unsigned int uNomSpeed;
1220  unsigned int EngineFlags;
1221  int Antiplay;
1222  unsigned int MicrostepMode;
1223  unsigned int StepsPerRev;
1225 
1226  typedef struct
1227  {
1228  unsigned int NomVoltage;
1229  unsigned int NomCurrent;
1230  float NomSpeed;
1231  unsigned int EngineFlags;
1232  float Antiplay;
1233  unsigned int MicrostepMode;
1234  unsigned int StepsPerRev;
1236 
1253  typedef struct
1254  {
1255  unsigned int EngineType;
1256  unsigned int DriverType;
1258 
1270  typedef struct
1271  {
1272  unsigned int HoldCurrent;
1273  unsigned int CurrReductDelay;
1274  unsigned int PowerOffDelay;
1275  unsigned int CurrentSetTime;
1276  unsigned int PowerFlags;
1277  } power_settings_t;
1278 
1292  typedef struct
1293  {
1294  unsigned int LowUpwrOff;
1295  unsigned int CriticalIpwr;
1296  unsigned int CriticalUpwr;
1297  unsigned int CriticalT;
1298  unsigned int CriticalIusb;
1299  unsigned int CriticalUusb;
1300  unsigned int MinimumUusb;
1301  unsigned int Flags;
1303 
1321  typedef struct
1322  {
1323  unsigned int BorderFlags;
1324  unsigned int EnderFlags;
1329  } edges_settings_t;
1330 
1331  typedef struct
1332  {
1333  unsigned int BorderFlags;
1334  unsigned int EnderFlags;
1335  float LeftBorder;
1336  float RightBorder;
1338 
1362  typedef struct
1363  {
1364  unsigned int KpU;
1365  unsigned int KiU;
1366  unsigned int KdU;
1367  } pid_settings_t;
1368 
1384  typedef struct
1385  {
1386  unsigned int SyncInFlags;
1387  unsigned int ClutterTime;
1388  int Position;
1390  unsigned int Speed;
1391  unsigned int uSpeed;
1393 
1394  typedef struct
1395  {
1396  unsigned int SyncInFlags;
1397  unsigned int ClutterTime;
1398  float Position;
1399  float Speed;
1401 
1417  typedef struct
1418  {
1419  unsigned int SyncOutFlags;
1420  unsigned int SyncOutPulseSteps;
1421  unsigned int SyncOutPeriod;
1422  unsigned int Accuracy;
1423  unsigned int uAccuracy;
1425 
1426  typedef struct
1427  {
1428  unsigned int SyncOutFlags;
1429  unsigned int SyncOutPulseSteps;
1430  unsigned int SyncOutPeriod;
1431  float Accuracy;
1433 
1450  typedef struct
1451  {
1452  unsigned int EXTIOSetupFlags;
1453  unsigned int EXTIOModeFlags;
1454  } extio_settings_t;
1455 
1469  typedef struct
1470  {
1471  unsigned int t1;
1472  unsigned int t2;
1473  unsigned int t3;
1474  unsigned int t4;
1475  unsigned int BrakeFlags;
1476  } brake_settings_t;
1477 
1507  typedef struct
1508  {
1509  unsigned int MaxSpeed[10];
1510  unsigned int uMaxSpeed[10];
1511  unsigned int Timeout[9];
1512  unsigned int MaxClickTime;
1513  unsigned int Flags;
1517 
1518  typedef struct
1519  {
1520  float MaxSpeed[10];
1521  unsigned int Timeout[9];
1522  unsigned int MaxClickTime;
1523  unsigned int Flags;
1526 
1555  typedef struct
1556  {
1557  unsigned int JoyLowEnd;
1558  unsigned int JoyCenter;
1559  unsigned int JoyHighEnd;
1560  unsigned int ExpFactor;
1561  unsigned int DeadZone;
1562  unsigned int JoyFlags;
1564 
1598  typedef struct
1599  {
1600  unsigned int CTPMinError;
1601  unsigned int CTPFlags;
1602  } ctp_settings_t;
1603 
1617  typedef struct
1618  {
1619  unsigned int Speed;
1620  unsigned int UARTSetupFlags;
1621  } uart_settings_t;
1622 
1632  typedef struct
1633  {
1634  char ControllerName[17];
1635  unsigned int CtrlFlags;
1637 
1647  typedef struct
1648  {
1649  int Position;
1651  unsigned int Time;
1653 
1654  typedef struct
1655  {
1656  float Position;
1657  unsigned int Time;
1659 
1674  typedef struct
1675  {
1676  int Position;
1678  long_t EncPosition;
1679  } get_position_t;
1680 
1681  typedef struct
1682  {
1683  float Position;
1684  long_t EncPosition;
1686 
1701  typedef struct
1702  {
1703  int Position;
1705  long_t EncPosition;
1706  unsigned int PosFlags;
1707  } set_position_t;
1708 
1709  typedef struct
1710  {
1711  float Position;
1712  long_t EncPosition;
1713  unsigned int PosFlags;
1715 
1727  typedef struct
1728  {
1729  unsigned int MoveSts;
1730  unsigned int MvCmdSts;
1731  unsigned int PWRSts;
1732  unsigned int EncSts;
1733  unsigned int WindSts;
1736  long_t EncPosition;
1737  int CurSpeed;
1739  int Ipwr;
1740  int Upwr;
1741  int Iusb;
1742  int Uusb;
1743  int CurT;
1744  unsigned int Flags;
1745  unsigned int GPIOFlags;
1746  unsigned int CmdBufFreeSpace;
1747  } status_t;
1748 
1749  typedef struct
1750  {
1751  unsigned int MoveSts;
1752  unsigned int MvCmdSts;
1753  unsigned int PWRSts;
1754  unsigned int EncSts;
1755  unsigned int WindSts;
1756  float CurPosition;
1757  long_t EncPosition;
1758  float CurSpeed;
1759  int Ipwr;
1760  int Upwr;
1761  int Iusb;
1762  int Uusb;
1763  int CurT;
1764  unsigned int Flags;
1765  unsigned int GPIOFlags;
1766  unsigned int CmdBufFreeSpace;
1767  } status_calb_t;
1768 
1781  typedef struct
1782  {
1789  unsigned int Pot;
1790  unsigned int Joy;
1792  } chart_data_t;
1793 
1810  typedef struct
1811  {
1812  char Manufacturer[5];
1813  char ManufacturerId[3];
1814  char ProductDescription[9];
1815  unsigned int Major;
1816  unsigned int Minor;
1817  unsigned int Release;
1819 
1835  typedef struct
1836  {
1837  unsigned int SN;
1838  unsigned int Key[32];
1839  unsigned int Major;
1840  unsigned int Minor;
1841  unsigned int Release;
1842  } serial_number_t;
1843 
1858  typedef struct
1859  {
1860  unsigned int A1Voltage_ADC;
1861  unsigned int A2Voltage_ADC;
1862  unsigned int B1Voltage_ADC;
1863  unsigned int B2Voltage_ADC;
1864  unsigned int SupVoltage_ADC;
1865  unsigned int ACurrent_ADC;
1866  unsigned int BCurrent_ADC;
1867  unsigned int FullCurrent_ADC;
1868  unsigned int Temp_ADC;
1869  unsigned int Joy_ADC;
1870  unsigned int Pot_ADC;
1871  unsigned int L5_ADC;
1872  unsigned int H5_ADC;
1878  int ACurrent;
1879  int BCurrent;
1881  int Temp;
1882  int Joy;
1883  int Pot;
1884  int L5;
1885  int H5;
1886  unsigned int deprecated;
1887  int R;
1888  int L;
1889  } analog_data_t;
1890 
1902  typedef struct
1903  {
1904  unsigned int DebugData[128];
1905  } debug_read_t;
1906 
1918  typedef struct
1919  {
1920  unsigned int DebugData[128];
1921  } debug_write_t;
1922 
1932  typedef struct
1933  {
1934  char PositionerName[17];
1935  } stage_name_t;
1936 
1948  typedef struct
1949  {
1950  char Manufacturer[17];
1951  char PartNumber[25];
1953 
1965  typedef struct
1966  {
1968  char Units[9];
1969  float MaxSpeed;
1970  float TravelRange;
1976  } stage_settings_t;
1977 
1989  typedef struct
1990  {
1991  char Manufacturer[17];
1992  char PartNumber[25];
1994 
2006  typedef struct
2007  {
2008  unsigned int MotorType;
2009  unsigned int ReservedField;
2010  unsigned int Poles;
2011  unsigned int Phases;
2020  float StallTorque;
2026  float MaxSpeed;
2027  float MaxCurrent;
2030  float NoLoadSpeed;
2031  } motor_settings_t;
2032 
2044  typedef struct
2045  {
2046  char Manufacturer[17];
2047  char PartNumber[25];
2049 
2061  typedef struct
2062  {
2067  unsigned int PPR;
2068  unsigned int EncoderSettings;
2070 
2082  typedef struct
2083  {
2084  char Manufacturer[17];
2085  char PartNumber[25];
2087 
2099  typedef struct
2100  {
2105  unsigned int PPR;
2107 
2119  typedef struct
2120  {
2121  char Manufacturer[17];
2122  char PartNumber[25];
2124 
2136  typedef struct
2137  {
2138  float ReductionIn;
2144  float Efficiency;
2145  } gear_settings_t;
2146 
2158  typedef struct
2159  {
2160  char MagneticBrakeInfo[25];
2163  float MBTorque;
2164  unsigned int MBSettings;
2165  char TemperatureSensorInfo[25];
2166  float TSMin;
2167  float TSMax;
2168  float TSGrad;
2169  unsigned int TSSettings;
2170  unsigned int LimitSwitchesSettings;
2172 
2184  typedef struct
2185  {
2186  unsigned int key[16];
2187  } init_random_t;
2188 
2189 /*
2190  --------------------------------------------
2191  BEGIN OF GENERATED function declarations
2192  --------------------------------------------
2193 */
2194 
2207 
2224  result_t XIMC_API set_feedback_settings (device_t id, const feedback_settings_t* feedback_settings);
2225 
2242  result_t XIMC_API get_feedback_settings (device_t id, feedback_settings_t* feedback_settings);
2243 
2260  result_t XIMC_API set_home_settings (device_t id, const home_settings_t* home_settings);
2261 
2262  result_t XIMC_API set_home_settings_calb (device_t id, const home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2263 
2280  result_t XIMC_API get_home_settings (device_t id, home_settings_t* home_settings);
2281 
2282  result_t XIMC_API get_home_settings_calb (device_t id, home_settings_calb_t* home_settings_calb, const calibration_t* calibration);
2283 
2296  result_t XIMC_API set_move_settings (device_t id, const move_settings_t* move_settings);
2297 
2298  result_t XIMC_API set_move_settings_calb (device_t id, const move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2299 
2312  result_t XIMC_API get_move_settings (device_t id, move_settings_t* move_settings);
2313 
2314  result_t XIMC_API get_move_settings_calb (device_t id, move_settings_calb_t* move_settings_calb, const calibration_t* calibration);
2315 
2337  result_t XIMC_API set_engine_settings (device_t id, const engine_settings_t* engine_settings);
2338 
2339  result_t XIMC_API set_engine_settings_calb (device_t id, const engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2340 
2360  result_t XIMC_API get_engine_settings (device_t id, engine_settings_t* engine_settings);
2361 
2362  result_t XIMC_API get_engine_settings_calb (device_t id, engine_settings_calb_t* engine_settings_calb, const calibration_t* calibration);
2363 
2378  result_t XIMC_API set_entype_settings (device_t id, const entype_settings_t* entype_settings);
2379 
2394  result_t XIMC_API get_entype_settings (device_t id, entype_settings_t* entype_settings);
2395 
2409  result_t XIMC_API set_power_settings (device_t id, const power_settings_t* power_settings);
2410 
2425  result_t XIMC_API get_power_settings (device_t id, power_settings_t* power_settings);
2426 
2440  result_t XIMC_API set_secure_settings (device_t id, const secure_settings_t* secure_settings);
2441 
2455  result_t XIMC_API get_secure_settings (device_t id, secure_settings_t* secure_settings);
2456 
2471  result_t XIMC_API set_edges_settings (device_t id, const edges_settings_t* edges_settings);
2472 
2473  result_t XIMC_API set_edges_settings_calb (device_t id, const edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2474 
2489  result_t XIMC_API get_edges_settings (device_t id, edges_settings_t* edges_settings);
2490 
2491  result_t XIMC_API get_edges_settings_calb (device_t id, edges_settings_calb_t* edges_settings_calb, const calibration_t* calibration);
2492 
2516  result_t XIMC_API set_pid_settings (device_t id, const pid_settings_t* pid_settings);
2517 
2538  result_t XIMC_API get_pid_settings (device_t id, pid_settings_t* pid_settings);
2539 
2557  result_t XIMC_API set_sync_in_settings (device_t id, const sync_in_settings_t* sync_in_settings);
2558 
2559  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);
2560 
2578  result_t XIMC_API get_sync_in_settings (device_t id, sync_in_settings_t* sync_in_settings);
2579 
2580  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);
2581 
2599  result_t XIMC_API set_sync_out_settings (device_t id, const sync_out_settings_t* sync_out_settings);
2600 
2601  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);
2602 
2617  result_t XIMC_API get_sync_out_settings (device_t id, sync_out_settings_t* sync_out_settings);
2618 
2619  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);
2620 
2639  result_t XIMC_API set_extio_settings (device_t id, const extio_settings_t* extio_settings);
2640 
2656  result_t XIMC_API get_extio_settings (device_t id, extio_settings_t* extio_settings);
2657 
2670  result_t XIMC_API set_brake_settings (device_t id, const brake_settings_t* brake_settings);
2671 
2684  result_t XIMC_API get_brake_settings (device_t id, brake_settings_t* brake_settings);
2685 
2714  result_t XIMC_API set_control_settings (device_t id, const control_settings_t* control_settings);
2715 
2716  result_t XIMC_API set_control_settings_calb (device_t id, const control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2717 
2746  result_t XIMC_API get_control_settings (device_t id, control_settings_t* control_settings);
2747 
2748  result_t XIMC_API get_control_settings_calb (device_t id, control_settings_calb_t* control_settings_calb, const calibration_t* calibration);
2749 
2785  result_t XIMC_API set_joystick_settings (device_t id, const joystick_settings_t* joystick_settings);
2786 
2822  result_t XIMC_API get_joystick_settings (device_t id, joystick_settings_t* joystick_settings);
2823 
2858  result_t XIMC_API set_ctp_settings (device_t id, const ctp_settings_t* ctp_settings);
2859 
2894  result_t XIMC_API get_ctp_settings (device_t id, ctp_settings_t* ctp_settings);
2895 
2912  result_t XIMC_API set_uart_settings (device_t id, const uart_settings_t* uart_settings);
2913 
2930  result_t XIMC_API get_uart_settings (device_t id, uart_settings_t* uart_settings);
2931 
2944  result_t XIMC_API set_controller_name (device_t id, const controller_name_t* controller_name);
2945 
2958  result_t XIMC_API get_controller_name (device_t id, controller_name_t* controller_name);
2959 
2960 
2962 
2975 
2993  result_t XIMC_API command_stop (device_t id);
2994 
3014  result_t XIMC_API command_add_sync_in_action (device_t id, const command_add_sync_in_action_t* the_command_add_sync_in_action);
3015 
3016  result_t XIMC_API command_add_sync_in_action_calb (device_t id, const command_add_sync_in_action_calb_t* the_command_add_sync_in_action_calb, const calibration_t* calibration);
3017 
3036  result_t XIMC_API command_power_off (device_t id);
3037 
3057  result_t XIMC_API command_move (device_t id, int Position, int uPosition);
3058 
3059  result_t XIMC_API command_move_calb (device_t id, float Position, const calibration_t* calibration);
3060 
3082  result_t XIMC_API command_movr (device_t id, int DeltaPosition, int uDeltaPosition);
3083 
3084  result_t XIMC_API command_movr_calb (device_t id, float DeltaPosition, const calibration_t* calibration);
3085 
3125  result_t XIMC_API command_home (device_t id);
3126 
3137  result_t XIMC_API command_left (device_t id);
3138 
3149  result_t XIMC_API command_right (device_t id);
3150 
3163  result_t XIMC_API command_loft (device_t id);
3164 
3175  result_t XIMC_API command_sstp (device_t id);
3176 
3191  result_t XIMC_API get_position (device_t id, get_position_t* the_get_position);
3192 
3193  result_t XIMC_API get_position_calb (device_t id, get_position_calb_t* the_get_position_calb, const calibration_t* calibration);
3194 
3211  result_t XIMC_API set_position (device_t id, const set_position_t* the_set_position);
3212 
3213  result_t XIMC_API set_position_calb (device_t id, const set_position_calb_t* the_set_position_calb, const calibration_t* calibration);
3214 
3237  result_t XIMC_API command_zero (device_t id);
3238 
3239 
3241 
3254 
3265  result_t XIMC_API command_save_settings (device_t id);
3266 
3277  result_t XIMC_API command_read_settings (device_t id);
3278 
3291  result_t XIMC_API command_eesave_settings (device_t id);
3292 
3304  result_t XIMC_API command_eeread_settings (device_t id);
3305 
3322  result_t XIMC_API get_chart_data (device_t id, chart_data_t* chart_data);
3323 
3336  result_t XIMC_API get_serial_number (device_t id, unsigned int* SerialNumber);
3337 
3354  result_t XIMC_API get_firmware_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3355 
3366  result_t XIMC_API service_command_updf (device_t id);
3367 
3368 
3370 
3383 
3402  result_t XIMC_API set_serial_number (device_t id, const serial_number_t* serial_number);
3403 
3418  result_t XIMC_API get_analog_data (device_t id, analog_data_t* analog_data);
3419 
3434  result_t XIMC_API get_debug_read (device_t id, debug_read_t* debug_read);
3435 
3448  result_t XIMC_API set_debug_write (device_t id, const debug_write_t* debug_write);
3449 
3450 
3452 
3465 
3478  result_t XIMC_API set_stage_name (device_t id, const stage_name_t* stage_name);
3479 
3492  result_t XIMC_API get_stage_name (device_t id, stage_name_t* stage_name);
3493 
3508  result_t XIMC_API set_stage_information (device_t id, const stage_information_t* stage_information);
3509 
3522  result_t XIMC_API get_stage_information (device_t id, stage_information_t* stage_information);
3523 
3538  result_t XIMC_API set_stage_settings (device_t id, const stage_settings_t* stage_settings);
3539 
3552  result_t XIMC_API get_stage_settings (device_t id, stage_settings_t* stage_settings);
3553 
3568  result_t XIMC_API set_motor_information (device_t id, const motor_information_t* motor_information);
3569 
3582  result_t XIMC_API get_motor_information (device_t id, motor_information_t* motor_information);
3583 
3598  result_t XIMC_API set_motor_settings (device_t id, const motor_settings_t* motor_settings);
3599 
3612  result_t XIMC_API get_motor_settings (device_t id, motor_settings_t* motor_settings);
3613 
3628  result_t XIMC_API set_encoder_information (device_t id, const encoder_information_t* encoder_information);
3629 
3642  result_t XIMC_API get_encoder_information (device_t id, encoder_information_t* encoder_information);
3643 
3658  result_t XIMC_API set_encoder_settings (device_t id, const encoder_settings_t* encoder_settings);
3659 
3672  result_t XIMC_API get_encoder_settings (device_t id, encoder_settings_t* encoder_settings);
3673 
3688  result_t XIMC_API set_hallsensor_information (device_t id, const hallsensor_information_t* hallsensor_information);
3689 
3702  result_t XIMC_API get_hallsensor_information (device_t id, hallsensor_information_t* hallsensor_information);
3703 
3718  result_t XIMC_API set_hallsensor_settings (device_t id, const hallsensor_settings_t* hallsensor_settings);
3719 
3732  result_t XIMC_API get_hallsensor_settings (device_t id, hallsensor_settings_t* hallsensor_settings);
3733 
3748  result_t XIMC_API set_gear_information (device_t id, const gear_information_t* gear_information);
3749 
3762  result_t XIMC_API get_gear_information (device_t id, gear_information_t* gear_information);
3763 
3778  result_t XIMC_API set_gear_settings (device_t id, const gear_settings_t* gear_settings);
3779 
3792  result_t XIMC_API get_gear_settings (device_t id, gear_settings_t* gear_settings);
3793 
3808  result_t XIMC_API set_accessories_settings (device_t id, const accessories_settings_t* accessories_settings);
3809 
3822  result_t XIMC_API get_accessories_settings (device_t id, accessories_settings_t* accessories_settings);
3823 
3840  result_t XIMC_API get_bootloader_version (device_t id, unsigned int* Major, unsigned int* Minor, unsigned int* Release);
3841 
3854  result_t XIMC_API get_init_random (device_t id, init_random_t* init_random);
3855 
3856 
3857 /*
3858  -------------------------
3859  END OF GENERATED CODE
3860  -------------------------
3861 */
3862 
3863 /* hand-crafted functions begin */
3864 
3877  result_t XIMC_API goto_firmware(device_t id, uint8_t* ret);
3878 
3891  result_t XIMC_API has_firmware(const char* name, uint8_t* ret);
3892 
3908  result_t XIMC_API command_update_firmware(const char* name, const uint8_t* data, uint32_t data_size);
3909 
3924  result_t XIMC_API write_key (const char* name, uint8_t* key);
3925 
3938  result_t XIMC_API command_reset(device_t id);
3939 
3952  result_t XIMC_API command_clear_fram(device_t id);
3953 
3955 
3956  // ------------------------------------
3957 
3969 
3994  device_t XIMC_API open_device (const char* name);
3995 
4006  result_t XIMC_API close_device (device_t* id);
4007 
4020  result_t XIMC_API probe_device (const char* name);
4021 
4040  device_enumeration_t XIMC_API enumerate_devices(int enumerate_flags, const char *hints);
4041 
4052  result_t XIMC_API free_enumerate_devices(device_enumeration_t device_enumeration);
4053 
4064  int XIMC_API get_device_count(device_enumeration_t device_enumeration);
4065 
4074  typedef char* pchar;
4075 
4090  pchar XIMC_API get_device_name(device_enumeration_t device_enumeration, int device_index);
4091 
4092 
4109  result_t XIMC_API get_enumerate_device_serial(device_enumeration_t device_enumeration, int device_index, uint32_t* serial);
4110 
4127  result_t XIMC_API get_enumerate_device_information(device_enumeration_t device_enumeration, int device_index, device_information_t* device_information);
4128 
4145  result_t XIMC_API get_enumerate_device_controller_name(device_enumeration_t device_enumeration, int device_index, controller_name_t* controller_name);
4146 
4163  result_t XIMC_API get_enumerate_device_stage_name(device_enumeration_t device_enumeration, int device_index, stage_name_t* stage_name);
4164 
4181  result_t XIMC_API get_enumerate_device_network_information(device_enumeration_t device_enumeration, int device_index, device_network_information_t* device_network_information);
4182 
4190  result_t XIMC_API reset_locks ();
4191 
4211  result_t XIMC_API ximc_fix_usbser_sys(const char* device_name);
4212 
4213 
4223  void XIMC_API msec_sleep (unsigned int msec);
4224 
4234  void XIMC_API ximc_version (char* version);
4235 
4236 #if !defined(MATLAB_IMPORT) && !defined(LABVIEW64_IMPORT) && !defined(LABVIEW32_IMPORT)
4237 
4249  typedef void (XIMC_CALLCONV *logging_callback_t)(int loglevel, const wchar_t* message, void* user_data);
4250 
4262  void XIMC_API logging_callback_stderr_wide(int loglevel, const wchar_t* message, void* user_data);
4263 
4275  void XIMC_API logging_callback_stderr_narrow(int loglevel, const wchar_t* message, void* user_data);
4276 
4289  void XIMC_API set_logging_callback(logging_callback_t logging_callback, void* user_data);
4290 
4291 #endif
4292 
4316  result_t XIMC_API get_status (device_t id, status_t* status);
4317 
4329  result_t XIMC_API get_status_calb (device_t id, status_calb_t* status, const calibration_t* calibration);
4330 
4356  result_t XIMC_API get_device_information (device_t id, device_information_t* device_information);
4357 
4376  result_t XIMC_API command_wait_for_stop(device_t id, uint32_t refresh_interval_ms);
4377 
4390  result_t XIMC_API command_homezero(device_t id);
4392 
4393 #if defined(__cplusplus)
4394 };
4395 #endif
4396 
4397 #endif
4398 
4399 // vim: ts=4 shiftwidth=4
4400