[ndnSIM] help about ndnsim

Klaus Schneider klaus at cs.arizona.edu
Thu Sep 6 15:02:30 PDT 2018


Dear Asmaa,

Please consider asking these questions on the ndnSIM mailing list.

Also, please keep my earlier reply at the bottom of the email. Here is 
what I wrote earlier:

> 
> See my earlier reply below:
> 
>>
>> You probably want to use
>>
>>>
>>>   /**
>>>    * \brief gets the current RTT estimate.
>>>    * \return The current RTT estimate.
>>>    */
>>>   Time
>>>   GetCurrentEstimate(void) const;
>>>
>>
>> or
>>
>>>   /**
>>>    * \brief Returns the estimated RTO. Pure virtual function.
>>>    * \return the estimated RTO.
>>>    */
>>>   virtual Time
>>>   RetransmitTimeout() = 0;
>>
>> Assuming your class inherits from ndn::Consumer, this should work out of the box. Otherwise, you also need to call SentSeq() for each Interest and AckSeq() for each Data.
> 
>> Also, if you want the RTT for every single packet, you can look into RttMeanDeviation::AckSeq():
>>
>>> m = Simulator::Now() - i->time; // Elapsed time
>>
>> Then use this time right there, or store it in a map<seq, Time>. 

Doesn't the last part answer your question?

"Simulator::Now() - i->time" should give you the RTT for each packet.

Best regards,
Klaus






On 06/09/18 14:54, EL-BAKKOUCHI Asmaa wrote:
> 
> Dear Klaus,
> 
> Thanks for your reply, so that's exactly what I want:
> 
> if I send 4 interest packets  and when I receive the 4 data packets, how 
> should I use RttMeanDeviation::AckSeq 
> <https://ndnsim.net/2.1/doxygen/classns3_1_1ndn_1_1RttMeanDeviation.html#a291b9b4a6847dbc64898aea22c49e206>  
> to get the RTT of each packet?
> 
> I mean:
> interest packet 1 ==> rtt= ...
> interest packet 2 ==> rtt=  ...
> interest packet 3 ==> rtt= ...
> interest packet 4 ==> rtt=  ...
> 
> Best regards,
> Asmaa


More information about the ndnSIM mailing list