Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hpib_send_c(3I) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hpib_parity_ctl(3I)

HPIB_SEND_CMND(3I)

NAME

hpib_send_cmnd − send command bytes over HP-IB

SYNOPSIS

int hpib_send_cmnd (eid, ca, length);
int eid, length;
char ∗ca;

DESCRIPTION

Hpib_send_cmnd enables you to send arbitrary  bytes of information on the HP-IB with the ATN line asserted.  This enables you to configure  and  control the  bus.  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.  Ca is a character pointer to a string of bytes to be written to the HP-IB bus as commands.  Length is an integer specifying the number of bytes in the string pointed to by ca. 

The  interface   must   currently  be  the  active controller in order to send commands over the bus. 

Note that for all HP-IB interfaces, both built-in and plug-in, the most significant bit of each byte is overwritten with a parity bit.  All commands are written with odd parity. 

RETURN VALUE

Hpib_send_cmnd returns 0 (zero) if  successful,  or −1 if an error was encountered. 

ERRORS

Hpib_send_cmnd 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. 

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

­[ETIMEDOUT] a timeout occurs. 

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

­[EINVAL] The value specified for length is invalid, either less than or equal to 0 or greater than MAX_HPIB_COMMANDS as defined in <dvio.h>. 

DEPENDENCIES

Series 300:
EIO is returned if a timeout occurs. 

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

AUTHOR

Hpib_send_cmnd was developed by Hewlett-Packard Company. 

SEE ALSO

hpib_parity_ctl(3I). 

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

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