Bug 1601 RttEstimator doesn't set m_currentEstimatedRtt fix
authorTommaso Pecorella <tommaso.pecorella@unifi.it>
Fri, 19 Apr 2013 12:18:00 -0400
changeset 9698 9d91a3c643b2
parent 9697 1c8203172c9d
child 9699 88d2659d664c
Bug 1601 RttEstimator doesn't set m_currentEstimatedRtt fix
RELEASE_NOTES
doc/manual/source/attributes.rst
src/internet/model/rtt-estimator.cc
src/internet/model/rtt-estimator.h
--- a/RELEASE_NOTES	Fri Apr 19 11:50:31 2013 -0400
+++ b/RELEASE_NOTES	Fri Apr 19 12:18:00 2013 -0400
@@ -36,6 +36,7 @@
 - Bug 1582 - IPv6 raw socket return value is not like Linux socket
 - bug 1585 - Length field of A-MSDU subframe header endianness
 - Bug 1409 - Add an attribute "SystemId" to configure the ID for MPI
+- Bug 1601 -  RttEstimator doesn't set the m_currentEstimatedRtt to m_initialEstimatedRtt on creation
 - Bug 1612 - pyviz (visualizer) will not be installed
 - Bug 1623 - pybindgen rev809 is not able to build after Ubuntu 1210
 
--- a/doc/manual/source/attributes.rst	Fri Apr 19 11:50:31 2013 -0400
+++ b/doc/manual/source/attributes.rst	Fri Apr 19 12:18:00 2013 -0400
@@ -492,6 +492,10 @@
       // continue on with constructor.
     }
 
+Beware that the object and all its derived classes must also implement a 
+``virtual TypeId GetInstanceTypeId (void) const;`` method. Otherwise the
+``ObjectBase::ConstructSelf ()`` will not be able to read the attributes.
+
 Extending attributes
 ********************
 
--- a/src/internet/model/rtt-estimator.cc	Fri Apr 19 11:50:31 2013 -0400
+++ b/src/internet/model/rtt-estimator.cc	Fri Apr 19 12:18:00 2013 -0400
@@ -134,6 +134,12 @@
   NS_LOG_FUNCTION (this);
 }
 
+TypeId
+RttEstimator::GetInstanceTypeId (void) const
+{
+  return GetTypeId ();
+}
+
 void RttEstimator::SentSeq (SequenceNumber32 seq, uint32_t size)
 { 
   NS_LOG_FUNCTION (this << seq << size);
@@ -254,6 +260,12 @@
   NS_LOG_FUNCTION (this);
 }
 
+TypeId
+RttMeanDeviation::GetInstanceTypeId (void) const
+{
+  return GetTypeId ();
+}
+
 void RttMeanDeviation::Measurement (Time m)
 {
   NS_LOG_FUNCTION (this << m);
--- a/src/internet/model/rtt-estimator.h	Fri Apr 19 11:50:31 2013 -0400
+++ b/src/internet/model/rtt-estimator.h	Fri Apr 19 12:18:00 2013 -0400
@@ -64,6 +64,8 @@
 
   virtual ~RttEstimator();
 
+  virtual TypeId GetInstanceTypeId (void) const;
+
   /**
    * \brief Note that a particular sequence has been sent
    * \param seq the packet sequence number.
@@ -167,6 +169,8 @@
 
   RttMeanDeviation (const RttMeanDeviation&);
 
+  virtual TypeId GetInstanceTypeId (void) const;
+
   /**
    * \brief Add a new measurement to the estimator.
    * \param measure the new RTT measure.