User Tools

Site Tools


Sidebar

viztools:msc

MSC plots

With MSC plots, you get an understanding of the communication behavior of your system. The MSC tool to display such plots is under development in the Shed project, under the “viztools” sub-project.

You can get the picture at the right msc-ab.png from a sequence of commands like

START A @ 0
START B @ 3.5
COMM "get 5" A -> B @ 7.23
COMM "ok" B -> A @ 7.23
END B @ 7.25

Format of the input

The tool understands three kind of commands, a start command, an end command, and a communication command. Each command should be put at a seperate line.

The meaning of the available commands is discussed below.

Start command

The general form of the start command is

START <proc-name> @ <time>

It states to the MSC tool that the process with name <proc-name> starts at time <time>, for example “START A @ 5”.

End command

The general form of the end command is

END <proc-name> @ <time>

It states to the MSC tool that the process with name <proc-name> ends at time <time>, for example “END A @ 28”.

Communication command

The general form of the communication command is

COMM "<label-text>" <from-proc> -> <to-proc> @ <time>

It states to the MSC tool that a communication takes place from the process with name <from-proc> to the process with name <to-proc> at time <time>. The label associated with the communication is <label-text>. For example “COMM “get 5” A → B @ 18”.

Example

Download

Currently, the MSC tool consists of a single file “msc.py” at http://devel.se.wtb.tue.nl/trac/shed/browser/trunk/viztools/msc/msc.py (at the center bottom is a link 'download in original format'). The tool uses both Python and Pygtk. These packages should be available at the Linux systems. for Windows systems, you probably have to install them first. (in that case, please add the URLs here, so fewer people have to search for them.)

Usage

Graphical display

The msc tool uses a window to show the MSC, so you must make a display available for the program. If you are sitting behind a Linux system, this is handled for you. If you are using Windows, you need to use Exceed and SSH with X11 tunneling. See elsewhere at this Wiki on how to do that (and please add the link here for other people).

Examples

If you have a program “myprog” that generates the above commands at its output, you can combine both programs with a pipe:

./myprog | ./msc.py

Loading the commands from a file called “myfile” can be done with

./msc.py myfile

The latter has the advantage that it is easy to reproduce the same MSC diagram.

In addition, you can specify a configuration file to the MSC tool, as in

./msc.py -c myconf.cfg myfile

This loads the “myconf.cfg” configuration file (if it exists), and also writes a new version if the configuration changes during the vizualisation. Currently, the configuration file contains the columns used for each process, for example

[columns]
A = 0
B = 1

says that the process with name “A” should be displayed at column 0 (the leftmost column of the display), and the process with name “B” should be displayed at the right of process “A” (in column 1). By swapping column numbers in the file, you can customize the horizontal layout of the displayed processes.

Feed back

Currently, the MSC tool can display MSC picture, and not much else. Further development is very much demand-driven, so you are invited to provide feed back (suggest extensions, point out omissions, report errors or bad behavior) in order to make the tool more useful for you. Either send me an email about it (a.t.hofkamp@tue.nl), or submit a ticket for an enhancement or bug report in the Shed project (see top of the page for an URL). In the latter case, it is important to make the ticket short but understandable to an outsider. Please add me (hat) in the Cc field, otherwise I don't get a notice that you submitted a ticket.

viztools/msc.txt · Last modified: Friday, 19 February 2010 : 08:07:35 by dhendriks