[ndnSIM] Same interest

Alex Afanasyev alexander.afanasyev at ucla.edu
Thu Mar 7 10:08:23 PST 2013


Hi Chiara,

With the available code, you can achieve this by installing two or more instances of the same applications on the same node (but of course, you probably want to have different starting/stopping times for different instances).  For example:

Ptr<Node> consumer = ...;
ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
consumerHelper.SetPrefix (...
consumerHelper.SetAttribute ("Frequency", ...

consumerHelper.Install (consumer).Start (Seconds (1.0));
consumerHelper.Install (consumer).Start (Seconds (2.0));
consumerHelper.Install (consumer).Start (Seconds (3.0));
...

If you really want to have the same application (not just a node) to send the same interest multiple times, you would need to write a custom application class, deriving either from ndn::Consumer or just from ndn::App, implementing Interest re-request logic that you need.  For a couple of simple examples on how to write applications, please refer here: http://ndnsim.net/applications.html#custom-applications

---
Alex

On Mar 7, 2013, at 10:00 AM, Chiara Contoli <chiara.contoli at gmail.com> wrote:

> Hi all,
> my question is the following: is it possible to make generate the same Interest, from the same Consumer, more times? If the answer is yes, how can I do it? 
> I know that if the Consumer doesn't receive a Content object before timers expires, it's re-express the same request again; but I need to re-express the same request for the same interest even if the consumer receive the Content for that Interest.
> Thanks
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim





More information about the ndnSIM mailing list