Time Change Callbacks


SmartSockets provides a mechanism whereby you may request notification whenever the value of current time changes (data time). This is implemented with a time change callback. Once a time change callback has been created, the specified callback function is called whenever the value of current time changes. The time change callback function is defined in this way:

void (*T_TIME_CHANGE_CB_FUNC)  
     (T_PTR dummy,       /* Always NULL */ 
      T_TIME_CHANGE_CB_DATA data, 
      T_CB_ARG arg); 

The API function to create a time change callback is TutTimeChangeCbCreate. A time change callback function is always called with exactly three arguments, where the first argument is always NULL, the second argument is a pointer to a time change callback data structure, and the third argument is the user-provided callback argument. The first argument is always NULL because the time change callback is a global-only type of callback and does not have a specific object with which it is associated.

The time change callback data structure is defined as:

struct T_TIME_CHANGE_CB_DATA_STRUCT { 
  T_CB cb;       /* Pointer to the callback being called */ 
  T_TIME time;   /* Current value of data time */ 
} T_TIME_CHANGE_CB_DATA_STRUCT, *T_TIME_CHANGE_CB_DATA; 

The current, that is, new, value of data time is contained in this structure as the time field.


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