TipcMtLogAddMt add a message type to a message file logging type
log_type
message file logging type
mt
message type to add to list
TRUE
if the message type was successfully added, FALSE
otherwise.
If TipcMtLogAddMt fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcMtLogAddMt adds a message type to a message file logging type. The logging type T_IPC_MT_LOG_DATA is controlled by the options Log_In_Data and Log_Out_Data. The logging type T_IPC_MT_LOG_STATUS is controlled by the options Log_In_Status and Log_Out_Status. The logging type T_IPC_MT_LOG_INTERNAL is controlled by the options Log_In_Internal and Log_Out_Internal.
All of the standard SmartSockets message types are added automatically to one logging type. Message types can be added to multiple logging types.
TipcMtLogAddMt only takes effect if called before the RTclient has created a connection to RTserver.
TipcMtLogRemoveMt; see the TIBCO SmartSockets Utilities for information on TutPtrAryAppend.
This example creates a message type and adds it to the data
logging type with TipcMtLogAddMt:
#define USER_MT_COORD_DATA 100 mt = TipcMtCreate("coord_data", USER_MT_COORD_DATA, "int4 /*x*/ int4 /*y*/ int4 /*z*/"); if (mt == NULL) {
return
; /* error */
} if (!TipcMtLogAddMt(T_IPC_MT_LOG_DATA, mt)) {
return
; /* error */
} TutCommandParseStr("setopt log_in_data data.msg");/*
Data messages that arrive from RTserver (include those of type
USER_MT_COORD_DATA) will now be logged to the file data.msg.
*/
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |