Time Visualization Sub-Package

This sub-package contains APIs related to the time visualization capabilities of network models. Thus, these functions are called in the context of a Project Editor and not during discrete event simulation. For a description of how network time is modeled, see “Network Time: Calendar, Relative, and Network Start Times“ on page 329. For a description of the time visualization GUI, see “Show Time Controller“ on page 178.

Each network model can define a start time that relates simulation time to some moment in calendar time. Network start time (which specifies both date and time) is of type PrgT_Date and expresses the start time as an offset, in seconds, from the operating system's epoch time (similar to the behavior of C's time_t). You can determine the start time of a network with Ets_Nt_Time_Base_Get() and set the start time with Ets_Nt_Time_Base_Set().

When users choose to visualize a network based on time, one of the things they can do is set the start time, end time, and step interval based on different values. Riverbed Modeler gets these values from plug-ins written to support specific data sets. For example, the Flow Analysis module might provide one or more plug-ins that provide this information. In addition, you can develop custom plug-ins and make them available. You can specify what default plug-in to use with Ets_Nt_Time_Settings_Plugin_Set().

A plug-in is a set of functions that the GUI uses to find the start time, end time, and time interval for a set of data. The plug-in consists of two files: a time settings file that registers all necessary callback functions and a library that implements the callbacks. Both files must be in a directory listed in the “mod_dirs“ preference.

The time settings file is a text file with a .tsf extension. It contains one or more plug-in descriptions that look like the following example:

start_plugin_definition
	plug-in tag:         flan
	source name:         Flow Analysis
	library:             flan_plugins
	include proc:        flan_time_slider_settings_include_proc
	range query proc:    flan_time_slider_settings_range_query_proc
	step query proc:     flan_time_slider_settings_step_query_proc
end_plugin_definition

The definition elements are defined as follows:

  • plug-in tag—a unique identifier used to find a particular plug-in
  • source name—a pretty name that tells the user which feature generated the time values
  • library—the name of the library that contains all of the plug-in's functions
  • include proc—the name of the function to use as the include callback. The prototype is given in EtsT_Nt_Time_Settings_Include_Callback.
  • range query proc—the name of the function to use as the range query callback. The prototype is given in EtsT_Nt_Time_Slider_Range_Query_Callback.
  • step query proc—the name of the function to use as the step query callback. The prototype is given in EtsT_Nt_Time_Slider_Step_Query_Callback.

As a user changes the time visualized for a network model, various changes in the state or appearance of the network might be necessary. You can define one or more callbacks to manage these changes with Ets_Nt_Time_Change_Callback_Register(), and remove unneeded callbacks with Ets_Nt_Time_Change_Callback_Deregister(). You can determine what time is currently visualized with Ets_Nt_Time_Offset_Current_Get(), or set the visualized time with Ets_Nt_Time_Offset_Current_Set().

One of the things that might change as a user changes the time being visualized is the position of mobile nodes and subnets. You can get the position of a site at a specified time with Ets_Nt_Site_Geocentric_Position_Get(), Ets_Nt_Site_Geodetic_Position_Get(), and Ets_Nt_Site_Local_Position_Get(). To obtain the current position of a mobile object, use Ets_Nt_Trajectory_Position_Get().