TipcSrvMonSubjectSubscribeGetWatch


Name

TipcSrvMonSubjectSubscribeGetWatch — determine if this RTclient is watching the RTclients that are subscribing to a subject

Synopsis

T_BOOL TipcSrvMonSubjectSubscribeGetWatch(srv, subject_name, 
watch_status_return) 
T_IPC_SRV srv; 
T_STR subject_name; 
T_BOOL *watch_status_return; 

Arguments

srv — connection handle to RTserver

subject_name — name of subject to get watch status for (use T_IPC_MON_ALL to indicate a watch of all subjects matching the value of Monitor_Scope)

watch_status_return — storage for watch status

Return Values

TRUE if the subject subscribe watch status was successfully retrieved, FALSE otherwise.

Diagnostics

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

Description

TipcSrvMonSubjectSubscribeGetWatch determines whether this RTclient is watching the RTclients that are subscribing to a subject. The watch status controls whether the RTclient receives a MON_SUBJECT_SUBSCRIBE_STATUS message each time an RTclient starts or stops subscribing to the subject. If subject_name is T_IPC_MON_ALL then all subjects in the current project that match the value of the Monitor_Scope option are watched.

Each MON_SUBJECT_SUBSCRIBE_STATUS message contains four fields:

To set whether this RTclient is watching the RTclients that are subscribing to a subject, use TipcSrvMonSubjectSubscribeSetWatch. To poll once for the RTclients that are subscribing to a subject, use TipcSrvMonSubjectSubscribePoll.

For an example of how MON_SUBJECT_SUBSCRIBE_STATUS messages can be used, see the RTmon GDI Watch Clients in Subject window.

Caution

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

See Also

TipcSrvMonSubjectSubscribePoll, TipcSrvMonSubjectSubscribeSetWatch

Examples

This example uses TipcSrvMonSubjectSubscribeGetWatch to get the status of watching the RTclients that are subscribing to the thermal subject:

T_BOOL watch_status; 
 
if (!TipcSrvMonSubjectSubscribeGetWatch(srv, "thermal", 
&watch_status)) { 
  return;  /* error */ 
} 
TutOut("This process is %s subject subscribers for thermal.\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