HPIB_SPOLL(3I) — HP-UX
NAME
hpib_spoll − conduct a serial poll on HP-IB bus
SYNOPSIS
int hpib_spoll (eid, ba);
int eid, ba;
DESCRIPTION
Hpib_spoll conducts a serial poll of the specified device. Eid is an entity identifier of an open HP-IB raw bus device file obtained from an open(2), dup(2), fcntl(2), or creat(2) call. Ba is the bus address of the intended device.
Hpib_spoll polls a single device for its response byte. The information stored in the response byte is device specific with the exception of bit 6. If bit 6 of the response byte is set, the addressed device has asserted the SRQ line, and is requesting service. (Note that the least significant (right-most) bit of the response byte is bit 0.)
Not all devices respond to the serial poll function. Consult the device documentation. Specifying a device that does not support serial polling may cause a timeout error or suspend your program indefinitely (see hpib_rqst_srvce(3I)). The interface cannot serial poll itself. The interface must be the active controller.
RETURN VALUE
If hpib_spoll is successful, the device response byte is returned in the least significant byte of the return value. Otherwise, −1 is returned, indicating an error.
ERRORS
Hpib_spoll fails under the following circumstances, and sets errno (see errno(2)) to the value in square brackets:
[EBAD] eid does not refer to an open file.
[ENOTTY] eid does not refer to an HP-IB raw bus device file.
[EIO] the device polled did not respond before timeout, or the interface is not the active controller.
[EINVAL] ba is the address of the polling interface itself.
AUTHOR
Hpib_spoll was developed by the Hewlett-Packard Company.
SEE ALSO
Hewlett-Packard Company — May 11, 2021