TipcMtLogAddMt


Name

TipcMtLogAddMt — add a message type to a message file logging type

Synopsis

T_BOOL TipcMtLogAddMt(log_type, mt) 
T_IPC_MT_LOG_TYPE log_type; 
T_IPC_MT mt; 

Arguments

log_type — message file logging type

mt — message type to add to list

Return Values

TRUE if the message type was successfully added, FALSE otherwise.

Diagnostics

If TipcMtLogAddMt fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

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.

Caution

TipcMtLogAddMt only takes effect if called before the RTclient has created a connection to RTserver.

See Also

TipcMtLogRemoveMt; see the TIBCO SmartSockets Utilities for information on TutPtrAryAppend.

Examples

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