MessageSequenceChartPlugin
Draw message sequence charts (MSCs) using the mscgen utility
Introduction
A TWiki plugin for the
mscgen
utility. Parses message sequence chart (MSC) descriptions and produces PNG images as the output. MSCs are described using a simple markup language written between
%MSC%
and
%ENDMSC%
tags.
MSC is an interaction diagram from the SDL family very similar to UML's sequence diagram. MSCs are popular for describing communication behaviour in real-time systems, telecommunication, protocol software etc.
Input: |
Output: |
%MSC%
msc {
width="300";
a [label="Alice"],b [label="Bob"];
a=>b [label="INVITE"];
a<=b [label="180 Ringing"];
a<=b [label="200 OK"];
a=>b [label="ACK"];
}
%ENDMSC%
|
|
Syntax Rules
Enclose the description for your MSC within
%MSC%
and
%ENDMSC%
tags.
mscgen language:
Examples
Fictional process
You type: |
You get: |
%MSC%
msc {
a,b,c;
a->b [ label = "ab()" ] ;
b->c [ label = "bc(TRUE)"];
c=>c [ label = "process(1)" ];
c=>c [ label = "process(2)" ];
...;
c=>c [ label = "process(n)" ];
c=>c [ label = "process(END)" ];
a<<=c [ label = "callback()"];
--- [ label = "If more to run", ID="*" ];
a->a [ label = "next()"];
a->c [ label = "ac1()\nac2()"];
b<-c [ label = "cb(TRUE)"];
b->b [ label = "stalled(...)"];
a<-b [ label = "ab() = FALSE"];
}
%ENDMSC%
|
|
Fictional client-server protocol
You type: |
You get: |
%MSC%
msc {
arcgradient = 8;
a [label="Client"],b [label="Server"];
a=>b [label="data1"];
a-xb [label="data2"];
a=>b [label="data3"];
a<=b [label="ack1, nack2"];
a=>b [label="data2", arcskip="1"];
|||;
a<=b [label="ack3"];
|||;
}
%ENDMSC%
|
|
Plugin Installation & Configuration
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.
1. Install mscgen
Instructions and installation packages can be found from
http://www.mcternan.me.uk/mscgen/
.
2. Install MessageSequenceChartPlugin
- For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.
- Or, follow these manual installation steps:
- Download the ZIP file from the Plugins home (see below).
- Unzip
MessageSequenceChartPlugin.zip
in your twiki installation directory. Content:
File: |
Description: |
data/TWiki/MessageSequenceChartPlugin.txt |
Plugin topic |
lib/TWiki/Plugins/MessageSequenceChartPlugin.pm |
Plugin Perl module |
-
- Set the ownership of the extracted directories and files to the webserver user.
- Install the dependencies (if any).
- Plugin configuration and testing:
- Run the configure script and enable the plugin in the Plugins section.
- Configure additional plugin settings in the Extensions section if needed. All settings start with
$TWiki::cfg{Plugins}{MessageSequenceChartPlugin}
, and on many systems, these are optional.
Setting |
Description |
{mscGenCmd} |
Path to mscgen executable on your system. Default value is /usr/bin/mscgen . |
{mscScript} |
Path to the MessageSequenceChart.pl script (should be in your tools directory). E.g. /var/www/twiki/tools/MessageSequenceChart.pl . |
{Debug} |
Debug plugin. See output in data/debug.txt. |
-
- Test if the installation was successful: See example above.
Plugin Info
Related Topics: TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory,
TWikiPreferences