[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

32.2 NetAnim

NetAnim is a stand-alone program which uses the custom trace files generated by the animation interface to graphically display the simulation. NetAnim is based on the multi-platform Qt4 GUI toolkit. A screenshot of the NetAnim GUI is shown below.

figures/animation-dumbbell

Figure 32.1: NetAnim GUI with dumbbell animation.

The NetAnim GUI provides play, pause, and record buttons. Play and pause start and stop the simulation. The record button starts a series of screenshots of the animator, which are written to the directory in which the trace file was run. Two slider bars also exist. The top slider provides a "seek" functionality, which allows a user to skip to any moment in the simulation. The bottom slider changes the granularity of the time step for the animation. Finally, there is a quit button to stop the simulation and quit the animator.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

32.2.1 Prerequisites

The animator requires the Qt4 development packages. If you are using a Debian or Ubuntu Linux distribution, you can get the following package: qt4-dev-tools

This should install everything you need to compile and build NetAnim. If you are using an Red Hat based distribution, look for similar qt4 packages (or libqt4*) and install these using yum. Mac users should install the binaries: http://www.qtsoftware.com/downloads/mac-os-cpp

Make sure to download the binary package; look for a link to something without the word "src" or "debug" in the download filename. These will be the library binaries you need.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

32.2.2 Downloading NetAnim

The tarball of the source code for NetAnim is available here: http://www.nsnam.org/~jpelkey3/NetAnim.tar.gz. Download it, then untar it:

tar -xzvf NetAnim.tar.gz

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

32.2.3 Building NetAnim

NetAnim uses a Qt4 build tool called qmake; this is similar to the configure script from autotools in that it generates the Makefile, which make then uses to build the project. qmake is different on different versions of Qt, so we’ll provide some additional information that is system dependent. You can check your default version of qmake:

qmake --version
Qmake version: 1.07a (Qt 3.3.8b)
Qmake is free software from Trolltech ASA.

If you see something like the above, where it says Qt 3.x.x, find the qt4 version of qmake on your system and explicitly call it instead.

In general,

cd NetAnim
qmake
make

On Mac OSX,

cd NetAnim
/usr/local/Trolltech/Qt-4.x.y/bin/qmake
make

Note that above, the x.y is the specific version of Qt4 you are running. As of April 1st 2009, the latest version is 4.5.0, although you might have an older version already installed.

On Ubuntu/Debian with Qt3 AND Qt4,

cd NetAnim
qmake-qt4
make

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by root on May 3, 2010 using texi2html 1.82.