Generating Object Libraries


Generating Object Libraries is a critical step after you have completed the Schema Definition for a simulator. In this process, SansGUI checks for completeness and coherence of all classes defined in the Schema Definition. If this is successful, they are then compiled into an Object Library or multiple Object Libraries. If you have multiple simulation options defined, SansGUI creates an Object Library for each option; otherwise, only one Object Library is generated.

Object Library Generation

Although the Schema Definition to Object Library compilation process internal to SansGUI is quite complex in order to achieve robustness, the procedure that you perform is actually quite simple. All you need is to decide what type of release you wish to make: an in-house test build, a patch release, an alpha or beta test release, or an official release with a minor or major version. Please consult the Class Schema Version Control section in Chapter 1 of this manual for the version scheme used by SansGUI.

To generate the Object Library or Libraries, select one of the following from the Action menu:

During the Object Library generation operation, SansGUI will display the status of the process in the Operation and Message Views in the bottom pane.

Using Operation View

As stated previously, SansGUI will automatically check the completeness and coherence of your Schema Definition and compile it for you into Object Libraries. The trail of this process is logged in the Operation View in the bottom pane. It shows you how many Object Libraries were successfully generated and the locations where they are now stored. If SansGUI encounters any errors, it will direct you to the Message View in the second tab in the bottom pane. You can obtain a hard copy of the Operation View by clicking on the view to make it active and then select File>Print to print it. A landscape configuration for the paper orientation is recommended.

Using Message View

SansGUI uses the Message View in the bottom pane to show any informational, warning, or error messages encountered during the Object Library generation process. The Message View is a column-oriented table with one row for each message:

Simulator Version Control

The simulator version number is indicated by the version number of the simulation control class that you defined. When you generate Object Libraries, the version number of the simulation control class will always be advanced, regardless of whether the class has been modified or not. All other class versions will be advanced only when their specific schemas have been modified.

The version numbers of the classes in the Schema Definition are essential for version control, especially to synchronize your users' model data with different versions of your simulator. After your users install the Object Library on their system, they can select it to evolve all the Project Models and custom Object Libraries related to your simulator to the new schemas found in the new Object Library. This process can be reversed for full forward and backward compatibility without any major effort from your side.

Object Library Name

The generated Object Library or Object Libraries will have their names specified in the following format:

<Name>_<Major>_<Minor>[_<OptionCode>].sgo

Please note that the patch level and the build increment are not included in the file name.

Schema Definition Backup File

When a new version of the Object Library is generated, the Schema Definition of the pre-generation state is saved in a backup file. The file is stored in the same directory as the Schema Definition file with a .sgb extension. The name of the backup file consists of the original Schema Definition file name and the version number of the new Object Library.

<Name>_<Major>_<Minor>_<Patch>_<Build>.sgb

The patch level and build increment are appended to the backup file name for improved version identification. For example, if you generate an official minor release from version 1.2.beta.5 of a Schema Definition with the file name MySim.sgs, the new version will be 1.2.0.0 and the back up file will have the name MySim_1_2_0_0.sgb. Also, the name of the Object Library file will be MySim_1_2.sgo, if there is no simulator option defined. For test release with alpha or beta patch level, the letter a or b will be used, respectively.

When you really need to go back to the backup file, simply rename it to have the .sgs extension or copy it to another file with the .sgs extension. You can then open it to restore the Schema Definition to the pre-generation state. You should handle the backup file very carefully and not to use it to defeat the version control mechanism in the SansGUI environment.

Source Code Generation

For an in-process simulator, if you checked any of the Call flags of the DLL function Entry Points in a class, a program source file for the class will be generated along with the Object Library. The file contains the skeleton code of all the checked functions in the class. The class path is used as the file name for identification purposes. The next chapter is devoted to using the SansGUI Development Environment to implement in-process simulators. You can consult the Using Source Code Framework section in that chapter for available options and details on the source code generation process.

 



C:\FH_Suite\htmlgifs\home.gif Generating and Maintaining Object Libraries Preparing Object Libraries

SansGUI Modeling and Simulation Environment Version 1.2

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

http://protodesign-inc.com