next up previous
Next: T3D Modules Up: AVS Overview Previous: AVS Modules

Module Generator

One of the most powerful tools in AVS is the Module Generator, which allows an AVS user to create new AVS modules through a point and click GUI. The Module Generator creates a wrapper for user code and supplies the data structures, communications and control required for modules to function in an AVS network. Presently there are variations of the Module Generator which allow modules to be created in FORTRAN, C, and C++ [6][7].

Figure 1 shows the template for a module created by the Module Generator. Modules may be edited, compiled and debugged using the Module Generator environment, or a template may be generated and modified as desired using standard compilation procedures. The template includes three functions which are used to define a module. These are: (1) the description function, (2) the compute function, and (3) the initialization function. These functions contain the actual code which is executed by the AVS executive when a module is connected and executed in an AVS network.

The description function contains calls to AVS kernel routines which define the name and type of the module, the specifications for the ports and control panel parameter widgets for the module and the names of the compute and initialization functions for the module. The initialization function contains code which is executed when an instance of a module is first loaded into a network. The compute function contains the actual executable code for a module. The arguments to the function consist of the module parameters, whose values are read from the control panel, and pointers to the data structures corresponding to the ports on the module. The compute function is called whenever the AVS executive ``fires'' the module during the execution of a network.



Mitch Roth
Tue Aug 6 09:57:21 ADT 1996