1. Mscgen 란? [Bottom] [Top]
Mscgen is a small program that parses Message Sequence Chart descriptions and produces PNG, SVG, 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 common image formats for display or printing.
2. 참고링크 [Bottom] [Top]
3. 기본 구조 [Bottom] [Top]
- Mscgen 예제
# MSC Example msc { # MSC 시작 # STEP 1: 옵션 설정 width = "400"; # STEP 2: 엔티티 설정 A, B, C; # STEP 3: 메시지 차트 A -> B; A <- C [label="return"]; B -> C [label="signal", textcolor="red", linecolor="blue" ]; } # MSC 종료 - 생성된 MSC 이미지
4. Mscgen 사용법 [Bottom] [Top]
Usage: mscgen -T <type> [-i <infile>] -o <file> mscgen -l Where: -T <type> Specifies the output file type, which maybe one of 'png', 'eps', 'svg' or 'ismap' -i <infile> The file from which to read input. If omitted or specified as '-', input will be read from stdin. -o <file> Write output to the named file. This option must be specified. -p Print parsed msc output (for parser debug). -l Display program licence and exit. Mscgen version 0.13, Copyright (C) 2007 Michael C McTernan, Michael.McTernan.2001@cs.bris.ac.uk Mscgen comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; type `mscgen -l' for details.사용 예>
C:\>mscgen.exe -T png -i Example.msc -o Example.png C:\>mscgen.exe -T svg -i Example.msc -o Example.svg
4.1. MSC 옵션 [Bottom] [Top]
- hscale
- MSC 이미지 스케일을 지정(기준값: PNG 포맷-600 픽셀), 문자열 형태의 실수값 사용. (예: "1.5")
- width
- MSC 이미지의 넓이를 지정, 픽셀값으로 지정.
- arcgradient
- 메시지 라인의 기울기를 픽셀값으로 지정, End 포인터의 높이를 지정.
4.2. 엔티티 선언 [Bottom] [Top]
4.3. 메시지 [Bottom] [Top]
4.4. 속성 [Bottom] [Top]
- label
- 엔티티 또는 메시지의 라벨을 지정, '\n' 문자는 줄바꿈 처리.
- URL
- 라벨을 파란색(blue)으로 표시, 참조 기능으로 Doxygen 의 '\ref' 태그와 같이 사용. (Doxygen 도움말 참고)
- ID
- 라벨에 윗첨자로 표시.
- IDURL
- ID 속성에 대한 참조 기능, URL 속성과 동일.
- textcolour, textcolor
- 라벨의 색상을 지정.
- linecolour, linecolor
엔티티 또는 메시지 라인의 색상을 지정. (주의: textcolor 속성과 함께 사용해야 됨.)
- arctextcolour, arctextcolor
엔티티 선언 시 지정, 라벨의 색상을 지정. (해당 엔티티에서 발생하는 모든 메시지에 적용됨)
- arclinecolour, arclinecolor
엔티티 선언 시 지정, 메시지 라인의 색상을 지정. (해당 엔티티에서 발생하는 모든 메시지에 적용됨)
4.5. 색상 [Bottom] [Top]
Name
Code
Block
Name
Code
Block
white
#ffffff
lime
#00FF00
silver
#C0C0C0
olive
#808000
gray
#808080
maroon
#800000
black
#000000
navy
#000080
red
#ff0000
teal
#008080
orange
#ffb000
aqua
#00FFFF
yellow
#ffff00
purple
#800080
green
#00ff00
fuchsia
#FF00FF
blue
#0000ff
indigo
#440088
violet
#d02090
5. Mscgen 예제 [Bottom] [Top]
- 예제 1
# MSC Example 1 msc { ... } - 예제 2
# MSC Example 2 msc { ... }
