gtpc2mbeC/C++ Language Support User's Guide

cmtrts-Test for Request_To_Send Notification

This function determines if a REQUEST_TO_SEND notification was received from the remote program for the specified conversation.

Format

#include   <tpfmap.h>
void       cmtrts(unsigned char *conversation_ID,
                  signed int *request_to_send_received,
                  signed int *return_code);

conversation_ID
This is a pointer to an 8-byte character array that contains the conversation ID. This conversation ID must be the ID returned by the cminit (INITIALIZE) or cmaccp (ACCEPT_CONVERSATION) that started this conversation.

request_to_send_received
This is a pointer to a 4-byte field where a REQUEST_TO_SEND notification is placed. Possible values are:

CM_REQ_TO_SEND_RECEIVED
This value indicates that the local program received a REQUEST_TO_SEND notification from the remote program. This is a request that the local program enter receive state, which allows the remote program to enter send state.

CM_REQ_TO_SEND_NOT_RECEIVED
This value indicates that a REQUEST_TO_SEND notification was not received.

If return_code is not CM_OK, request_to_send_received does not contain a meaningful value.

return_code
This is a pointer to a 4-byte field where the return code will be placed.

Return Codes

The following is a list of return codes that can be returned to the program that called the cmtrts function. A complete list of the return codes and their definitions can be found in Table 45.

Programming Considerations

Examples

The following example checks to see if a REQUEST_TO_SEND notification was received.

#include <tpfmap.h>
 
 
      unsigned char *buff;
      signed int    rtsr;
      signed int    rcode;
      .
      .
/* set conversation_ID with value returned from accept or initialize */
      .
      .
cmtrts(convid,&rtsr,&rcode);
      .                       /*  normal processing path             */
      .
      .

Related Information