Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hpib_wait_o(3I) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

HPIB_WAIT_ON_PPOLL(3I)

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;

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. 

The mask argument specifies on which lines the parallel poll response is expected.  The value of mask is viewed as an eight-bit binary number where the least significant bit corresponds to line DIO1; the most significant bit to DIO8.  For example, if you want to wait for a response on lines DIO2 and DIO6, the corresponding binary number is 00010010, so a hexadecimal value of 12 should be passed as the mask argument. 

The sense argument specifies what response is expected on the selected lines.  The value of sense is constructed in the same way as mask; eight bits for eight lines.  If a bit in sense is set, the function returns when the line corresponding to that bit is cleared. If a bit in sense is clear, the function returns when the corresponding line is set. Using the previous example, if mask is 0x12 and sense is 00000010 (0x02 hexadecimal), the function will return when line DIO5 is set, or when line DIO2 is clear. 

RETURN VALUE

Hpib_wait_on_ppoll returns a value of −1 if an error or timeout condition occurs.  Upon successful completion, the function returns the response byte XOR-ed with the sense value and AND-ed with the mask.

ERRORS

Hpib_wait_on_ppoll fails and sets errno to indicate the error if any of the following is true:

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

­[EBADF] The eid argument is not a valid open entity identifier. 

­[ENOTTY] The eid argument does not refer to an HP-IB raw bus device file. 

­[EINVAL] An invalid mask is received. 

­[EIO] The interface is not currently the active controller. 

­[EIO] A timeout occurs (Series 300 only). 

­[ETIMEDOUT] A timeout occurs (Series 800 only). 

DEPENDENCIES

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

Series 300:
[EIO] is returned if a timeout occurs. 

AUTHOR

Hpib_wait_on_ppoll was developed by HP. 

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

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