User guide

162 DC 900-1338I
Protocol Software Toolkit Programmer Guide
9.2.1 Sequence of Client Events to Communicate to the ICP
To exchange data with a wide-area network, a client must follow these steps:
1. Initiate a session with the Freeway server or the embedded products driver
(
dlOpen, Section 9.2.2 on page163)
2. Initiate a session with the ICP link (Attach command, Section 9.2.3 on page 164)
3. Configure the link (Section 9.2.7.1 on page 175)
4. Activate the link (Bind command, Section 9.2.5 on page 169)
5. Send data to and receive data from the link (Section 9.2.7 on page 174 and
Section 9.2.8 on page 185)
6. Deactivate the link (Unbind command, Section 9.2.6 on page 172)
7. End the session with the ICP link (Detach command, Section 9.2.4 on page 167)
8. End the session with the Freeway server or the embedded products driver
(
dlClose, Section 9.2.4 on page 167)
The following sections describe how to use the DLI subroutine library to perform these
steps. Prior to these steps, however, the DLI must be initialized. This is accomplished
when the application calls the
dlInit function, which is declared as follows:
int dlInit (char *pCfgFile,
char *pUsrCB,
int (*pUsrIOCH) (char *pUsrCB));
The following is an example of a call to dlInit:
status = dlInit (spsaldcfg.bin, NULL, NULL);
This example indicates to DLI that the file spsaldcfg.bin is available to be read to config-
ure the process, and that if an I/O completion function is to be called, it is specified as
individual sessions are opened in calls to
dlOpen. For more information, consult the
Freeway Data Link Interface Reference Guide.