|
||
This chapter describes ways that you can customize ProtoCollum to suit your needs.
ProtoCollum objects are saved to a file type of .mps (message passing system). This is an ASCII text file in XML format. The information that is important to the model description and test scenarios is stored separately from any graphical information. This allows the file to be used when operating ProtoCollum in batch mode (text commands only, no GUI). These .mps files are managed via the menu items File>New, File>Open, File>Save, and File>Save As.
One .mps file describes a Binder, which contains one description of the protocol model (which may be spread over many Edit Sheets), and which may contain test scenarios which are actual simulations of a specific chain of events (one scenario per Test Sheet).
The initial values of various program defaults and object states can be affected by loading a preference file. Settings which have been made inside the program can also be saved to a preference file. Preference files can be loaded and saved via the menu items File>Preferences>Load and File>Preferences>Save.
You can load custom code into ProtoCollum by using the File>Package Management dialog window. (See Managing Code Packages.)
Values for program options are collected in the following order, with items coming later in the list overriding items that are earlier in the list:
Each package of Tcl code which makes up ProtoCollum stores its option values in an array called Option(). Each package creates the array in a namespace corresponding to the package name. For example:
| Package Name | Array Name | Package Description |
|---|---|---|
| plm | plm::Option() | tool startup and initialization |
| mps | mps::Option() | object definitions and simulation model |
| gui | gui::Option() | menus, drawing canvas, adds graphical methods to objects |
The values for the options of any package can be set in the following ways.
For example, if an array dump (via ::parray gui::Option) showed these option values:
gui::Option(pe.fill) = LightSkyBlue gui::Option(pe.outline) = DarkSlateBlue
then any of following methods could be used to override these values:
Preference File
gui.pe.fill PaleGreen gui.pe.outline orange
Environment Variables
PROTOCOLLUM_GUI_PE_FILL=PageGreen PROTOCOLLUM_GUI_PE_OUTLINE=orange
Command Line Options
-gui.pe.fill PaleGreen -gui.pe.outline orange
User-written packages can use these same three ways to set their options. The name of the user package is used in the same manner as the other package names shown above. Each package must sign up for the customization service via get_consolidation_options.
|
Copyright © 2003-2005 by Bellum Software
last updated on 29 May 2005 |