Starting up nam will first create the nam console window. You can have multiple animations running under the same nam instance. At the top of all nam windows is a menu bar. For the nam console there are 'File' and 'Help' menus. Under the 'File' there is a 'New' command for creating a ns topology using the nam editor (under construction) , an 'Open' command which allows you to open existing tracefiles, a 'WinList' command that popup a window will the names of all currently opened tracefiles, and a 'Quit' command which exits nam. The 'Help' menu contains a very limited popup help screen and a command to show version and copyright information.
Once a tracefile has been loaded into nam (either by using the 'Open' menu command or by specifying the tracefile on the command line) an animation window will appear. It has a 'Save layout' command which will save the current network layout to a file and a 'Print' command which will print the current network layout.
The 'Views' menu has 4 buttons:
Below the menu bar, there is a control bar containing 6 buttons, a label, and a small scrollbar(scale). They can be clicked in any order. We will explain them from left to right.
Time label - Show the current animation time (i.e., simulation time as in the trace file). Rate Slider - Controls the screen update rate (animation granularity). The current rate is displayed in the label above the slider.
Below the first control bar, there is Main Display, which contains a tool bar and a main view pane with two panning scroll bars. All new views created by menu command 'Views/New view' will have these three components. The tool bar contains two zoom buttons. The button with an up arrow zooms in, the button with a down arrrow zooms out. The two scroll bars are used to pan the main animation view.
Clicking the left button on any of the objects in the main view pane will pop up a information window. For packet and agent objects, there is a 'monitor' button in the popup window. Clicking that button will bring out the monitor pane (if it is not already there), and add a monitor to the object. For link objects, there will be a 'Graph' button. Clicking on that button will bring up another popup window, where users can select between drawing a bandwidth utilization graph or drawing a link loss graph of one simplex edge of the duplex link.
Below the user interface objects we have discussed so far, there may or may not be a Monitor pane, depending on whether the checkbox 'Views/Show monitors' is set. (The default is unset). All monitors will be shown in this pane. A monitor looks like a big button in the pane. Currently only packets and agents may have monitors.
A packet monitor shows the size, id, and sent time. When the packet reaches its destination, the monitor will still be there, but will say that the packet is invisible. An agent monitor shows the name of the agent, and if there are any variable traces associated with this agent, they will be shown there as well.
Below the monitor pane (or in its place if the monitor pane isn't there), there is a Time Slider. It looks likea scaled ruler, with a tag 'TIME' which can be dragged along the ruler. It is used to set the current animation time. As you drag the 'TIME' tag, current animation time will be displayed in the time label in the control bar above. The left edge of the slider represents the earliest event time in the trace file and the right edge represents the last event time. Clicking left button on the ruler (not on the tag) has the same effect as Rewind or Fast Forward, depending on the clicking position.
The Automatic Layout Pane may be visible or hidden. If visible, it is below the time slider. It has three inputboxes and one relayout button. The labeled input boxes let user adjust two automatic layout constants, and the number of iterations during next layout. When user press ENTER in any of the input boxes, or click the'relayout' button, that number of iterations will be performed. Refer to the AUTOMATIC LAYOUT section for details of usage.
The bottom component of the nam window is a Annotation Listbox, where annotations are displayed. Anannotation is a (time, string) pair, which describes a event occuring at that time. Refer to ns(1) for functions to generate annotations. Double-clicking on an annotation in the listbox will bring nam to the time when that annotation is recorded. When the pointer is within the listbox, clicking the right button will stop the animation and bring up a popup menu with 3 options: Add, Delete, Info. 'Add' will bring up a dialog box with a text input to add a new annotation entry which has the current animation time. The user can type an annotation string in the dialog box. `Delete' will delete the annotation entry pointed by the pointer. `Info' will bring out a pane which shows both the annotation time and the annotation string.
Tom Henderson 2011-11-05