gtpc2mau | C/C++ Language Support User's Guide |
This function returns the current value of the
conversation_state characteristic.
Format
#include <tpfmap.h>
void cmecs(unsigned char *conversation_ID,
signed int *conversation_state,
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.
- conversation_state
- This is a pointer to a 4-byte field where the current state of the
conversation is to be placed. The possible values are:
- CM_INITIALIZE_STATE
- CM_SEND_STATE
- CM_RECEIVE_STATE
- CM_SEND_PENDING_STATE
- CM_CONFIRM_STATE
- CM_CONFIRM_SEND_STATE
- CM_CONFIRM_DEALLOCATE_STATE.
- return_code
- This is a pointer to a 4-byte field where the return code is to be
placed.
Return Codes
The following is a list of return codes that can be returned to the program
that called the cmecs function. A complete list of the
return codes and their definitions can be found in Table 45.
- CM_OK
- CM_PROGRAM_PARAMETER_CHECK -- The specified conversation_ID
is invalid.
Programming Considerations
- You can execute this function on any I-stream.
- The conversation can be in any state.
- The value supplied in conversation_ID must be the conversation ID
returned by the cmaccp or cminit function.
- This function does not modify conversation_state.
Examples
The following example gets the current conversation state.
#include <tpfmap.h>
unsigned char convid[8];
signed int state;
signed int rcode;
.
.
/* set conversation_ID with value returned from accept or initialize */
.
.
cmecs(convid,&state,&rcode);
. /* normal processing path */
.
.
Related Information
Return Codes for Mapped Conversation Functions.