NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
ndicapi.h
Go to the documentation of this file.
1 /*=======================================================================
2 
3  Program: NDI Combined API C Interface Library
4  Module: $RCSfile: ndicapi.h,v $
5  Creator: David Gobbi <dgobbi@atamai.com>
6  Language: C
7  Author: $Author: dgobbi $
8  Date: $Date: 2005/07/01 22:52:05 $
9  Version: $Revision: 1.5 $
10 
11 ==========================================================================
12 
13 Copyright (c) 2000-2005 Atamai, Inc.
14 
15 Use, modification and redistribution of the software, in source or
16 binary forms, are permitted provided that the following terms and
17 conditions are met:
18 
19 1) Redistribution of the source code, in verbatim or modified
20  form, must retain the above copyright notice, this license,
21  the following disclaimer, and any notices that refer to this
22  license and/or the following disclaimer.
23 
24 2) Redistribution in binary form must include the above copyright
25  notice, a copy of this license and the following disclaimer
26  in the documentation or with other materials provided with the
27  distribution.
28 
29 3) Modified copies of the source code must be clearly marked as such,
30  and must not be misrepresented as verbatim copies of the source code.
31 
32 THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
33 WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
34 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
35 PURPOSE. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
36 MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
37 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
38 (INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
39 OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
40 THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
41 POSSIBILITY OF SUCH DAMAGES.
42 
43 =======================================================================*/
44 
50 #ifndef NDICAPI_H
51 #define NDICAPI_H 1
52 
53 #define NDICAPI_MAJOR_VERSION 3
54 #define NDICAPI_MINOR_VERSION 1
55 
56 #include "ndicapi_serial.h"
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 #include <stdarg.h>
63 
64 struct ndicapi;
65 typedef struct ndicapi ndicapi;
66 
67 /*=====================================================================*/
86 char *ndiDeviceName(int i);
87 
109 int ndiProbe(const char *device);
110 
121 ndicapi *ndiOpen(const char *device);
122 
132 void ndiClose(ndicapi *pol);
133 
161 void ndiSetThreadMode(ndicapi *pol, int mode);
162 
206 char *ndiCommand(ndicapi *pol, const char *format, ...);
207 
213 char *ndiCommandVA(ndicapi *pol, const char *format, va_list ap);
214 
218 typedef void (*NDIErrorCallback)(int errnum, char *description, void *userdata);
219 
230 void ndiSetErrorCallback(ndicapi *pol, NDIErrorCallback callback,
231  void *userdata);
232 
233 /*=====================================================================*/
245 /*\{*/
257 #define ndi3D(p,ph,mode) ndiCommand((p),"3D:%02X%d",(ph),(mode))
258 
269 #define ndiBEEP(p,n) ndiCommand((p),"BEEP:%i",(n))
270 
284 #define ndiCOMM(p,baud,dps,h) ndiCommand((p),"COMM:%d%03d%d",(baud),(dps),(h))
285 
291 #define ndiDSTART(p) ndiCommand((p),"DSTART:")
292 
296 #define ndiDSTOP(p) ndiCommand((p),"DSTOP:")
297 
324 #define ndiGX(p,mode) ndiCommand((p),"GX:%04X",(mode))
325 
330 #define ndiINIT(p) ndiCommand((p),"INIT:")
331 
335 #define ndiIRATE(p,rate) ndiCommand((p),"IRATE:%d",(rate))
336 
348 #define ndiIRCHK(p,mode) ndiCommand((p),"IRCHK:%04X",(mode))
349 
357 #define ndiIRED(p,ph,sig) ndiCommand((p),"IRED:%02X%08X",(ph),(sig))
358 
363 #define ndiIRINIT(p) ndiCommand((p),"IRINIT:")
364 
374 #define ndiLED(p,ph,led,s) ndiCommand((p),"LED:%02X%d%c",(ph),(led),(s))
375 
381 #define ndiPDIS(p,ph) ndiCommand((p),"PDIS:%02X",(ph))
382 
389 #define ndiPENA(p,ph,mode) ndiCommand((p),"PENA:%02X%c",(ph),(mode))
390 
397 #define ndiPFSEL(p,ph,tf) ndiCommand((p),"PFSEL:%02X%02X",(ph),(tf))
398 
404 #define ndiPHF(p,ph) ndiCommand((p),"PHF:%02X",(ph))
405 
428 #define ndiPHINF(p,ph,format) ndiCommand((p),"PHINF:%02X%04X",(ph),(format))
429 
443 #define ndiPHRQ(p,num,sys,tool,port,chan) ndiCommand((p),"PHRQ:%-8.8s%1.1s%1.1s%2.2s%2.2s",(num),(sys),(tool),(port),(chan))
444 
463 #define ndiPHSR(p,mode) ndiCommand((p),"PHSR:%02X",(mode))
464 
470 #define ndiPINIT(p,ph) ndiCommand((p),"PINIT:%02X",(ph))
471 
473 #define ndiPPRD(p,ph,addr) ndiCommand((p),"PPRD:%02X%04X",(ph),(addr))
474 
476 #define ndiPPWR(p,ph,a,x) ndiCommand((p),"PPWR:%02X%04X%.128s",(ph),(a),(x))
477 
479 #define ndiPSEL(p,ph,id) ndiCommand((p),"PSEL:%02X%s",(ph),(id))
480 
491 #define ndiPSOUT(p,ph,a,b,c) ndiCommand((p),"PSOUT:%02X%c%c%c",(ph),(a),(b),(c))
492 
494 #define ndiPSRCH(p,ph) ndiCommand((p),"PSRCH:%02X",(ph))
495 
520 #define ndiPSTAT(p,format) ndiCommand((p),"PSTAT:%04X",(format))
521 
523 #define ndiPURD(p,ph,addr) ndiCommand((p),"PURD:%02X%04X",(ph),(addr))
524 
526 #define ndiPUWR(p,ph,a,x) ndiCommand((p),"PPWR:%02X%04X%.128s",(ph),(a),(x))
527 
535 #define ndiPVCLR(p,port) ndiCommand((p),"PVCLR:%c",(port))
536 
545 #define ndiPVTIP(p,port,tip,np) ndiCommand((p),"PVTIP:%c%d%d",(port),(tip),(np))
546 
559 #define ndiPVWR(p,ph,a,x) ndiCommand((p),"PVWR:%02X%04X%.128s",(ph),(a),(x))
560 
565 #define ndiRESET(p) ndiCommand((p),NULL)
566 
583 #define ndiSFLIST(p,mode) ndiCommand((p),"SFLIST:%02X",(mode))
584 
601 #define ndiSSTAT(p,format) ndiCommand((p),"SSTAT:%04X",(format))
602 
604 #define ndiTCTST(p,ph) ndiCommand((p),"TCTST:%02X",(ph))
605 
609 #define ndiTSTART(p) ndiCommand((p),"TSTART:")
610 
614 #define ndiTSTOP(p) ndiCommand((p),"TSTOP:")
615 
617 #define ndiTTCFG(p,ph) ndiCommand((p),"TTCFG:%02X",(ph))
618 
641 #define ndiTX(p,mode) ndiCommand((p),"TX:%04X",(mode))
642 
653 #define ndiVER(p,n) ndiCommand((p),"VER:%d",(n))
654 
661 #define ndiVSEL(p,n) ndiCommand((p),"VSEL:%d",(n))
662 
680 int ndiPVWRFromFile(ndicapi *pol, int ph, char *filename);
681 /*\}*/
682 
683 /*=====================================================================*/
707 int ndiGetError(ndicapi *pol);
708 
713 char *ndiGetDeviceName(ndicapi *pol);
714 
720 NDIFileHandle ndiGetDeviceHandle(ndicapi *pol);
721 
725 int ndiGetThreadMode(ndicapi *pol);
726 
731 
735 void *ndiGetErrorCallbackData(ndicapi *pol);
736 
746 int ndiGetPHRQHandle(ndicapi *pol);
747 
756 
769 int ndiGetPHSRHandle(ndicapi *pol, int i);
770 
790 int ndiGetPHSRInformation(ndicapi *pol, int i);
791 
810 
830 int ndiGetPHINFToolInfo(ndicapi *pol, char information[31]);
831 
843 unsigned long ndiGetPHINFCurrentTest(ndicapi *pol);
844 
862 int ndiGetPHINFPartNumber(ndicapi *pol, char part[20]);
863 
886 
909 
926 int ndiGetPHINFPortLocation(ndicapi *pol, char location[14]);
927 
939 
961 int ndiGetTXTransform(ndicapi *pol, int ph, double transform[8]);
962 
982 int ndiGetTXPortStatus(ndicapi *pol, int ph);
983 
995 unsigned long ndiGetTXFrame(ndicapi *pol, int ph);
996 
1011 int ndiGetTXToolInfo(ndicapi *pol, int ph);
1012 
1029 int ndiGetTXMarkerInfo(ndicapi *pol, int ph, int marker);
1030 
1048 int ndiGetTXSingleStray(ndicapi *pol, int ph, double coord[3]);
1049 
1060 
1079 int ndiGetTXPassiveStray(ndicapi *pol, int i, double coord[3]);
1080 
1099 int ndiGetTXSystemStatus(ndicapi *pol);
1100 
1130 int ndiGetGXTransform(ndicapi *pol, int port, double transform[8]);
1131 
1151 int ndiGetGXPortStatus(ndicapi *pol, int port);
1152 
1166 int ndiGetGXSystemStatus(ndicapi *pol);
1167 
1183 int ndiGetGXToolInfo(ndicapi *pol, int port);
1184 
1203 int ndiGetGXMarkerInfo(ndicapi *pol, int port, int marker);
1204 
1222 int ndiGetGXSingleStray(ndicapi *pol, int port, double coord[3]);
1223 
1236 unsigned long ndiGetGXFrame(ndicapi *pol, int port);
1237 
1252 
1273 int ndiGetGXPassiveStray(ndicapi *pol, int i, double coord[3]);
1274 
1295 int ndiGetPSTATPortStatus(ndicapi *pol, int port);
1296 
1317 int ndiGetPSTATToolInfo(ndicapi *pol, int port, char information[30]);
1318 
1331 unsigned long ndiGetPSTATCurrentTest(ndicapi *pol, int port);
1332 
1351 int ndiGetPSTATPartNumber(ndicapi *pol, int port, char part[20]);
1352 
1376 int ndiGetPSTATAccessories(ndicapi *pol, int port);
1377 
1403 int ndiGetPSTATMarkerType(ndicapi *pol, int port);
1404 
1417 int ndiGetSSTATControl(ndicapi *pol);
1418 
1435 int ndiGetSSTATSensors(ndicapi *pol);
1436 
1453 int ndiGetSSTATTIU(ndicapi *pol);
1454 
1465 int ndiGetIRCHKDetected(ndicapi *pol);
1466 
1479 int ndiGetIRCHKNumberOfSources(ndicapi *pol, int side);
1480 
1498 int ndiGetIRCHKSourceXY(ndicapi *pol, int side, int i, double xy[2]);
1499 
1500 /*=====================================================================*/
1512 char *ndiErrorString(int errnum);
1513 
1521 unsigned long ndiHexToUnsignedLong(const char *cp, int n);
1522 
1531 long ndiSignedToLong(const char *cp, int n);
1532 
1545 char *ndiHexEncode(char *cp, const void *data, int n);
1546 
1556 void *ndiHexDecode(void *data, const char *cp, int n);
1557 
1558 /*=====================================================================*/
1571 /*\{*/
1572 #define NDI_OKAY 0x00
1573 #define NDI_INVALID 0x01
1574 #define NDI_TOO_LONG 0x02
1575 #define NDI_TOO_SHORT 0x03
1576 #define NDI_BAD_COMMAND_CRC 0x04
1577 #define NDI_INTERN_TIMEOUT 0x05
1578 #define NDI_COMM_FAIL 0x06
1579 #define NDI_PARAMETERS 0x07
1580 #define NDI_INVALID_PORT 0x08
1581 #define NDI_INVALID_MODE 0x09
1582 #define NDI_INVALID_LED 0x0a
1583 #define NDI_LED_STATE 0x0b
1584 #define NDI_BAD_MODE 0x0c
1585 #define NDI_NO_TOOL 0x0d
1586 #define NDI_PORT_NOT_INIT 0x0e
1587 #define NDI_PORT_DISABLED 0x0f
1588 #define NDI_INITIALIZATION 0x10
1589 #define NDI_TSTOP_FAIL 0x11
1590 #define NDI_TSTART_FAIL 0x12
1591 #define NDI_PINIT_FAIL 0x13
1592 #define NDI_CAMERA 0x14
1593 #define NDI_INIT_FAIL 0x15
1594 #define NDI_DSTART_FAIL 0x16
1595 #define NDI_DSTOP_FAIL 0x17
1596 #define NDI_IRCHK_FAIL 0x18
1597 #define NDI_FIRMWARE 0x19
1598 #define NDI_INTERNAL 0x1a
1599 #define NDI_IRINIT_FAIL 0x1b
1600 #define NDI_IRED_FAIL 0x1c
1601 #define NDI_SROM_FAIL 0x1d
1602 #define NDI_SROM_READ 0x1e
1603 #define NDI_SROM_WRITE 0x1f
1604 #define NDI_SROM_SELECT 0x20
1605 #define NDI_PORT_CURRENT 0x21
1606 #define NDI_WAVELENGTH 0x22
1607 #define NDI_PARAMETER_RANGE 0x23
1608 #define NDI_VOLUME 0x24
1609 #define NDI_FEATURES 0x25
1611 #define NDI_ENVIRONMENT 0xf1
1613 #define NDI_EPROM_READ 0xf6
1614 #define NDI_EPROM_WRITE 0xf5
1615 #define NDI_EPROM_ERASE 0xf4
1617 /* error codes returned by the C api */
1618 
1619 #define NDI_BAD_CRC 0x0100
1620 #define NDI_OPEN_ERROR 0x0200
1621 #define NDI_BAD_COMM 0x0300
1622 #define NDI_TIMEOUT 0x0400
1623 #define NDI_WRITE_ERROR 0x0500
1624 #define NDI_READ_ERROR 0x0600
1625 #define NDI_RESET_FAIL 0x0700
1626 #define NDI_PROBE_FAIL 0x0800
1627 /*\}*/
1628 
1629 
1630 /* ndiCOMM() baud rates */
1631 /*\{*/
1632 #define NDI_9600 0
1633 #define NDI_14400 1
1634 #define NDI_19200 2
1635 #define NDI_38400 3
1636 #define NDI_57600 4
1637 #define NDI_115200 5
1638 #define NDI_921600 6
1639 #define NDI_1228739 7
1640 /*\}*/
1641 
1642 /* ndiCOMM() data bits, parity and stop bits */
1643 /*\{*/
1644 #define NDI_8N1 0 /* 8 data bits, no parity, 1 stop bit */
1645 #define NDI_8N2 1 /* etc. */
1646 #define NDI_8O1 10
1647 #define NDI_8O2 11
1648 #define NDI_8E1 20
1649 #define NDI_8E2 21
1650 #define NDI_7N1 100
1651 #define NDI_7N2 101
1652 #define NDI_7O1 110
1653 #define NDI_7O2 111
1654 #define NDI_7E1 120
1655 #define NDI_7E2 121
1656 /*\}*/
1657 
1658 /* ndiCOMM() hardware handshaking */
1659 /*\{*/
1660 #define NDI_NOHANDSHAKE 0
1661 #define NDI_HANDSHAKE 1
1662 /*\}*/
1663 
1664 /* PHSR() handle types */
1665 /*\{*/
1666 #define NDI_ALL_HANDLES 0x00
1667 #define NDI_STALE_HANDLES 0x01
1668 #define NDI_UNINITIALIZED_HANDLES 0x02
1669 #define NDI_UNENABLED_HANDLES 0x03
1670 #define NDI_ENABLED_HANDLES 0x04
1671 /*\}*/
1672 
1673 /* ndiPENA() tracking modes */
1674 /*\{*/
1675 #define NDI_STATIC 'S' /* relatively immobile tool */
1676 #define NDI_DYNAMIC 'D' /* dynamic tool (e.g. probe) */
1677 #define NDI_BUTTON_BOX 'B' /* tool with no IREDs */
1678 /*\}*/
1679 
1680 /* ndiGX() reply mode bit definitions */
1681 /*\{*/
1682 #define NDI_XFORMS_AND_STATUS 0x0001 /* transforms and status */
1683 #define NDI_ADDITIONAL_INFO 0x0002 /* additional tool transform info */
1684 #define NDI_SINGLE_STRAY 0x0004 /* stray active marker reporting */
1685 #define NDI_FRAME_NUMBER 0x0008 /* frame number for each tool */
1686 #define NDI_PASSIVE 0x8000 /* report passive tool information */
1687 #define NDI_PASSIVE_EXTRA 0x2000 /* add 6 extra passive tools */
1688 #define NDI_PASSIVE_STRAY 0x1000 /* stray passive marker reporting */
1689 /*\}*/
1690 
1691 /* return values that give the reason behind missing data */
1692 /*\{*/
1693 #define NDI_DISABLED 1
1694 #define NDI_MISSING 2
1695 #define NDI_UNOCCUPIED 3
1696 /*\}*/
1697 
1698 /* ndiGetTXPortStatus() and ndiGetPSTATPortStatus() return value bits */
1699 /*\{*/
1700 #define NDI_TOOL_IN_PORT 0x01
1701 #define NDI_SWITCH_1_ON 0x02
1702 #define NDI_SWITCH_2_ON 0x04
1703 #define NDI_SWITCH_3_ON 0x08
1704 #define NDI_INITIALIZED 0x10
1705 #define NDI_ENABLED 0x20
1706 #define NDI_OUT_OF_VOLUME 0x40 /* only for ndiGetGXPortStatus() */
1707 #define NDI_PARTIALLY_IN_VOLUME 0x80 /* only for ndiGetGXPortStatus() */
1708 #define NDI_CURRENT_DETECT 0x80 /* only for ndiGetPSTATPortStatus() */
1709 /*\}*/
1710 
1711 /* ndiGetTXSystemStatus() return value bits */
1712 /*\{*/
1713 #define NDI_COMM_SYNC_ERROR 0x0001
1714 #define NDI_TOO_MUCH_EXTERNAL_INFRARED 0x0002
1715 #define NDI_COMM_CRC_ERROR 0x0004
1716 #define NDI_COMM_RECOVERABLE 0x0008
1717 #define NDI_HARDWARE_FAILURE 0x0010
1718 #define NDI_HARDWARE_CHANGE 0x0020
1719 #define NDI_PORT_OCCUPIED 0x0040
1720 #define NDI_PORT_UNOCCUPIED 0x0080
1721 /*\}*/
1722 
1723 /* ndiGetGXToolInfo() return value bits */
1724 /*\{*/
1725 #define NDI_BAD_TRANSFORM_FIT 0x01
1726 #define NDI_NOT_ENOUGH_MARKERS 0x02
1727 #define NDI_TOOL_FACE_USED 0x70
1728 /*\}*/
1729 
1730 /* ndiGetTXMarkerInfo() return value bits */
1731 /*\{*/
1732 #define NDI_MARKER_MISSING 0
1733 #define NDI_MARKER_EXCEEDED_MAX_ANGLE 1
1734 #define NDI_MARKER_EXCEEDED_MAX_ERROR 2
1735 #define NDI_MARKER_USED 3
1736 /*\}*/
1737 
1738 /* ndiLED() states */
1739 /*\{*/
1740 #define NDI_BLANK 'B' /* off */
1741 #define NDI_FLASH 'F' /* flashing */
1742 #define NDI_SOLID 'S' /* on */
1743 /*\}*/
1744 
1745 /* ndiPSTAT() reply mode bits */
1746 /*\{*/
1747 #define NDI_BASIC 0x0001
1748 #define NDI_TESTING 0x0002
1749 #define NDI_PART_NUMBER 0x0004
1750 #define NDI_ACCESSORIES 0x0008
1751 #define NDI_MARKER_TYPE 0x0010
1752 #define NDI_PORT_LOCATION 0x0020
1753 #define NDI_GPIO_STATUS 0x0040
1754 /*\}*/
1755 
1756 /* ndiGetPSTATAccessories() return value bits */
1757 /*\{*/
1758 #define NDI_TOOL_IN_PORT_SWITCH 0x01 /* tool has tool-in-port switch */
1759 #define NDI_SWITCH_1 0x02 /* tool has button #1 */
1760 #define NDI_SWITCH_2 0x04 /* tool has button #2 */
1761 #define NDI_SWITCH_3 0x08 /* tool has button #3 */
1762 #define NDI_TOOL_TRACKING_LED 0x10 /* tool has tracking LED */
1763 #define NDI_LED_1 0x20 /* tool has LED #1 */
1764 #define NDI_LED_2 0x40 /* tool has LED #2 */
1765 #define NDI_LED_3 0x80 /* tool has LED #3 */
1766 /*\}*/
1767 
1768 /* ndiGetPSTATMarkerType() return value, the first 3 bits */
1769 /*\{*/
1770 #define NDI_950NM 0x00
1771 #define NDI_850NM 0x01
1772 /*\}*/
1773 
1774 /* ndiGetPSTATMarkerType() return value, the last 5 bits */
1775 /*\{*/
1776 #define NDI_NDI_ACTIVE 0x08
1777 #define NDI_NDI_CERAMIC 0x10
1778 #define NDI_PASSIVE_ANY 0x20
1779 #define NDI_PASSIVE_SPHERE 0x28
1780 #define NDI_PASSIVE_DISC 0x30
1781 /*\}*/
1782 
1783 /* tool type specifiers */
1784 /*\{*/
1785 #define NDI_TYPE_REFERENCE 0x01
1786 #define NDI_TYPE_POINTER 0x02
1787 #define NDI_TYPE_BUTTON 0x03
1788 #define NDI_TYPE_SOFTWARE 0x04
1789 #define NDI_TYPE_MICROSCOPE 0x05
1790 #define NDI_TYPE_DOCK 0x08
1791 #define NDI_TYPE_CARM 0x0A
1792 #define NDI_TYPE_CATHETER 0x0B
1793 /*\}*/
1794 
1795 /* ndiSSTAT() reply format bits */
1796 /*\{*/
1797 #define NDI_CONTROL 0x0001 /* control processor information */
1798 #define NDI_SENSORS 0x0002 /* sensor processors */
1799 #define NDI_TIU 0x0004 /* TIU processor */
1800 /*\}*/
1801 
1802 /* ndiGetSSTATControl() return value bits */
1803 /*\{*/
1804 #define NDI_EPROM_CODE_CHECKSUM 0x01
1805 #define NDI_EPROM_SYSTEM_CHECKSUM 0x02
1806 /*\}*/
1807 
1808 /* ndiGetSSTATSensor() return value bits */
1809 /*\{*/
1810 #define NDI_LEFT_ROM_CHECKSUM 0x01
1811 #define NDI_LEFT_SYNC_TYPE_1 0x02
1812 #define NDI_LEFT_SYNC_TYPE_2 0x04
1813 #define NDI_RIGHT_ROM_CHECKSUM 0x10
1814 #define NDI_RIGHT_SYNC_TYPE_1 0x20
1815 #define NDI_RIGHT_SYNC_TYPE_2 0x40
1816 /*\}*/
1817 
1818 /* ndiGetSSTATTIU() return value bits */
1819 /*\{*/
1820 #define NDI_ROM_CHECKSUM 0x01
1821 #define NDI_OPERATING_VOLTAGES 0x02
1822 #define NDI_MARKER_SEQUENCING 0x04
1823 #define NDI_SYNC 0x08
1824 #define NDI_COOLING_FAN 0x10
1825 #define NDI_INTERNAL_ERROR 0x20
1826 /*\}*/
1827 
1828 /* ndiIRCHK() reply mode bits */
1829 /*\{*/
1830 #define NDI_DETECTED 0x0001 /* simple yes/no whether IR detected */
1831 #define NDI_SOURCES 0x0002 /* locations of up to 20 sources per camera */
1832 /*\}*/
1833 
1834 /* ndiGetIRCHKNumberOfSources(), ndiGetIRCHKSourceXY() sensor arguments */
1835 /*\{*/
1836 #define NDI_LEFT 0 /* left sensor */
1837 #define NDI_RIGHT 1 /* right sensor */
1838 /*\}*/
1839 
1840 #ifdef __cplusplus
1841 }
1842 #endif
1843 
1844 #endif /* NDICAPI_H */
1845 
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
Definition: glew.h:1822
void ndiSetThreadMode(ndicapi *pol, int mode)
int ndiGetPHSRInformation(ndicapi *pol, int i)
int ndiGetPHSRHandle(ndicapi *pol, int i)
unsigned long ndiHexToUnsignedLong(const char *cp, int n)
int ndiGetTXTransform(ndicapi *pol, int ph, double transform[8])
void(* NDIErrorCallback)(int errnum, char *description, void *userdata)
Definition: ndicapi.h:218
GLuint coord
Definition: glew.h:7061
int ndiGetTXSystemStatus(ndicapi *pol)
int ndiGetTXToolInfo(ndicapi *pol, int ph)
unsigned long ndiGetPSTATCurrentTest(ndicapi *pol, int port)
int ndiGetPHSRNumberOfHandles(ndicapi *pol)
GLint location
Definition: glew.h:1819
char * ndiCommandVA(ndicapi *pol, const char *format, va_list ap)
char * ndiHexEncode(char *cp, const void *data, int n)
int ndiPVWRFromFile(ndicapi *pol, int ph, char *filename)
void * ndiGetErrorCallbackData(ndicapi *pol)
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
Definition: glew.h:1363
GLenum mode
Definition: glew.h:2404
void ndiClose(ndicapi *pol)
NDIErrorCallback ndiGetErrorCallback(ndicapi *pol)
int ndiGetPSTATToolInfo(ndicapi *pol, int port, char information[30])
int ndiGetPHRQHandle(ndicapi *pol)
int ndiGetSSTATTIU(ndicapi *pol)
GLuint GLenum GLenum transform
Definition: glew.h:12775
int ndiGetIRCHKNumberOfSources(ndicapi *pol, int side)
int ndiGetThreadMode(ndicapi *pol)
int ndiGetTXNumberOfPassiveStrays(ndicapi *pol)
char * ndiGetDeviceName(ndicapi *pol)
NDIFileHandle ndiGetDeviceHandle(ndicapi *pol)
int ndiGetTXMarkerInfo(ndicapi *pol, int ph, int marker)
unsigned long ndiGetPHINFCurrentTest(ndicapi *pol)
int ndiGetError(ndicapi *pol)
int ndiGetGXNumberOfPassiveStrays(ndicapi *pol)
int ndiGetGXSystemStatus(ndicapi *pol)
struct ndicapi ndicapi
Definition: ndicapi.h:65
int ndiProbe(const char *device)
int ndiGetGXPassiveStray(ndicapi *pol, int i, double coord[3])
int ndiGetGXToolInfo(ndicapi *pol, int port)
int ndiGetPSTATPartNumber(ndicapi *pol, int port, char part[20])
int ndiGetPSTATMarkerType(ndicapi *pol, int port)
char * ndiDeviceName(int i)
int ndiGetIRCHKDetected(ndicapi *pol)
void * ndiHexDecode(void *data, const char *cp, int n)
int ndiGetSSTATControl(ndicapi *pol)
int ndiGetPSTATPortStatus(ndicapi *pol, int port)
const GLchar * marker
Definition: glew.h:7764
char * ndiCommand(ndicapi *pol, const char *format,...)
int ndiGetGXSingleStray(ndicapi *pol, int port, double coord[3])
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glew.h:1238
unsigned long ndiGetGXFrame(ndicapi *pol, int port)
int ndiGetIRCHKSourceXY(ndicapi *pol, int side, int i, double xy[2])
int ndiGetSSTATSensors(ndicapi *pol)
int ndiGetTXPortStatus(ndicapi *pol, int ph)
int ndiGetPHINFGPIOStatus(ndicapi *pol)
GLclampd n
Definition: glew.h:6789
void ndiSetErrorCallback(ndicapi *pol, NDIErrorCallback callback, void *userdata)
int ndiGetPHINFPartNumber(ndicapi *pol, char part[20])
int ndiGetGXTransform(ndicapi *pol, int port, double transform[8])
int ndiGetTXSingleStray(ndicapi *pol, int ph, double coord[3])
int ndiGetPHINFMarkerType(ndicapi *pol)
unsigned long ndiGetTXFrame(ndicapi *pol, int ph)
int ndiGetPHINFToolInfo(ndicapi *pol, char information[31])
ndicapi * ndiOpen(const char *device)
char * ndiErrorString(int errnum)
int ndiGetGXPortStatus(ndicapi *pol, int port)
int ndiGetGXMarkerInfo(ndicapi *pol, int port, int marker)
long ndiSignedToLong(const char *cp, int n)
int ndiGetPHINFPortLocation(ndicapi *pol, char location[14])
int ndiGetPSTATAccessories(ndicapi *pol, int port)
int ndiGetPHINFPortStatus(ndicapi *pol)
int ndiGetPHINFAccessories(ndicapi *pol)
int ndiGetTXPassiveStray(ndicapi *pol, int i, double coord[3])