[ndnSIM] How can I get the contents ahout PIT.
Spyridon (Spyros) Mastorakis
mastorakis at CS.UCLA.EDU
Thu Nov 3 12:15:31 PDT 2016
Hi,
you could do something like:
Ptr<L3Protocol> protoNode = L3Protocol::getL3Protocol(nodes.Get(<node-id>));
Pit pit = protoNode->getForwarder()->getPit();
You might have to use the appropriate namespaces, but the logic to get the PIT instance of a node is the one I demonstrated above.
Hope that this helps,
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA
> On Nov 3, 2016, at 6:31 AM, RuntongChen <runtongchen at csu.edu.cn> wrote:
>
> Hello Everone,
>
> I want to get the contents of PIT,such as InRecords,OutRecords and the Interest.What I believe is I can get the contents from nfd::pit::Entry::getInRecords/getOutRecords/getInterest.But I meet some problems.If I have defined the "Ptr<Node> node" before,and then,run the code about:"Ptr<nfd::pit::Entry> entry = node->GetObject<nfd::pit::Entry> ();" It will give me the wrong answer like this:
>
>
>
> And so as to the "Ptr<nfd::Pit> pit = node->GetObject<nfd::Pit> ();" Can you tell me the reason(s)?If I cantn't do like this. What should I do to get the contents about the PIT?
>
> I am looking forward to your guidance and support.
>
> Best Wishes,
>
> Roter
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161103/36424772/attachment.html>
More information about the ndnSIM
mailing list