27 #ifndef NDN_CXX_UTIL_RTT_ESTIMATOR_HPP
28 #define NDN_CXX_UTIL_RTT_ESTIMATOR_HPP
61 RttEstimator(std::shared_ptr<const Options> options =
nullptr);
77 return m_sRtt != -1_ns;
181 int64_t m_nRttSamples = 0;
RTT/RTO estimator that also maintains min/max/average RTT statistics.
time::nanoseconds getMinRtt() const
Returns the minimum RTT observed.
time::nanoseconds getMaxRtt() const
Returns the maximum RTT observed.
void addMeasurement(time::nanoseconds rtt, size_t nExpectedSamples=1)
Records a new RTT measurement.
time::nanoseconds getAvgRtt() const
Returns the average RTT.
time::nanoseconds getSmoothedRtt() const
Returns the smoothed RTT value (SRTT).
time::nanoseconds getRttVariation() const
Returns the RTT variation (RTTVAR).
std::shared_ptr< const Options > m_options
void backoffRto()
Backoff RTO by a factor of Options::rtoBackoffMultiplier.
void addMeasurement(time::nanoseconds rtt, size_t nExpectedSamples=1)
Records a new RTT measurement.
RttEstimator(std::shared_ptr< const Options > options=nullptr)
Constructor.
time::nanoseconds getEstimatedRto() const
Returns the estimated RTO value.
::boost::chrono::nanoseconds nanoseconds
time::nanoseconds maxRto
upper bound of RTO
time::nanoseconds minRto
lower bound of RTO
double alpha
weight of exponential moving average for smoothed RTT
time::nanoseconds initialRto
initial RTO value
int rtoBackoffMultiplier
RTO multiplier used in backoff operation.
double beta
weight of exponential moving average for RTT variation
int k
RTT variation multiplier used when calculating RTO.