NetAnim2

From Nsnam
Revision as of 19:40, 1 April 2009 by Rajb245 (Talk | contribs)

Jump to: navigation, search

A simple animator is presented here, called NetAnim. Written by George Riley, and based on the multi-platform QT4 GUI toolkit, it is capable of animating simulations with PointToPoint links in ns-3. It depicts frames on the links as they travel from node to node. It uses a custom trace output format for animation, so there is some additional code which has to be included in ns-3 to enable these traces.

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" in the download filename.

Downloading NetAnim

The tarball of the source code is available here. Download it, then untar it:

tar -xzvf NetAnim.tar.gz

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.

cd NetAnim
qmake
make

This should hopefully build the animator. Note that on your system, qmake might default to the qt3 version if you have both qt3 and qt4 installed. Check this:

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. For some Ubuntu / Debian systems, the following will work:

cd NetAnim
qmake-qt4
make