User`s guide

3: ADCCP NRM DLI Functions
DC 900-1317J 51
3.3.1 DLI Optional Arguments
The dlWrite and dlRead functions handle the control packets for an ADCCP NRM appli-
cation. Both functions can use the optional arguments parameter to provide the proto-
col-specific information required for Raw operation (Section 3.1.2). The “C” definition
of the optional arguments structure is shown in Figure 3–1.
Note
If the protocol DLI configuration parameter is specified as “raw,” all
the optional arguments shown in the C-style structure definition
on page 51 must be specified when the optional arguments are
included in a
dlWrite call. If the protocol parameter is specified as
ADCCPNRM” but the optional arguments are included in a
dlWrite call, only usFWPacketType, usFWCommand, usICPCommand,
usProtCommand, iProtModifier, usProtCircuitID, and both usProtX-
Parms must be specified.
typedef struct _DLI_OPT_ARGS
{
unsigned short usFWPacketType; /* FW_CONTROL or FW_DATA */
unsigned short usFWCommand; /* FW_ICP_WRITE, FW_ICP_WRITE_EXP */
/* or FW_ICP_READ */
unsigned short usFWStatus; /* 0 */
unsigned short usICPClientID; /* 0 */
unsigned short usICPServerID; /* 0 */
unsigned short usICPCommand; /* DLI_ICP_CMD_READ/DLI_ICP_CMD_WRITE */
short iICPStatus; /* ICP return error code (dlRead) */
unsigned short usICPParms[3]; /* usICPParms[1] = DLI session ID */
/* (returned by dlOpen ) */
unsigned short usProtCommand; /* Required field (see Table 3–5)*/
short iProtModifier; /* Required field (see Table 3–5)*/
unsigned short usProtLinkID; /* Required field (see Section 3.4)*/
unsigned short usProtCircuitID; /* 0 */
unsigned short usProtSessionID; /* ICP session ID (returned in */
/* DLI_ICP_CMD_ATTACH response) */
unsigned short usProtSequence; /* 0 */
unsigned short usProtXParms[2]; /* Station ID and data size */
} DLI_OPT_ARGS;
Figure 3–1: “C” Definition of DLI Optional Arguments Structure