HPUX hpib_send_c[3i]






 hpib_send_cmnd(3I)       Series 300, 400, 800 Only       hpib_send_cmnd(3I)





 NAME
      hpib_send_cmnd() - send command bytes over HP-IB

 SYNOPSIS
      #include <dvio.h>

      int hpib_send_cmnd(int eid, const char *ca, int length);

 DESCRIPTION
      hpib_send_cmnd() sends specified arbitrary bytes of information on the
      HP-IB with the ATN line asserted, providing a means to configure and
      control the bus.  eid is an entity identifier of an open HP-IB raw bus
      device file obtained from an open(), dup(), fcntl(), or creat() 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 occurred.

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





 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 hpib_send_cmnd(3I)       Series 300, 400, 800 Only       hpib_send_cmnd(3I)





 DEPENDENCIES
    Series 300/400:
      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 [EIO].

 AUTHOR
      hpib_send_cmnd() was developed by HP.

 SEE ALSO
      dup(2), creat(2), fcntl(2), open(2), hpib_parity_ctl(3I).









































 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992