NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Macros
Error Codes

Macros

#define NDI_OKAY   0x00
 No error. More...
 
#define NDI_INVALID   0x01
 Invalid command. More...
 
#define NDI_TOO_LONG   0x02
 Command too long. More...
 
#define NDI_TOO_SHORT   0x03
 Command too short. More...
 
#define NDI_BAD_COMMAND_CRC   0x04
 Bad CRC calculated for command. More...
 
#define NDI_INTERN_TIMEOUT   0x05
 Timeout on command execution. More...
 
#define NDI_COMM_FAIL   0x06
 New communication parameters failed. More...
 
#define NDI_PARAMETERS   0x07
 Incorrect number of command parameters. More...
 
#define NDI_INVALID_PORT   0x08
 Invalid port selected. More...
 
#define NDI_INVALID_MODE   0x09
 Invalid mode selected. More...
 
#define NDI_INVALID_LED   0x0a
 Invalid LED selected. More...
 
#define NDI_LED_STATE   0x0b
 Invalid LED state selected. More...
 
#define NDI_BAD_MODE   0x0c
 Command invalid for current mode. More...
 
#define NDI_NO_TOOL   0x0d
 No tool plugged in selected port. More...
 
#define NDI_PORT_NOT_INIT   0x0e
 Selected port not initialized. More...
 
#define NDI_PORT_DISABLED   0x0f
 Selected port not enabled. More...
 
#define NDI_INITIALIZATION   0x10
 System not initialized. More...
 
#define NDI_TSTOP_FAIL   0x11
 Failure to stop tracking. More...
 
#define NDI_TSTART_FAIL   0x12
 Failure to start tracking. More...
 
#define NDI_PINIT_FAIL   0x13
 Failure to initialize tool in port. More...
 
#define NDI_CAMERA   0x14
 Invalid camera parameters. More...
 
#define NDI_INIT_FAIL   0x15
 Failure to initialize. More...
 
#define NDI_DSTART_FAIL   0x16
 Failure to start diagnostic mode. More...
 
#define NDI_DSTOP_FAIL   0x17
 Failure to stop diagnostic mode. More...
 
#define NDI_IRCHK_FAIL   0x18
 Failure to determine environmental IR. More...
 
#define NDI_FIRMWARE   0x19
 Failure to read firmware version. More...
 
#define NDI_INTERNAL   0x1a
 Internal device error. More...
 
#define NDI_IRINIT_FAIL   0x1b
 Failure to initialize for IR diagnostics. More...
 
#define NDI_IRED_FAIL   0x1c
 Failure to set marker firing signature. More...
 
#define NDI_SROM_FAIL   0x1d
 Failure to search for SROM IDs. More...
 
#define NDI_SROM_READ   0x1e
 Failure to read SROM data. More...
 
#define NDI_SROM_WRITE   0x1f
 Failure to write SROM data. More...
 
#define NDI_SROM_SELECT   0x20
 Failure to select SROM. More...
 
#define NDI_PORT_CURRENT   0x21
 Failure to perform tool current test. More...
 
#define NDI_WAVELENGTH   0x22
 No camera parameters for this wavelength. More...
 
#define NDI_PARAMETER_RANGE   0x23
 Command parameter out of range. More...
 
#define NDI_VOLUME   0x24
 No camera parameters for this volume. More...
 
#define NDI_FEATURES   0x25
 Failure to determine supported features. More...
 
#define NDI_ENVIRONMENT   0xf1
 Too much environmental infrared. More...
 
#define NDI_EPROM_READ   0xf6
 Failure to read Flash EPROM. More...
 
#define NDI_EPROM_WRITE   0xf5
 Failure to write Flash EPROM. More...
 
#define NDI_EPROM_ERASE   0xf4
 Failure to erase Flash EPROM. More...
 
#define NDI_BAD_CRC   0x0100
 Bad CRC received from device. More...
 
#define NDI_OPEN_ERROR   0x0200
 Error opening serial device. More...
 
#define NDI_BAD_COMM   0x0300
 Bad communication parameters for host. More...
 
#define NDI_TIMEOUT   0x0400
 Device took >5 secs to reply. More...
 
#define NDI_WRITE_ERROR   0x0500
 Device write error. More...
 
#define NDI_READ_ERROR   0x0600
 Device read error. More...
 
#define NDI_RESET_FAIL   0x0700
 Device failed to reset on break. More...
 
#define NDI_PROBE_FAIL   0x0800
 Device not found on specified port. More...
 
#define NDI_9600   0
 
#define NDI_14400   1
 
#define NDI_19200   2
 
#define NDI_38400   3
 
#define NDI_57600   4
 
#define NDI_115200   5
 
#define NDI_921600   6
 
#define NDI_1228739   7
 
#define NDI_8N1   0 /* 8 data bits, no parity, 1 stop bit */
 
#define NDI_8N2   1 /* etc. */
 
#define NDI_8O1   10
 
#define NDI_8O2   11
 
#define NDI_8E1   20
 
#define NDI_8E2   21
 
#define NDI_7N1   100
 
#define NDI_7N2   101
 
#define NDI_7O1   110
 
#define NDI_7O2   111
 
#define NDI_7E1   120
 
#define NDI_7E2   121
 
#define NDI_NOHANDSHAKE   0
 
#define NDI_HANDSHAKE   1
 
#define NDI_ALL_HANDLES   0x00
 
#define NDI_STALE_HANDLES   0x01
 
#define NDI_UNINITIALIZED_HANDLES   0x02
 
#define NDI_UNENABLED_HANDLES   0x03
 
#define NDI_ENABLED_HANDLES   0x04
 
#define NDI_STATIC   'S' /* relatively immobile tool */
 
#define NDI_DYNAMIC   'D' /* dynamic tool (e.g. probe) */
 
#define NDI_BUTTON_BOX   'B' /* tool with no IREDs */
 
#define NDI_XFORMS_AND_STATUS   0x0001 /* transforms and status */
 
#define NDI_ADDITIONAL_INFO   0x0002 /* additional tool transform info */
 
#define NDI_SINGLE_STRAY   0x0004 /* stray active marker reporting */
 
#define NDI_FRAME_NUMBER   0x0008 /* frame number for each tool */
 
#define NDI_PASSIVE   0x8000 /* report passive tool information */
 
#define NDI_PASSIVE_EXTRA   0x2000 /* add 6 extra passive tools */
 
#define NDI_PASSIVE_STRAY   0x1000 /* stray passive marker reporting */
 
#define NDI_DISABLED   1
 
#define NDI_MISSING   2
 
#define NDI_UNOCCUPIED   3
 
#define NDI_TOOL_IN_PORT   0x01
 
#define NDI_SWITCH_1_ON   0x02
 
#define NDI_SWITCH_2_ON   0x04
 
#define NDI_SWITCH_3_ON   0x08
 
#define NDI_INITIALIZED   0x10
 
#define NDI_ENABLED   0x20
 
#define NDI_OUT_OF_VOLUME   0x40 /* only for ndiGetGXPortStatus() */
 
#define NDI_PARTIALLY_IN_VOLUME   0x80 /* only for ndiGetGXPortStatus() */
 
#define NDI_CURRENT_DETECT   0x80 /* only for ndiGetPSTATPortStatus() */
 
#define NDI_COMM_SYNC_ERROR   0x0001
 
#define NDI_TOO_MUCH_EXTERNAL_INFRARED   0x0002
 
#define NDI_COMM_CRC_ERROR   0x0004
 
#define NDI_COMM_RECOVERABLE   0x0008
 
#define NDI_HARDWARE_FAILURE   0x0010
 
#define NDI_HARDWARE_CHANGE   0x0020
 
#define NDI_PORT_OCCUPIED   0x0040
 
#define NDI_PORT_UNOCCUPIED   0x0080
 
#define NDI_BAD_TRANSFORM_FIT   0x01
 
#define NDI_NOT_ENOUGH_MARKERS   0x02
 
#define NDI_TOOL_FACE_USED   0x70
 
#define NDI_MARKER_MISSING   0
 
#define NDI_MARKER_EXCEEDED_MAX_ANGLE   1
 
#define NDI_MARKER_EXCEEDED_MAX_ERROR   2
 
#define NDI_MARKER_USED   3
 
#define NDI_BLANK   'B' /* off */
 
#define NDI_FLASH   'F' /* flashing */
 
#define NDI_SOLID   'S' /* on */
 
#define NDI_BASIC   0x0001
 
#define NDI_TESTING   0x0002
 
#define NDI_PART_NUMBER   0x0004
 
#define NDI_ACCESSORIES   0x0008
 
#define NDI_MARKER_TYPE   0x0010
 
#define NDI_PORT_LOCATION   0x0020
 
#define NDI_GPIO_STATUS   0x0040
 
#define NDI_TOOL_IN_PORT_SWITCH   0x01 /* tool has tool-in-port switch */
 
#define NDI_SWITCH_1   0x02 /* tool has button #1 */
 
#define NDI_SWITCH_2   0x04 /* tool has button #2 */
 
#define NDI_SWITCH_3   0x08 /* tool has button #3 */
 
#define NDI_TOOL_TRACKING_LED   0x10 /* tool has tracking LED */
 
#define NDI_LED_1   0x20 /* tool has LED #1 */
 
#define NDI_LED_2   0x40 /* tool has LED #2 */
 
#define NDI_LED_3   0x80 /* tool has LED #3 */
 
#define NDI_950NM   0x00
 
#define NDI_850NM   0x01
 
#define NDI_NDI_ACTIVE   0x08
 
#define NDI_NDI_CERAMIC   0x10
 
#define NDI_PASSIVE_ANY   0x20
 
#define NDI_PASSIVE_SPHERE   0x28
 
#define NDI_PASSIVE_DISC   0x30
 
#define NDI_TYPE_REFERENCE   0x01
 
#define NDI_TYPE_POINTER   0x02
 
#define NDI_TYPE_BUTTON   0x03
 
#define NDI_TYPE_SOFTWARE   0x04
 
#define NDI_TYPE_MICROSCOPE   0x05
 
#define NDI_TYPE_DOCK   0x08
 
#define NDI_TYPE_CARM   0x0A
 
#define NDI_TYPE_CATHETER   0x0B
 
#define NDI_CONTROL   0x0001 /* control processor information */
 
#define NDI_SENSORS   0x0002 /* sensor processors */
 
#define NDI_TIU   0x0004 /* TIU processor */
 
#define NDI_EPROM_CODE_CHECKSUM   0x01
 
#define NDI_EPROM_SYSTEM_CHECKSUM   0x02
 
#define NDI_LEFT_ROM_CHECKSUM   0x01
 
#define NDI_LEFT_SYNC_TYPE_1   0x02
 
#define NDI_LEFT_SYNC_TYPE_2   0x04
 
#define NDI_RIGHT_ROM_CHECKSUM   0x10
 
#define NDI_RIGHT_SYNC_TYPE_1   0x20
 
#define NDI_RIGHT_SYNC_TYPE_2   0x40
 
#define NDI_ROM_CHECKSUM   0x01
 
#define NDI_OPERATING_VOLTAGES   0x02
 
#define NDI_MARKER_SEQUENCING   0x04
 
#define NDI_SYNC   0x08
 
#define NDI_COOLING_FAN   0x10
 
#define NDI_INTERNAL_ERROR   0x20
 
#define NDI_DETECTED   0x0001 /* simple yes/no whether IR detected */
 
#define NDI_SOURCES   0x0002 /* locations of up to 20 sources per camera */
 
#define NDI_LEFT   0 /* left sensor */
 
#define NDI_RIGHT   1 /* right sensor */
 
#define PL_OKAY   0x00
 No error. More...
 
#define PL_INVALID   0x01
 Invalid command. More...
 
#define PL_TOO_LONG   0x02
 Command too long. More...
 
#define PL_TOO_SHORT   0x03
 Command too short. More...
 
#define PL_BAD_COMMAND_CRC   0x04
 Bad CRC calculated for command. More...
 
#define PL_INTERN_TIMEOUT   0x05
 Timeout on command execution. More...
 
#define PL_COMM_FAIL   0x06
 New communication parameters failed. More...
 
#define PL_PARAMETERS   0x07
 Incorrect number of command parameters. More...
 
#define PL_INVALID_PORT   0x08
 Invalid port selected. More...
 
#define PL_INVALID_MODE   0x09
 Invalid mode selected. More...
 
#define PL_INVALID_LED   0x0a
 Invalid LED selected. More...
 
#define PL_LED_STATE   0x0b
 Invalid LED state selected. More...
 
#define PL_BAD_MODE   0x0c
 Command invalid for current mode. More...
 
#define PL_NO_TOOL   0x0d
 No tool plugged in selected port. More...
 
#define PL_PORT_NOT_INIT   0x0e
 Selected port not initialized. More...
 
#define PL_PORT_DISABLED   0x0f
 Selected port not enabled. More...
 
#define PL_INITIALIZATION   0x10
 System not initialized. More...
 
#define PL_TSTOP_FAIL   0x11
 Failure to stop tracking. More...
 
#define PL_TSTART_FAIL   0x12
 Failure to start tracking. More...
 
#define PL_PINIT_FAIL   0x13
 Failure to initialize tool in port. More...
 
#define PL_CAMERA   0x14
 Invalid camera parameters. More...
 
#define PL_INIT_FAIL   0x15
 Failure to initialize POLARIS. More...
 
#define PL_DSTART_FAIL   0x16
 Failure to start diagnostic mode. More...
 
#define PL_DSTOP_FAIL   0x17
 Failure to stop diagnostic mode. More...
 
#define PL_IRCHK_FAIL   0x18
 Failure to determine environmental IR. More...
 
#define PL_FIRMWARE   0x19
 Failure to read firmware version. More...
 
#define PL_INTERNAL   0x1a
 Internal POLARIS error. More...
 
#define PL_IRINIT_FAIL   0x1b
 Failure to initialize for IR diagnostics. More...
 
#define PL_IRED_FAIL   0x1c
 Failure to set marker firing signature. More...
 
#define PL_SROM_FAIL   0x1d
 Failure to search for SROM IDs. More...
 
#define PL_SROM_READ   0x1e
 Failure to read SROM data. More...
 
#define PL_SROM_WRITE   0x1f
 Failure to write SROM data. More...
 
#define PL_SROM_SELECT   0x20
 Failure to select SROM. More...
 
#define PL_PORT_CURRENT   0x21
 Failure to perform tool current test. More...
 
#define PL_WAVELENGTH   0x22
 No camera parameters for this wavelength. More...
 
#define PL_PARAMETER_RANGE   0x23
 Command parameter out of range. More...
 
#define PL_VOLUME   0x24
 No camera parameters for this volume. More...
 
#define PL_FEATURES   0x25
 Failure to determine supported features. More...
 
#define PL_ENVIRONMENT   0xf1
 Too much environmental infrared. More...
 
#define PL_EPROM_READ   0xf6
 Failure to read Flash EPROM. More...
 
#define PL_EPROM_WRITE   0xf5
 Failure to write Flash EPROM. More...
 
#define PL_EPROM_ERASE   0xf4
 Failure to erase Flash EPROM. More...
 
#define PL_BAD_CRC   0x0100
 Bad CRC received from POLARIS. More...
 
#define PL_OPEN_ERROR   0x0200
 Error opening serial device. More...
 
#define PL_BAD_COMM   0x0300
 Bad communication parameters for host. More...
 
#define PL_TIMEOUT   0x0400
 POLARIS took >5 secs to reply. More...
 
#define PL_WRITE_ERROR   0x0500
 Device write error. More...
 
#define PL_READ_ERROR   0x0600
 Device read error. More...
 
#define PL_RESET_FAIL   0x0700
 POLARIS failed to reset on break. More...
 
#define PL_PROBE_FAIL   0x0800
 POLARIS not found on specified port. More...
 
#define PL_9600   0
 
#define PL_14400   1
 
#define PL_19200   2
 
#define PL_38400   3
 
#define PL_57600   4
 
#define PL_115200   5
 
#define PL_8N1   0 /* 8 data bits, no parity, 1 stop bit */
 
#define PL_8N2   1 /* etc. */
 
#define PL_8O1   10
 
#define PL_8O2   11
 
#define PL_8E1   20
 
#define PL_8E2   21
 
#define PL_7N1   100
 
#define PL_7N2   101
 
#define PL_7O1   110
 
#define PL_7O2   111
 
#define PL_7E1   120
 
#define PL_7E2   121
 
#define PL_NOHANDSHAKE   0
 
#define PL_HANDSHAKE   1
 
#define PL_STATIC   'S' /* relatively immobile tool */
 
#define PL_DYNAMIC   'D' /* dynamic tool (e.g. probe) */
 
#define PL_BUTTON_BOX   'B' /* tool with no IREDs */
 
#define PL_XFORMS_AND_STATUS   0x0001 /* transforms and status */
 
#define PL_ADDITIONAL_INFO   0x0002 /* additional tool transform info */
 
#define PL_SINGLE_STRAY   0x0004 /* stray active marker reporting */
 
#define PL_FRAME_NUMBER   0x0008 /* frame number for each tool */
 
#define PL_PASSIVE   0x8000 /* report passive tool information */
 
#define PL_PASSIVE_EXTRA   0x2000 /* add 6 extra passive tools */
 
#define PL_PASSIVE_STRAY   0x1000 /* stray passive marker reporting */
 
#define PL_DISABLED   1
 
#define PL_MISSING   2
 
#define PL_UNOCCUPIED   3
 
#define PL_TOOL_IN_PORT   0x01
 
#define PL_SWITCH_1_ON   0x02
 
#define PL_SWITCH_2_ON   0x04
 
#define PL_SWITCH_3_ON   0x08
 
#define PL_INITIALIZED   0x10
 
#define PL_ENABLED   0x20
 
#define PL_OUT_OF_VOLUME   0x40 /* only for plGetGXPortStatus() */
 
#define PL_PARTIALLY_IN_VOLUME   0x80 /* only for plGetGXPortStatus() */
 
#define PL_CURRENT_DETECT   0x80 /* only for plGetPSTATPortStatus() */
 
#define PL_COMM_SYNC_ERROR   0x01
 
#define PL_TOO_MUCH_EXTERNAL_INFRARED   0x02
 
#define PL_COMM_CRC_ERROR   0x04
 
#define PL_BAD_TRANSFORM_FIT   0x01
 
#define PL_NOT_ENOUGH_MARKERS   0x02
 
#define PL_TOOL_FACE_USED   0x70
 
#define PL_MARKER_MISSING   0
 
#define PL_MARKER_EXCEEDED_MAX_ANGLE   1
 
#define PL_MARKER_EXCEEDED_MAX_ERROR   2
 
#define PL_MARKER_USED   3
 
#define PL_BLANK   'B' /* off */
 
#define PL_FLASH   'F' /* flashing */
 
#define PL_SOLID   'S' /* on */
 
#define PL_BASIC   0x0001
 
#define PL_TESTING   0x0002
 
#define PL_PART_NUMBER   0x0004
 
#define PL_ACCESSORIES   0x0008
 
#define PL_MARKER_TYPE   0x0010
 
#define PL_TOOL_IN_PORT_SWITCH   0x01 /* tool has tool-in-port switch */
 
#define PL_SWITCH_1   0x02 /* tool has button #1 */
 
#define PL_SWITCH_2   0x04 /* tool has button #2 */
 
#define PL_SWITCH_3   0x08 /* tool has button #3 */
 
#define PL_TOOL_TRACKING_LED   0x10 /* tool has tracking LED */
 
#define PL_LED_1   0x20 /* tool has LED #1 */
 
#define PL_LED_2   0x40 /* tool has LED #2 */
 
#define PL_LED_3   0x80 /* tool has LED #3 */
 
#define PL_950NM   0x00
 
#define PL_850NM   0x01
 
#define PL_NDI_ACTIVE   0x08
 
#define PL_NDI_CERAMIC   0x10
 
#define PL_PASSIVE_ANY   0x20
 
#define PL_PASSIVE_SPHERE   0x28
 
#define PL_PASSIVE_DISC   0x30
 
#define PL_CONTROL   0x0001 /* control processor information */
 
#define PL_SENSORS   0x0002 /* sensor processors */
 
#define PL_TIU   0x0004 /* TIU processor */
 
#define PL_EPROM_CODE_CHECKSUM   0x01
 
#define PL_EPROM_SYSTEM_CHECKSUM   0x02
 
#define PL_LEFT_ROM_CHECKSUM   0x01
 
#define PL_LEFT_SYNC_TYPE_1   0x02
 
#define PL_LEFT_SYNC_TYPE_2   0x04
 
#define PL_RIGHT_ROM_CHECKSUM   0x10
 
#define PL_RIGHT_SYNC_TYPE_1   0x20
 
#define PL_RIGHT_SYNC_TYPE_2   0x40
 
#define PL_ROM_CHECKSUM   0x01
 
#define PL_OPERATING_VOLTAGES   0x02
 
#define PL_MARKER_SEQUENCING   0x04
 
#define PL_SYNC   0x08
 
#define PL_COOLING_FAN   0x10
 
#define PL_INTERNAL_ERROR   0x20
 
#define PL_DETECTED   0x0001 /* simple yes/no whether IR detected */
 
#define PL_SOURCES   0x0002 /* locations of up to 20 sources per camera */
 
#define PL_LEFT   0 /* left sensor */
 
#define PL_RIGHT   1 /* right sensor */
 

Detailed Description

The error code is set only by ndiCommand() or by macros and functions that call ndiCommand().

Error codes that equal to or less than 0xff are error codes reported by the device itself. Error codes greater than 0xff are errors that are reported by the host computer.

The error code is returned by ndiGetError() and the corresponding text is available by passing the code to ndiErrorString().

The POLARIS error code is set only by plCommand() or by macros and functions that call plCommand().

Error codes that equal to or less than 0xff are error codes reported by the POLARIS itself. Error codes greater than 0xff are errors that are reported by the host computer.

The error code is returned by plGetError() and the corresponding text is available by passing the code to plErrorString().

Macro Definition Documentation

#define NDI_115200   5
#define NDI_1228739   7
#define NDI_14400   1
#define NDI_19200   2
#define NDI_38400   3
#define NDI_57600   4
#define NDI_7E1   120
#define NDI_7E2   121
#define NDI_7N1   100
#define NDI_7N2   101
#define NDI_7O1   110
#define NDI_7O2   111
#define NDI_850NM   0x01
#define NDI_8E1   20
#define NDI_8E2   21
#define NDI_8N1   0 /* 8 data bits, no parity, 1 stop bit */
#define NDI_8N2   1 /* etc. */
#define NDI_8O1   10
#define NDI_8O2   11
#define NDI_921600   6
#define NDI_950NM   0x00
#define NDI_9600   0
#define NDI_ACCESSORIES   0x0008
#define NDI_ADDITIONAL_INFO   0x0002 /* additional tool transform info */
#define NDI_ALL_HANDLES   0x00
#define NDI_BAD_COMM   0x0300

Bad communication parameters for host.

#define NDI_BAD_COMMAND_CRC   0x04

Bad CRC calculated for command.

#define NDI_BAD_CRC   0x0100

Bad CRC received from device.

#define NDI_BAD_MODE   0x0c

Command invalid for current mode.

#define NDI_BAD_TRANSFORM_FIT   0x01
#define NDI_BASIC   0x0001
#define NDI_BLANK   'B' /* off */
#define NDI_BUTTON_BOX   'B' /* tool with no IREDs */
#define NDI_CAMERA   0x14

Invalid camera parameters.

#define NDI_COMM_CRC_ERROR   0x0004
#define NDI_COMM_FAIL   0x06

New communication parameters failed.

#define NDI_COMM_RECOVERABLE   0x0008
#define NDI_COMM_SYNC_ERROR   0x0001
#define NDI_CONTROL   0x0001 /* control processor information */
#define NDI_COOLING_FAN   0x10
#define NDI_CURRENT_DETECT   0x80 /* only for ndiGetPSTATPortStatus() */
#define NDI_DETECTED   0x0001 /* simple yes/no whether IR detected */
#define NDI_DISABLED   1
#define NDI_DSTART_FAIL   0x16

Failure to start diagnostic mode.

#define NDI_DSTOP_FAIL   0x17

Failure to stop diagnostic mode.

#define NDI_DYNAMIC   'D' /* dynamic tool (e.g. probe) */
#define NDI_ENABLED   0x20
#define NDI_ENABLED_HANDLES   0x04
#define NDI_ENVIRONMENT   0xf1

Too much environmental infrared.

#define NDI_EPROM_CODE_CHECKSUM   0x01
#define NDI_EPROM_ERASE   0xf4

Failure to erase Flash EPROM.

#define NDI_EPROM_READ   0xf6

Failure to read Flash EPROM.

#define NDI_EPROM_SYSTEM_CHECKSUM   0x02
#define NDI_EPROM_WRITE   0xf5

Failure to write Flash EPROM.

#define NDI_FEATURES   0x25

Failure to determine supported features.

#define NDI_FIRMWARE   0x19

Failure to read firmware version.

#define NDI_FLASH   'F' /* flashing */
#define NDI_FRAME_NUMBER   0x0008 /* frame number for each tool */
#define NDI_GPIO_STATUS   0x0040
#define NDI_HANDSHAKE   1
#define NDI_HARDWARE_CHANGE   0x0020
#define NDI_HARDWARE_FAILURE   0x0010
#define NDI_INIT_FAIL   0x15

Failure to initialize.

#define NDI_INITIALIZATION   0x10

System not initialized.

#define NDI_INITIALIZED   0x10
#define NDI_INTERN_TIMEOUT   0x05

Timeout on command execution.

#define NDI_INTERNAL   0x1a

Internal device error.

#define NDI_INTERNAL_ERROR   0x20
#define NDI_INVALID   0x01

Invalid command.

#define NDI_INVALID_LED   0x0a

Invalid LED selected.

#define NDI_INVALID_MODE   0x09

Invalid mode selected.

#define NDI_INVALID_PORT   0x08

Invalid port selected.

#define NDI_IRCHK_FAIL   0x18

Failure to determine environmental IR.

#define NDI_IRED_FAIL   0x1c

Failure to set marker firing signature.

#define NDI_IRINIT_FAIL   0x1b

Failure to initialize for IR diagnostics.

#define NDI_LED_1   0x20 /* tool has LED #1 */
#define NDI_LED_2   0x40 /* tool has LED #2 */
#define NDI_LED_3   0x80 /* tool has LED #3 */
#define NDI_LED_STATE   0x0b

Invalid LED state selected.

#define NDI_LEFT   0 /* left sensor */
#define NDI_LEFT_ROM_CHECKSUM   0x01
#define NDI_LEFT_SYNC_TYPE_1   0x02
#define NDI_LEFT_SYNC_TYPE_2   0x04
#define NDI_MARKER_EXCEEDED_MAX_ANGLE   1
#define NDI_MARKER_EXCEEDED_MAX_ERROR   2
#define NDI_MARKER_MISSING   0
#define NDI_MARKER_SEQUENCING   0x04
#define NDI_MARKER_TYPE   0x0010
#define NDI_MARKER_USED   3
#define NDI_MISSING   2
#define NDI_NDI_ACTIVE   0x08
#define NDI_NDI_CERAMIC   0x10
#define NDI_NO_TOOL   0x0d

No tool plugged in selected port.

#define NDI_NOHANDSHAKE   0
#define NDI_NOT_ENOUGH_MARKERS   0x02
#define NDI_OKAY   0x00

No error.

#define NDI_OPEN_ERROR   0x0200

Error opening serial device.

#define NDI_OPERATING_VOLTAGES   0x02
#define NDI_OUT_OF_VOLUME   0x40 /* only for ndiGetGXPortStatus() */
#define NDI_PARAMETER_RANGE   0x23

Command parameter out of range.

#define NDI_PARAMETERS   0x07

Incorrect number of command parameters.

#define NDI_PART_NUMBER   0x0004
#define NDI_PARTIALLY_IN_VOLUME   0x80 /* only for ndiGetGXPortStatus() */
#define NDI_PASSIVE   0x8000 /* report passive tool information */
#define NDI_PASSIVE_ANY   0x20
#define NDI_PASSIVE_DISC   0x30
#define NDI_PASSIVE_EXTRA   0x2000 /* add 6 extra passive tools */
#define NDI_PASSIVE_SPHERE   0x28
#define NDI_PASSIVE_STRAY   0x1000 /* stray passive marker reporting */
#define NDI_PINIT_FAIL   0x13

Failure to initialize tool in port.

#define NDI_PORT_CURRENT   0x21

Failure to perform tool current test.

#define NDI_PORT_DISABLED   0x0f

Selected port not enabled.

#define NDI_PORT_LOCATION   0x0020
#define NDI_PORT_NOT_INIT   0x0e

Selected port not initialized.

#define NDI_PORT_OCCUPIED   0x0040
#define NDI_PORT_UNOCCUPIED   0x0080
#define NDI_PROBE_FAIL   0x0800

Device not found on specified port.

#define NDI_READ_ERROR   0x0600

Device read error.

#define NDI_RESET_FAIL   0x0700

Device failed to reset on break.

#define NDI_RIGHT   1 /* right sensor */
#define NDI_RIGHT_ROM_CHECKSUM   0x10
#define NDI_RIGHT_SYNC_TYPE_1   0x20
#define NDI_RIGHT_SYNC_TYPE_2   0x40
#define NDI_ROM_CHECKSUM   0x01
#define NDI_SENSORS   0x0002 /* sensor processors */
#define NDI_SINGLE_STRAY   0x0004 /* stray active marker reporting */
#define NDI_SOLID   'S' /* on */
#define NDI_SOURCES   0x0002 /* locations of up to 20 sources per camera */
#define NDI_SROM_FAIL   0x1d

Failure to search for SROM IDs.

#define NDI_SROM_READ   0x1e

Failure to read SROM data.

#define NDI_SROM_SELECT   0x20

Failure to select SROM.

#define NDI_SROM_WRITE   0x1f

Failure to write SROM data.

#define NDI_STALE_HANDLES   0x01
#define NDI_STATIC   'S' /* relatively immobile tool */
#define NDI_SWITCH_1   0x02 /* tool has button #1 */
#define NDI_SWITCH_1_ON   0x02
#define NDI_SWITCH_2   0x04 /* tool has button #2 */
#define NDI_SWITCH_2_ON   0x04
#define NDI_SWITCH_3   0x08 /* tool has button #3 */
#define NDI_SWITCH_3_ON   0x08
#define NDI_SYNC   0x08
#define NDI_TESTING   0x0002
#define NDI_TIMEOUT   0x0400

Device took >5 secs to reply.

#define NDI_TIU   0x0004 /* TIU processor */
#define NDI_TOO_LONG   0x02

Command too long.

#define NDI_TOO_MUCH_EXTERNAL_INFRARED   0x0002
#define NDI_TOO_SHORT   0x03

Command too short.

#define NDI_TOOL_FACE_USED   0x70
#define NDI_TOOL_IN_PORT   0x01
#define NDI_TOOL_IN_PORT_SWITCH   0x01 /* tool has tool-in-port switch */
#define NDI_TOOL_TRACKING_LED   0x10 /* tool has tracking LED */
#define NDI_TSTART_FAIL   0x12

Failure to start tracking.

#define NDI_TSTOP_FAIL   0x11

Failure to stop tracking.

#define NDI_TYPE_BUTTON   0x03
#define NDI_TYPE_CARM   0x0A
#define NDI_TYPE_CATHETER   0x0B
#define NDI_TYPE_DOCK   0x08
#define NDI_TYPE_MICROSCOPE   0x05
#define NDI_TYPE_POINTER   0x02
#define NDI_TYPE_REFERENCE   0x01
#define NDI_TYPE_SOFTWARE   0x04
#define NDI_UNENABLED_HANDLES   0x03
#define NDI_UNINITIALIZED_HANDLES   0x02
#define NDI_UNOCCUPIED   3
#define NDI_VOLUME   0x24

No camera parameters for this volume.

#define NDI_WAVELENGTH   0x22

No camera parameters for this wavelength.

#define NDI_WRITE_ERROR   0x0500

Device write error.

#define NDI_XFORMS_AND_STATUS   0x0001 /* transforms and status */
#define PL_115200   5
#define PL_14400   1
#define PL_19200   2
#define PL_38400   3
#define PL_57600   4
#define PL_7E1   120
#define PL_7E2   121
#define PL_7N1   100
#define PL_7N2   101
#define PL_7O1   110
#define PL_7O2   111
#define PL_850NM   0x01
#define PL_8E1   20
#define PL_8E2   21
#define PL_8N1   0 /* 8 data bits, no parity, 1 stop bit */
#define PL_8N2   1 /* etc. */
#define PL_8O1   10
#define PL_8O2   11
#define PL_950NM   0x00
#define PL_9600   0
#define PL_ACCESSORIES   0x0008
#define PL_ADDITIONAL_INFO   0x0002 /* additional tool transform info */
#define PL_BAD_COMM   0x0300

Bad communication parameters for host.

#define PL_BAD_COMMAND_CRC   0x04

Bad CRC calculated for command.

#define PL_BAD_CRC   0x0100

Bad CRC received from POLARIS.

#define PL_BAD_MODE   0x0c

Command invalid for current mode.

#define PL_BAD_TRANSFORM_FIT   0x01
#define PL_BASIC   0x0001
#define PL_BLANK   'B' /* off */
#define PL_BUTTON_BOX   'B' /* tool with no IREDs */
#define PL_CAMERA   0x14

Invalid camera parameters.

#define PL_COMM_CRC_ERROR   0x04
#define PL_COMM_FAIL   0x06

New communication parameters failed.

#define PL_COMM_SYNC_ERROR   0x01
#define PL_CONTROL   0x0001 /* control processor information */
#define PL_COOLING_FAN   0x10
#define PL_CURRENT_DETECT   0x80 /* only for plGetPSTATPortStatus() */
#define PL_DETECTED   0x0001 /* simple yes/no whether IR detected */
#define PL_DISABLED   1
#define PL_DSTART_FAIL   0x16

Failure to start diagnostic mode.

#define PL_DSTOP_FAIL   0x17

Failure to stop diagnostic mode.

#define PL_DYNAMIC   'D' /* dynamic tool (e.g. probe) */
#define PL_ENABLED   0x20
#define PL_ENVIRONMENT   0xf1

Too much environmental infrared.

#define PL_EPROM_CODE_CHECKSUM   0x01
#define PL_EPROM_ERASE   0xf4

Failure to erase Flash EPROM.

#define PL_EPROM_READ   0xf6

Failure to read Flash EPROM.

#define PL_EPROM_SYSTEM_CHECKSUM   0x02
#define PL_EPROM_WRITE   0xf5

Failure to write Flash EPROM.

#define PL_FEATURES   0x25

Failure to determine supported features.

#define PL_FIRMWARE   0x19

Failure to read firmware version.

#define PL_FLASH   'F' /* flashing */
#define PL_FRAME_NUMBER   0x0008 /* frame number for each tool */
#define PL_HANDSHAKE   1
#define PL_INIT_FAIL   0x15

Failure to initialize POLARIS.

#define PL_INITIALIZATION   0x10

System not initialized.

#define PL_INITIALIZED   0x10
#define PL_INTERN_TIMEOUT   0x05

Timeout on command execution.

#define PL_INTERNAL   0x1a

Internal POLARIS error.

#define PL_INTERNAL_ERROR   0x20
#define PL_INVALID   0x01

Invalid command.

#define PL_INVALID_LED   0x0a

Invalid LED selected.

#define PL_INVALID_MODE   0x09

Invalid mode selected.

#define PL_INVALID_PORT   0x08

Invalid port selected.

#define PL_IRCHK_FAIL   0x18

Failure to determine environmental IR.

#define PL_IRED_FAIL   0x1c

Failure to set marker firing signature.

#define PL_IRINIT_FAIL   0x1b

Failure to initialize for IR diagnostics.

#define PL_LED_1   0x20 /* tool has LED #1 */
#define PL_LED_2   0x40 /* tool has LED #2 */
#define PL_LED_3   0x80 /* tool has LED #3 */
#define PL_LED_STATE   0x0b

Invalid LED state selected.

#define PL_LEFT   0 /* left sensor */
#define PL_LEFT_ROM_CHECKSUM   0x01
#define PL_LEFT_SYNC_TYPE_1   0x02
#define PL_LEFT_SYNC_TYPE_2   0x04
#define PL_MARKER_EXCEEDED_MAX_ANGLE   1
#define PL_MARKER_EXCEEDED_MAX_ERROR   2
#define PL_MARKER_MISSING   0
#define PL_MARKER_SEQUENCING   0x04
#define PL_MARKER_TYPE   0x0010
#define PL_MARKER_USED   3
#define PL_MISSING   2
#define PL_NDI_ACTIVE   0x08
#define PL_NDI_CERAMIC   0x10
#define PL_NO_TOOL   0x0d

No tool plugged in selected port.

#define PL_NOHANDSHAKE   0
#define PL_NOT_ENOUGH_MARKERS   0x02
#define PL_OKAY   0x00

No error.

#define PL_OPEN_ERROR   0x0200

Error opening serial device.

#define PL_OPERATING_VOLTAGES   0x02
#define PL_OUT_OF_VOLUME   0x40 /* only for plGetGXPortStatus() */
#define PL_PARAMETER_RANGE   0x23

Command parameter out of range.

#define PL_PARAMETERS   0x07

Incorrect number of command parameters.

#define PL_PART_NUMBER   0x0004
#define PL_PARTIALLY_IN_VOLUME   0x80 /* only for plGetGXPortStatus() */
#define PL_PASSIVE   0x8000 /* report passive tool information */
#define PL_PASSIVE_ANY   0x20
#define PL_PASSIVE_DISC   0x30
#define PL_PASSIVE_EXTRA   0x2000 /* add 6 extra passive tools */
#define PL_PASSIVE_SPHERE   0x28
#define PL_PASSIVE_STRAY   0x1000 /* stray passive marker reporting */
#define PL_PINIT_FAIL   0x13

Failure to initialize tool in port.

#define PL_PORT_CURRENT   0x21

Failure to perform tool current test.

#define PL_PORT_DISABLED   0x0f

Selected port not enabled.

#define PL_PORT_NOT_INIT   0x0e

Selected port not initialized.

#define PL_PROBE_FAIL   0x0800

POLARIS not found on specified port.

#define PL_READ_ERROR   0x0600

Device read error.

#define PL_RESET_FAIL   0x0700

POLARIS failed to reset on break.

#define PL_RIGHT   1 /* right sensor */
#define PL_RIGHT_ROM_CHECKSUM   0x10
#define PL_RIGHT_SYNC_TYPE_1   0x20
#define PL_RIGHT_SYNC_TYPE_2   0x40
#define PL_ROM_CHECKSUM   0x01
#define PL_SENSORS   0x0002 /* sensor processors */
#define PL_SINGLE_STRAY   0x0004 /* stray active marker reporting */
#define PL_SOLID   'S' /* on */
#define PL_SOURCES   0x0002 /* locations of up to 20 sources per camera */
#define PL_SROM_FAIL   0x1d

Failure to search for SROM IDs.

#define PL_SROM_READ   0x1e

Failure to read SROM data.

#define PL_SROM_SELECT   0x20

Failure to select SROM.

#define PL_SROM_WRITE   0x1f

Failure to write SROM data.

#define PL_STATIC   'S' /* relatively immobile tool */
#define PL_SWITCH_1   0x02 /* tool has button #1 */
#define PL_SWITCH_1_ON   0x02
#define PL_SWITCH_2   0x04 /* tool has button #2 */
#define PL_SWITCH_2_ON   0x04
#define PL_SWITCH_3   0x08 /* tool has button #3 */
#define PL_SWITCH_3_ON   0x08
#define PL_SYNC   0x08
#define PL_TESTING   0x0002
#define PL_TIMEOUT   0x0400

POLARIS took >5 secs to reply.

#define PL_TIU   0x0004 /* TIU processor */
#define PL_TOO_LONG   0x02

Command too long.

#define PL_TOO_MUCH_EXTERNAL_INFRARED   0x02
#define PL_TOO_SHORT   0x03

Command too short.

#define PL_TOOL_FACE_USED   0x70
#define PL_TOOL_IN_PORT   0x01
#define PL_TOOL_IN_PORT_SWITCH   0x01 /* tool has tool-in-port switch */
#define PL_TOOL_TRACKING_LED   0x10 /* tool has tracking LED */
#define PL_TSTART_FAIL   0x12

Failure to start tracking.

#define PL_TSTOP_FAIL   0x11

Failure to stop tracking.

#define PL_UNOCCUPIED   3
#define PL_VOLUME   0x24

No camera parameters for this volume.

#define PL_WAVELENGTH   0x22

No camera parameters for this wavelength.

#define PL_WRITE_ERROR   0x0500

Device write error.

#define PL_XFORMS_AND_STATUS   0x0001 /* transforms and status */