TipcSrvMonClientSubscribeGetWatch determine if this RTclient is watching the subjects that an RTclient is subscribing to
T_BOOL TipcSrvMonClientSubscribeGetWatch(srv
,client_name
,watch_status_return
) T_IPC_SRVsrv
; T_STRclient_name
; T_BOOL *watch_status_return
;
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)
watch_status_return
storage for watch status
TRUE
if the RTclient subscribe watch status was successfully retrieved, FALSE
otherwise.
If TipcSrvMonClientSubscribeGetWatch fails, it returns FALSE
and sets the global SmartSockets error number to:
TipcSrvMonClientSubscribeGetWatch determines whether this RTclient is watching the subjects that the client_name
RTclient is subscribing to. 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_SUBSCRIBE_STATUS message each time the watched RTclient starts or stops subscribing to a subject.
Each MON_CLIENT_SUBSCRIBE_STATUS message contains four fields:
""
if not applicable) ""
if not applicable)To set whether this RTclient is watching the subjects that an RTclient is subscribing to, use TipcSrvMonClientSubscribeSetWatch. To poll once for the subjects that an RTclient is subscribing to, use TipcSrvMonClientSubscribePoll.
For an example of how MON_CLIENT_SUBSCRIBE_STATUS messages can be used, see the RTmon GDI Watch Client Subjects window.
If TipcSrvMonClientSubscribeGetWatch returns FALSE
, it does not store a value in watch_status_return
.
TipcSrvMonClientSubscribePoll, TipcSrvMonClientSubscribeSetWatch
This example uses TipcSrvMonClientSubscribeGetWatch to get the status of watching subjects being subscribed to by the primary
RTclient:
T_BOOL watch_status; if (!TipcSrvMonClientSubscribeGetWatch(srv, "primary", &watch_status)) {
return
; /* error */
} TutOut("This process is %s subjects being subscribed to by ", watch_status ? "watching" : "not watching"); TutOut("primary.\n");
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |