TipcSrvMonClientMsgRecvGetWatch


Name

TipcSrvMonClientMsgRecvGetWatch — determine if this RTclient is watching received messages in an RTclient

Synopsis

T_BOOL TipcSrvMonClientMsgRecvGetWatch(srv, client_name, msg_type_name, 
watch_status_return) 
T_IPC_SRV srv; 
T_STR client_name; 
T_STR msg_type_name; 
T_BOOL *watch_status_return; 

Arguments

srv — connection handle to RTserver

client_name — name of RTclient to get watch status for (wildcard names allowed, or use T_IPC_MON_ALL to indicate a watch of all RTclients matching the value of Monitor_Scope)

msg_type_name — name of message type to get watch status for (use T_IPC_MON_ALL to indicate a watch of all message types)

watch_status_return — storage for watch status

Return Values

TRUE if the RTclient received messages watch status was successfully retrieved, FALSE otherwise.

Diagnostics

If TipcSrvMonClientMsgRecvGetWatch fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcSrvMonClientMsgRecvGetWatch determines whether this RTclient is watching received messages in the client_name RTclient. The client_name argument can be the unique subject name of a single RTclient, a wildcarded subject name to match many RTclients, or T_IPC_MON_ALL to watch all RTclients in the project that match the value of the Monitor_Scope option. The watch status controls whether the RTclient receives a MON_CLIENT_MSG_RECV_STATUS message each time a received message is inserted into or deleted from the message queue (for the connection to RTserver) in the watched RTclient. If msg_type_name is T_IPC_MON_ALL, then all message types in the watched RTclient are watched.

Each MON_CLIENT_MSG_RECV_STATUS message contains six fields:

To set whether this RTclient is watching RTclient received messages, use TipcSrvMonClientMsgRecvSetWatch.

For an example of how MON_CLIENT_MSG_RECV_STATUS messages can be used, see the RTmon GDI Watch Messages Received window.

Caution

If TipcSrvMonClientMsgRecvGetWatch returns FALSE, it does not store a value in watch_status_return.

RTclient received messages can only be watched, not polled.

See Also

TipcSrvMonClientMsgRecvSetWatch

Examples

This example uses TipcSrvMonClientMsgRecvGetWatch to get the status of watching all received messages in the primary RTclient:

T_BOOL watch_status; 
 
if (!TipcSrvMonClientMsgRecvGetWatch(srv, "primary", 
T_IPC_MON_ALL,  
                                     &watch_status)) { 
  return;  /* error */ 
} 
TutOut("This process is %s all messages received in primary.\n", 
       watch_status ? "watching" : "not watching"); 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com