Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

aux_open(3)

intro(3)

xaux(7)



  aux_write(3)                        CLIX                        aux_write(3)



  NAME

    aux_write, aux_write_nw - Write data to a serial port

  LIBRARY

    Intergraph Device Library (libix.a)

  SYNOPSIS

    #include <sys/xio/xaux.h>

    #include <sys/xio/xio.h>

    #include <sys/xio/xerr.h>

    int aux_write(
      int port ,
      char *dbuf ,
      int dcnt ,
      int *xfcnt );

    int aux_write_nw(
      int port ,
      short *dbuf ,
      int dcnt ,
      struct xiosb *xiosb ,
      int efn );

  PARAMETERS

    port    An integer representing a serial port

    dbuf    A pointer to the buffer of characters to be written

    dcnt    The size of the buffer to be written

    xfcnt   The number of bytes transmitted

    xiosb   A pointer to the xiosb structure being updated

    efn     The event number associated with the transfer

  DESCRIPTION

    The aux_write() function writes data to the specified port.  The port must
    have been opened by xaux_open().

    The dbuf parameter is a pointer to a buffer of characters to be written,
    and dcnt is the size (in bytes) of the buffer.




  2/94 - Intergraph Corporation                                              1






  aux_write(3)                        CLIX                        aux_write(3)



    Upon completion of the synchronous request, the integer pointed to by
    xfcnt is updated with the number of bytes transmitted.

    The aux_write_nw() function is the asynchronous version of aux_write(),
    providing the same capability without waiting for completion of the
    request.  The efn parameter is the event flag number associated with the
    request.  The xiosb parameter is a pointer to the xiosb structure updated
    upon completion of the request (see intro(3)).  The xfcnt member of the
    xiosb structure indicates the number of bytes transmitted.

  RETURN VALUES

    Upon successful completion of the synchronous request, a value of 0 is
    returned.  Otherwise, one of the following failure codes is returned.

    If the asynchronous request is accepted by the XIO system, a value of 0
    will be returned by the request.  Otherwise, XIO_FAILURE will be returned.
    Upon completion of an accepted request, the status member of the xiosb
    structure will be set to either 0 if successful, or to one of the
    following failure codes if unsuccessful.

  ERRORS

    The aux_write() and aux_write_nw() functions will fail if one of the
    following is true:

    [XIO_FAILURE]
           The system does not contain the driver needed to support this
           request or efn is invalid.

    [AUX_PORT_NOT_OPEN]
           The specified port is not open by the calling process.

    [BAD_DATA_BUFFER_SIZE]
           The value of dcnt is less than or equal to zero or greater than
           NAUXWRITE.

    [BAD_DATA_BUFFER_ADDRESS]
           The dbuf parameter points to an invalid memory space.

  RELATED INFORMATION

    Functions:  aux_open(3), intro(3)

    Files:  xaux(7)









  2                                              Intergraph Corporation - 2/94




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