50.1.1 Initialization Events

The first section of a trace file must contain initialization information. All initialization events will have the flag -t *. This tells nam that this event needs to be parsed before any animation has started.

Version
The following line define the nam version as required to visualize the given trace:
V -t <time> -v <version> -a <attr>
Normally there is only one version string in a given tracefile, and it is usually the first line of the file. An example is the following:
V -t * -v 1.0a5 -a 0

The flag -v 1.0a5 tells nam that this script requires a version of nam > 1.0a5. For more information on this event look at the file tcl/stats.tcl under the procedure nam_analysis.

Wireless
If you want to use wireless nodes in nam you need the wireless intialization event.
W -t * -x 600 -y 600

This gives nam the size of the layout for the wireless world. The -x value is the width and -y is height. For more information look at the file animator.tcl in the procedure infer-network-model.

Hierarchy
Hierarchical address information is defined by:

A -t time -n levels -o address-space size -c mcastshift -a mcastmask -h nth level -m mask in nth level -s shift in nth level

This trace gives the details of hierarchy, if hierarchical addressing is being used for simulation. Flag -n <levels> indicate the total number of hierarchical tiers, which is 1 for flat addressing, 2 for a 2-level hierarchy etc. Flag -o <address-space size> denotes the total number of bits used for addressing. Flag -h <nth level> specifies the level of the address hierarchy. Flag -m <mask> and -s <shift> describes the address mask and the bit shift of a given level in the address hierarchy, respectively. Here is an example of a trace for topology with 3 level hierachy:

A -t * -n 3 -p 0 -o 0xffffffff -c 31 -a 1
A -t * -h 1 -m 1023 -s 22
A -t * -h 2 -m 2047 -s 11
A -t * -h 3 -m 2047 -s 0
Look at tcl/netModel.tcl under the nam_addressing procedure for more information.

Color Table Entry
A table of color entries can be built using:
c -t time -i color id -n color name
Nam allows one to associate color names with integers. This is very useful in coloring packets. The flow id of a packet is used to color the packet using the corresponding color table entry color. Notice the color name should be one of the names listed in color database in X11 (/usr/X11/lib/rgb.txt).

In addition to the above node and link layout events are also included in the initialization section.

Tom Henderson 2014-12-17