User`s guide
110 DC 900-1340I
BSC Programmer’s Guide
5.2 Example BSC 2780/3780 Call Sequences
Ta ble 5 –1 shows the sequence of DLI function calls to send and receive data using block-
ing I/O. Ta bl e 5–2 is the non-blocking I/O example. The remainder of this chapter and
the Freeway Data Link Interface Reference Guide give further information about each
function call.
Note
The example call sequences assume that the cfgLink and enable DLI
configuration parameters are both set to “yes” (the defaults). This
means that
dlOpen configures and enables the ICP links. Figure 7–2
on page 189 shows an example DLI configuration file.
Table 5–1: DLI Call Sequence for BSC 2780/3780 (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 dlBufAlloc for all required input and output buffers.
4. Call dlWrite to send requests and data to Freeway (Section 5.4 on page 115).
5. Call dlRead to receive responses and data from Freeway (Section 5.5 on page 150).
6. Repeat Step 4 and Step 5 until you are finished writing and reading.
7. Call dlBufFree for all buffers allocated in Step 3.
8. Call dlClose for each session ID obtained in Step 2.
9. Call dlTerm to terminate your application’s access to Freeway.