|
|
|
|
The example below charts a simple mapped conversation. It shows the CPI-C calls used to start the conversation, exchange data, and end it. The arrow indicates the flow of data. Some call parameters and some return codes are also shown, enclosed in parentheses.
To start a conversation, the invoking program issues the following calls:
Initialize_Conversation, which requests CPI-C to set the characteristics of the conversation.
The Initialize_Conversation call specifies a symbolic destination name, which is associated with a CPI-C side information entry in the SNAP-IX configuration. This entry specifies partner program, partner LU, mode, and security information.
Allocate, which requests that SNAP-IX establish a conversation between the invoking program and the invoked program.
The invoked program issues the Accept_Conversation call, which informs SNAP-IX that the invoked program is ready to begin a conversation with the invoking program.
The Send_Data call puts one data record (containing application data to be transmitted) into the local LU's send buffer which already contains the allocation request. The transmission of the data to the partner program does not happen until one of the following events occurs:
The send buffer fills up
The program issues a call that forces SNAP-IX to flush the buffer (and send the data to the partner program)
The Deallocate call flushes the send buffer sending the allocation request and data to the partner program.
The Receive call receives the data record and status information from the partner program. If no data or status information is currently available, the local program, by default, waits for data to arrive.
The data_received parameter of the Receive call tells the program whether it received data and if so, whether the data is complete or not.
To end a conversation, one of the programs issues the Deallocate call, which causes SNAP-IX to deallocate the conversation between the two programs.
|
|
|
|
|