User`s guide

3: ADCCP NRM DLI Functions
DC 900-1317J 47
3.2 Example ADCCP NRM Call Sequences
Ta ble 3 –2 shows the sequence of DLI function calls to send and receive data using
blocking I/O. Ta bl e 3 –3 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 5–2 on page 105 shows an example DLI configuration file.
Table 3–2: DLI Call Sequence for ADCCP NRM (Blocking I/O)
1. Call dlInit to initialize the DLI 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.
5. Call dlRead to receive responses and data from Freeway.
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 applications access to Freeway.