User guide

154 DC 900-1338I
Protocol Software Toolkit Programmer Guide
Note
Server-resident applications must use non-blocking I/O. It is also
necessary to call
dlPost before relinquishing task control. See the
Freeway Data Link Interface Reference Guide for details.
Table 84: DLI Call Sequence for Non-blocking I/O
1. Call dlInit to initialize the DLI operating environment. The first parameter is
your DLI binary configuration file name.
2. Call dlOpen for each required session (link) to get a session ID.
3. Call dlPoll to confirm the success of each session ID obtained in Step 2.
4. Call dlBufAlloc for all required input and output buffers.
5. Call dlRead to queue the initial read request.
6. Call dlWrite to send an attach request to Freeway.
7. Call dlRead to receive the protocol session ID from Freeway.
8. Call dlWrite to send a configuration message to Freeway.
9. Call dlRead to receive the configuration confirmation from Freeway.
10. Call dlWrite to send a link activation message to Freeway.
11. Call dlRead to receive the link activation confirmation from Freeway.
12. Call dlWrite to send requests and data to Freeway.
13. Call dlRead to queue reads to receive responses and data from Freeway.
14. As I/Os complete, call dlPoll to confirm the success of each dlWrite in Step 12
and to accept the data from each dlRead in Step 13.
15. Repeat Step 12 through Step 14 until you are finished writing and reading.
16. Call dlBufFree for all buffers allocated in Step 4.
17. Call dlClose for each session ID obtained in Step 2.
18. Call dlPoll to confirm that each session was closed in Step 17.
19. Call dlTerm to terminate your applications access to Freeway.