NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::util::RttEstimator Class Reference

RTT Estimator. More...

#include <rtt-estimator.hpp>

Classes

class  Options
 

Public Types

using MillisecondsDouble = time::duration< double, time::milliseconds::period >
 

Public Member Functions

 RttEstimator (const Options &options=Options())
 Create a RTT Estimator. More...
 
void addMeasurement (MillisecondsDouble rtt, size_t nExpectedSamples)
 Add a new RTT measurement to the estimator. More...
 
MillisecondsDouble getEstimatedRto () const
 Returns the estimated RTO value. More...
 
MillisecondsDouble getMinRtt () const
 Returns the minimum RTT observed. More...
 
MillisecondsDouble getMaxRtt () const
 Returns the maximum RTT observed. More...
 
MillisecondsDouble getAvgRtt () const
 Returns the average RTT. More...
 
void backoffRto ()
 Backoff RTO by a factor of Options::rtoBackoffMultiplier. More...
 

Detailed Description

RTT Estimator.

This class implements the "Mean-Deviation" RTT estimator, as discussed in RFC 6298, with the modifications to RTO calculation described in RFC 7323 Appendix G.

Definition at line 41 of file rtt-estimator.hpp.

Member Typedef Documentation

◆ MillisecondsDouble

using ndn::util::RttEstimator::MillisecondsDouble = time::duration<double, time::milliseconds::period>

Definition at line 44 of file rtt-estimator.hpp.

Constructor & Destructor Documentation

◆ RttEstimator()

ndn::util::RttEstimator::RttEstimator ( const Options options = Options())
explicit

Create a RTT Estimator.

Configures the RTT Estimator with the default parameters if an instance of Options is not passed to the constructor.

Definition at line 34 of file rtt-estimator.cpp.

Member Function Documentation

◆ addMeasurement()

void ndn::util::RttEstimator::addMeasurement ( MillisecondsDouble  rtt,
size_t  nExpectedSamples 
)

Add a new RTT measurement to the estimator.

Parameters
rttthe sampled rtt
nExpectedSamplesnumber of expected samples, must be greater than 0. It should be set to current number of in-flight Interests. Please refer to Appendix G of RFC 7323 for details.
Note
Don't add RTT measurements for retransmissions

Definition at line 47 of file rtt-estimator.cpp.

References ndn::time::abs(), ndn::util::RttEstimator::Options::alpha, ns3::alpha, ndn::util::RttEstimator::Options::beta, ndn::clamp(), ndn::util::RttEstimator::Options::k, ndn::util::RttEstimator::Options::maxRto, and ndn::util::RttEstimator::Options::minRto.

◆ getEstimatedRto()

MillisecondsDouble ndn::util::RttEstimator::getEstimatedRto ( ) const
inline

Returns the estimated RTO value.

Definition at line 90 of file rtt-estimator.hpp.

◆ getMinRtt()

MillisecondsDouble ndn::util::RttEstimator::getMinRtt ( ) const
inline

Returns the minimum RTT observed.

Definition at line 99 of file rtt-estimator.hpp.

◆ getMaxRtt()

MillisecondsDouble ndn::util::RttEstimator::getMaxRtt ( ) const
inline

Returns the maximum RTT observed.

Definition at line 108 of file rtt-estimator.hpp.

◆ getAvgRtt()

MillisecondsDouble ndn::util::RttEstimator::getAvgRtt ( ) const
inline

Returns the average RTT.

Definition at line 117 of file rtt-estimator.hpp.

◆ backoffRto()


The documentation for this class was generated from the following files: