TipcSrvLogAddMt 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 TipcSrvLogAddMt fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSrvLogAddMt adds a message type to a message file logging type on the connection to RTserver. Each logging type has two options that can be used to log incoming and outgoing messages in that logging type. When the option is set (the option value should be the name of a file), then read callbacks (for incoming) or write callbacks (for outgoing) are created for all the logging type’s message types in the connection to RTserver. More than one option can use the same file.
The logging type T_IPC_SRV_LOG_DATA
, which is for variable value message types such as TIME and NUMERIC_DATA, is controlled by the options Log_In_Data and Log_Out_Data. The logging type T_IPC_SRV_LOG_STATUS
, which is for RThci messages types such ALERT and POPUP, is controlled by the options Log_In_Status and Log_Out_Status. The logging type T_IPC_SRV_LOG_INTERNAL
, which is for all other message types such as SUBJECT_SET_SUBSCRIBE and SERVER_STOP_CALL, 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.
TipcSrvLogAddMt can only be called before the RTclient has created a connection to RTserver.
TipcSrvLogRemoveMt; see the TIBCO SmartSockets Utilities for information on TutPtrArytAppend.
This example creates a message type and adds it to the data
logging type with TipcSrvLogAddMt:
#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 (!TipcSrvLogAddMt(T_IPC_SRV_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 |