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

124 Chapter5
Intrinsic Descriptions
MCTest
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
Test
= 0 (POSTED) and
Status
= 0 (something is
waiting in the receive buffer). 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 MCTest intrinsic tests the receive buffer of the specified
conversation to see whether any information has been received and
what kind of information it is (data or control information). The MCTest
intrinsic can also indicate whether the remote TP has issued the
equivalent of MCReqToSend, requesting that the local TP enter Receive
state and place the remote TP in Send state.
Before calling MCTest, you must call MCPostOnRcpt to set up the
resources necessary to check the contents of the receive buffer. See the
description of MCPostOnRcpt, earlier in this chapter.
The MCWait intrinsic, described later in this chapter, is similar to the
MCTest 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 and, unlike the MCTest intrinsic, cannot 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
information arrives in the receive buffer of one of the conversations
it is monitoring before it returns control to the conversation.