Appendix: Display String Tags

Module and Connection Display String Tags

Supported module and connection display string tags are listed in the following table.

Tag[argument index] - name

Description

p[0] - x

X position of the center of the icon/shape; defaults to automatic graph layouting

p[1] - y

Y position of the center of the icon/shape; defaults to automatic graph layouting

p[2] - arrangement

Arrangement of submodule vectors. Values: row (r), column (c), matrix (m), ring (ri), cring (cr), exact (x)

p[3] - arr. par1

Depends on arrangement: row => dx, column => dy, matrix => ncols, ring/cring => rx, exact => dx

p[4] - arr. par2

Depends on arrangement: row => numcols, column => numrows, matrix => dx, ring/cring => ry, exact => dy

p[5] - arr. par3

Depends on arrangement: row => dy, column => dx, matrix => dy

g[5] - layout group

Allows unrelated modules to be arranged in a row, column, matrix, etc

b[0] - width

Width of object. Default: 40

b[1] - height

Height of object. Default: 24

b[2] - shape

Shape of object. Values: rectangle (rect), oval (oval). Default: rect

b[3] - fill color

Fill color of the object (color name, #RRGGBB or @HHSSBB). Default: #8080ff

b[4] - border color

Border color of the object (color name, #RRGGBB or @HHSSBB). Default: black

b[5] - border width

Border width of the object. Default: 2

i[0] - icon

An icon representing the object

i[1] - icon tint

A color for tinting the icon (color name, #RRGGBB or @HHSSBB)

i[2] - icon tint

Amount of tinting in percent. Default: 30

is[0] - icon size

The size of the image. Values: very small (vs), small (s), normal (n), large (l), very large (vl)

it[0] - icon rotation

Rotation of the icon, in degrees (clockwise)

it[1] - icon flip

Flip the icon: horizontally (h), vertically (v), or both (b)

it[2] - icon scale x

Horizontal scaling factor for the icon (floating-point, default 1.0)

it[3] - icon scale y

Vertical scaling factor for the icon (floating-point, default 1.0). Defaults to scale x if omitted

i2[0] - overlay icon

An icon added to the upper right corner of the original image

i2[1] - overlay icon tint

A color for tinting the overlay icon (color name, #RRGGBB or @HHSSBB)

i2[2] - overlay icon tint

Amount of tinting in percent. Default: 30

r[0] - range

Radius of the range indicator

r[1] - range fill color

Fill color of the range indicator (color name, #RRGGBB or @HHSSBB)

r[2] - range border color

Border color of the range indicator (color name, #RRGGBB or @HHSSBB). Default: black

r[3] - range border width

Border width of the range indicator. Default: 1

q[0] - queue object

Displays the length of the named queue object

t[0] - text

Additional text to display

t[1] - text position

Position of the text. Values: left (l), right (r), top (t). Default: t

t[2] - text color

Color of the displayed text (color name, #RRGGBB or @HHSSBB). Default: blue

tt[0] - tooltip

Tooltip to be displayed over the object

bgb[0] - bg width

Width of the module background rectangle

bgb[1] - bg height

Height of the module background rectangle

bgb[2] - bg fill color

Background fill color (color name, #RRGGBB or @HHSSBB). Default: grey82

bgb[3] - bg border color

Border color of the module background rectangle (color name, #RRGGBB or @HHSSBB). Default: black

bgb[4] - bg border width

Border width of the module background rectangle. Default: 2

bgtt[0] - bg tooltip

Tooltip to be displayed over the module’s background

bgi[0] - bg image

An image to be displayed as a module background

bgi[1] - bg image mode

How to arrange the module’s background image. Values: fix (f), tile (t), stretch (s), center (c). Default: fixed

bgg[0] - grid distance

Distance between two major gridlines, in units

bgg[1] - grid subdivision

Minor gridlines per major gridlines. Default: 1

bgg[2] - grid color

Color of the grid lines (color name, #RRGGBB or @HHSSBB). Default: grey

bgu[0] - distance unit

Name of distance unit. Default: m

m[0] - src routing direction

Routing direction for the source side. For submodule-to-parent connections: a cardinal direction (n, e, s, w) selecting the parent edge, or empty/auto (a) for nearest edge. For submodule-to-submodule connections: h (horizontal, leave via east/west edge) or v (vertical, leave via north/south edge), or empty for unconstrained; e and w are synonyms for h, n and s are synonyms for v. The value manual (m) enables anchor-based routing with m[1]..m[4]

m[1] - dest routing direction

Routing direction for the destination side. For submodule-to-submodule connections: h (horizontal) or v (vertical), or empty for unconstrained; e/w are synonyms for h, n/s are synonyms for v. When m[0] is ’m’ (manual mode), this is the x coordinate of the source anchor, in integer percentages of the source rectangle

m[2] - src anchor y

Manual mode only (m[0]=’m’): y coordinate of the source anchor, in integer percentages of the source rectangle

m[3] - dest anchor x

Manual mode only (m[0]=’m’): x coordinate of the destination anchor, in integer percentages of the destination rectangle

m[4] - dest anchor y

Manual mode only (m[0]=’m’): y coordinate of the destination anchor, in integer percentages of the destination rectangle

ls[0] - line color

Connection color (color name, #RRGGBB or @HHSSBB). Default: black

ls[1] - line width

Connection line width. Default: 1

ls[2] - line style

Connection line style. Values: solid (s), dotted (d), dashed (da). Default: solid

Message Display String Tags

To customize the appearance of messages in the graphical runtime environment, override the getDisplayString() method of cMessage or cPacket to return a display string.

Tag

Meaning

b=width,height,oval

Ellipse with the given height and width.

Defaults: width=10, height=10

b=width,height,rect

Rectangle with the given height and width.

Defaults: width=10, height=10

o=fillcolor,outlinecolor,borderwidth

Specifies options for the rectangle or oval. Colors can be given in HTML format (#rrggbb), in HSB format (@hhssbb), or as a valid SVG color name.

Defaults: fillcolor=red, outlinecolor=black, borderwidth=1

i=iconname,color,percentage

Use the named icon. It can be colorized, and the percentage specifies the amount of colorization. If the color name is "kind", a message kind dependent color is used (like default behavior).

Defaults: iconname: no default – if no icon name is present, a small red solid circle will be used; color: no coloring; percentage: 30%

tt=tooltip-text

Displays the given text in a tooltip when the user moves the mouse over the message icon.