TipcMtPrint


Name

TipcMtPrint — print all information about a message type in portable, reproducible format

Synopsis

T_BOOL TipcMtPrint(mt, func) 
T_IPC_MT mt; 
T_OUT_FUNC func; 

Arguments

mt — message type to print

funcTutOut-style output function

Return Values

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

Diagnostics

If TipcMtPrint fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcMtPrint prints all information about a message type in a portable, reproducible format to a TutOut-style output function. The output function is called once for each line of output.

TipcMtPrint first prints the name, number, and grammar string of the message type. TipcMtPrint then prints an internal representation of the grammar.

Caution

None

See Also

TipcMtPrint

Examples

This example prints a few message types using TutOut:

T_IPC_MT mt; 
 
mt = TipcMtLookup("numeric_data"); 
if (mt == NULL) { 
  return;  /* error */ 
}  
if (!TipcMtPrint(mt, TutOut)) { 
  return;  /* error */ 
}  
 
mt = TipcMtLookup("subject_set_subscribe"); 
if (mt == NULL) { 
  return;  /* error */ 
}  
if (!TipcMtPrint(mt, TutOut)) { 
  return;  /* error */ 
}  

The above fragment prints this output:

name = numeric_data 
num = -22 
grammar string = { id real8 } 
priority = unknown 
delivery_mode = best_effort 
user_prop = 0 
grammar: 
  type group 
    type id 
    type real8 
name = subject_set_subscribe 
num = -76 
grammar string = id /*subject*/ bool /*subscribe_flag*/ bool 
/*lb_flag*/ 
priority = unknown 
delivery_mode = best_effort 
user_prop = 0 
grammar: 
  type id 
  type bool 
  type bool 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com