[ndnSIM] A question about printing out PIT contents

Amin Karami amin at ac.upc.edu
Fri Sep 27 04:48:47 PDT 2013


Hi Alex,
If we want to print some extra information such as, RTT (or incoming 
time of Interest into PIT and the response time) for each entry, what we 
should do?
Thanks a lot.

I looking forward to your response.

Best Regards,
Amin


On 09/26/2013 06:25 ق.ظ, Alex Afanasyev wrote:
> Hi Liu,
>
> You can do something like this:
>
> input: Ptr<Node> node;
>
> Ptr<ndn::Pit> pit = node->GetObject<ndn::Pit> ();
> for (Ptr<ndn::pit::Entry> entry = pit->Begin (); entry != pit->End (); entry = pit->Next (entry))
>    {
>      std::cout << *entry << std::endl;
>    }
>
> This will print out content of each PIT entry in the default format.  If you want some customizations, you can either directly access elements of PIT entry, or modify Print method of Pit implementation.
>
> ---
> Alex
>
> On Sep 25, 2013, at 6:41 PM, 刘总真 <liuzongzhen at cstnet.cn> wrote:
>
>> Hi Alex,
>>
>> I want to print out PIT contents, such as the incoming and outgoing interface. But I don’t know which function to use. Any suggestion?Thanks a lot!
>>
>> Looking forward to your response.
>>
>> Liu Zongzhen
>
> _______________________________________________
> 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