csi_ustat(3) CLIX csi_ustat(3)
NAME
csi_ustat, csi_ustat_nw - Receives unsolicited status from a CSI port
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/xio/xerr.h>
#include <sys/xio/xio.h>
int csi_ustat(
int channel ,
int scnt ,
int timeout ,
char *sbuf ,
int *xfcnt );
int csi_ustat_nw(
int channel ,
char *sbuf ,
int scnt ,
int timeout ,
struct xiosb *xiosb ,
int efn );
PARAMETERS
channel An integer representing a Command Status Interface channel
sbuf A pointer to the status buffer
scnt The size of the status buffer
timeout The time in 1/60 second intervals before aborting a request
xfcnt The number of bytes received
xiosb A pointer to the xiosb structure
efn The event number associated with the request
DESCRIPTION
The csi_ustat() provides a mechanism to establish a receive buffer to
catch unsolicited status 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().
2/94 - Intergraph Corporation 1
csi_ustat(3) CLIX csi_ustat(3)
In the event that an unsolicited or unclaimed status packet is received
over the CSI port, the packet is received to the first unsolicited status
buffer in the queue and the request associated with that buffer completes.
Only one process may have unsolicited status requests outstanding at a
time. An appropriate status is returned if another process is gathering
unsolicited status for the channel.
The sbuf parameter is a pointer to the unsolicited status buffer and must
begin on a longword boundary. The scnt parameter is the size (in bytes)
of sbuf. This value must be greater than or equal to 20 which is the
packet header size.
The timeout parameter specifies the time limit in 1/60 second intervals to
receive an unsolicited status packet. Upon expiration, the request will
be aborted and an appropriate status is returned. A 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_ustat_nw() function is the asynchronous version of csi_ustat(),
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 received in the status
buffer.
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 csi_ustat() and csi_ustat_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.
2 Intergraph Corporation - 2/94
csi_ustat(3) CLIX csi_ustat(3)
[ISI_CHANNEL_BUSY]
Another process is already collecting unsolicited status packets on
this channel.
[BAD_DATA_BUFFER_ADDRESS]
The sbuf buffer is not longword aligned or points to a nonwritable
memory space.
[BAD_DATA_BUFFER_SIZE]
The value of scnt is smaller than the header size of 20 bytes.
[PAGE_LOCK_FAILED]
Not enough physical memory for this request is available at this
time.
[ISI_CANCELED]
The request was canceled with either csi_ucan() or csi_close().
[ISI_PARITY_ERROR]
A parity error occurred during the transfer.
[ISI_CYCLE_ERROR]
A hardware handshake error occurred during the transfer.
[ISI_TIMEOUT]
The timeout expired before the status packet was received.
[ISI_PROTOCOL_ERROR]
A firmware handshake error occurred during the transfer. 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 transfer.
RELATED INFORMATION
Functions: csi_open(3), csi_close(3), csi_ucan(3), intro(3)
Files: xcsi(7)
2/94 - Intergraph Corporation 3