User`s guide

34 DC 900-1343D
DDCMP Programmer’s Guide
Caution
When using non-blocking I/O, a dlRead request must always be
queued to avoid loss of data or responses from the ICP (see Step 5
of Table 2–3).
a
After each dlWrite call, wait for the proper response to arrive using calls to dlRead/dlPoll before
continuing (see Step 10).
Table 2–3: DLI Call Sequence for DDCMP (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
a
to attach each session from Step 2 to the ICP (Section 2.2.3 on page 32).
7. Call dlWrite
a
to configure and enable the ICP links (page 41 and page 42).
8. Call dlWrite to send requests and data to Freeway (Section 2.5 on page 40).
9. Call dlRead to receive responses and data from Freeway (Section 2.6 on page 48).
10. As I/Os complete and the I/O completion handler is invoked, call dlPoll to confirm the
success of each dlWrite in Step 8 and to accept the data from each dlRead in Step 9.
11. Repeat Step 8 through Step 10 until you are finished writing and reading.
12. Call dlWrite
a
to disable the ICP links (Section 2.5.1.4 on page 43).
13. Call dlWrite
a
to detach each session from Step 6 (Section 2.2.4 on page 32).
14. Call dlBufFree for all buffers allocated in Step 4.
15. Call dlClose for each session ID obtained in Step 2.
16. Call dlPoll to confirm that each session was closed in Step 15.
17. Call dlTerm to terminate your applications access to Freeway.