[ndnSIM] Inducing waiting delay in nodes

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Wed Mar 1 17:15:37 PST 2017


Hi Raj,

the code that you referred to is very old.

I would suggest you schedule events using NS-3’s scheduler after the desired amount time:

https://github.com/named-data-ndnSIM/ndnSIM/blob/a9d889b7a787842d45c86c67bc21d44853b03b7f/apps/ndn-consumer-cbr.cpp#L85
https://github.com/named-data-ndnSIM/ndnSIM/blob/5ea3322623a0550799431f25b2fc4e7e4df5c046/model/ndn-app-link-service.cpp#L55

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA


> On Mar 1, 2017, at 6:54 AM, Rajvardhan <rdeshmukh at umass.edu> wrote:
> 
> hi Spyridon,
> I am implementing something similar to delay induction depending on distance,so I was going through the code base for car-to-car 
> https://github.com/cawka/ndnSIM-nom-rapid-car2car?files=1 <https://github.com/cawka/ndnSIM-nom-rapid-car2car?files=1>
> I was wondering where the delay induction depending on distance was implemented, as there was no mention of the afterrecieveinterest method(heavily used in ndnSIM2.0 version). I observed the tracer observed this delay.
> 
> Regards,
> Raj
> 
> 
> On 28 Feb 2017, at 11:25, Rajvardhan Deshmukh <rdeshmukh at umass.edu <mailto:rdeshmukh at umass.edu>> wrote:
> hi Spyros,
> I have written a new forwarding strategy and
> included following in z-strategy.cpp
> const Name 
> ZStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/ZStrategy/%FD%00");
> NFD_REGISTER_STRATEGY(ZStrategy);
> 
> after saving the files z-strategy.cpp and z-strategy.hpp in 
> /NFD/daemon/fw
> i used ./waf
> then included the below method in my main(network simulation)program.
> 
> How do i call it in my main program(#include 
> "NFD/daemon/fw/z-strategy.hpp") that implements this strategy?
> 1.
> StrategyChoiceHelper::InstallAll("/", 
> "/localhost/nfd/strategy/ZStrategy");
> 
> Problem: Can't test if this is implemented or not
> 
> OR
> 
> 2.
> I moved the random-load-balancer-strategy.hpp and 
> random-load-balancer-strategy.cpp to /NFD/daemon/fw/
> and was able to use 
> StrategyChoiceHelper::Install<nfd::fw::RandomLoadBalancerStrategy>(nodes,"/");
> 
> I tried
> using:
> StrategyChoiceHelper::Install<nfd::fw::ZStrategy>(nodes,"/");
> 
> Gives error:
> scratch/rvanet.cc <http://rvanet.cc/>.2.o: In function `void 
> ns3::ndn::StrategyChoiceHelper::Install<nfd::fw::ZStrategy>(ns3::Ptr<ns3::Node>, 
> ndn::Name const&)':
> /home/rajvardhan/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:122: 
> undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'
> /home/rajvardhan/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:126: 
> undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'
> scratch/rvanet.cc <http://rvanet.cc/>.2.o: In function `std::unique_ptr<nfd::fw::ZStrategy, 
> std::default_delete<nfd::fw::ZStrategy> > 
> ndn::make_unique<nfd::fw::ZStrategy, 
> std::reference_wrapper<nfd::Forwarder> 
> (std::reference_wrapper<nfd::Forwarder>&&)':
> /home/rajvardhan/ndnSIM/ns-3/build/ns3/ndnSIM/ndn-cxx/util/backports.hpp:42: 
> undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'
> /home/rajvardhan/ndnSIM/ns-3/build/ns3/ndnSIM/ndn-cxx/util/backports.hpp:42: 
> undefined reference to `nfd::fw::ZStrategy::ZStrategy(nfd::Forwarder&, 
> ndn::Name const&)'
> collect2: error: ld returned 1 exit status
> 
> 
> 
> 
> 
> Let me know if further details are required to debug this problem.
> 
> Thanks a lot.
> 
> Regards,
> Raj

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170301/9dab0403/attachment.html>


More information about the ndnSIM mailing list