Previous Page Contents Page Next Page

1.2 A Simple Mapped Conversation

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.

A Simple Mapped Conversation

Invoking Program Invoked Program
Initialize_Conversation
Allocate
Send_Data
Deallocate
->
Accept_Conversation
Receive
( data_received=CM_COMPLETE_DATA_RECEIVED)
( return_code=CM_DEALLOCATED_NORMAL)

1.2.1 Starting a Conversation

To start a conversation, the invoking program issues the following calls:

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.

1.2.2 Sending Data

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 Deallocate call flushes the send buffer sending the allocation request and data to the partner program.

1.2.3 Receiving Data

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.

1.2.4 Ending a Conversation

To end a conversation, one of the programs issues the Deallocate call, which causes SNAP-IX to deallocate the conversation between the two programs.

Previous Page Contents Page Top of Page Next page