TipcMonSubjectSubscribeGetWatch


Name

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

Synopsis

T_BOOL TipcMonSubjectSubscribeGetWatch(subject_name, watch_status_return) 
T_STR subject_name; 
T_BOOL *watch_status_return; 

Arguments

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 TipcMonSubjectSubscribeGetWatch fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcMonSubjectSubscribeGetWatch gets 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 TipcMonSubjectSubscribeSetWatch. To poll once for the RTclients that are subscribing to a subject, use TipcMonSubjectSubscribePoll.

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

Caution

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

See Also

TipcMonSubjectSubscribePoll, TipcMonSubjectSubscribeSetWatch

Examples

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

T_BOOL watch_status; 
 
if (!TipcMonSubjectSubscribeGetWatch("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