Mscgen | |
Introduction | Mscgen is a small program that parses Message Sequence Chart descriptions and produces PNG, EPS or server side image maps (ismaps) as the output. |
Features | The author of mscgen is Michael McTernan. |
Mscgen is a small program that parses Message Sequence Chart descriptions and produces PNG, EPS or server side image maps (ismaps) as the output. Message Sequence Charts (MSCs) are a way of representing entities and interactions over some time period and are often used in combination with SDL. MSCs are popular in Telecoms to specify how protocols operate although MSCs need not be complicated to create or use. Mscgen aims to provide a simple text language that is clear to create, edit and understand, which can also be transformed into PNG or EPS images.
This program and the language it parses have been inspired by Graphviz Dot, which provides a really good way to document State Transition Diagrams and data structures. Unlike Graphviz, this program does no clever layout operations or spline routing as this is not needed for MSCs, and so was much simpler to implement. Doxygen (version 1.5.2 onwards) also allows MSCs to be embedded directly in the same way that dot diagrams can be added to documentation.
The author of mscgen is Michael McTernan. Please feel free to contact him with any questions, suggestions, bug fixes, hate mail :) etc. at:
email: Michael.Mc@cs.bri s.ac.uk Ternan.2001
http://www.mcternan.me.uk/mscgen/
Mscgen is licenced under the GPLv2. This covers use of the program sources but places no restriction on the usage of the tool itself or the diagrams it produces.
Mscgen is written in ANSI-C, and uses the GD graphics library for PNG output.
The following is an example of the raw input code and output that is generated, in this case as a PNG.
Source
(start mscgen) 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"]; (end mscgen)
Source
(start mscgen) # Example MSC using boxes A, B, C, D; # Small gap before the boxes |||; # Next four on same line due to ',' A box A [label="box"], B rbox B [label="rbox"], C abox C [label="abox"], D note D [label="note"]; # Example of the boxes with filled backgrounds A abox B [label="abox", textbgcolour="#ff7f7f"]; B rbox C [label="rbox", textbgcolour="#7fff7f"]; C note D [label="note", textbgcolour="#7f7fff"]; (end mscgen)
To send feedback on this topic email: natural@gmai l.com docsplus
© Some Rights Reserved. see License