The SansGUI Development Environment contains a Source Code Framework mechanism that generates skeleton code for in-process simulators. With class function entry points declared in the class properties in the Schema Definition, SansGUI generates the skeletons of these class functions in source files on a class by class basis. The source files are created during the Generating Object Libraries process described in the previous chapter. In addition to the Object Library files and a backup file of the Schema Definition, SansGUI also creates a subdirectory to store the generated source files. This directory can be used as the seed or starting place for your simulator to grow or you can merely move the generated files into any directory or project of your choice.
SansGUI supports multiple programming languages and environments for creating in-process simulators. The programming languages supported currently are C/C++ and Fortran. To access routines written in currently unsupported languages, you can use C/C++ or Fortran as a bridge to indirectly call these routines. The source code framework within SansGUI contains a mechanism to generate the class function skeleton files in C/C++, Fortran, or both. To specify the language(s) you desire:
From the Schema Definition, select Action>DLL Language Options... from the pull-down menu. A Language options for DLL Framework dialog will be displayed.
Check the language or languages of choice. You can mix the programming languages on a per-class basis. If this is the case, select all the languages involved.
Check the source file extension from the drop-down list.
Click the OK button to commit the selection.
The next time you generate an Object Library, the source files for the language(s) will be generated.
The source files are generated and stored in a subdirectory under your working directory, where your Schema Definition file is located. This subdirectory has the following name:
<Name>_<Major>_<Minor>_<Patch>_<Build>
<Name>: the name of the Schema Definition file without the .sgs extension.
<Major>: the major version number of the simulator, or the simulation control class.
<Minor>: the minor version number of the simulator, or the simulation control class.
<Patch>: the patch level of the simulator, or a for alpha release and b for beta release.
<Build>: the build increment of the simulator.
The actual directory path of the source files is displayed in the Operation View in the bottom pane when you generate the Object Library.
Each generated source file contains skeleton class functions for each specified class. SansGUI uses the class path as the file name appended with the extension specified in the Language options for DLL Framework dialog. Please note that all non-alphanumeric characters are turned into underscores.
The contents of the source file include class functions that have the Call flags checked in the class schema in the Schema Definition. If there is no Call flag checked in a class, SansGUI will not generate a source file for it. All the class function names have the class path mingled so that you can insert all functions from all classes into a single simulator DLL.
For details on how to check the Call flags and the supported DLL function entry points, see the Defining Component Classes and Defining Reference Classes sections in Chapter 2 and the DLL Function Entry Points section in the SansGUI Reference Manual.
SansGUI Modeling and Simulation Environment Version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.