Top Up Prev Next Bottom Contents Index Search

11.2 Graphical User Interface


The original visual interface to Ptolemy, called Vem, is not suitable for drawing the STD for an FSM. A new visual editor based on Tycho, a hierarchical syntax manager and part of the Ptolemy project, is being developed based on drawing mechanisms created by Wan-teh Chang.

11.2.1 Edit a new STD file

A new STD file can be created from a Tycho editor that is running inside Ptolemy or from a standalone Tycho process. To start Tycho from within Ptolemy, type a y. To start a standalone Tycho process, run tycho from the shell prompt. Once Tycho is started, either open a file with the file extension .std, or select the Tycho Window menu and choose State transition diagram editor. A message window will pop up to ask for machine type. Currently there is one type of FSM supported, called mixed Mealy/Moore machine.

11.2.2 Edit the Input/Output and Internal Events Names

If there are any input/output and internal events for the FSM, their names must be specified as follows: Select the Special menu and choose I/O Port Names..., then enter the names for the input/output. Each name should be separated by at least one space.

11.2.3 Draw/Edit a State

To draw a state, either select the Edit menu and choose New Node, or use the keyboard accelerator N key. A crossbar cursor will appear in the window. Press and hold (don't release) the left mouse button and move the mouse to get a different shape of node. Release the button to finish the drawing.

To edit a state, first select the state by pressing the left mouse button on your selection. Then either select the Edit menu and choose Edit Item, or use the keyboard shortcut and type an e.

11.2.4 Draw/Edit a Transition

To draw a transition, either select the Edit menu and choose New Arc, or use the keyboard shortcut and type an A. A crossbar cursor will appear in the window. Press the left mouse button on the periphery of the starting state. Move the mouse and press the left mouse button to get a more delicate arc. To finish the drawing, move the mouse on the periphery of the ending state and press the left mouse button.

To edit a transition, select the transition by pressing the left mouse button. Then either select the Edit menu and choose Edit Item, or use the keyboard shortcut and type an e.

11.2.5 Delete a State/Transition

First select the state/transition by pressing the left mouse button on your selection. Then select the Edit menu and choose Delete.

11.2.6 Move/Reshape a State/Transition

To move a state, press and hold the left mouse button on the state and then move the mouse to the desired position. To reshape a state, first select the state, and then move the cursor to the up/down/left/right periphery of the state to get an up/down/left/right arrow-shape cursor. Press and hold the left mouse button and move the mouse to reshape it.

To move/reshape a transition, first select it, then some small rectangles will appear along the arc. Select and move the rectangles to move/reshape the arc.

11.2.7 Slave Processes of States

In an FSM, each state may be associated with a slave process. This slave process could be a subsystem of any other Ptolemy domain or be another FSM Galaxy. To specify the slave process of a state, when editing a state, give the full path name and file name of the subsystem. For example, a Vem facet could be specified for the Galaxy of any other Ptolemy domain, or an STD file could be specified for the FSM Galaxy.



Top Up Prev Next Bottom Contents Index Search

Copyright © 1990-1997, University of California. All rights reserved.