TipcMsgAppendTimestamp


Name

TipcMsgAppendTimestamp — append a TIMESTAMP field to a message

Synopsis

T_BOOL TipcMsgAppendTimestamp(msg, timestamp_data) 
T_IPC_MSG msg; 
T_REAL8 timestamp_data; 

Arguments

msg — message to append field to

timestamp_data — data for new message field

Return Values

TRUE if the field was successfully appended to the message, FALSE otherwise.

Diagnostics

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

Description

TipcMsgAppendTimestamp appends a timestamp, or the current computer wall clock time in the number of seconds since midnight January 1, 1970. The TIMESTAMP field is an eight-byte real number containing timestamp_data to the end of a message’s data.

Caution

None

See Also

TipcMsgNextTimestamp

Examples

This example creates a message and appends a TIMESTAMP field:

T_IPC_MSG mt; 
T_IPC_MSG msg; 
 
#define USER_MT_TIMESTAMP_TEST 100 
mt = TipcMtCreate("timestamp_test", USER_MT_TIMESTAMP_TEST,  
                  "timestamp"); 
if (mt == NULL) { 
  return;  /* error */ 
} 
 
msg = TipcMsgCreate(mt); 
if (msg == NULL) { 
  return;  /* error */ 
} 
 
/* An RTclient would typically set the destination of */ 
/* a message at this point by calling TipcMsgSetDest. */ 
 
if (!TipcMsgAppendTimestamp(msg, TutGetWallTime())) { 
  return;  /* error */ 
}  
 
/* A process would typically send a message at this point by */ 
/* calling TipcConnMsgSend or TipcSrvMsgSend. */ 
 
/* A process would typically destroy a message at this point by */ 
/* calling TipcMsgDestroy. */ 

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