TipcMonClientNamesNumPoll poll for the number of RTclients in the current project that match the value of the Monitor_Scope option
None
TRUE
if the poll for the number of RTclients was successfully initiated, FALSE
otherwise.
If TipcMonClientNamesNumPoll fails, it returns FALSE
and sets the global SmartSockets error number to:
TipcMonClientNamesNumPoll polls for the number of RTclients in the current project that match the value of the Monitor_Scope option by sending a MON_CLIENT_NAMES_NUM_POLL_CALL to the RTserver. The RTserver responds by sending back a MON_CLIENT_NAMES_NUM_POLL_RESULT message.
Each MON_CLIENT_NAMES_NUM_POLL_RESULT message contains one field:
If there are no RTclients in the project that match the value of Monitor_Scope, the MON_CLIENT_NAMES_NUM_POLL_RESULT message returns 0
for the number of clients.
TipcMonClientNamesNumPoll sends a MON_CLIENT_NAMES_NUM_POLL_CALL message to RTserver, but does not explicitly flush the message. See TipcSrvGetAutoFlushSize for more information on message buffering.
The number of RTclients can only be polled, not watched.
This example uses TipcMonClientNamesNumPoll to poll for the number of RTclient names, waits up to 10
seconds for the poll result, and then prints the poll result message:
T_IPC_MT mt; T_IPC_MSG msg; T_INT4 num_client_names;/* send the poll request out to RTserver */
if (!TipcMonClientNamesNumPoll()) { return;/* error */
} mt = TipcMtLookupByNum(T_MT_MON_CLIENT_NAMES_NUM_POLL_RESULT); if (mt == NULL) { return;/* error */
}/* wait up to 10 seconds for the poll result */
msg = TipcSrvMsgSearchType(10.0, mt); if (msg == NULL) { return;/* error */
}/* set the current field to the first field */
if (!TipcMsgSetCurrent(msg, 0)) { return;/* error */
} if (!TipcMsgNextInt4(msg, &num_client_names)) { return;/* error */
} TutOut("Got CLIENT_NAMES_NUM poll result.\n"); TutOut("number of client names = %d\n", num_client_names);/* clean up */
if (!TipcMsgDestroy(msg)) { return;/* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |