This document describes the ioctls available to an application.
To use the ioctls in a C program, #include the sdi.h header file.


General purpose ioctls
----------------------

SDI_IOC_GETID
	Get the board's PCI device ID.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:
		0x006a - MultiMaster SDI-R
		0x006b - SDI Master
		0x0076 - SDI Master LP
		0x006c - MultiMaster SDI-T
		0x009F - SDI Master PCIe
 		0x00A0 - MultiMaster SDI-R PCIe
		0x00A1 - MultiMaster SDI-T PCIe
		0x0091 - SDI Master LP PCIe
		0x00B4 - SDI Master Q/o LP PCIe
		0x00B1 - SDI Master Q/i
		0x00A7 - SDI Master Q/i PCIe

SDI_IOC_GETVERSION
	Get the board's firmware revision level.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..65535

SDI_IOC_QBUF
	Queue the next "available" driver buffer.
	Argument type:	unsigned int
	Read/write:	read
	Valid values:	0..65535

SDI_IOC_DQBUF
	Dequeue the last "used" driver buffer.
	Argument type:	unsigned int
	Read/write:	read
	Valid values:	0..65535


Transmitter ioctls
------------------

SDI_IOC_TXGETCAP
	Get the interface's capabilities flags; contains
		  SDI_CAP_TX_RXCLKSRC: Recovered receive clock input
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDI_IOC_TXGETEVENTS
	Get and reset the transmitter event flags; contains
		SDI_EVENT_TX_BUFFER: Driver buffer queue underrun
		SDI_EVENT_TX_FIFO: Onboard FIFO underrun
		SDI_EVENT_TX_DATA: Transmit data status change
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDI_IOC_TXGETBUFLEVEL
	Get the driver transmit buffer queue length.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:	0..(number of buffers - 1)

SDI_IOC_TXGETTXD
	Get the transmit data status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - not transmitting
		1 - transmitting


Receiver ioctls
---------------

SDI_IOC_RXGETCAP
	Get the interface's capabilities flags.
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDI_IOC_RXGETEVENTS
	Get and reset the receiver event flags; contains
		SDI_EVENT_RX_BUFFER: Driver buffer queue overrun
		SDI_EVENT_RX_FIFO: Onboard FIFO overrun
		SDI_EVENT_RX_CARRIER: Carrier detect status change
	Argument type:	pointer to unsigned int
	Read/write:	read
	Valid values:	0..4294967295

SDI_IOC_RXGETBUFLEVEL
	Get the driver receive buffer queue length.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:	0..(number of buffers - 1)

SDI_IOC_RXGETCARRIER
	Get the carrier detect status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - no carrier
		1 - carrier detected

SDI_IOC_RXGETSTATUS
	Get the receiver status.
	Argument type:	pointer to int
	Read/write:	read
	Valid values:
		0 - blocking data
		1 - passing data

