Preparing Object Libraries


You can either distribute the generated Object Library as is or enhance the Object Library with the features described in this section before sending them out to your simulation users.

Entering Service Sessions

Some operations described in this section require you to enter a service session. This is accomplished by typing in the password that you entered in the simulator identification in the Schema Definition. To enter a service session while the Object Library is opened:

You can verify whether or not you have entered the service session successfully by examining the checkbox in the Tools>Service Session... menu item. If the Service Session... menu item is checked, you are in the service session. You can exit the service session by selecting the Tools>Service Session... menu item again. When you are exiting, no further questions will be asked. When you close the Object Library, the service session will also be closed.

Adding Convenient Objects

Possible types of convenient objects are described in the Object Library section in Chapter 1. To add an object to an Object Library, you first open the Object Library and then use the same procedures to add, delete, and modify objects as described in the Creating Project Models section of the User's Guide. We assume that you are familiar with the SansGUI Run-Time Environment. If not, please consult the User's Guide to know how the users will use the Object Library distributed by you to configure models, enter data, run simulations and view results.

SansGUI also provides the capability for an object can be locked. This becomes very useful in the production of an Object Library. For example, when the user creates a Project Model with the Minimal option checked, the locked objects will still be included, but will not be if unlocked. If you decide to lock an object, however, you need to make sure that the data in the object are complete and without any error because the users will not be able to add or change the values. Locking and unlocking objects can only be performed within a service session.

Evolving Old Object Libraries

It is possible that you already have quite a few convenient objects added to the Object Library of a previous version and you would like to include them in the new release. One easy way to do it is to evolve the old Object Library so that it will have the new class definitions with the old convenient objects converted. To evolve an old Object Library:

See the messages displayed in the Operation and the Message View in the bottom pane for operation details in the version evolution process. The Update Version operation does not require service session.

Importing Shared Classes

You can import a shared class from another Object Library or Project Model into your own Object Library, provided that the class is compatible. Class compatibility is determined by the simulation identification of the Object Library. The procedure for importing a shared class is the same as in the SansGUI Run-Time Environment.

Suppressing import masks

After the shared class is imported successfully, you will see an import mask. This is indicated by a yellow square with an arrow in it, displayed in the lower left corner of the class icon. As a simulation developer, you have the privilege to remove the import mask before distributing the Object Library. To do so, enter the service session as described earlier and then:

Despite removing the import mask, you can still see the sharing information of the imported class from its Class Properties dialog. The purpose of suppressing the import mask is that the imported class will be presented to the simulation users as if they were native classes.

Preparing Shared Class Functions

Normally, the class functions of the imported classes are merged into the same simulator DLL for distribution. The names of these class functions are mingled with the class path, similar to those of the native classes. If you allow a shared class to be exported into other user's projects, the functions of the class should be provided in a separate DLL, in addition to those merged in the simulator DLL. The user will use the overriding mechanism to specify the DLL file and its location; therefore, the functions in the separate DLL for the class should have the simple SG_x function names without being mingled with the class path.

 



C:\FH_Suite\htmlgifs\home.gif Generating Object Libraries Preparing On-Line Documentation

SansGUI Modeling and Simulation Environment Version 1.2

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

http://protodesign-inc.com