The Set_Receive_Type (CMSRT) call sets the value for the conversation characteristic receive_type. In receive_type you define whether the Receive and Receive_Mapped_Data calls are to be executed with blocking or without. The call overwrites the value of receive_type which was assigned during the Initialize_Conversation call.
The Set_Receive_Type call is only permitted in one of the following states: “Initialize”, “Send” or “Receive”.
This function is one of the advanced functions.
UPIC local on Unix, Linux and Windows systems:
Local connection via UPIC local does not support the Set_Receive_Type call.
CMSRT (conversation_ID, receive_type, return_code)
Parameters
--> conversation_ID | Identifier of the conversation |
--> receive_type | Defines whether the following Receive / Receive_Mapped_Data calls are to be executed with blocking or without. You can specify the following values:
|
<-- return_code | Result of the function call. |
Result (return_code)
CM_OK
The call is OK.
CM_PROGRAM_PARAMETER_CHECK
conversation_ID is invalid or the value of receive_type is undefined.
CM_PRODUCT_SPECIFIC_ERROR
The UPIC instance could not be found.
CM_CALL_NOT_SUPPORTED
The function is not supported.
State change
If there are no errors, this function returns the result CM_OK. This call does not change the state of the conversation.
Notes
If the return code is not CM_OK, the receive_type characteristic remains unchanged.
If Set_Receive_Type is called in the “Start” or “Reset” state, the value transferred in cconversation_ID is always invalid. The return code CM_PROGRAM_PARAMETER_CHECK is then always returned as the result of the call.
Behavior in the event of errors
CM_PROGRAM_PARAMETER_CHECK
Modify program.
CM_PRODUCT_SPECIFIC_ERROR
The operating system cannot provide sufficient memory for the internal buffers. Check whether the memory requirements of your program are too high and if necessary reboot your system.
CM_CALL_NOT_SUPPORTED
This return code only applies to Unix, Linux and Windows systems.
This is not necessarily an error: If the application is intended for both UPIC-L and UPIC-R this return code just means that the application is linked to a UPIC-L library. The program can take note of this return code and avoid making further Set_Receive_Type calls.
CM_ENTRY Set_Receive_Type ( unsigned char CM_PTR conversation_ID, CM_RECEIVE_TYPE CM_PTR receive_type, CM_RETURN_CODE CM_PTR return_code )