pdi_read(3) CLIX pdi_read(3)
NAME
pdi_read, pdi_read_nw - Read data from a Processed Data Interface port
into memory
LIBRARY
Intergraph Device Library (libix.a)
SYNOPSIS
#include <sys/xio/xerr.h>
#include <sys/xio/xio.h>
int pdi_read(
int channel ,
char *dbuf ,
int dcnt ,
int timeout ,
int *xfcnt );
int pdi_read_nw(
int channel ,
char *dbuf ,
int dcnt ,
int timeout ,
struct xiosb *xiosb ,
int efn );
PARAMETERS
channel An integer representing a Processed Data Interface port
dbuf A pointer to a data buffer
dcnt The size of the data buffer
timeout The time limit in 1/60 second intervals for the data transfer
xfcnt The number of bytes transferred
efn The event flag number associated with the request
xiosb A pointer to the xiosb structure updated upon completion of the
request
DESCRIPTION
The pdi_read() and pdi_read_nw() functions provide a mechanism for reading
directly from the Processed Data Interface (PDI) port on the Image System
2/94 - Intergraph Corporation 1
pdi_read(3) CLIX pdi_read(3)
Interface (ISI) board referenced by channel. The channel must have been
opened with pdi_open().
The dbuf parameter points to the data buffer. The buffer must begin on a
longword boundary. The dcnt parameter contains the byte count to be
transferred and must be a multiple of the linewidth specified in
pdi_setup().
The timeout parameter indicates the time limit in 1/60 second intervals
for the data transfer. Any transfer 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, xfcnt indicates the number of
bytes transferred.
The pdi_read_nw() function is the asynchronous version of pdi_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). The xfcnt member of the xiosb
structure indicates the number of bytes transferred.
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 pdi_read() and pdi_read_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 data buffer is not longword aligned or points to a nonwritable
memory address.
[BAD_DATA_BUFFER_COUNT]
2 Intergraph Corporation - 2/94
pdi_read(3) CLIX pdi_read(3)
The byte count is not a multiple of linewidth from pdi_setup().
[PAGE_LOCK_FAILED]
Not enough physical memory for this request is available at this
time.
[ISI_CANCELED]
The request was canceled with pdi_cancel() or pdi_close().
[ISI_PARITY_ERROR]
A parity error occurred on the transfer.
[ISI_CYCLE_ERROR]
A hardware handshake error occurred on the transfer.
[ISI_TIMEOUT]
The timeout expired before the transfer completed.
RELATED INFORMATION
Functions: pdi_open(3), pdi_close(3), pdi_setup(3), pdi_cancel(3),
intro(3)
Files: xpdi(7)
2/94 - Intergraph Corporation 3