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

MCSendError

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Informs the remote TP that the local TP has detected an error in an application. Places the remote TP in Receive state and the local TP in Send state.

Syntax

			               I16V              I16            I32
		MCSendError(ResourceID, RequestToSendReceived, Status);

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.

RequestToSendReceived

Required; 16-bit signed integer; output. Indicates whether the remote TP has issued a RequestToSend. Possible values are as follows:

1 = YES

Indicates a RequestToSend has been received from the remote TP. The remote TP has issued the equivalent of the MCReqToSend intrinsic, requesting that the local TP enter Receive state and place the remote TP in Send state.

0 = NO

No RequestToSend has been received.

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.

Description

The MCSendError intrinsic informs the remote TP that the local TP has detected an application error and is unable to receive any further information. It can be called from any state except Deallocate state or Reset state. Successful execution of this intrinsic places the remote TP in Receive state (if it is not already in Receive state) and the local TP in Send state (if it is not already in Send state).

The most common use of MCSendError is to respond negatively to a confirmation request.

A call to MCSendError ends posting. For more information on posting, see the description of MCPostOnRcpt, earlier in this chapter.

The MCSendError intrinsic operates differently depending on the current state of the TP that calls it. Following are descriptions of what MCSendError does in each conversation state:

Send state

When MCSendError is called from Send state, it flushes the send buffer.

Receive state

When MCSendError is called from Receive state, the states of the local and remote TPs are immediately reversed: The local TP is placed in Send state and the remote TP is placed in Receive state. All data in the receive buffer of the local TP is purged. However, if a RequestToSend indicator is waiting in the receive buffer, it is preserved for the next call to an intrinsic that uses the RequestToSendReceived parameter.

All Confirm states

When MCSendError is called from one of the Confirm states, all data from the remote TP has already been received, so the buffers are already empty. The local TP is placed in Send state, and the remote TP is placed in Receive state. The call to MCSendError serves as a negative response to the remote TP's confirmation request, so the request is no longer pending.

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.
-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