utils+apps: Fix a bug in ndn::RttEstimator
In the constructor of ndn::RttEstimator, the code tries to set
m_currentEstimatedRtt to m_initialEstimatedRtt using the ConstructSelf()
technique. However, it doesn't take effect at this point since
ndn::RttEstimator hasn't defined GetInstanceTypeId().
According to the manual
(http://www.nsnam.org/docs/manual/html/attributes.html#initialization-order),
"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".
GetInstanceTypeId() was defined in the original RttEstimator but was
somehow lost during the port to ndnSIM.
closes #40
diff --git a/utils/ndn-rtt-estimator.h b/utils/ndn-rtt-estimator.h
index 6bf6aa8..287452e 100644
--- a/utils/ndn-rtt-estimator.h
+++ b/utils/ndn-rtt-estimator.h
@@ -67,6 +67,8 @@
virtual ~RttEstimator();
+ virtual TypeId GetInstanceTypeId (void) const;
+
/**
* \brief Note that a particular sequence has been sent
* \param seq the packet sequence number.