The class functions implement the behavior of a class. The class functions of reference objects and parts are specified by the simulation developer in their deriving reference classes and component classes, respectively. The original class functions may be implemented in a dynamic-linked library for an in-process simulator, in an executable program for an external process simulator, or both. For user overriding functions, however, it is required that the functions be implemented in dynamic-linked libraries with specific function names. Though not required, we recommend that all functions within a class be stored in one DLL file to ease maintenance.
A full description of the function entry points in a class can be found in the DLL Function Entry Points section in the SansGUI Reference Manual. Here we describe the procedures of finding out what the overridable functions are and how to specify the locations of user overriding DLLs.
Because DLL function specifications are stored on a per-class basis, you can examine them via the Class Properties dialog:
From a Project Model or Object Library, right click on the class in question. Once the context menu appears, select Properties to invoke the Class Properties dialog.
Alternatively, you can double click on the class in question to invoke the Class Properties dialog directly.
Normally, the class should be the immediate parent of an object. It depends, however, on how the classes are defined by the simulation developer. The Class Properties dialog should show Read Only because none of the definitions here are changeable by you, the simulation user. When there exists a DLL tab in the Class Properties dialog, the class has DLL function specifications. Click on the DLL tab to see the details.
The DLL functions listed in the Class Properties dialog are described in full in the DLL Function Entry Points section of the SansGUI Reference Manual. In the DLL specifications in the Class Properties dialog, you can find the following columns:
Call: a checked box indicates that the function entry point is used by the simulator.
Override: a checked box indicates that the user can override this function. This is the column we are interested in now.
Default Function Entry Point: the name of the function in the code. All the function names in this column are appended with the path of the class. For user overriding functions discussed here, we take the names without the class path. For example, SG_xEndEdit, SG_xLoadSize, SG_xLoad, etc.
For a user overriding function in a reference object or part, the SansGUI DLL function loader first checks to see if the DLL function field has a DLL path specified. You can use the Object Properties dialog or the Part Properties dialog to specify the DLL paths for the overriding functions:
Invoke the Object Properties dialog or the Part Properties dialog by using the right click context menu or by double clicking on the object or part.
Inside the Properties dialog, click on the DLL Override tab, if available. If no DLL Override tab is found or it is empty inside, there is no overriding capability in the deriving class.
Enter the path of the DLL file or use the File Locator in the Input Assistant to find the DLL file you implemented. This informs SansGUI that the user overriding function is requested. A blank field means that the original function from the simulator shall be called.
For an object, each DLL file path entered in a Dynamic-Linked Library field indicates that the function is overridden. To override all the functions, you need to enter the path of the DLL file in all the fields. You can enter the DLL file paths in a component object so that all the parts derived from it will use the DLL(s) specified. If some of the parts require a little different DLL functions, the Dynamic-Linked Library values in the component object can be overridden in the Part Properties dialog. Use the Override fields in the Part Properties dialog to specify them.
SansGUI Modeling and Simulation Environment Version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.