[ndnSIM] Different attributes for different consumers in the trace file

Mohibi Hussain mohibihussain1 at gmail.com
Mon May 20 08:32:47 PDT 2019


Hi,
We have defined an attribute (level) that is changeable by a consumer and we have defined an extern double variable in ndn-consumer.cpp that can be read in ndn-app-trace.cpp. However, after we tried rocketfuel topology, we noticed that although we defined different levels for different consumers  but the trace file just shows the level that is defined by the last consumer. The program runs fine but the trace file has this issue of not showing the correct level. Details of the scenario are shown as below:
> 
> namespace ns3 {
> int
> main (int argc, char *argv[])
> {
>   CommandLine cmd;
>   cmd.Parse (argc, argv);
>   AnnotatedTopologyReader topologyReader ("", 25);
>   topologyReader.SetFileName ("topologies/bw-delay-rand-1/1221.r0-conv-annotated.txt");
>   topologyReader.Read ();
>   // Install Ndn stack on all nodes
>   ndn::StackHelper ndnHelper;
>   ndnHelper.SetDefaultRoutes(true);
> ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "10000");
>   ndnHelper.InstallAll ();
>   // Choosing forwarding strategy
>   ndn::StrategyChoiceHelper::InstallAll("/prefix", "/localhost/nfd/strategy/multicast");
> 
>   // Installing global routing interface on all nodes
>   ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
>   ndnGlobalRoutingHelper.InstallAll ();
>   // Getting containers for the consumer/producer
>   Ptr<Node> producer = Names::Find<Node> ("bb-781");
>   NodeContainer consumerNodes;
>   consumerNodes.Add (Names::Find<Node> ("leaf-327"));
> consumerNodes.Add (Names::Find<Node> ("leaf-1770"));
> std::string prefix = "/prefix";
> //*****************consumer with level 2
>   ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
>   consumerHelper.SetPrefix (prefix);
>   consumerHelper.SetAttribute ("Frequency", StringValue ("100")); // 100 interests a second
>   //consumerHelper.Install (consumerNodes);
> consumerHelper.SetAttribute("Level", StringValue("2"));
> ApplicationContainer consumer = consumerHelper.Install(Names::Find<Node> ("leaf-327"));
> //*******************consumer with level 1
> ndn::AppHelper consumerHelper1 ("ns3::ndn::ConsumerCbr");
>   consumerHelper1.SetPrefix (prefix);
>   consumerHelper1.SetAttribute ("Frequency", StringValue ("100")); // 100 interests a second
> consumerHelper1.SetAttribute("Level", StringValue("1"));
> ApplicationContainer consumer2 =consumerHelper1.Install (Names::Find<Node> ("leaf-1770"));
> //*****************producer
>  ndn::AppHelper producerHelper ("ns3::ndn::Producer");
>   producerHelper.SetPrefix (prefix);
>   producerHelper.SetAttribute ("PayloadSize", StringValue("1024"));
>   producerHelper.Install (producer);
>   // Add /prefix origins to ndn::GlobalRouter
>   ndnGlobalRoutingHelper.AddOrigins (prefix, producer);
>   // Calculate and install FIBs
>   ndnGlobalRoutingHelper.CalculateRoutes ();
> Simulator::Stop (Seconds (20.0));
> ndn::AppDelayTracer::InstallAll("app-delays-trace.txt");
>   Simulator::Run ();
>   Simulator::Destroy ();
>   return 0;
> }
> } // namespace ns3
> int main(int argc, char* argv[]) {
>   return ns3::main(argc,argv);
> }
> 
> Please note that the trace file shows the correct values for ndn-simple.cpp example, but not for rocketfuel.
> 
Your help would be much appreciated for the resolution of this problem/ 
Warm regards,
Mohibi
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190520/435ee00c/attachment.html>


More information about the ndnSIM mailing list