AnimationInterface.EnablePacketMetaData not working

220 views
Skip to first unread message

subhrendu chattopadhyay

unread,
Oct 21, 2013, 11:07:59 AM10/21/13
to ns-3-...@googlegroups.com
Hi All,

I am having problem in utilizing AnimationInterface.EnablePacketMetaData. When I am using this method with true argument it is showing the following message

"assert failed. cond="!m_metadataSkipped", msg="Error: attempting to enable the packet metadata subsystem too late in the simulation, which is not allowed."

However putting this function in the beginning of the run method results in build failure. I need to trace the packet meta data in animation.

If somebody can tell me how to do this I will be in debt to him. Please help me.

Thanks you.

Subhrendu.

G.Beinas

unread,
Oct 21, 2013, 11:13:11 AM10/21/13
to ns-3-...@googlegroups.com
That's the correct way I think to implement EnablePacketMetadata.
   
    Simulator::Stop(Seconds(10.0));
    AnimationInterface anim ("example.xml");
    anim.AnimationInterface::EnablePacketMetadata(true);
    Simulator::Run();
    Simulator::Destroy();

G.Beinas

subhrendu chattopadhyay

unread,
Oct 21, 2013, 1:18:32 PM10/21/13
to ns-3-...@googlegroups.com
Hi,
Thanks for your help. Following is the code I have implemented. But it is giving an error which I have mentioned in my previous post. Please let me know what's wrong in the code.

int MeshTest::Run (){
  std::string animFile = "reports/mesh_animation.xml" ;  // Name of file for animation output
  std::string routeTrackFile = "reports/mesh_track_route.xml" ;  // Name of file for animation output
  CreateNodes ();
  InstallInternetStack ();
  InstallApplication ();
  //Simulator::Schedule (Seconds (m_totalTime), &MeshTest::Report, this);
  Simulator::Stop (Seconds (m_totalTime));
  // Create the animation object and configure for specified output
  AnimationInterface anim (animFile);
  //anim.EnableIpv4RouteTracking(routeTrackFile,Seconds(0.0),Seconds())
  //anim.EnableIpv4RouteTracking(routeTrackFile,Seconds(0.0),Seconds(m_totalTime),Seconds(5));
  anim.AnimationInterface::EnablePacketMetadata(true);
  Simulator::Run ();
  std::cout << "Animation Trace file created:" << animFile.c_str ()<< std::endl;
  Simulator::Destroy ();
  return 0;
mesh.cc

John Abraham

unread,
Oct 21, 2013, 1:31:17 PM10/21/13
to ns-3-...@googlegroups.com
Yes, that is an old issue with the mesh-module. You will most likely see the same issue, when you enable Ascii tracing with packet printing.
https://www.nsnam.org/bugzilla/show_bug.cgi?id=1482
There is no fix for this yet
john


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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 http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/groups/opt_out.

subhrendu chattopadhyay

unread,
Oct 21, 2013, 1:36:38 PM10/21/13
to ns-3-...@googlegroups.com
Hi John,

Thanks for your help anyway. I hope this method works in rest of the system other than mesh. Am I correct?

sai kishore

unread,
Nov 14, 2013, 4:58:54 AM11/14/13
to ns-3-...@googlegroups.com
Use patch bug1363.patch ,it may work... but you should remove or comment some assert statements which u will get as errors
Reply all
Reply to author
Forward
0 new messages