Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hpib_spoll(3I) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hpib_rqst_srvce(3I)

HPIB_SPOLL(3I)

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 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.  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 interface is not the active controller. 

­[ETIMEDOUT] the device polled did not respond before timeout. 

­[EINVAL] ba is the address of the polling interface itself. 

­[EACCES] The interface associated with this eid is locked by another process and O_NDELAY is set for this eid (see io_lock(3I)). 

DEPENDENCIES

Series 300:
EIO is returned if a timeout occurs. 

Series 800:
If the interface is not currently the active controller, hpib_spoll sets errno to [EACCES] instead of to [EIO]. 

AUTHOR

Hpib_spoll was developed by the Hewlett-Packard Company. 

SEE ALSO

hpib_rqst_srvce(3I). 

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026