View | Details | Raw Unified | Return to bug 1351
Collapse All | Expand All

(-)a/src/internet/model/rtt-estimator.cc (-4 / +4 lines)
 Lines 42-53    Link Here 
42
  static TypeId tid = TypeId ("ns3::RttEstimator")
42
  static TypeId tid = TypeId ("ns3::RttEstimator")
43
    .SetParent<Object> ()
43
    .SetParent<Object> ()
44
    .AddAttribute ("MaxMultiplier", 
44
    .AddAttribute ("MaxMultiplier", 
45
                   "XXX",
45
                   "Maximum RTO Multiplier",
46
                   DoubleValue (64.0),
46
                   DoubleValue (64.0),
47
                   MakeDoubleAccessor (&RttEstimator::m_maxMultiplier),
47
                   MakeDoubleAccessor (&RttEstimator::m_maxMultiplier),
48
                   MakeDoubleChecker<double> ())
48
                   MakeDoubleChecker<double> ())
49
    .AddAttribute ("InitialEstimation", 
49
    .AddAttribute ("InitialEstimation", 
50
                   "XXX",
50
                   "Initial RTT estimation",
51
                   TimeValue (Seconds (1.0)),
51
                   TimeValue (Seconds (1.0)),
52
                   MakeTimeAccessor (&RttEstimator::SetEstimate,
52
                   MakeTimeAccessor (&RttEstimator::SetEstimate,
53
                                     &RttEstimator::GetEstimate),
53
                                     &RttEstimator::GetEstimate),
 Lines 183-189    Link Here 
183
void RttEstimator::Reset ()
183
void RttEstimator::Reset ()
184
{ // Reset to initial state
184
{ // Reset to initial state
185
  next = 1;
185
  next = 1;
186
  est = 1; // XXX: we should go back to the 'initial value' here. Need to add support in Object for this.
186
  SetEstimate(Seconds (1.0)); // XXX: we should go back to the 'initial value' here. Need to add support in Object for this.
187
  history.clear ();         // Remove all info from the history
187
  history.clear ();         // Remove all info from the history
188
  nSamples = 0;
188
  nSamples = 0;
189
  ResetMultiplier ();
189
  ResetMultiplier ();
 Lines 241-247    Link Here 
241
241
242
Time RttMeanDeviation::RetransmitTimeout ()
242
Time RttMeanDeviation::RetransmitTimeout ()
243
{
243
{
244
  // If not enough samples, justjust return 2 times estimate
244
  // If not enough samples, just return 2 times estimate
245
  //if (nSamples < 2) return est * 2;
245
  //if (nSamples < 2) return est * 2;
246
  int64x64_t retval;
246
  int64x64_t retval;
247
  if (variance < est / 4.0)
247
  if (variance < est / 4.0)

Return to bug 1351