HPUX hpib_spoll[3i]






 hpib_spoll(3I)           Series 300, 400, 800 Only           hpib_spoll(3I)





 NAME
      hpib_spoll() - conduct a serial poll on HP-IB bus

 SYNOPSIS
      #include <dvio.h>

      int hpib_spoll(int eid, int 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(), dup(), fcntl(), or creat() 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 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)).





 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 hpib_spoll(3I)           Series 300, 400, 800 Only           hpib_spoll(3I)





 DEPENDENCIES
    Series 300/400:
      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 HP.

 SEE ALSO
      dup(2), creat(2), fcntl(2), open(2), hpib_rqst_srvce(3I).









































 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992