question for expert

421 views
Skip to first unread message

mak coza

unread,
Feb 20, 2016, 6:49:30 AM2/20/16
to ns-3-users
dear expert,
i'm trying actually to simulate multi hope comunications between many nodes and one sink using ipv6 , i modify the wsn-ping.cc , but i have a little problem , the program  execute but without resulte , and an error ocured after execution say that its  terminated with signal SIGFPE.and when i try to run with the debuger a message say:
" File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>   from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Best regards.

Tommaso Pecorella

unread,
Feb 20, 2016, 2:22:17 PM2/20/16
to ns-3-users
Ji,

I'm sorry but the info you provide are not enough to even start thinking to the error.
The only useful info is the SIGFPE. This is usually an error arising from a division by zero.
I'd strongly suggest to read the posting guidelines and a basic tutorial about C++ debugging.

T.

mak coza

unread,
Feb 20, 2016, 4:21:14 PM2/20/16
to ns-3-...@googlegroups.com
i'm just trying to make a little WSN whith multihope communication with the node and the sink, i modified the wsn-ping6 , but i have this hard error.
Best Regards.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Vr4-C2gcZNE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Feb 20, 2016, 5:48:03 PM2/20/16
to ns-3-users
Hi,

I wrote a sarcastic message. I deleted it, you could not understand it.
I wrote an harsh message. I deleted it, other could be offended by it.
I tried to ignore your message, but you and others could not understand why I did ignore you.

Hence, I'll explain it. Once. Only once, because it is written in the posting guidelines.

Stating that you did modify something and that it's not working, and not providing info on WHAT you did modify and HOW makes it IMPOSSIBLE to guess the problem.
It's like calling the doctor stating "I did something and now I don't feel fine", and expect that the doctor can help you. You know what the doctor will suggest? To pray.
A bad news: praying doesn't work with coding.

T.

mak coza

unread,
Feb 21, 2016, 7:37:24 AM2/21/16
to ns-3-...@googlegroups.com
sorry sir , here is my code source , and what i do , i hope that an other personne could help me:

#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/sixlowpan-module.h"
#include "ns3/lr-wpan-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/propagation-module.h"
#include "ns3/flow-monitor-module.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/wifi-module.h"

using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("Ping6WsnExample");

int main (int argc, char **argv)
{
 
  std::string phyMode ("DsssRate1Mbps");
  double rss = -80;  // -dBm
  bool verbose = false;
  CommandLine cmd;
  cmd.AddValue ("phyMode", "Wifi Phy mode", phyMode);
  cmd.AddValue ("rss", "received signal strength", rss);
  cmd.AddValue ("verbose", "turn on log components", verbose);
  cmd.Parse (argc, argv);

  if (verbose)
    {
      LogComponentEnable ("Ping6WsnExample", LOG_LEVEL_INFO);
      LogComponentEnable ("Ipv6EndPointDemux", LOG_LEVEL_ALL);
      LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL);
      LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL);
      LogComponentEnable ("Ipv6ListRouting", LOG_LEVEL_ALL);
      LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL);
      LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL);
      LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL);
      LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL);
      LogComponentEnable ("SixLowPanNetDevice", LOG_LEVEL_ALL);
    }

  NS_LOG_INFO ("Create nodes.");
  NodeContainer nodes;

  NodeContainer sink;
  NodeContainer ch;
  sink.Create(1);
  ch.Create (9);
  NodeContainer allNodes = NodeContainer (sink, ch);
  nodes.Create (10); 
  // Set seed for random numbers
  SeedManager::SetSeed (167);














  // Install mobility
  MobilityHelper mobility;
  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
  Ptr<ListPositionAllocator> nodesPositionAlloc = CreateObject<ListPositionAllocator> ();
  nodesPositionAlloc->Add (Vector (0.0, 0.0, 0.0));
  nodesPositionAlloc->Add (Vector (50.0, 0.0, 0.0));
  nodesPositionAlloc->Add (Vector (-50.0, 0.0, 0.0));
  nodesPositionAlloc->Add (Vector (0.0, 50.0, 0.0));
  nodesPositionAlloc->Add (Vector (0.0, -50.0, 0.0));
  nodesPositionAlloc->Add (Vector (0.0, 0.0, 50.0));
  nodesPositionAlloc->Add (Vector (0.0, 0.0, -50.0));
  nodesPositionAlloc->Add (Vector (-50.0, -50.0, 50.0));
  nodesPositionAlloc->Add (Vector (50.0, 0.0, 50.0));
  nodesPositionAlloc->Add (Vector (50.0, 50.0, -50.0));
  mobility.SetPositionAllocator (nodesPositionAlloc);
  mobility.Install (nodes);

  NS_LOG_INFO ("Create channels.");
  LrWpanHelper lrWpanHelper;
  // Add and install the LrWpanNetDevice for each node
  // lrWpanHelper.EnableLogComponents();
  NetDeviceContainer devContainer = lrWpanHelper.Install(nodes);
  lrWpanHelper.AssociateToPan (devContainer, 10);

  std::cout << "Created " << devContainer.GetN() << " devices" << std::endl;
  std::cout << "There are " << nodes.GetN() << " nodes" << std::endl;

  /* Install IPv4/IPv6 stack */
  NS_LOG_INFO ("Install Internet stack.");
  InternetStackHelper internetv6;
  internetv6.SetIpv4StackInstall (false);
  internetv6.Install (nodes);

  // Install 6LowPan layer
  NS_LOG_INFO ("Install 6LoWPAN.");
  SixLowPanHelper sixlowpan;
  NetDeviceContainer six1 = sixlowpan.Install (devContainer);

  NS_LOG_INFO ("Assign addresses.");
  Ipv6AddressHelper ipv6;
  ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
  Ipv6InterfaceContainer i = ipv6.Assign (six1);

  NS_LOG_INFO ("Create Applications.");

  /* Create a Ping6 application to send ICMPv6 echo request from node zero to
   * all-nodes (ff02::1).
   */
  uint32_t packetSize = 10;
  uint32_t maxPacketCount = 5;
  Time interPacketInterval = Seconds (1.);
  Ping6Helper ping6;

  ping6.SetLocal (i.GetAddress (0, 1));
  ping6.SetRemote (i.GetAddress (1, 1));
  // ping6.SetRemote (Ipv6Address::GetAllNodesMulticast ());

  ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
  ping6.SetAttribute ("Interval", TimeValue (interPacketInterval));
  ping6.SetAttribute ("PacketSize", UintegerValue (packetSize));

  Inet6SocketAddress local = Inet6SocketAddress (Ipv6Address::GetAny (), 50000); 
  PacketSinkHelper sinkHelper ("ns3::UdpSocketFactory", local);
  ApplicationContainer apps = ping6.Install (sink);
  apps.Start (Seconds (1.0));
  apps.Stop (Seconds (100.0));

  AsciiTraceHelper ascii;
  lrWpanHelper.EnableAsciiAll (ascii.CreateFileStream ("ping6wsn.tr"));
  lrWpanHelper.EnablePcapAll (std::string ("ping6wsn"), true);



  ApplicationContainer clientApps;
  // Create the OnOff applications to send UDP to the server
  OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());
  clientHelper.SetAttribute ("OnTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]"));
  clientHelper.SetAttribute("OffTime", StringValue ("ns3::UniformRandomVariable[Min=0.,Max=1.]"));

//normally wouldn't need a loop here but the server IP address is different
  //on each p2p subnet

  for(uint32_t j=0; j<ch.GetN (); ++j)
    {
      AddressValue remoteAddress (Inet6SocketAddress (i.GetAddress (0,1), 50000));
      //Inet6SocketAddress remoteAddress = Inet6SocketAddress (i.GetAddress (0,1), 50000);
      clientHelper.SetAttribute ("Remote", remoteAddress);
   
      clientApps.Add (clientHelper.Install (ch.Get (j)));
    }

  clientApps.Start (Seconds (1.0));
  clientApps.Stop (Seconds (100.0));



  // Install FlowMonitor on all nodes
  FlowMonitorHelper flowmon;
  Ptr<FlowMonitor> monitor = flowmon.InstallAll ();

  // Run simulation for 10 seconds
  Simulator::Stop (Seconds (120));



  // Print per flow statistics
  monitor->CheckForLostPackets ();

  Ptr<Ipv6FlowClassifier> classifier = DynamicCast<Ipv6FlowClassifier> (flowmon.GetClassifier ());
  std::map<FlowId, FlowMonitor::FlowStats> stats = monitor->GetFlowStats ();
 

        uint32_t txPacketsum = 0;
        uint32_t rxPacketsum = 0;
        uint32_t rxBytesum = 0;
        uint32_t DropPacketsum = 0;
        uint32_t LostPacketsum = 0;
        double Delaysum = 0;

    
for (std::map<FlowId, FlowMonitor::FlowStats>::const_iterator v = stats.begin (); v != stats.end (); ++v)
    {

          Ipv6FlowClassifier::FiveTuple t = classifier->FindFlow (v->first);
          std::cout << "Flow " << v->first << " (" << t.sourceAddress << " -> " << t.destinationAddress << ")\n";

                txPacketsum += v->second.txPackets;
                rxPacketsum += v->second.rxPackets;
                rxBytesum += v->second.rxBytes;
                LostPacketsum += v->second.lostPackets;
                DropPacketsum += v->second.packetsDropped.size();
                Delaysum += v->second.delaySum.GetSeconds();

          std::cout << "  Tx :   " << v->second.txPackets << "(" << v->second.txBytes<< ")" << "\n";
          std::cout << "  Rx :   " << v->second.rxPackets << "(" << v->second.rxBytes<< ")" << "\n";
          std::cout << "------------------------------------------------------------------" << "\n";
          std::cout << "  Lost Packets:   " << v->second.lostPackets << "\n";
          std::cout << "  Drop Packets:   " << v->second.packetsDropped.size() << "\n";
          std::cout << "------------------------------------------------------------------" << "\n";
          std::cout << "  Packets Delivery Ratio: " << ((rxPacketsum * 100) /txPacketsum ) << "%" << "\n";
          std::cout << "  Packets Lost Ratio: " << ((LostPacketsum * 100) /txPacketsum) << "%" << "\n";
          std::cout << "  Throughput: " << v->second.rxBytes * 8.0 / 10.0 / 1024 / 1024  << " Mbps\n";
          std::cout << "---------------------------------------------------------------------------------------" << "\n";
    }
       
        std::cout << "********************************************************************************" << "\n";
        std::cout << "  All Tx Packets: " << txPacketsum <<"                  " << "  All Rx Packets: " << rxPacketsum << "\n";
        std::cout << "  All Lost Packets: " << LostPacketsum <<"                " << "  All Drop Packets: " << DropPacketsum << "\n";
        std::cout << "********************************************************************************" << "\n";
    //  std::cout << "  Packets Delivery Ratio: " << ((rxPacketsum * 100) /txPacketsum ) << "%" << "          " << "  Packets Lost Ratio: " << ((LostPacketsum * 100) /txPacketsum) << "%" << "\n";
        std::cout << "  All Delay: " << Delaysum / txPacketsum << "\n";
        std::cout << "  Throughput: " << rxBytesum * 8.0 / 10.0 / 1024 / 1024  << " Mbps\n";



  Simulator::Run ();
  Simulator::Destroy ();
  NS_LOG_INFO ("Done.");
}


Tommaso Pecorella

unread,
Feb 21, 2016, 11:11:43 AM2/21/16
to ns-3-users
Hi,

despite the fact that you did NOT read the posting guidelines (because you blatantly ignored everything that is written in there), I did run your code.
It's not a SIGFPE, but a SIGIOT. Two completely different things.

Please run your code in a debugger, you'll find your mistake quite easily.

T.


On Sunday, February 21, 2016 at 1:37:24 PM UTC+1, mak coza wrote:
sorry sir , here is my code source , and what i do , i hope that an other personne could help me:

mak coza

unread,
Feb 21, 2016, 11:44:11 AM2/21/16
to ns-3-...@googlegroups.com
Hi , i run it in a debugger , and here is the error


h/wsn-ping6 az
Traceback (most recent call last):

  File "/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Created 10 devices
There are 10 nodes
********************************************************************************
  All Tx Packets: 0                    All Rx Packets: 0
  All Lost Packets: 0                  All Drop Packets: 0
********************************************************************************
  All Delay: -nan
  Throughput: 0 Mbps
assert failed. cond="socketFactory != 0", file=../src/network/model/socket.cc, line=77
terminate called without an active exception

Program received signal SIGABRT, Aborted.
0x00007fffebda7cc9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56    ../nptl/sysdeps/unix/sysv/linux/raise.c: there is no file or directory of this type.

Tommaso Pecorella

unread,
Feb 21, 2016, 12:28:21 PM2/21/16
to ns-3-users
Please read one of the countless tutorials about how to use gdb.
You did just run the debugger, you need to use it.

T.

mak coza

unread,
Feb 21, 2016, 3:06:23 PM2/21/16
to ns-3-...@googlegroups.com
hi , i run it  with ./waf --run wsn-ping6 --command-template="valgrind %s"
 and here is the result:

'build' finished successfully (7.272s)
==10177== Memcheck, a memory error detector
==10177== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==10177== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==10177== Command: /home/abdallah/ns3-1/ns-allinone-3.24.1/ns-3.24.1/build/examples/ipv6/ns3.24.1-wsn-ping6-debug
==10177==
Created 2 devices
There are 2 nodes
==10177==
==10177== HEAP SUMMARY:
==10177==     in use at exit: 47,252 bytes in 240 blocks
==10177==   total heap usage: 10,032 allocs, 9,792 frees, 877,014 bytes allocated
==10177==
==10177== LEAK SUMMARY:
==10177==    definitely lost: 0 bytes in 0 blocks
==10177==    indirectly lost: 0 bytes in 0 blocks
==10177==      possibly lost: 4,676 bytes in 83 blocks
==10177==    still reachable: 42,576 bytes in 157 blocks
==10177==         suppressed: 0 bytes in 0 blocks
==10177== Rerun with --leak-check=full to see details of leaked memory
==10177==
==10177== For counts of detected and suppressed errors, rerun with: -v
==10177== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
regards.

Jayasree Sengupta

unread,
Nov 23, 2017, 1:50:54 AM11/23/17
to ns-3-users
For me, This code is working properly. But in the flow monitor portion my code is not getting inside the loop. Could you please help.


#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/sixlowpan-module.h"
#include "ns3/lr-wpan-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/propagation-module.h"
#include "ns3/flow-monitor-module.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-apps-module.h"
#include "ns3/netanim-module.h"


using namespace ns3;

NS_LOG_COMPONENT_DEFINE ("Ping6WsnExample");

int main (int argc, char **argv)
{
      bool verbose = false;

      CommandLine cmd;
      cmd.AddValue ("verbose", "turn on log components", verbose);
      cmd.Parse (argc, argv);

      if (verbose)
        {
          LogComponentEnable ("Ping6WsnExample", LOG_LEVEL_INFO);
          LogComponentEnable ("Ipv6EndPointDemux", LOG_LEVEL_ALL);
          LogComponentEnable ("Ipv6L3Protocol", LOG_LEVEL_ALL);
          LogComponentEnable ("Ipv6StaticRouting", LOG_LEVEL_ALL);
          LogComponentEnable ("Ipv6ListRouting", LOG_LEVEL_ALL);
          LogComponentEnable ("Ipv6Interface", LOG_LEVEL_ALL);
          LogComponentEnable ("Icmpv6L4Protocol", LOG_LEVEL_ALL);
          LogComponentEnable ("Ping6Application", LOG_LEVEL_ALL);
          LogComponentEnable ("NdiscCache", LOG_LEVEL_ALL);
          LogComponentEnable ("SixLowPanNetDevice", LOG_LEVEL_ALL);
        }

      NS_LOG_INFO ("Create nodes.");
      NodeContainer ch;
      ch.Create (10);


      // Set seed for random numbers
      SeedManager::SetSeed (167);

      // Install mobility
      MobilityHelper mobility;
      mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
      Ptr <UniformRandomVariable> x= CreateObject <UniformRandomVariable>();

      Ptr<ListPositionAllocator> nodesPositionAlloc = CreateObject<ListPositionAllocator> ();
      int nodeCount, xPos, yPos;
      for (nodeCount=1; nodeCount<=10; nodeCount++)
      {
            xPos=((int)(x->GetValue()*1000))%100+1; yPos=((int)(x->GetValue()*1000))%100+1;
            std::cout << "Adding node at position (" << xPos << ", " << yPos << ")" << std::endl;
            nodesPositionAlloc->Add (Vector (xPos, yPos, 0.0));
      }
      mobility.SetPositionAllocator (nodesPositionAlloc);
      mobility.Install (ch);


      NS_LOG_INFO ("Create channels.");
      LrWpanHelper lrWpanHelper;
      // Add and install the LrWpanNetDevice for each node
      NetDeviceContainer devContainer = lrWpanHelper.Install(ch);

      lrWpanHelper.AssociateToPan (devContainer, 10);

      std::cout << "Created " << devContainer.GetN() << " devices" << std::endl;
      std::cout << "There are " << ch.GetN() << " nodes" << std::endl;


      /* Install IPv4/IPv6 stack */
      NS_LOG_INFO ("Install Internet stack.");
      InternetStackHelper internetv6;
      internetv6.SetIpv4StackInstall (false);
      internetv6.Install (ch);


      // Install 6LowPan layer
      NS_LOG_INFO ("Install 6LoWPAN.");
      SixLowPanHelper sixlowpan;
      NetDeviceContainer six1 = sixlowpan.Install (devContainer);

      NS_LOG_INFO ("Assign addresses.");
      Ipv6AddressHelper ipv6;
      ipv6.SetBase (Ipv6Address ("2001:1::"), Ipv6Prefix (64));
      Ipv6InterfaceContainer i1 = ipv6.Assign (six1);


      NS_LOG_INFO ("Create Applications.");

      /* Create a Ping6 application to send ICMPv6 echo request from node zero to
      * all-nodes (ff02::1).*/

      uint16_t ulPort = 2000;

      //PacketSink application is used to configure a node as the sink for data

      PacketSinkHelper sinkHelper ("ns3::UdpSocketFactory",Address (InetSocketAddress (Ipv4Address::GetAny (), ulPort)));
      ApplicationContainer serverApps = sinkHelper.Install (ch.Get(0));
      serverApps.Start (Seconds (1.0));
      serverApps.Stop (Seconds (100.0));

      ApplicationContainer clientApps;

      // The OnOff Application is used to send UDP/TCP to the sink


      OnOffHelper clientHelper ("ns3::UdpSocketFactory", Address ());
      clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
      clientHelper.SetAttribute("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));

    //normally wouldn't need a loop here but the server IP address is different on each p2p subnet


      for(uint32_t j=0; j<ch.GetN (); ++j)
        {
          AddressValue remoteAddress (Inet6SocketAddress (i1.GetAddress (0,1), 50000));

          //Inet6SocketAddress remoteAddress = Inet6SocketAddress (i.GetAddress (0,1), 50000);
          clientHelper.SetAttribute ("Remote", remoteAddress);

          clientApps.Add (clientHelper.Install (ch.Get (j)));
        }

      clientApps.Start (Seconds (2.0));
      clientApps.Stop (Seconds (100.0));

      AsciiTraceHelper ascii;
      lrWpanHelper.EnableAsciiAll (ascii.CreateFileStream ("wsn3.tr"));
      lrWpanHelper.EnablePcapAll (std::string ("wsn3"), true);

      // Calculate Throughput using Flowmonitor

        FlowMonitorHelper flowmon;
        Ptr<FlowMonitor> monitor = flowmon.InstallAll();

      // Now, do the actual simulation.


        NS_LOG_INFO ("Run Simulation.");
        Simulator::Stop (Seconds(110.0));
        Simulator::Run ();


        monitor->CheckForLostPackets ();

        Ptr<Ipv6FlowClassifier> classifier = DynamicCast<Ipv6FlowClassifier> (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)
          {

            Ipv6FlowClassifier::FiveTuple t = classifier->FindFlow (i->first);
                std::cout << "Flow " << i->first  << " (" << t.sourceAddress << " -> " << t.destinationAddress << ")\n";
                std::cout << "  Tx Bytes:   " << i->second.txBytes << "\n";
                std::cout << "  Rx Bytes:   " << i->second.rxBytes << "\n";
                  std::cout << "  Throughput: " << i->second.rxBytes * 8.0 / (i->second.timeLastRxPacket.GetSeconds() - i->second.timeFirstTxPacket.GetSeconds())/1024/1024  << " Mbps\n";


          }

      AnimationInterface anim("wsn3.xml");


      Simulator::Destroy ();
      NS_LOG_INFO ("Done.");
}


Tommaso Pecorella

unread,
Nov 23, 2017, 4:37:26 PM11/23/17
to ns-3-users
Hi,

please read the posting guidelines (see the link below).
Moreover, please triple check your code. This line actually prevents packet generation.
      clientHelper.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));


T.




On Thursday, November 23, 2017 at 7:50:54 AM UTC+1, Jayasree Sengupta wrote:
For me, This code is working properly. But in the flow monitor portion my code is not getting inside the loop. Could you please help.
 
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting

Jayasree Sengupta

unread,
Nov 24, 2017, 1:47:48 AM11/24/17
to ns-3-users
Sorry. I have now made the changes. Now please help me with what is wrong with the code. Why isn't it returning to the command prompt and why isn't it displaying the flow statistics.
wsn3.cc

Tommaso Pecorella

unread,
Nov 25, 2017, 8:02:29 AM11/25/17
to ns-3-users
Hi,

again, please read the posting guideline (and learn how to use a debugger).
        Ptr<Ipv6FlowClassifier> classifier = DynamicCast<Ipv6FlowClassifier> (flowmon.GetClassifier ());

should be
        Ptr<Ipv6FlowClassifier> classifier = DynamicCast<Ipv6FlowClassifier> (flowmon.GetClassifier6 ());

Moreover, mind that a simulation of 100 seconds will take a LONG time, and its ascii trace will go over 10 GB easily.

T.

Jayasree Sengupta

unread,
Nov 27, 2017, 1:57:41 AM11/27/17
to ns-3-...@googlegroups.com
Thank You so much for your help. Now it's all working fine.
But I did like to know what kind of routing strategy is this following (Since I am new to ns3 I have this doubt).

Thanks and Regards,
Jayasree Sengupta,
IIEST,Shibpur,
Department of Computer Science and Technology.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Vr4-C2gcZNE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Tommaso Pecorella

unread,
Nov 27, 2017, 6:01:46 PM11/27/17
to ns-3-users
Star topology - no routing is necessary.

T.

Jayasree Sengupta

unread,
Nov 28, 2017, 3:22:56 AM11/28/17
to ns-3-...@googlegroups.com
I'm attaching an output can you say why in some cases the Rx output shows zero.

Thanks and Regards,
Jayasree Sengupta,
IIEST,Shibpur,
Department of Computer Science and Technology.

To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
Output_wsn3.png

Tommaso Pecorella

unread,
Nov 28, 2017, 4:08:33 PM11/28/17
to ns-3-users
Perhaps the nodes are too far away.

T.

Jayasree Sengupta

unread,
Nov 29, 2017, 1:13:21 AM11/29/17
to ns-3-...@googlegroups.com
Please help me on how to incorporate energy calculation in this code. Will I do it using EnergySourceContainer and WifiRadioEnergyModel ?

Thanks and Regards,
Jayasree Sengupta,
IIEST,Shibpur,
Department of Computer Science and Technology.

To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Tommaso Pecorella

unread,
Nov 29, 2017, 5:50:04 PM11/29/17
to ns-3-users
At the moment the LrWPAN model does NOT include the energy calculation, basically because the MAC model is not energy aware. Any number that you would get from it would be totally wrong.

T.

Jayasree Sengupta

unread,
Nov 30, 2017, 12:32:15 AM11/30/17
to ns-3-...@googlegroups.com
Then what do I need to do if I want to incorporate energy calculation for nodes in a WSN ?

Thanks and Regards,
Jayasree Sengupta,
IIEST,Shibpur,
Department of Computer Science and Technology.

To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.

Tommaso Pecorella

unread,
Nov 30, 2017, 6:50:21 PM11/30/17
to ns-3-users
Debug and test the repository here: http://code.nsnam.org/vrege/ns-3-gsoc/
Mind that:
  1. It is an old ns-3 release. Any bug you can find in that release... well, I decline any responsibility.
  2. The module itself is not yet fully reviewed. As before, I decline any responsibility for any bug or bad behaviour.
  3. See points 1 and 2.
  4. See points 1, 2, and 3.
  5. See points 1, 2, 3, and 4.
I'm working to forward-port and integrate it in ns-3, but I have no idea about when the process will be finished. Unfortunately I have a zillion of chores, and they are all work-related.

Of course, if you want to help, any helping hand is more than welcome.
The most important priority is... testing it.

T.

Subha Kanta Swain

unread,
Apr 4, 2018, 2:28:19 AM4/4/18
to ns-3-users
I have ran the wsn3.cc programs in ns3.20 but i have got the below error,
internet-apps-module.h: No such file or directory
What does it mean?
Reply all
Reply to author
Forward
0 new messages