31 #include "ns3/simulator.h"
32 #include "ns3/double.h"
33 #include "ns3/integer.h"
34 #include "ns3/uinteger.h"
48 .AddAttribute (
"MaxMultiplier",
49 "Maximum RTO Multiplier",
52 MakeUintegerChecker<uint16_t> ())
53 .AddAttribute (
"InitialEstimation",
54 "Initial RTT estimation",
58 .AddAttribute (
"MinRTO",
59 "Minimum retransmit timeout value",
94 : seq (s), count (c), time (t), retx (false)
100 : seq (h.seq), count (h.count), time (h.time), retx (h.retx)
108 : m_next (1), m_history (),
123 :
Object (c), m_next (c.m_next), m_history (c.m_history),
124 m_maxMultiplier (c.m_maxMultiplier),
125 m_initialEstimatedRtt (c.m_initialEstimatedRtt),
126 m_currentEstimatedRtt (c.m_currentEstimatedRtt), m_minRto (c.m_minRto),
127 m_nSamples (c.m_nSamples), m_multiplier (c.m_multiplier)
177 Time m = Seconds (0.0);
241 .AddConstructor<RttMeanDeviation> ()
242 .AddAttribute (
"Gain",
243 "Gain used in estimating the RTT, must be 0 < Gain < 1",
246 MakeDoubleChecker<double> ())
258 :
RttEstimator (c), m_gain (c.m_gain), m_variance (c.m_variance)
310 return CopyObject<RttMeanDeviation> (
this);
323 NS_ASSERT_MSG( (g > 0) && (g < 1),
"RttMeanDeviation: Gain must be less than 1 and greater than 0" );
Time m_currentEstimatedRtt
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
int64x64_t Abs(const int64x64_t &value)
double ToDouble(enum Unit timeUnit) const
static TypeId GetTypeId(void)
int64_t ToInteger(enum Unit timeUnit) const
The "Mean--Deviation" RTT estimator, as discussed by Van Jacobson.
#define NS_LOG_COMPONENT_DEFINE(name)
static TypeId GetTypeId(void)
Time m_initialEstimatedRtt
virtual TypeId GetInstanceTypeId(void) const
static Time FromDouble(double value, enum Unit timeUnit)
SequenceNumber< uint32_t, int32_t > SequenceNumber32
double GetSeconds(void) const
virtual void ResetMultiplier()
Resets the estimation multiplier to 1.
hold objects of type ns3::Time
Time GetCurrentEstimate(void) const
gets the current RTT estimate.
Hold an unsigned integer type.
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
Base class for all RTT Estimators.
RttHistory(SequenceNumber32 s, uint32_t c, Time t)
virtual void Measurement(Time t)=0
Add a new measurement to the estimator. Pure virtual function.
virtual void SentSeq(SequenceNumber32 seq, uint32_t size)
Note that a particular sequence has been sent.
void ConstructSelf(const AttributeConstructionList &attributes)
Time GetMinRto(void) const
Get the Minimum RTO.
Time RetransmitTimeout()
Returns the estimated RTO.
void SetMinRto(Time minRto)
Sets the Minimum RTO.
virtual void Reset()
Resets the estimation to its initial state.
void Reset()
Resets sthe estimator.
virtual void IncreaseMultiplier()
Increase the estimation multiplier up to MaxMultiplier.
#define NS_ASSERT_MSG(condition, message)
Ptr< RttEstimator > Copy() const
static Time FromInteger(uint64_t value, enum Unit timeUnit)
void Measurement(Time measure)
Add a new measurement to the estimator.
virtual TypeId GetInstanceTypeId(void) const
Helper class to store RTT measurements.
void SetCurrentEstimate(Time estimate)
Sets the current RTT estimate (forcefully).
#define NS_LOG_DEBUG(msg)
virtual void ClearSent()
Clear all history entries.
void Gain(double g)
Sets the estimator Gain.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. Both limits are inclusive.
a base class which provides memory management and object aggregation
Hold an floating point type.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
virtual Time AckSeq(SequenceNumber32 ackSeq)
Note that a particular ack sequence has been received.