The two diagrams below show the possible forms of cooperation between a CPI-C application and a UTM application in a single-step service.
One Send and one Receive call
Figure 11: Single-step service with a Send()/Receive() call
With a Receive call, the program waits until the response arrives from openUTM.CM_COMPLETE_DATA_RECEIVED indicates that the response has been received in full. The fact that it was the last and only message is clear from CM_DEALLOCATE_NORMAL. Instead of Send_Data and Receive, you can also use Send_Mapped_Data and Receive-Mapped_Data.
If larger volumes of data are to be transferred, several Send and Receive calls can be used when communicating in a single-step service; see the following diagram.
Multiple Send and Receive calls
Figure 12: Single-step service with several Send/Receive calls
A separate Receive call is issued for each MPUT call.
After the first Receive() call, CM_NO_STATUS_RECEIVED together with CM_OK indicates that there are still more messages. Therefore, a second Receive() call is necessary to receive the second and last message. The last message is indicated by the return code CM_DEALLOCATED_NORMAL.