Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csi_cmd(3)

csi_open(3)

csi_cancel(3)

csi_ccan(3)

csi_reset(3)

intro(3)

xcsi(7)



  csi_cmd(3)                          CLIX                          csi_cmd(3)



  NAME

    csi_cmd, csi_cmd_nw - Sends command packets to a Command Status Interface
    (CSI) port

  LIBRARY

    Intergraph Device Library (libix.a)

  SYNOPSIS

    #include <sys/xio/xerr.h>

    #include <sys/xio/xio.h>

    int csi_cmd(
      int channel ,
      char *cbuf ,
      int ccnt ,
      char *sbuf ,
      int scnt ,
      int timeout ,
      int );

    int csi_cmd_nw(
      int channel ,
      char *cbuf ,
      int ccnt ,
      char *sbuf ,
      int scnt ,
      int timeout ,
      struct xiosb *xiosb ,
      int efn );

  PARAMETERS

    channel   An integer representing a Command Status Interface channel

    cbuf      A pointer to a command packet

    ccnt      The size (in bytes of the command packet

    sbuf      A pointer to the buffer receiving the status packet

    scnt      The size of the status packet buffer

    timeout   The time in 1/60 second intervals before aborting a command
              packet transmission

    xfcnt     The number of bytes received in the status packet




  2/94 - Intergraph Corporation                                              1






  csi_cmd(3)                          CLIX                          csi_cmd(3)



    xiosb     A pointer to the xiosb structure

    efn       The event flag associated with the transfer request

  DESCRIPTION

    The csi_cmd() function provides a mechanism to send a command packet and
    receive the associated status packet over the Command Status Interface
    (CSI) port on the Image System Interface (ISI) board referenced by
    channel.  The channel must have been opened with csi_open().

    Before sending the command packet pointed to by cbuf, the packet header is
    copied into the kernel and the source ID, magic numbers, start time, and
    checksum are filled in.  Bit 15 of the command word is never asserted on
    outgoing command headers, and bit 15 of the status word is always ignored
    on incoming status headers.  The cbuf parameter must point to a longword
    aligned buffer.

    The ccnt parameter specifies the size (in bytes) of the command packet.
    It must be greater than or equal to twice the word count submitted in the
    command packet header.  The packet header size is 10 words, hence, the
    minimum value for ccnt is 20.

    The status packet received from the CSI port for the command is copied
    into the buffer pointed to by sbuf.  The fields are checked and the finish
    time is entered in the appropriate field of the status packet header.
    sbuf must point to a longword aligned buffer.

    The scnt parameter is the size (in bytes) of sbuf.  If scnt is 0, then the
    request will complete as soon as the command packet is sent.  Otherwise,
    scnt must also be greater than or equal to 20

    The timeout parameter is the time limit in 1/60 second intervals to
    receive a status packet after sending the command packet.  Any transaction
    that takes longer is aborted and an appropriate status is returned.  A
    timeout value of 0 disables the timeout function.

    Upon completion of the synchronous request, the integer pointed to by
    xfcnt is updated with the number of bytes received in the status packet.

    The csi_cmd_nw() function is the asynchronous version of csi_cmd,
    providing the same capability without waiting for completion of the
    request.  The efn 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).  The xfcnt member of the xiosb
    structure indicates the number of bytes received in the status packet.

  RETURN VALUES

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



  2                                              Intergraph Corporation - 2/94






  csi_cmd(3)                          CLIX                          csi_cmd(3)



    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 csi_cmd() and csi_cmd_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.

    [ISI_CHANNEL_NOT_OPEN]
           The specified channel is not open for this process.

    [BAD_DATA_BUFFER_ADDRESS]
           The command and status packets are not longword aligned or lack the
           necessary permission.

    [BAD_DATA_BUFFER_SIZE]
           A nonzero packet size is smaller than the header size of 20 bytes.

    [PAGE_LOCK_FAILED]
           Not enough physical memory for this request is available.

    [ISI_CANCELED]
           The request was canceled by either csi_close(), csi_ccan(),
           csi_reset(), or csi_cancel().

    [ISI_PARITY_ERROR]
           A parity error occurred during the transaction.

    [ISI_CYCLE_ERROR]
           A hardware handshake error occurred during the transaction.

    [ISI_TIMEOUT]
           The timeout expired before the transaction completed.

    [ISI_PROTOCOL_ERROR]
           A firmware handshake error occurred during the transaction.  This
           probably means that scnt was smaller than the actual size of the
           status packet.

    [ISI_HARDWARE_CHECK]
           A fatal status code was asserted on the DR11 status lines during
           the transaction.

  RELATED INFORMATION



  2/94 - Intergraph Corporation                                              3






  csi_cmd(3)                          CLIX                          csi_cmd(3)



    Functions:  csi_open(3), csi_cancel(3), csi_ccan(3), csi_reset(3),
    intro(3).

    Files:  xcsi(7)


















































  4                                              Intergraph Corporation - 2/94




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