MscGen
Encyclopedia
Mscgen is a software tool for drawing message sequence charts
Message Sequence Chart
A Message Sequence Chart is an interaction diagram from the SDL family very similar to UML's sequence diagram, standardized by the International Telecommunication Union....

 from a simple to manage text-based source file. Rendered charts can be output in PNG, SVG
Scalable Vector Graphics
Scalable Vector Graphics is a family of specifications of an XML-based file format for describing two-dimensional vector graphics, both static and dynamic . The SVG specification is an open standard that has been under development by the World Wide Web Consortium since 1999.SVG images and their...

 and PostScript
PostScript
PostScript is a dynamically typed concatenative programming language created by John Warnock and Charles Geschke in 1982. It is best known for its use as a page description language in the electronic and desktop publishing areas. Adobe PostScript 3 is also the worldwide printing and imaging...

, with hyperlink information in ismap format. There is an extension for MediaWiki
MediaWiki
MediaWiki is a popular free web-based wiki software application. Developed by the Wikimedia Foundation, it is used to run all of its projects, including Wikipedia, Wiktionary and Wikinews. Numerous other wikis around the world also use it to power their websites...

 and integration with Doxygen
Doxygen
Doxygen is a documentation generator for multiple programming languages.Doxygen is a tool for writing software reference documentation. The documentation is written within code, and is thus relatively easy to keep up to date...

 that allows embedding of charts into source code comments with generated automatically inserted into the generated documentation page. Mscgen is free software licensed under the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

 (GPL).

Examples

The following example is from the author:


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="ac"];
b<-c [label="cb(TRUE)"];
b->b [label="stalled(...)"];
a<-b [label="ab = FALSE"];
}


Here are two examples of input and output for some standard SIP
Session Initiation Protocol
The Session Initiation Protocol is an IETF-defined signaling protocol widely used for controlling communication sessions such as voice and video calls over Internet Protocol . The protocol can be used for creating, modifying and terminating two-party or multiparty sessions...

message flows:

Simple Call Flow


msc {
UAS, UAC;

UAS->UAC [label="INVITE"];
UAS<-UAC [label="100 Trying"];
UAS<-UAC [label="180 Ringing"];
--- [label="the client plays ringing"];
UAS<-UAC [label="200 Ok"];
UAS->UAC [label="ACK"];
...;
--- [label="the client hangs up"];
UAS<-UAC [label="BYE"];
UAS<-UAC [label="200 Ok"];
}

Alice calls Bob with Intermediary Proxies


msc {
Alice, P1, P2, Bob;

Alice->P1 [label="INVITE"];
Alice<-P1 [label="100 Trying"];
P1->P2 [label="INVITE"];
P1<-P2 [label="100 Trying"];
P2->Bob [label="INVITE"];
P2<-Bob [label="100 Trying"];
P2<-Bob [label="180 Ringing"];
P1<-P2 [label="180 Ringing"];
Alice<-P1 [label="180 Ringing"];
--- [label="Alice's client plays ringing"];
...;
--- [label="Bob answers"];
P2<-Bob [label="200 Ok"];
P1<-P2 [label="200 Ok"];
Alice<-P1 [label="200 Ok"];
Alice->P1 [label="ACK"];
P1->P2 [label="ACK"];
P2->Bob [label="ACK"];
--- [label="two way media"];
...;
--- [label="Bob hangs up"];
P2<-Bob [label="BYE"];
P2->Bob [label="200 Ok"];
P1<-P2 [label="BYE"];
P1->P2 [label="200 Ok"];
Alice<-P1 [label="BYE"];
Alice->P1 [label="200 Ok"];
}
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK