Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ aux_read(3) — CLIX 3.1r7.6.22

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

aux_open(3)

intro(3)

xaux(7)



  auxread(3)                         CLIX                         auxread(3)



  NAME

    aux_read, aux_read_nw - Read data from a serial port

  LIBRARY

    Intergraph Device Library libix.a

  SYNOPSIS

    #include <sys/xio/xio.h>

    #include <sys/xio/xerr.h>

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

    int aux_read_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 receiving buffer

    dcnt    The size of the receiving buffer

    xfcnt   The number of bytes read

    xiosb   A pointer to the xiosb structure

    efn     The event number associated with the transfer

  DESCRIPTION

    The aux_read() function reads data from the specified port.  The port must
    have been opened by xaux_open().

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

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



  2/94 - Intergraph Corporation                                              1






  auxread(3)                         CLIX                         auxread(3)



    The aux_read_nw function is the asynchronous version of aux_read,
    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 transferred to dbuf.

  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_read() and aux_read_nw() 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.

    [AUX_PORT_REDUNDANT_REQUEST]
           An outstanding read is already on the specified port.

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

    [BAD_DATA_BUFFER_ADDRESS]
           The dbuf parameter points to a nonwritable 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