run .xml by netAnim?

2,531 views
Skip to first unread message

domenico foglia

unread,
Jun 30, 2012, 8:39:00 AM6/30/12
to ns-3-...@googlegroups.com
HI,
I have a file. Xml and I want to run it through netanim. I installed netAnim, through the procedure http://www.nsnam.org/wiki/index.php/NetAnim , but do not know how to run!
anyone can help me?
thanks!!

John Abraham

unread,
Jun 30, 2012, 9:30:09 AM6/30/12
to ns-3-...@googlegroups.com
please see the section

Using the XML trace with NetAnim

Run NetAnim and click the file-open button on the top-left hand corner and select the XML trace file that was discussed in the previous sections

  • Here is a youtube video demonstrating how to load the XML file click here
  • Here is a youtube video demonstrating Animation for Wired transmission click here
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/qsu6KG2SHNAJ.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.
Message has been deleted

domenico foglia

unread,
Jun 30, 2012, 9:59:12 AM6/30/12
to ns-3-...@googlegroups.com


the problem is how to run netAnim?
thanks!

John Abraham

unread,
Jun 30, 2012, 10:01:11 AM6/30/12
to ns-3-...@googlegroups.com
if you built it, after the "make" command , type "./NetAnim"


On Saturday, June 30, 2012, domenico foglia wrote:


the problem is how to run netAnim?
thanks!

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/pCglbR1c3JYJ.

domenico foglia

unread,
Jun 30, 2012, 10:16:53 AM6/30/12
to ns-3-...@googlegroups.com


If I launch make clean , I have in out

rm -f moc_animatorscene.o moc_animatormode.o
rm -f animator/moc_animatorscene.cpp animator/moc_animatormode.cpp
rm -f mobilitymanager.o animxmlparser.o animpacket.o animnode.o animatorview.o animatorscene.o xdebug.o main.o animatormode.o netanim.o packetstatisticsdialog.o nodepositionstatisticsdialog.o nodetrajectorydialog.o
rm -f *~ core *.core

then I write    "qmake NetAnim.pro"   and then    "make"
show:
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I. -o mobilitymanager.o animator/mobilitymanager.cpp
In file included from animator/mobilitymanager.cpp:20:0:
animator/mobilitymanager.h:27:18: fatal error: QPoint: File o directory not exist
compilation terminated.
make: *** [mobilitymanager.o] Error 1


John Abraham

unread,
Jun 30, 2012, 10:19:01 AM6/30/12
to ns-3-...@googlegroups.com
did you check the prerequisites

Prerequisites

  1. mercurial
  2. QT4 development packages (recommended version 4.7)

Debian/Ubuntu Linux distribution:

  1. apt-get install mercurial
  2. apt-get install qt4-dev-tools

Red Hat/Fedora based distribution:

  1. yum install mercurial
  2. yum install qt4
  3. yum install qt4-devel

Mac/OSX

  1. mercurial
  2. Qt4 : Install Qt4 (including Qt Creator if possible) from http://qt.nokia.com/downloads/
On Saturday, June 30, 2012, domenico foglia wrote:
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/kgvVpSnX-v0J.

domenico foglia

unread,
Jun 30, 2012, 10:31:33 AM6/30/12
to ns-3-...@googlegroups.com


...I have mercurial and qt4-dev-tools......
how can I do?

John Abraham

unread,
Jun 30, 2012, 10:35:04 AM6/30/12
to ns-3-...@googlegroups.com
looks a problem with your qt 4 installation.what is your operating system and version?


On Saturday, June 30, 2012, domenico foglia wrote:


...I have mercurial and qt4-dev-tools......
how can I do?

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/890UgaCu0G8J.

domenico foglia

unread,
Jun 30, 2012, 10:40:11 AM6/30/12
to ns-3-...@googlegroups.com
I have ubuntu 12.04 


John Abraham

unread,
Jun 30, 2012, 10:45:08 AM6/30/12
to ns-3-...@googlegroups.com
let me see if i can repriduce it, in the meantime you can try

Code:
apt-get install libqt4-core libqt4-dev libqt4-gui 
qt4-dev-tools
On Saturday, June 30, 2012, domenico foglia wrote:
I have ubuntu 12.04 



--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/Ey64GNnutIIJ.

domenico foglia

unread,
Jun 30, 2012, 10:58:08 AM6/30/12
to ns-3-...@googlegroups.com
where I write it?.....in ns3-allinone ? o ns-3-dev ?

John Abraham

unread,
Jun 30, 2012, 11:00:27 AM6/30/12
to ns-3-...@googlegroups.com
in the same place where you did apt-get install qt4-dev-tools


On Saturday, June 30, 2012, domenico foglia wrote:
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/FOz701g7m1kJ.

domenico foglia

unread,
Jun 30, 2012, 11:01:27 AM6/30/12
to ns-3-...@googlegroups.com
I would like to see the hops that are traversed, I see the source node and destination node but not the nodes hops, it's OK to something like traceroute or is there a command I can add to my code?
  this is my code:
in the end of code there is // Plot the statistics for each data flow
and  std::cout << "\nFlow " << k << " (" << t.sourceAddress << " -> "<< t.destinationAddress << ")\n";
I should add that to see "hops"?

#include "ns3/core-module.h"
#include "ns3/simulator.h"
#include "ns3/node.h"
#include "ns3/internet-stack-helper.h"
#include "ns3/wifi-module.h"
#include "ns3/mesh-module.h"
#include "ns3/mobility-helper.h"
#include "ns3/mesh-helper.h"
#include "ns3/mesh-module.h"
#include "ns3/wifi-phy.h"
#include "ns3/application-container.h"
#include "ns3/inet-socket-address.h"
#include "ns3/packet-sink-helper.h"
#include "ns3/flow-monitor.h"
#include "ns3/flow-monitor-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/ipv4-interface-container.h"
#include "ns3/ipv4-flow-classifier.h"
#include "ns3/random-variable.h"
#include "ns3/on-off-helper.h"
#include "ns3/boolean.h"
#include "ns3/csma-module.h"
#include "ns3/netanim-module.h"
#include <iostream>
#include <sstream>
#include <fstream>
#include <vector>
using namespace ns3;
class MeshTest
{
public:
// Init test
MeshTest ();
// Configure test from command line arguments
void Configure (int argc, char ** argv);
// Run test
int Run ();
private:
int m_nnodes; // number of nodes
int m_nconn; // number of connections
double m_step;
double m_randomStart;
double m_totalTime;
uint16_t m_packetSize;
uint32_t m_nIfaces;
bool m_chan;
bool m_pcap;
std::string m_stack;
std::string m_txrate;
//to calculate the lenght of the simulation
float m_timeTotal, m_timeStart, m_timeEnd;
// List of network nodes
NodeContainer nodes;
// List of all mesh point devices
NetDeviceContainer meshDevices;
//Addresses of interfaces:
Ipv4InterfaceContainer interfaces;
// MeshHelper. Report is not static methods
MeshHelper mesh;
private:
// Create nodes and setup their mobility
void CreateNodes ();
// Install internet m_stack on nodes
void InstallInternetStack ();
// Install applications randomly
void InstallApplicationRandom ();
// Print mesh devices diagnostics
void Report ();
};
MeshTest::MeshTest () :
m_nnodes (30),
m_nconn (30),
m_step (530),
m_randomStart (0.5),
m_totalTime (240),
m_packetSize (1024),
m_nIfaces (1),
m_chan (false),
m_pcap (false),
m_stack ("ns3::Dot11sStack"),
m_txrate ("275kbps")
{
}
void
MeshTest::Configure (int argc, char *argv[])
{
CommandLine cmd;
cmd.AddValue ("m_step", "Separation", m_step);
cmd.AddValue ("m_nconn", "Number of connections", m_nconn);
cmd.Parse (argc, argv);
}
void MeshTest::CreateNodes ()
{
double m_txpower = 18.0; // dbm
// Calculate nnodes stations random topology
nodes.Create (m_nnodes);
// Setup mobility - static rectangle topology
MobilityHelper mobility;
mobility.SetPositionAllocator ("ns3::RandomRectanglePositionAllocator", "X", RandomVariableValue (UniformVariable (0, m_step)),
"Y", RandomVariableValue (UniformVariable (0, m_step/2)));
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (nodes);
// Configure YansWifiChannel
YansWifiPhyHelper WifiPhy = YansWifiPhyHelper::Default ();
WifiPhy.Set("EnergyDetectionThreshold", DoubleValue (-89.0) );
WifiPhy.Set("CcaMode1Threshold", DoubleValue (-62.0) );
WifiPhy.Set("TxGain", DoubleValue (1.0) );
WifiPhy.Set("RxGain", DoubleValue (1.0) );
WifiPhy.Set("TxPowerLevels", UintegerValue (1) );
WifiPhy.Set("TxPowerEnd", DoubleValue (m_txpower) );
WifiPhy.Set("TxPowerStart", DoubleValue (m_txpower) );
WifiPhy.Set("RxNoiseFigure", DoubleValue (7.0) );
YansWifiChannelHelper WifiChannel;
WifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
WifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel","Exponent", StringValue ("2.7"));
WifiPhy.SetChannel (WifiChannel.Create ());
// Configure the parameters of the Peer Link
Config::SetDefault ("ns3::dot11s::PeerLink::MaxBeaconLoss", UintegerValue (20));
Config::SetDefault ("ns3::dot11s::PeerLink::MaxRetries", UintegerValue (4));
Config::SetDefault ("ns3::dot11s::PeerLink::MaxPacketFailure", UintegerValue (5));
// Configure the parameters of the Peer Management Protocol
//Config::SetDefault ("ns3::dot11s::PeerManagementProtocol::EnableBeaconCollision-Avoidance", BooleanValue (false));
// Configure the parameters of the HWMP
Config::SetDefault ("ns3::dot11s::HwmpProtocol::Dot11MeshHWMPactivePathTimeout", TimeValue (Seconds (100)));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::Dot11MeshHWMPactiveRootTimeout", TimeValue (Seconds (100)));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::Dot11MeshHWMPmaxPREQretries", UintegerValue (5));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::UnicastPreqThreshold", UintegerValue (10));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::UnicastDataThreshold", UintegerValue (5));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::DoFlag", BooleanValue (false));
Config::SetDefault ("ns3::dot11s::HwmpProtocol::RfFlag", BooleanValue (true));
// Create mesh helper and set stack installer to it
// Stack installer creates all needed protocols and install them to device
mesh = MeshHelper::Default ();
mesh.SetStandard (WIFI_PHY_STANDARD_80211a);
mesh.SetMacType ("RandomStart", TimeValue (Seconds(m_randomStart)));
mesh.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", StringValue ("OfdmRate6Mbps"), "RtsCtsThreshold", UintegerValue (2500));
// Set number of interfaces - default is single-interface mesh point
mesh.SetNumberOfInterfaces (m_nIfaces);
mesh.SetStackInstaller (m_stack);
//If multiple channels is activated
if (m_chan)
{
mesh.SetSpreadInterfaceChannels (MeshHelper::SPREAD_CHANNELS);
}
else
{
mesh.SetSpreadInterfaceChannels (MeshHelper::ZERO_CHANNEL);
}
// Install protocols and return container if MeshPointDevices
meshDevices = mesh.Install (WifiPhy, nodes);
if (m_pcap){
    WifiPhy.EnablePcapAll (std::string ("mp-"));
AnimationInterface anim("hwmp-test-anim.xml");
}
}
void MeshTest::InstallInternetStack ()
{
//Install the internet protocol stack on all nodes
InternetStackHelper internetStack;
internetStack.Install (nodes);
//Assign IP addresses to the devices interfaces (m_nIfaces)
Ipv4AddressHelper address;
address.SetBase ("192.168.1.0", "255.255.255.0");
interfaces = address.Assign (meshDevices);
}
void MeshTest::InstallApplicationRandom ()
{
int i=0;
int m_source, m_dest, m_dest_port;
char num [2];
char onoff [7];
char sink [6];
double start_time, stop_time, duration;
// Set the parameters of the onoff application
Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (m_packetSize));
Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue (m_txrate));
ApplicationContainer apps [m_nconn];
UniformVariable rand_nodes (0,m_nnodes-1);
UniformVariable rand_port (49000,49100);
// 50 seconds for transitori are left at the beginning.
UniformVariable a(50,m_totalTime-15);
for (i = 0; i < m_nconn; i++){
start_time = a.GetValue();
ExponentialVariable b(25);
duration = b.GetValue()+1;
//If the exponential variable gives us a value that added to the start time
//is greater than the maximum permitted, this is changed for the maximum
//10 seconds are left at the end to calculate well the statistics of each flow
if ( (start_time + duration) > (m_totalTime - 10)){
stop_time = m_totalTime-10;
}else{
stop_time = start_time + duration;
}
//create different names for the connections
//(we can not use vectors for OnOffHelper)
strcpy(onoff,"onoff");
strcpy(sink,"sink");
sprintf(num,"%d",i);
strcat(onoff,num);
strcat(sink,num);
//set random variables of the destination (server) and destination port.
m_dest = rand_nodes.GetInteger (0,m_nnodes-1);
m_dest_port = rand_port.GetInteger (49000,49100);
// Set random variables of the source (client).
// Client and server can not be the same node.
m_source = rand_nodes.GetInteger (0,m_nnodes-1);
while (m_source == m_dest){
m_source = rand_nodes.GetInteger (0,m_nnodes-1);
}
// Plot the connection values
std::cout << "\n\t Node "<< m_source << " to " << m_dest;
std::cout << "\n Start_time: " << start_time << "s";
std::cout << "\n Stop_time: " << stop_time << "s";
std::cout << "\n Duration: " << stop_time-start_time << "s\n";
// Define UDP traffic for the onoff application
OnOffHelper onoff ("ns3::UdpSocketFactory", Address (InetSocketAddress (interfaces.GetAddress (m_dest), m_dest_port)));
onoff.SetAttribute ("OnTime", RandomVariableValue (ConstantVariable (1)));
onoff.SetAttribute ("OffTime", RandomVariableValue (ConstantVariable (0)));
apps[i] = onoff.Install (nodes.Get(m_source));
apps[i].Start (Seconds (start_time));
apps[i].Stop (Seconds (stop_time));
// Create a packet sink to receive these packets
PacketSinkHelper sink ("ns3::UdpSocketFactory",InetSocketAddress (interfaces.GetAddress (m_dest), 49001));
apps[i] = sink.Install (nodes.Get (m_dest));
apps[i].Start (Seconds (1.0));
}
}
int MeshTest::Run ()
{
CreateNodes ();
InstallInternetStack ();
InstallApplicationRandom ();
// Install FlowMonitor on all nodes
FlowMonitorHelper flowmon;
Ptr<FlowMonitor> monitor = flowmon.InstallAll();
m_timeStart=clock();
Simulator::Schedule (Seconds(m_totalTime), & MeshTest::Report, this);
Simulator::Stop (Seconds (m_totalTime));
Simulator::Run ();
// Define variables to calculate the metrics
int k=0;
int totaltxPackets = 0;
int totalrxPackets = 0;
double totaltxbytes = 0;
double totalrxbytes = 0;
double totaldelay = 0;
double totalrxbitrate = 0;
double totalpacketloss =0;
double difftx, diffrx;
double pdf_value, rxbitrate_value, txbitrate_value, delay_value;
double pdf_total, rxbitrate_total, delay_total;
//Print per flow statistics
monitor->CheckForLostPackets ();
Ptr<Ipv4FlowClassifier> classifier = DynamicCast<Ipv4FlowClassifier>(flowmon.GetClassifier ());
std::map<FlowId, FlowMonitor::FlowStats> stats = monitor->GetFlowStats ();
for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator i = stats.begin (); i != stats.end (); ++i)
{
Ipv4FlowClassifier::FiveTuple t = classifier->FindFlow (i->first);
difftx = i->second.timeLastTxPacket.GetSeconds() - i->second.timeFirstTxPacket.GetSeconds();
diffrx = i->second.timeLastRxPacket.GetSeconds() - i->second.timeFirstRxPacket.GetSeconds();
pdf_value = (double) i->second.lostPackets / (double) i->second.txPackets * 100;
txbitrate_value = (double) i->second.txBytes * 8 / 1024 / difftx;
if (i->second.rxPackets != 0){
rxbitrate_value = (double)i->second.rxBytes / diffrx*8/m_packetSize;
delay_value = (double) i->second.delaySum.GetSeconds() / (double) i->second.rxPackets;
}
else{
rxbitrate_value = 0;
delay_value = 0;
}
// We are only interested in the metrics of the data flows
if ((!t.destinationAddress.IsSubnetDirectedBroadcast("255.255.255.0")))
{
k++;
// Plot the statistics for each data flow
std::cout << "\nFlow " << k << " (" << t.sourceAddress << " -> "<< t.destinationAddress << ")\n";
//std::cout << "Tx Packets: " << i->second.txPackets << "\n";
//std::cout << "Rx Packets: " << i->second.rxPackets << "\n";
//std::cout << "Lost Packets: " << i->second.lostPackets << "\n";
//std::cout << "Dropped Packets: " << i->second.packetsDropped.size() << "\n";
std::cout << "Packetloss for flow: " << pdf_value << " %\n";
std::cout << "Average delay x flow: " << delay_value << "s\n";
std::cout << "Throughput x flow: " << rxbitrate_value << " kbps\n";
std::cout << "Tx bitrate x flow: " << txbitrate_value << " kbps\n\n";
// Acumulate for average statistics
totaltxPackets += i->second.txPackets;
totalpacketloss += i->second.lostPackets;
totaltxbytes += i->second.txBytes;
totalrxPackets += i->second.rxPackets;
totaldelay += i->second.delaySum.GetSeconds();
totalrxbitrate += rxbitrate_value;
totalrxbytes += i->second.rxBytes;
    }
 
}
  // Average all nodes statistics
if (totaltxPackets != 0){
pdf_total = (double) totalpacketloss / (double) totaltxPackets * 100;
}
else{
pdf_total = 0;
}
if (totalrxPackets != 0){
rxbitrate_total = totalrxbitrate;
delay_total = (double) totaldelay / (double) totalrxPackets;
}
else{
rxbitrate_total = 0;
delay_total = 0;
}
//print all nodes statistics
std::cout << "\nTotal Packetloss: " << pdf_total << " %\n";
std::cout << "Total throughput: " << rxbitrate_total << " kbps\n";
std::cout << "Total Delay: " << delay_total << " s\n";
Simulator::Destroy ();
m_timeEnd=clock();
m_timeTotal=(m_timeEnd - m_timeStart)/(double) CLOCKS_PER_SEC;
std::cout << "\n*** Simulation time: " << m_timeTotal << "s\n\n";
return 0;
}
void MeshTest::Report ()
{
// Using this function we print detailed statistics of each mesh point device
// These statistics are used later with an AWK files to extract routing metrics
unsigned n (0);
for (NetDeviceContainer::Iterator i = meshDevices.Begin ();
i != meshDevices.End (); ++i, ++n)
{
std::ostringstream os;
os << "mp-report.xml";
std::cerr << "Printing mesh point device #" << n << " diagnostics to " << os.str () << "\n";
std::ofstream of;
of.open (os.str().c_str(), ios::out | ios::app);
if (! of.is_open ())
{
std::cerr << "Error: Can’t open file " << os.str() << "\n";
return;
}
mesh.Report (*i, of);
of.close ();
 }
}
int main (int argc, char *argv[])
{
MeshTest t;
t.Configure (argc, argv);
return t.Run();
}

John Abraham

unread,
Jun 30, 2012, 11:03:11 AM6/30/12
to ns-3-...@googlegroups.com
this is a separate question, you need to create a new thread


On Saturday, June 30, 2012, domenico foglia wrote:
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/Y2S8t_OrK-gJ.

domenico foglia

unread,
Jun 30, 2012, 11:07:54 AM6/30/12
to ns-3-...@googlegroups.com


is simpler than using netAnim?
that thread should I write?

John Abraham

unread,
Jun 30, 2012, 11:10:53 AM6/30/12
to ns-3-...@googlegroups.com
 i meant to say if you create a new email post with a new subject line about hops and traceroute you might get an answer from someone who did it. this email thread/post is dealing with NetAnim issues


On Saturday, June 30, 2012, domenico foglia wrote:


is simpler than using netAnim?
that thread should I write?

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/pE4Qe_e0VmcJ.

domenico foglia

unread,
Jun 30, 2012, 11:14:30 AM6/30/12
to ns-3-...@googlegroups.com
if you help me to use netanim are happier .....
the thread to ask how to use traceroute I have already entered ... but nobody answered


John Abraham

unread,
Jun 30, 2012, 11:20:42 AM6/30/12
to ns-3-...@googlegroups.com
im downloading ubuntu 12 to try to see the problem you reported


On Saturday, June 30, 2012, domenico foglia wrote:
if you help me to use netanim are happier .....
the thread to ask how to use traceroute I have already entered ... but nobody answered


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/fRJQndbn-6oJ.

domenico foglia

unread,
Jun 30, 2012, 11:23:20 AM6/30/12
to ns-3-...@googlegroups.com
now says that I have permissions as an administrator to run the command:


E: Could not open lock file / var / lib / dpkg / lock - open (13: Permission denied)
E: Could not acquire the lock the administration directory (/ var / lib / dpkg /). You must be root.

why?.....

John Abraham

unread,
Jun 30, 2012, 11:25:08 AM6/30/12
to ns-3-...@googlegroups.com
these are linux questions but,  try "sudo apt-get install ..."


On Saturday, June 30, 2012, domenico foglia wrote:
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/j1STU3dsdXcJ.

domenico foglia

unread,
Jun 30, 2012, 11:50:47 AM6/30/12
to ns-3-...@googlegroups.com

...did you download "ubuntu"? 
have you same my problems?

John Abraham

unread,
Jun 30, 2012, 12:07:32 PM6/30/12
to ns-3-...@googlegroups.com
I tried a completely brand new installation of ubuntu 12 (64 bit)
These are the sequence of steps

    2  sudo apt-get install mercurial build-essential
    3  sudo apt-get install qt4-dev-tools
    4  hg clone http://code.nsnam.org/netanim
    5  cd netanim/
    6  qmake NetAnim.pro
    7  make
    8  ./NetAnim

If it still complains about QPoint etc, then it can only answered in a linux or Qt forum.

-john



On Sat, Jun 30, 2012 at 8:50 AM, domenico foglia <dfog...@gmail.com> wrote:

...did you download "ubuntu"? 
have you same my problems?

--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/WC3J8-XdvowJ.

domenico foglia

unread,
Jun 30, 2012, 12:34:37 PM6/30/12
to ns-3-...@googlegroups.com
wow!!!
now works good!!!
thanks! You're very kind !!!
now, opening the file. xml, I see the grid of nodes, however, I do not see the connections between them!
why?....

John Abraham

unread,
Jun 30, 2012, 1:40:39 PM6/30/12
to ns-3-...@googlegroups.com
as mentioned in the wiki
"
They must be applied just before the "Simulation::Run" statement. "

use "AnimationInterface anim ("....") just before the Simulation::Run statement.
AnimationInterface anim ("hwmp.xml");
Simulator::Run ();

But even if you do that, AnimationInterface will only capture Wifi Beacons, because I don't believe the complete implementation for trace hooks for mesh module is available.
To find the hops you might have to enable ascii tracing to see where your Ip packet is moving. or even enable pcaps and use wireshark to see if the desired packets are reaching each node.



--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/91m8-1aNQ3wJ.

domenico foglia

unread,
Jul 1, 2012, 6:50:53 AM7/1/12
to ns-3-...@googlegroups.com

Hi,
if I enter the command before "simulation run", I get so many. xml file for each second of simulation, but I want a file for each flow connection, in that part of the program should enter the command?
thanks and good sunday!

John Abraham

unread,
Jul 1, 2012, 9:07:12 AM7/1/12
to ns-3-...@googlegroups.com
yes ,because there are so many packets exchanged, AnimationInterface creates a new file when the number of packets exceeds a threshold per file, to keep the file size manageable.
as i mentioned earlier, it is better to use ascii or pcap tracing for this scenario, because the mesh module does not implement all required callbacks compatible with AnimationInterface
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/X-pRcZk8LWIJ.

domenico foglia

unread,
Jul 1, 2012, 9:49:51 AM7/1/12
to ns-3-...@googlegroups.com
understood, 
but if I wanted that the results are shown in "terminal" as happens now in my program for the information of "source node" and "destination node", what should I use? I would get a result in style "traceroute" where in the  "terminal" show me the various node crossed and the sum of delay!can I use?
thanks


John Abraham

unread,
Jul 1, 2012, 9:52:17 AM7/1/12
to ns-3-...@googlegroups.com
I don't think there is a traceroute, but you should take some time to understand Ascii tracing and pcap tracing and parse the output from there.


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/bD8cQgTlv2gJ.

domenico foglia

unread,
Jul 1, 2012, 10:02:00 AM7/1/12
to ns-3-...@googlegroups.com
but why I can see only the "source node" and "destination node" for each flow?


Milad Mahdian

unread,
Mar 18, 2013, 6:32:50 PM3/18/13
to ns-3-...@googlegroups.com
hi guys,
i got a similar error instaling netAnim on Ubuntu, after the command make. can someone please help me?

milad@ubuntu:~/repos/ns-3-allinone/ns-3.16/netanim$ make

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I. -o mobilitymanager.o animator/mobilitymanager.cpp
In file included from animator/mobilitymanager.h:23:0,
                 from animator/mobilitymanager.cpp:20:
./main/common.h:22:19: fatal error: QWidget: No such file or directory

compilation terminated.
make: *** [mobilitymanager.o] Error 1

On Saturday, June 30, 2012 5:39:00 AM UTC-7, domenico foglia wrote:
HI,
I have a file. Xml and I want to run it through netanim. I installed netAnim, through the procedure http://www.nsnam.org/wiki/index.php/NetAnim , but do not know how to run!
anyone can help me?
thanks!!

salima

unread,
Mar 18, 2013, 6:43:08 PM3/18/13
to ns-3-...@googlegroups.com
the step for install netanim 
sudo apt-get install qt4-dev-tools
cd $HOME
mkdir netanimtest
cd netanimtest
hg clone http://code.nsnam.org/netanim
cd netanim
qmake NetAnim.pro
make
./NetAnim
Reply all
Reply to author
Forward
0 new messages