Using Source Code Framework


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.

Specifying Language Options

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:

The next time you generate an Object Library, the source files for the language(s) will be generated.

Locating Source File Directory

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>

The actual directory path of the source files is displayed in the Operation View in the bottom pane when you generate the Object Library.

Examining Source Files

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.

 



C:\FH_Suite\htmlgifs\home.gif Developing In-Process Simulators Preparing Development Environments

SansGUI Modeling and Simulation Environment Version 1.2

Copyright 2000-2003 ProtoDesign, Inc. All rights reserved.

http://protodesign-inc.com