LU 6.2 API Application Programmer's Reference Guide (30294-90008)

Chapter 5 127
Intrinsic Descriptions
MCWait
Status
Required; 32-bit signed integer; output. Indicates the
result of intrinsic execution. See the “Status
Parameter” section, earlier in this chapter, for more
information.
PostedType
16-bit signed integer; output. This parameter indicates
the kind of information received. It is valid only when
Status
= 0 (something is waiting in the receive buffer
for one of the posted conversations). Possible values are
as follows:
0 = DATA
Indicates that the receive buffer contains at least the
amount of data specified in the
Length
parameter of
the MCPostOnRcpt intrinsic.
1 = NOT_DATA
Indicates that the receive buffer contains control
information, not data.
Description
The MCWait intrinsic waits for information to arrive in the receive
buffer of any in a list of active conversations. When it executes
successfully, it returns the
ResourceID
of the conversation for which
information has arrived. It may also indicate the type of information
that has arrived: control information or data.
Before calling MCWait, you must call MCPostOnRcpt for each of the
conversations you want to monitor, to set up the resources necessary to
check the contents of their receive buffers. See the description of
MCPostOnRcpt, earlier in this chapter.
The MCTest intrinsic, described earlier in this chapter, is similar to the
MCWait intrinsic; however, MCTest and MCWait differ in the following
ways:
1. The MCTest intrinsic can test only one conversation at a time, while
the MCWait intrinsic can monitor the receive buffers of many
conversations at once.
2. The MCWait intrinsic can return only information about the contents
of the receive buffer, while the MCTest intrinsic can check whether a
RequestToSend has been received from the remote TP.
3. The MCTest intrinsic does not wait for information to arrive. After it
tests for the specified information, no matter what it finds, it returns
control to the conversation. The MCWait intrinsic waits until