Previous Chapter | Table of Contents | Next Chapter

Chapter 4 - Using Edit Sheets

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.

Creating and Deleting Objects

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.

Edit sheet buttons
Figure 4.1 Edit Sheet Buttons

Selection Button

Arrow button Select Mode
Left-click on the select (arrow) button to turn on Select mode. In Select mode, an object can be selected by left-clicking on it. Selection is indicated by one or more handles being shown on the object. Multiple objects can be selected by holding down the <Shift> key while doing the selections.

Note: 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.

Object Buttons

PE button Processing Entity (PE) Object
Left-click on this object button and then left-click somewhere on the Edit sheet to create a Processing Entity object. A Processing Entity appears as a blue rectangle with a blue vertical line (stem) coming out of the bottom of it.
Rule button Rule Object
Left-click on this object button and then left-click on a PE stem to create a Rule object. The cursor will change to a crosshair when it is over a PE stem. A Rule object appears as three yellow ovals connected by orange and green vertical lines.
Event button Event Object
Left-click on this object button and then left-click when the cursor is over a Rule object to create an Event object. The cursor will change to a crosshair when it is over a Rule object. An Event object appears as a thin yellow rectangle.
An event placed in the Guard area of the Rule (above the Mid event in the center) will have a Type=guard. An event placed in the Action area of the Rule (below the Mid event) will have a Type=action. If there is not enough space (height of Rule plus spacing) for the event to fit on the Rule, the other event(s) below will be moved down automatically.
Event button (Subtype=time) Event Object (Subtype=time)
Left-click on the object button to enter Event, Subtype=time mode. Left-click to place the Event in the guard area of a Rule.
Use this Subtype=time guard Event to indicate a required temporal ordering of Messages. As shown in Figure 4.2, the guard Events for the rule on the left are satisfied for any ordering of Messages A, B, and C. But the rule on the right requires MsgA be received before MsgB, and MsgB be received before MsgC.
Message Order
Figure 4.2 Message Ordering via guard Event (Subtype=time)
The relative ordering of Messages described here is provided automatically by the System Package. But it is also possible for a user to write any desired temporal expression in guard Events in order to achieve specific timing behavior. See Timing Expressions for more information.
Message button Message Object
Left-click on this object button and then left-click on an action Event to start the creation of a Message object. Complete the Message object by left-clicking on a guard Event. While making a connection, if you left-click on the background of the sheet instead of on a guard Event, the message creation is aborted.
Message Fast button Message Object (Fast Mode)
Left-click on this object button to begin creation of a Message object on a PE stem, a Rule, or an action Event. Any necessary Rule or Event object will be created on the fly. Left-click on a PE stem, a Rule, or a guard Event to complete the creation of the message.
Gate button Gate/Segment Object
Left-click on this object button and then move the cursor over a Message line until the cursor changes to a crosshair and left-click again to create a Gate object. Create a connecting Segment by left-clicking the Gate object and then left-clicking over the Guard/Action area of a Rule or on a guard/action Event. Left-clicking on the background of the sheet will abort the connection.
All Segments emanating from the same Gate must connect to Events of the same Type (guard or action). A Gate connected to one or more guard Events will be of Type=in. A Gate connected to one or more action Events will be of Type=out. The tool only allows one Gate of Type=in and one Gate of Type=out per each Message object.
A Gate can connect only Rules that are on the same Processing Entity. A Gate represents the arrival of a single message at a PE, with the message causing different outcomes depending on the state of the PE. It is an error in the design of the protocol model if more than one Rule triggers when a message arrives.
Pin button Pin Object
Left-click on this object button to enter Pin object mode. Add a pin to any guard or action Event with no other attached Message or Segment by left-clicking on the Event.
A Pin object will allow multiple messages to connect. By using Pin objects, it is possible to connect a Processing Entity to more than one place in the architecture. See Using Pin Objects to Avoid Duplication for more information.

Quick 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.

Moving and Resizing Objects

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:

PE Object
A PE object can be moved horizontally by left-clicking and dragging it. It can be resized by selecting the PE object and then left-clicking and dragging the handles.
Rule Object
A Rule can be moved vertically on the PE stem by left-clicking and dragging it. It will move independently of other Rules on the stem. Doing a Ctrl-left-click and drag will slide any other Rules that get in the way of the movement. A Rule can be resized by selecting the Rule and then left-clicking and dragging the Begin, Mid, and End event handles.
Event Object
An Event object can be moved up and down within the limits of its current position on the Rule. First, select the Event object; then left-click and drag the handle. Doing a Ctrl-left-click and drag will slide other Events that get in the way of the movement. An Event object cannot be resized manually, but it will automatically resize for any text put into its Description field.
Message Object
The ends of a Message object are bound to its events; however, there are some other movement operations that can be performed. The following operations can be performed when a Message object is selected:

Cutting and Pasting Objects

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.

Setting PE Hierarchy

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.

PE Hierarchy Window
Figure 4.3 PE Hierarchy Window

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:

PE Hierarchy as seen in Edit Sheet
Figure 4.4 PE Hierarchy as seen in Edit Sheet

Moving a PE which does not belong to the hierarchy under a hierachy "hat" causes a forbidden symbol to appear.

PE Hierarchy with Forbidden symbol
Figure 4.5 PE Hierarchy wth Forbidden symbol

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.

Previous Chapter | Table of Contents | Next Chapter

Copyright © 2003-2005 by Bellum Software™
last updated on 29 May 2005