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.
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:
Select Tools>Service Session... from the pull-down menu. A Service Session dialog will be displayed.
Enter the password recorded in the Simulator Identification in the Schema Definition from which the Object Library was generated.
If you enter the password correctly, the dialog will be closed without any further messages. If the password is wrong, an error message will be displayed.
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.
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.
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:
Open the old Object Library.
From the File menu, select Update Version. An Object Library [Select] dialog will be displayed.
Locate the new Object Library in the list. If it is not in the list, click on the Browse... button to obtain the Object Library Locator. Use the Object Library Locator to find the Object Library and click on the Open button to select it.
Once the desired Object Library is selected, click on the OK button in the Object Library [Select] dialog to commit the selection. The version evolution process will then begin.
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.
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.
Arrange the source and the target document in the SansGUI environment, so that the Tree Views of both document are visible.
Find the class from the source document in the Tree View. You may have to switch tabs to find the class.
Click on the class to be imported and hold down the mouse button.
As you move the mouse, the mouse pointer is changed into an outline icon with a + sign, meaning that you are performing a copy operation.
While still holding down the mouse button, move the mouse pointer to the Tree View of the target document. It does not matter which Tree View in the left pane is active. Once the pointer is in any of the Tree Views, release the mouse button. If the class is rejected, the operation is canceled and some error messages will be displayed.
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:
Right click on the imported class name or its icon to obtain a context menu.
You can see the Show Imported Class item being checked and enabled. It is disabled when not in a service session.
Select the Show Imported Class item to uncheck it. Once this is done, the import mask is removed.
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.
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.
SansGUI Modeling and Simulation Environment Version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.