Package Overview

External model access is the technique of accessing a model external to the Riverbed analysis software (i.e., without using the services provided by the graphical editors). In this context, the definition of accessing a model includes creating it, modifying it, and extracting data from it. External model access is supported via a library of C and C++ accessible functions that serve as a programmatic specification and query language. This library is named the External Model Access (Ema) package, and it can be viewed as an Application Program Interface (API) for creating and extracting data from model files.

Note: To use External Model Access in Windows, make sure that <reldir>/sys/pc_intel_win32/bin is the first directory listed in your PATH environment.

External model access is provided to adequately support a number of special requirements:

  • Large models, involving many objects and interconnections, can be tedious to enter using the graphical editors, and it is easy to make errors of omission when specifying attribute values. If large models have a regular structure (such as a ring, grid, tree, etc.), they are especially conducive to algorithmic specification using a programmatic interface.
  • Many applications involve model construction based on sets of parameters associated with real-world equipment configurations. Often, the parameter sets are conveniently stored in an on-line database. In these situations, it is useful to have an automated model construction process, especially if the number of models to be built is large or open-ended. Automated model construction is possible with a programmatic specification language.
  • Supporting an API for model files allows user-written programs to open and query models, thus providing an “open interface”. This can be very useful when exporting model data to other applications.

EMA function calls are designed to be external in C or C++ programs developed by users. The ability to embed EMA in C or C++ is superior to a stand-alone language, since it allows all the flexibility of a common, full-capability procedural language to be applied to the task of creating models. Model-creating programs can have a wide range of complexities: on the simple end, a “linear” sequence of calls to EMA primitives can be prepared to create a single model; this is equivalent to an editing session with one of the graphical editors. On the sophisticated end, an interactive program can be developed that creates models according to a variety of dynamic inputs, including user prompts or third-party database queries. The following figure shows a sophisticated application that interfaces to an external database via a query language, and to Riverbed analysis software via the Ema package.

Figure 1: Example Database-Driven Model Building Application

Example database-driven model building application

To support the convenient embedding of EMA statements in C/C++ programs, EMA statements are implemented as C/C++ function calls. The Ema package is an external object code library which must be linked in with application programs that make calls to it. The function call interface allows an EMA statement to be made from within almost any C/C++ control structure, such as IF-THEN-ELSE clauses, and for, while, and do-while loops.

Within EMA, model attributes are described and accessed in a standard, object-based methodology. This drastically reduces the number of functions that must be learned to specify models, and it allows application programs that process models to be written in a generic, “model independent” style. For instance, a simple EMA program can be written to print out the complete contents of a model using the same algorithm, regardless of the model type.

The following figure shows the model types that can be read and written with EMA,

Figure 2: EMA-Supported Model Types

EMA-supported model types