TipcSrvStdSubjectSetSubscribe start or stop subscribing to all standard subjects
T_BOOL TipcSrvStdSubjectSetSubscribe(subscribe_status
,time_status
) T_BOOLsubscribe_status
; T_BOOLtime_status
;
subscribe_status
whether to start or stop subscribing to all standard subjects
time_status
whether or not to include _time
subject
TRUE
if the subscribe statuses of the standard subjects were successfully set, FALSE
otherwise.
If TipcSrvStdSubjectSetSubscribe fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvStdSubjectSetSubscribe sets the subscribe statuses of the standard subjects by calling TipcSrvSubjectSetSubscribe for each standard subject. TipcSrvStdSubjectSetSubscribe is often used to subscribe to subjects listed in a command file.
There are many standard subjects:
_time
only set if time_status
is TRUE
_
node
the node-specific subject, such as workstation1
_all
common subject for all RTclients_mon
. User-defined RTclients do not have a standard process type subject. RTmon uses _mon
.As each standard subject subscribe status is changed, TipcSrvStdSubjectSetSubscribe prints out an informational message with TutOut. TipcSrvStdSubjectSetSubscribe also flushes the retrieval messages with TipcSrvFlush when it is done.
TipcSrvStdSubjectSetSubscribe may attempt to automatically create a connection to RTserver. If RTclient has a warm connection to RTserver, TipcSrvStdSubjectSetSubscribe changes the subscribe statuses of the subjects as if the RTclient were still connected to RTserver. See TipcSrvCreate on automatic creation of connections and warm connections to RTserver.
None
This example sets the option Subjects and uses TipcSrvStdSubjectSetSubscribe to start subscribing to the standard subjects:
TutCommandParseStr("setopt subjects subject1, subject2"); if (!TipcSrvStdSubjectSetSubscribe(TRUE, TRUE)) {
return
; /* error */
}
The output from the above fragment would be similar to:
Start subscribing to subject </_time>. Start subscribing to subject </subject1>. Start subscribing to subject </subject2>. Start subscribing to subject </_workstation1>. Start subscribing to subject </_all>.
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |