Linux-GPIB Reference

Reference for libgpib functions, macros, and constants.

Global Variables

Table of Contents
ibcnt and ibcntl -- hold number of bytes transferred, or errno
iberr -- holds error code
ibsta -- holds status

'Traditional' API Functions

Table of Contents
ibask -- query configuration (board or device)
ibbna -- change access board (device)
ibcac -- assert ATN (board)
ibclr -- clear device (device)
ibcmd -- write command bytes (board)
ibcmda -- write command bytes asynchronously (board)
ibconfig -- change configuration (board or device)
ibdev -- open a device (device)
ibeos -- set end-of-string mode (board or device)
ibeot -- assert EOI with last data byte (board or device)
ibevent -- get events from event queue (board)
ibfind -- open a board or device (board or device)
ibgts -- release ATN (board)
ibist -- set individual status bit (board)
iblines -- monitor bus lines (board)
ibln -- check if listener is present (board or device)
ibloc -- go to local mode (board or device)
ibonl -- close or reinitialize descriptor (board or device)
ibpad -- set primary GPIB address (board or device)
ibpct -- pass control (board)
ibppc -- parallel poll configure (board or device)
ibrd -- read data bytes (board or device)
ibrda -- read data bytes asynchronously (board or device)
ibrdf -- read data bytes to file (board or device)
ibrpp -- perform a parallel poll (board or device)
ibrsc -- request system control (board)
ibrsp -- conduct serial poll (device)
ibrsv -- request service (board)
ibsad -- set secondary GPIB address (board or device)
ibsic -- perform interface clear (board)
ibsre -- set remote enable (board)
ibstop -- abort asynchronous i/o operation (board or device)
ibtmo -- adjust io timeout (board or device)
ibtrg -- trigger device (device)
ibvers -- Obtain the current linux gpib version.
ibwait -- wait for event (board or device)
ibwrt -- write data bytes (board or device)
ibwrta -- write data bytes asynchronously (board or device)
ibwrtf -- write data bytes from file (board or device)

"Multidevice" API Functions

Table of Contents
AllSPoll -- serial poll multiple devices
DevClear -- clear a device
DevClearList -- clear multiple devices
EnableLocal -- put devices into local mode.
EnableRemote -- put devices into remote mode.
FindLstn -- find devices
FindRQS -- find device requesting service and read its status byte
PassControl -- make device controller-in-charge
PPoll -- parallel poll devices
PPollConfig -- configure a device's parallel poll response
PPollUnconfig -- disable devices' parallel poll response
RcvRespMsg -- read data
ReadStatusByte -- serial poll a device
Receive -- perform receive addressing and read data
ReceiveSetup -- perform receive addressing
ResetSys -- reset system
Send -- perform send addressing and write data
SendCmds -- write command bytes onto bus
SendDataBytes -- write data
SendIFC -- perform interface clear
SendList -- write data to multiple devices
SendLLO -- put devices into local lockout mode
SendSetup -- perform send addressing
SetRWLS -- put devices into remote with lockout state
TestSRQ -- query state of SRQ bus line
TestSys -- perform self-test queries on devices
Trigger -- trigger a device
TriggerList -- trigger multiple devices
WaitSRQ -- sleep until the SRQ bus line is asserted

The "Multidevice" API functions provide similar functionality to the "Traditional" API functions. However, some of the "multidevice" functions can be to be performed on multiple devices simultaneously. For example, SendList() can be used to write a message to multiple devices. Such functions take an array of Addr4882_t as an argument. The end of the array is specified by setting the last element to the constant NOADDR.

Utility Functions

Table of Contents
GetPAD -- extract primary address from an Addr4882_t value
GetSAD -- extract secondary address from an Addr4882_t value
MakeAddr -- pack primary and secondary address into an Addr4882_t value
MLA -- generate 'my listen address' command byte
MSA -- generate 'my secondary address' command byte
MTA -- generate 'my talk address' command byte
PPE_byte -- generate 'parallel poll enable' command byte
ThreadIbcnt and ThreadIbcntl -- thread-specific ibcnt and ibcntl values
ThreadIberr -- thread-specific iberr value
ThreadIbsta -- thread-specific ibsta value