HPIB_WAIT_ON_PPOLL(3D)
NAME
hpib_wait_on_ppoll − wait until a particular parallel poll value occurs
SYNOPSIS
int hpib_wait_on_ppoll (eid, mask, sense);
int eid, mask, sense;
HP-UX COMPATIBILITY
Level: Device I/O Library − HP-UX/EXTENDED
Origin: HP
DESCRIPTION
Hpib_wait_on_ppoll waits for a parallel poll response to occur on one or more lines. 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.
Mask is an integer that specifies on which line the parallel poll response is expected. Mask’s value is obtained from an 8-bit binary number, each bit of which corresponds to one of the eight lines. For example, if you want to wait for a response on lines 2 and 6, the correct binary number is 01000100. This converts to a decimal equivalent of 68, which is the number you should assign to mask.
Sense simply specifies what response you are expecting on the selected lines. Sense is constructed in the same way as mask − eight bits for eight lines. If a bit is set, then the function returns when the line corresponding that bit is cleared. Similarly, if a bit in sense is clear, the function returns when the corresponding line is set. Using the previous example, a sense = 00000100 = 4 (decimal) causes the function to return when line 6 is set, and return when line 2 is cleared.
HARDWARE DEPENDENCIES
Series 500:
When an hpib_wait_on_ppoll is in progress, all other bus activity is held off until it has completed. Therefore, it is strongly recommended that a timeout be in effect before all hpib_wait_on_ppoll calls.
RETURN VALUE
Hpib_wait_on_ppoll returns a value of −1 if an error or timeout condition occurs. A successful completion of the function returns the response byte XOR-ed with the sense value and AND-ed with the mask.
DIAGNOSTICS
Hpib_wait_on_ppoll fails under the following circumstances, and sets errno (see errno(2)) to the value in square brackets:
eid does not refer to an open file [EBADF];
eid does not refer to an HP-IB raw bus device file [ENOTTY];
a timeout occured [EIO];
the interface is not currently the active controller [EIO].
Hewlett-Packard — last mod. May 11, 2021