|
|
|
|
Synchronous LU0 Communication Sequence and Asynchronous LU0 Communication Sequence show a sample LU0 communication sequence, using synchronous and asynchronous LU0 functions.
In this sample sequence, the application performs the following steps:
Issues lu0_init to establish the session. The session is established when SNAP-IX has received ACTLU, BIND, and SDT messages from the host. The lu0_init function includes the option to send an INITSELF message to the host if necessary.
In the synchronous case, all of these messages are handled by SNAP-IX and not exposed to the LU0 application. In the asynchronous case, SNAP-IX allows the application to check the BIND and reject it if necessary, but the other messages are not exposed to the application.
Issues lu0_write to send some data to the host application. SNAP-IX sends this to the host as a chain of data consisting of three RUs (the last indicates that a definite response is required), and waits for the response.
Issues lu0_read to read some data from the host application. In this example, SNAP-IX has already received the first RU in a chain of data from the host, but waits until it has received the complete chain before returning it to the application.
Issues lu0_term to terminate the session. SNAP-IX sends an RSHUTD message to the host to request an UNBIND, waits for the UNBIND, and sends a positive response.
The list that follows shows the abbreviations used in Synchronous LU0 Communication Sequence and Asynchronous LU0 Communication Sequence.
| +rsp | Positive response to the indicated message |
| BC | Begin chain |
| MC | Middle of chain |
| EC | End chain |
| RQD | Definite response required |
Synchronous LU0 Communication Sequence, shows synchronous LU0 functions used to start a session, exchange data, and end the session, and the SNA messages sent and received.
Asynchronous LU0 Communication Sequence, shows the same communications sequence as Synchronous LU0 Communication Sequence, but this time using synchronous functions.
Each function returns immediately to allow the application to continue with other processing.
The application's callback routine is called when the processing for each function is complete.
In the case of lu0_init, the callback routine is called to notify the application of the startup status.
|
|
|
|
|