|
||
This Chapter shows how the ProtoCollum graphical user interface (GUI) can be used to interact with the objects available on the Edit Sheet.
The Edit Sheet objects are: Processing Entities (PE), Rules, Guard and Action events, Messages, Gates, Segments, and Pins. The information in Chapter 2 about Objects and Edit Sheets should be reviewed first.
Additional topics relating to the Edit Sheet and how it can be used for protocol modeling is found in Chapter 6 - Protocol Modeling Concepts.
To create a new Edit sheet, use the menu item Edit>New Sheet>For Editing. The current Edit sheet can be copied to form a new identical sheet by selecting the menu item Edit>Copy Sheet>.
Right clicking on a sheet tab will bring up a menu which includes options for renaming the sheet, copying the sheet, changing the tab order, and for bringing up a window to show the Sheet properties.
Objects can be created, selected, and deleted by using the Selection and Object buttons along the top of the Graphical User Interface (GUI). Figure 4.1 shows the Edit sheet buttons.
Select ModeNote: If the <Delete> key is pressed while one or more objects are selected, those objects are deleted from the model and are removed from any views of the objects on other sheets. A delete command may be ignored if proceeding will cause an architectural inconsistency. For instance, an event cannot be deleted which has an attached message, the message must be deleted first.
Processing Entity (PE) Object
Rule Object
Event Object
Event Object (Subtype=time)
Message Object
Message Object (Fast Mode)
Gate/Segment Object
Pin ObjectQuick Mode Change: A right click in any of these specialized Object modes will switch back to Select mode. A right click (not on an object) in Select mode will return back to the previous Object mode.
Objects can be moved and resized after being selected in Select mode. Not all objects can be resized with the cursor. For example, a selected Event object is shown with only one handle which is used to drag the Event to a new location. Almost all objects have restrictions in their axes of movement which is done to maintain object relationships. For example, a Rule object must stay on the stem of its associated PE.
There are two types of handles which can appear on objects. The traditional handle is square-shaped and is meant to be clicked and dragged. The other type of handle is diamond-shaped and appears at the ends of lines. When a diamond-shaped handle is clicked, the handle goes away and the line follows the cursor so that the line can be repositioned.
The following objects can be moved and/or resized:
A selected object (or objects, if Shift-left-click was used for multiple selections) can be placed into a clipboard by using the menu item Edit>Copy or by using Ctrl-c. The interface ensures that during multiple object selection all of the objects are of the same type. The reason for this is to ensure that all objects in the clipboard are of the same type. This is necessary because of the requirements of pasting, which is done via Edit>Paste or by using Ctrl-v.
When pasting objects, it is necessary to put them in a correct location. Thus, PE objects can be pasted onto a sheet, Rule objects can be pasted onto a PE, etc. For example, to paste one or more Rules in the clipboard onto a PE, the Rules would first be copied or cut into the clipboard; then the desired PE would be selected and the paste operation done.
It is also possible to copy and paste the graphical properties of an object. The properties of an object in the clipboard are transferred to the selected object during a paste operation if the objects are of the same type. For example, if a Rule object is in the clipboard, doing a paste operation when another Rule is selected causes a transfer of the graphical properties to the selected Rule.
All the PE objects in a protocol model are all peers, they live at the same level in a flat relationship. (This is explained more here.) However, one can make it appear in the GUI that the PE objects have a hierarchical (parent-child) organization.
There are no special restrictions or capabilities that result from setting hierarchical relationships between PE objects1. For example, hierarchy does not affect where a message can be attached. The use of hierarchy merely provides an additional visual cue to assist in organizing large projects.
1 In reality the hierarchical relationships are set indirectly using objects called PE-pointers, not the PE objects themselves.
To create or modify a hierarchy, choose Edit>PE Hierarchy. This will open a window (see Figure 4.3) that shows the current PE objects. Use the mouse to left-click and drag (the cursor will be red) a PE entry on top of another PE entry. This will move the first PE to be a child and the picture will change to show the parent PE as a directory.
Setting up a PE hierarchy has the effect of drawing a visual clue on the Edit Sheet. A "hat" is drawn from the parent PE over each child PE, as shown in Figure 4.4:
Moving a PE which does not belong to the hierarchy under a hierachy "hat" causes
a forbidden symbol
to appear.
It is possible to create multiple levels of hierarchy. Simply use the same process to drag a PE symbol under some other PE symbol or Directory symbol. Multiple layers of "hats" will appear to show the PE hierachy relationships. The depth of the hierarchy is limited by the option gui::Option(pe_hierarchy_level) which is set at tool startup time.
To support cases where a piece of the architecture is used in multiple places (functionality of one or more PEs is duplicated in the protocol) it is possible to place a PE in more than one spot in the hierarchy. To create a copy of the PE, press Ctrl-left-click and drag (the cursor will be green) the PE entry to another location in the hierarchy. The original PE entry will remain and a new PE entry with the same name will appear. A duplicate PE entry can be removed from the hierarchy by using a right-click.
|
Copyright © 2003-2005 by Bellum Software
last updated on 29 May 2005 |