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

MCWait

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Waits for information to arrive for any of a list of conversations.

Syntax

			          IA16           I16V           I16
									MCWait(ResourceList, NumResources, ResourcePosted,
 
 			         I32       I16
		       Status, [PostedType]);

Parameters

ResourceList

Required; 16-bit integer array; input. This array is a list of ResourceIDs for current conversations. It specifies the conversations that MCWait will monitor for incoming information. At least one of the conversations specified must have posting active; that is, MCPostOnRcpt must have been called. MCWait can monitor only conversations for which posting is active.

On MPE V, up to 8 ResourceIDs can be listed in the ResourceList, because MPE V supports a maximum of 8 active conversations.

On MPE XL, up to 256 ResourceIDs can be listed in the ResourceList, because MPE XL supports a maximum of 256 active conversations.

NumResources

Required; 16-bit signed integer by value; input. This parameter specifies the number of ResourceIDs listed in the ResourceList array. On MPE V, NumResources must be from 1 through 8. On MPE XL, NumResources must be from 1 through 256.

ResourcePosted

Required; 16-bit signed integer; output. When the Status parameter returns 0, the ResourcePosted parameter contains the ResourceID of the conversation for which information has arrived.

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 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.
-34   Out of range 'NumResources' parameter specified in intrinsic call.
-37   Posting Not Active.
-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.
+80   Timer has expired.
-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