Previous Page Contents Page Next Page

1.6 Changing Conversation States

In Using APPC Verbs to Change Conversation States, the conversation states appear in the left and right margins. This table shows how APPC verbs can change the state of the conversation from Send to Receive and from Receive to Send.

Using APPC Verbs to Change Conversation States

StateInvoking TP Flow Invoked TP State
TP_STARTED
Reset
MC_ALLOCATE(sync_level = AP_CONFIRM_SYNC_LEVEL)
Send
MC_SEND_DATA
MC_PREPARE_TO_RECEIVE (ptr_type = AP_SYNC_LEVEL)
->
Reset
RECEIVE_ALLOCATE
Receive
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_DATA_COMPLETE)
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd= AP_CONFIRM_SEND)
Confirm-Send
MC_CONFIRMED
Send
<-
(MC_PREPARE_TO_RECEIVE returns, primary_rc = AP_OK)
Receive
MC_SEND_DATA
MC_CONFIRM
<-
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_DATA_COMPLETE)
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_CONFIRM)
Confirm
MC_REQUEST_TO_SEND
MC_CONFIRMED
Receive
->
(MC_CONFIRM returns, primary_rc = AP_OK, rts_rcvd = AP_YES)
Send
MC_PREPARE_TO_RECEIVE (ptr_type = AP_SYNC_LEVEL)
<-
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_CONFIRM_SEND)
Confirm-Send
MC_CONFIRMED
->
(MC_PREPARE_TO_RECEIVE returns, primary_rc = AP_OK)
Receive
Send
MC_SEND_DATA
MC_DEALLOCATE (dealloc_type = AP_SYNC_LEVEL)
->
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_DATA_COMPLETE)
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_CONFIRM_DEALLOCATE)
Confirm-Deallocate
MC_CONFIRMED
<-
(MC_DEALLOCATE returns, primary_rc = AP_OK)
Reset Reset
TP_ENDED TP_ENDED

1.6.1 Initial States

Before the conversation is allocated, the state is Reset for both TPs. After the conversation is allocated, the initial state is Send for the invoking TP and Receive for the invoked TP.

1.6.2 Changing to Receive State

The MC_PREPARE_TO_RECEIVE verb enables a TP to change the conversation from Send to Receive state. This verb does the following:

Issuing the MC_RECEIVE_AND_WAIT verb while the conversation is in Send state also flushes the LU's send buffer and changes the conversation state to Receive. Changing the conversation state in this manner does not support confirmation processing.

1.6.3 Changing to Send State

The MC_REQUEST_TO_SEND verb informs the partner TP (for which the conversation is in Send state) that the local TP (for which the conversation is in Receive state) wants to send data.

This request is communicated to the partner TP through the rts_rcvd parameter of the MC_CONFIRM verb. (The rts_rcvd parameter is also returned to MC_SEND_DATA and other verbs.)

When the partner TP issues the MC_PREPARE_TO_RECEIVE verb, the conversation state changes to Receive for the partner TP, making it possible for the local TP to send data.

Issuing the MC_REQUEST_TO_SEND verb does not change the state of the conversation. Upon receiving a request to send, the partner TP is not required to change the conversation state; it can ignore the request.

Previous Page Contents Page Top of Page Next page