User`s guide

50 DC 900-1317J
ADCCP NRM Programmer’s Guide
Table 3–4: DLI Functions: Syntax and Parameters (Listed in Typical Call Order)
DLI Function Parameter(s) Parameter Usage
int dlInit (char *cfgFile,
char *pUsrCb,
int (*fUsrIOCH)(char *pUsrCb));
DLI binary configuration file name
Optional I/O complete control block
Optional IOCH and parameter
int dlOpen
a
(char *cSessionName,
int (*fUsrIOCH)
(char *pUsrCB, int iSessionID));
Session name in DLI config file
Optional I/O completion handler
Parameters for IOCH
int dlPoll (int iSessionID,
int iPollType,
char **ppBuf,
int *piBufLen,
char *pStat,
DLI_OPT_ARGS **ppOptArgs);
Session ID from dlOpen
Request type
Poll type dependent buffer
Size of I/O buffer (bytes)
Status or configuration buffer
Optional arguments
int dlpErrString (int dlErrNo); DLI error number (global variable
dlerrno)
char *dlBufAlloc (int iBufLen); Minimum buffer size
int dlRead (int iSessionID,
char **ppBuf,
int iBufLen,
DLI_OPT_ARGS *pOptArgs);
Session ID from dlOpen
Buffer to receive data
Maximum bytes to be returned
Optional arguments structure
int dlWrite (int iSessionID,
char *pBuf,
int iBufLen,
int iWritePriority,
DLI_OPT_ARGS *pOptArgs);
Session ID from dlOpen
Source buffer for write
Number of bytes to write
Write priority (normal or expedite)
Optional arguments structure
int dlSyncSelect (int iNbrSessID,
int sessIDArray[],
int readStatArray[]);
Number of session IDs
Packed array of session IDs
Array containing read status for IDs
char *dlBufFree (char *pBuf); Buffer to return to pool
int dlClose (int iSessionID,
int iCloseMode);
Session ID from dlOpen
Mode (normal or force)
int dlTerm (void);
int dlControl (char *cSessionName,
int iCommand,
int (*fUsrIOCH)
(char *pUsrCB, int iSessionID));
Session name in DLI config file
Command (e.g. reset/download)
Optional I/O completion handler
Parameters for IOCH
a
It is critical for the client application to receive the dlOpen completion status before making any other DLI
requests; otherwise, subsequent requests will fail.