53 #define NDICAPI_MAJOR_VERSION 3
54 #define NDICAPI_MINOR_VERSION 1
257 #define ndi3D(p,ph,mode) ndiCommand((p),"3D:%02X%d",(ph),(mode))
269 #define ndiBEEP(p,n) ndiCommand((p),"BEEP:%i",(n))
284 #define ndiCOMM(p,baud,dps,h) ndiCommand((p),"COMM:%d%03d%d",(baud),(dps),(h))
291 #define ndiDSTART(p) ndiCommand((p),"DSTART:")
296 #define ndiDSTOP(p) ndiCommand((p),"DSTOP:")
324 #define ndiGX(p,mode) ndiCommand((p),"GX:%04X",(mode))
330 #define ndiINIT(p) ndiCommand((p),"INIT:")
335 #define ndiIRATE(p,rate) ndiCommand((p),"IRATE:%d",(rate))
348 #define ndiIRCHK(p,mode) ndiCommand((p),"IRCHK:%04X",(mode))
357 #define ndiIRED(p,ph,sig) ndiCommand((p),"IRED:%02X%08X",(ph),(sig))
363 #define ndiIRINIT(p) ndiCommand((p),"IRINIT:")
374 #define ndiLED(p,ph,led,s) ndiCommand((p),"LED:%02X%d%c",(ph),(led),(s))
381 #define ndiPDIS(p,ph) ndiCommand((p),"PDIS:%02X",(ph))
389 #define ndiPENA(p,ph,mode) ndiCommand((p),"PENA:%02X%c",(ph),(mode))
397 #define ndiPFSEL(p,ph,tf) ndiCommand((p),"PFSEL:%02X%02X",(ph),(tf))
404 #define ndiPHF(p,ph) ndiCommand((p),"PHF:%02X",(ph))
428 #define ndiPHINF(p,ph,format) ndiCommand((p),"PHINF:%02X%04X",(ph),(format))
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))
463 #define ndiPHSR(p,mode) ndiCommand((p),"PHSR:%02X",(mode))
470 #define ndiPINIT(p,ph) ndiCommand((p),"PINIT:%02X",(ph))
473 #define ndiPPRD(p,ph,addr) ndiCommand((p),"PPRD:%02X%04X",(ph),(addr))
476 #define ndiPPWR(p,ph,a,x) ndiCommand((p),"PPWR:%02X%04X%.128s",(ph),(a),(x))
479 #define ndiPSEL(p,ph,id) ndiCommand((p),"PSEL:%02X%s",(ph),(id))
491 #define ndiPSOUT(p,ph,a,b,c) ndiCommand((p),"PSOUT:%02X%c%c%c",(ph),(a),(b),(c))
494 #define ndiPSRCH(p,ph) ndiCommand((p),"PSRCH:%02X",(ph))
520 #define ndiPSTAT(p,format) ndiCommand((p),"PSTAT:%04X",(format))
523 #define ndiPURD(p,ph,addr) ndiCommand((p),"PURD:%02X%04X",(ph),(addr))
526 #define ndiPUWR(p,ph,a,x) ndiCommand((p),"PPWR:%02X%04X%.128s",(ph),(a),(x))
535 #define ndiPVCLR(p,port) ndiCommand((p),"PVCLR:%c",(port))
545 #define ndiPVTIP(p,port,tip,np) ndiCommand((p),"PVTIP:%c%d%d",(port),(tip),(np))
559 #define ndiPVWR(p,ph,a,x) ndiCommand((p),"PVWR:%02X%04X%.128s",(ph),(a),(x))
565 #define ndiRESET(p) ndiCommand((p),NULL)
583 #define ndiSFLIST(p,mode) ndiCommand((p),"SFLIST:%02X",(mode))
601 #define ndiSSTAT(p,format) ndiCommand((p),"SSTAT:%04X",(format))
604 #define ndiTCTST(p,ph) ndiCommand((p),"TCTST:%02X",(ph))
609 #define ndiTSTART(p) ndiCommand((p),"TSTART:")
614 #define ndiTSTOP(p) ndiCommand((p),"TSTOP:")
617 #define ndiTTCFG(p,ph) ndiCommand((p),"TTCFG:%02X",(ph))
641 #define ndiTX(p,mode) ndiCommand((p),"TX:%04X",(mode))
653 #define ndiVER(p,n) ndiCommand((p),"VER:%d",(n))
661 #define ndiVSEL(p,n) ndiCommand((p),"VSEL:%d",(n))
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
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
1637 #define NDI_115200 5
1638 #define NDI_921600 6
1639 #define NDI_1228739 7
1660 #define NDI_NOHANDSHAKE 0
1661 #define NDI_HANDSHAKE 1
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
1675 #define NDI_STATIC 'S'
1676 #define NDI_DYNAMIC 'D'
1677 #define NDI_BUTTON_BOX 'B'
1682 #define NDI_XFORMS_AND_STATUS 0x0001
1683 #define NDI_ADDITIONAL_INFO 0x0002
1684 #define NDI_SINGLE_STRAY 0x0004
1685 #define NDI_FRAME_NUMBER 0x0008
1686 #define NDI_PASSIVE 0x8000
1687 #define NDI_PASSIVE_EXTRA 0x2000
1688 #define NDI_PASSIVE_STRAY 0x1000
1693 #define NDI_DISABLED 1
1694 #define NDI_MISSING 2
1695 #define NDI_UNOCCUPIED 3
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
1707 #define NDI_PARTIALLY_IN_VOLUME 0x80
1708 #define NDI_CURRENT_DETECT 0x80
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
1725 #define NDI_BAD_TRANSFORM_FIT 0x01
1726 #define NDI_NOT_ENOUGH_MARKERS 0x02
1727 #define NDI_TOOL_FACE_USED 0x70
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
1740 #define NDI_BLANK 'B'
1741 #define NDI_FLASH 'F'
1742 #define NDI_SOLID 'S'
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
1758 #define NDI_TOOL_IN_PORT_SWITCH 0x01
1759 #define NDI_SWITCH_1 0x02
1760 #define NDI_SWITCH_2 0x04
1761 #define NDI_SWITCH_3 0x08
1762 #define NDI_TOOL_TRACKING_LED 0x10
1763 #define NDI_LED_1 0x20
1764 #define NDI_LED_2 0x40
1765 #define NDI_LED_3 0x80
1770 #define NDI_950NM 0x00
1771 #define NDI_850NM 0x01
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
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
1797 #define NDI_CONTROL 0x0001
1798 #define NDI_SENSORS 0x0002
1799 #define NDI_TIU 0x0004
1804 #define NDI_EPROM_CODE_CHECKSUM 0x01
1805 #define NDI_EPROM_SYSTEM_CHECKSUM 0x02
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
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
1830 #define NDI_DETECTED 0x0001
1831 #define NDI_SOURCES 0x0002
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])