HPlogo LU 6.2 API Application Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5  Intrinsic Descriptions

MCTest

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Tests the specified for the receipt of information.

Syntax

			          I16V      I16V    I32        I16
									MCTest(ResourceID, [Test], Status, [PostedType]);

Parameters

ResourceID

Required; 16-bit signed integer by value; input. This is the unique resource ID number assigned to this conversation when it was allocated. See MCAllocate or MCGetAllocate, in this chapter, for more information.

Test

16-bit signed integer by value; input. This parameter specifies whether to look for information waiting in the receive buffer or to check for a RequestToSend indicator sent from the remote TP.

0 = POSTED

Tests for information waiting in the receive buffer. The value returned in the Status parameter indicates the result of the test, as follows:

status info value

meaning

0

Something is waiting in the receive buffer.

-37

Posting is not active. (See MCPostOnRcpt.

+38

Nothing is waiting in the receive buffer.

1 = REQUEST_TO_SEND_RECEIVED

Tests for the receipt of a RequestToSend indicator from the remote TP. The value returned in the Status parameter indicates the result of the test, as follows:

status info value

meaning

0

A RequestToSend indicator has been received.

+36

No RequestToSend indicator has bee received.

Default: 0 (POSTED)

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.

Status Info Values

 0    Successful Completion.
-1    Intrinsic called with parameter out of bounds.
-2    Invalid 'ResourceID' parameter specified in intrinsic call.
-20   Not enough stack space for intrinsic to run.
-35   Out of range 'Test' parameter specified in intrinsic call.
+36   Request To Send Not Received.
-37   Posting Not Active.
+38   Not Posted.
-40   Intrinsic called in invalid state.
-50   Allocation Error.
-51   Resource Failure:  Retry possible.
-52   Resource Failure:  No retry possible.
-56   Program Error:  No data truncation has occurred.
-60   Program Error:  Data may have been purged.
-90   An internal error in Presentation Services has occurred.
-91   An internal error in the APPC subsystem has occurred.
+100  Deallocate Normal received from the remote TP.
-1002 An internal error at the mapped conversation level has occurred.
-1003 Required parameter missing.
-1020 Deallocate Abend.
-1105 Internal Error: Conversation deallocated.
Feedback to webmaster