NAME
hpib_status_wait() — wait until the requested status condition becomes true (OBSOLETED AT 10.30)
SYNOPSIS
#include <dvio.h>
int hpib_status_wait(int eid, int status);
#include <dvio.h>
DESCRIPTION
hpib_status_wait()
waits until a specific condition has occurred before returning.
eid
is an entity identifier of an open
HP-IB
raw bus device file obtained from an
open(),
dup(),
fcntl(),
or
creat()
call.
status
is an integer specifying what information is returned.
The possible values for
status
and their associated meanings are:
- WAIT_FOR_SRQ
Wait until
SRQ
line is enabled.
- WAIT_FOR_CONTROL
Wait until this channel is active controller.
- WAIT_FOR_TALKER
Wait until this channel is addressed as talker.
- WAIT_FOR_LISTENER
Wait until this channel is addressed as listener.
The wait is subject to the current timeout in effect.
If a timeout occurs before the desired condition occurs,
the function returns with an error.
RETURN VALUE
hpib_status_wait()
returns zero when the condition requested becomes true.
A value of -1 is returned if an error occurs.
A -1 is also returned if a timeout occurs
before the desired condition becomes true.
ERRORS
hpib_status_wait()
fails under the following circumstances, and sets
errno
(see
errno(2))
to the value in square brackets:
- [EBADF]
eid
does not refer to an open file.
- [ENOTTY]
eid
does not refer to an
HP-IB
raw bus device file.
- [ETIMEDOUT]
a timeout occurred.
- [EINVAL]
status
contains an invalid value.
- [EACCES]
the interface associated with this
eid
is locked by another process and
O_NDELAY
is set for this
eid
(see io_lock(3I)).
AUTHOR
hpib_status_wait()
was developed by HP.