hpib_pass_ctl(3I) — Series 300, 400, 800 Only
NAME
hpib_pass_ctl() − change active controllers on HP-IB
SYNOPSIS
#include <dvio.h>
int hpib_pass_ctl(int eid, int ba);
DESCRIPTION
hpib_pass_ctl() passes control of a bus to an inactive controller on that bus. The inactive controller becomes the active controller of that bus. 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.
Not all devices can accept control. Pass control passes only active control of the bus; it cannot pass system control of the bus. The specified interface must be the current active controller but need not be the system controller. The pass control operation does not suspend program execution if the inactive controller does not take active control of the bus. However, the interface is no longer active controller.
RETURN VALUE
hpib_pass_ctl() returns 0 (zero) if successful, or −1 if an error was encountered.
ERRORS
hpib_pass_ctl() fails under any of 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.
[EIO] the interface is not the active controller.
[ETIMEDOUT] a timeout occurred.
[EINVAL] ba is not a valid HP-IB bus address.
[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/400:
EIO is returned if a timeout occurs.
Series 800:
If the interface is not currently the active controller, hpib_pass_ctl() sets errno to [EACCES] instead of to [EIO].
AUTHOR
hpib_pass_ctl() was developed by HP.
Hewlett-Packard Company — HP-UX Release 9.0: August 1992