Defining Link Classes


A link class is a special component class except that there is no DLL function entry point, port definition, or connectivity specification. Besides, there can only be one link class in a Schema Definition. Although there may be more than one levels in the link class path, the last descendent class, the terminal class, is treated as the link class of the simulator. SansGUI uses this feature to avoid run-time class type checking and, thus, to enhance the performance of the simulator.

When there is only one link class in the system, all parts can take input values from the incoming links and deposit output values to the outgoing links directly because there is only one link class schema. In other words, no run-time link class type information is needed. Should there have been more than one link types, the functions in the component class of the part would have to check what types of links they are and fetch the values according to the links' class schemas. If you need more than one link class for a particular connection in your modeling scheme, you need to promote it to a full-blown component class with all the features that can be used to produce parts. Keep in mind that in the SansGUI Object System, links are used to carry information from one part to the other without the need for the simulator to check run-time type information (RTTI).

Creating a Link Class

It is essential to create a link class in the Schema Definition of your simulator when you have information to be passed from one part to the other. Follow the procedures described in the Adding Classes and Adding Attributes to Classes sections to create a subclass from the Link class. Add common attributes in the class for your simulator to send data from one part to another. When there are more than one class in the link class path, the terminal class will be used as the link class for model building.

 



C:\FH_Suite\htmlgifs\home.gif Defining Component Classes Defining Reference Classes

SansGUI Modeling and Simulation Environment Version 1.2

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

http://protodesign-inc.com