[ndnSIM] check content store entries periodically ?
Spyridon (Spyros) Mastorakis
mastorakis at cs.ucla.edu
Thu Dec 28 01:21:24 PST 2017
Hi,
it depends on when exactly you use this method. The aggregation of the CS and L3 protocol object to a node object occurs here:
https://github.com/named-data-ndnSIM/ndnSIM/blob/master/helper/ndn-stack-helper.cpp#L201-L211 <https://github.com/named-data-ndnSIM/ndnSIM/blob/master/helper/ndn-stack-helper.cpp#L201-L211>
You should be able to get the L3 Protocol object from a node object after this aggregation has occurred.
Thanks,
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA
> On Dec 25, 2017, at 4:07 AM, Chengb Cao <chengbcao at gmail.com> wrote:
>
> Thank you, everyone, I have solved the problem using the following method:
>
> Ptr<ndn::ContentStore> cs=router->GetObject<ndn::ContentStore>; //(1)
> cs->Print(file);
> Simulator::Schedule(...);
>
> I got the correct entry, but, when I used the method in "https://github.com/named-data-ndnSIM/ndnSIM/blob/master/examples/ndn-triangle-calculate-routes.cpp <https://github.com/named-data-ndnSIM/ndnSIM/blob/master/examples/ndn-triangle-calculate-routes.cpp>", line 79-81,
> auto ndn = routet->GetObject<ndn::L3Protocol>();
> for (const auto& entry : ndn->getForwarder()->getCs()) { //(2)
> .......
>
> the entry size is always 0, i am confused what's the difference between (1) and (2) to get the CS pointer ?
>
> Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20171228/7bf78256/attachment.html>
More information about the ndnSIM
mailing list