User`s guide

32 DC 900-1343D
DDCMP Programmer’s Guide
2.2.3 Opening and Attaching DLI Sessions
After DLI initialization, the client calls dlOpen to open each DLI session. The DDCMP
protocol allows only one session per ICP link.
Using Raw operation, the client’s
dlOpen call to open a session allows only the client DLI
and Freeway to handle that session. A separate step is required to allow the ICP to han-
dle the session and to associate a link with the session. To accomplish this, the client
sends a DLI Attach command for a link in the first
dlWrite issued to the session. This
informs the ICP’s Freeway interface of the session and its associated link, and then
returns the ICP session ID to be used to communicate with that session. After a session
is opened and attached, the ICP’s Freeway interface needs both the ICP session ID and
link number to route the message to the intended link and to send responses associated
with that link to the client.
When using Raw operation, the client application must use the DLI optional arguments
data structure to issue
dlWrite commands to a session. The optional arguments struc-
ture is also supplied to the client by completed
dlRead requests. Section 2.4.1 on page 37
describes the optional arguments.
2.2.4 Detaching and Closing DLI Sessions
To close a session, the client application first must detach it from the ICP. To accomplish
this, the client sends a DLI Detach command using a
dlWrite issued to the session. This
informs the ICP’s Freeway interface that the client is ending the session. When the ICP’s
Detach response is received in the final
dlRead for the session, the client calls dlClose to
end the session within the DLI and Freeway.
2.2.5 Error Reporting
Refer to Appendix A for DDCMP error reporting.