A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::RttEstimator Class Reference

Base class for all RTT Estimators. More...

#include <rtt-estimator.h>

+ Inheritance diagram for ns3::RttEstimator:
+ Collaboration diagram for ns3::RttEstimator:

Public Member Functions

 RttEstimator ()
 RttEstimator (const RttEstimator &)
virtual ~RttEstimator ()
virtual Time AckSeq (SequenceNumber32 ackSeq)
 Note that a particular ack sequence has been received.
virtual void ClearSent ()
 Clear all history entries.
virtual Ptr< RttEstimatorCopy () const =0
Time GetCurrentEstimate (void) const
 gets the current RTT estimate.
Time GetMinRto (void) const
 Get the Minimum RTO.
virtual void IncreaseMultiplier ()
 Increase the estimation multiplier up to MaxMultiplier.
virtual void Measurement (Time t)=0
 Add a new measurement to the estimator. Pure virtual function.
virtual void Reset ()
 Resets the estimation to its initial state.
virtual void ResetMultiplier ()
 Resets the estimation multiplier to 1.
virtual Time RetransmitTimeout ()=0
 Returns the estimated RTO. Pure virtual function.
virtual void SentSeq (SequenceNumber32 seq, uint32_t size)
 Note that a particular sequence has been sent.
void SetCurrentEstimate (Time estimate)
 Sets the current RTT estimate (forcefully).
void SetMinRto (Time minRto)
 Sets the Minimum RTO.
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~Object ()
void AggregateObject (Ptr< Object > other)
void Dispose (void)
AggregateIterator GetAggregateIterator (void) const
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::RttEstimator.

Protected Attributes

Time m_currentEstimatedRtt
Time m_minRto
uint16_t m_multiplier
uint32_t m_nSamples

Private Attributes

RttHistory_t m_history
Time m_initialEstimatedRtt
uint16_t m_maxMultiplier
SequenceNumber32 m_next

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void DoDispose (void)
virtual void DoStart (void)
virtual void NotifyNewAggregate (void)

Detailed Description

Base class for all RTT Estimators.

Definition at line 58 of file rtt-estimator.h.

Constructor & Destructor Documentation

ns3::RttEstimator::RttEstimator ( )

Definition at line 107 of file rtt-estimator.cc.

References ns3::ObjectBase::ConstructSelf(), ns3::Time::GetSeconds(), m_currentEstimatedRtt, m_initialEstimatedRtt, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

ns3::RttEstimator::RttEstimator ( const RttEstimator c)

Definition at line 122 of file rtt-estimator.cc.

References NS_LOG_FUNCTION.

ns3::RttEstimator::~RttEstimator ( )
virtual

Definition at line 132 of file rtt-estimator.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

Time ns3::RttEstimator::AckSeq ( SequenceNumber32  ackSeq)
virtual

Note that a particular ack sequence has been received.

Parameters
ackSeqthe ack sequence number.
Returns
The measured RTT for this ack.

Definition at line 165 of file rtt-estimator.cc.

References ns3::RttHistory::count, m_history, Measurement(), ns3::Now(), NS_LOG_FUNCTION, ResetMultiplier(), ns3::RttHistory::retx, ns3::Seconds(), ns3::RttHistory::seq, and ns3::RttHistory::time.

Referenced by ns3::TcpSocketBase::EstimateRtt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RttEstimator::ClearSent ( )
virtual

Clear all history entries.

Definition at line 190 of file rtt-estimator.cc.

References m_history, m_next, and NS_LOG_FUNCTION.

virtual Ptr<RttEstimator> ns3::RttEstimator::Copy ( ) const
pure virtual

Implemented in ns3::RttMeanDeviation.

Referenced by ns3::TcpSocketBase::TcpSocketBase().

+ Here is the caller graph for this function:

Time ns3::RttEstimator::GetCurrentEstimate ( void  ) const

gets the current RTT estimate.

Returns
The current RTT estimate.

Definition at line 86 of file rtt-estimator.cc.

References m_currentEstimatedRtt.

Time ns3::RttEstimator::GetMinRto ( void  ) const

Get the Minimum RTO.

Returns
The minimum RTO returned by the estimator.

Definition at line 75 of file rtt-estimator.cc.

References m_minRto.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

TypeId ns3::RttEstimator::GetTypeId ( void  )
static

This method returns the TypeId associated to ns3::RttEstimator.

Attributes defined for this type:

  • MaxMultiplier: Maximum RTO Multiplier
  • InitialEstimation: Initial RTT estimation
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +1000000000.0ns
    • Flags: construct write read
  • MinRTO: Minimum retransmit timeout value
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +200000000.0ns
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::Object.

Reimplemented in ns3::RttMeanDeviation.

Definition at line 44 of file rtt-estimator.cc.

References GetMinRto(), m_initialEstimatedRtt, m_maxMultiplier, ns3::Seconds(), SetMinRto(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::RttEstimator::IncreaseMultiplier ( )
virtual

Increase the estimation multiplier up to MaxMultiplier.

Definition at line 198 of file rtt-estimator.cc.

References m_maxMultiplier, m_multiplier, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::TcpNewReno::Retransmit(), ns3::TcpReno::Retransmit(), ns3::TcpTahoe::Retransmit(), and ns3::TcpSocketBase::Retransmit().

+ Here is the caller graph for this function:

virtual void ns3::RttEstimator::Measurement ( Time  t)
pure virtual

Add a new measurement to the estimator. Pure virtual function.

Parameters
tthe new RTT measure.

Implemented in ns3::RttMeanDeviation.

Referenced by AckSeq().

+ Here is the caller graph for this function:

void ns3::RttEstimator::Reset ( void  )
virtual

Resets the estimation to its initial state.

Reimplemented in ns3::RttMeanDeviation.

Definition at line 211 of file rtt-estimator.cc.

References m_currentEstimatedRtt, m_history, m_initialEstimatedRtt, m_next, m_nSamples, NS_LOG_FUNCTION, and ResetMultiplier().

Referenced by ns3::TcpSocketBase::Connect().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RttEstimator::ResetMultiplier ( )
virtual

Resets the estimation multiplier to 1.

Definition at line 205 of file rtt-estimator.cc.

References m_multiplier, and NS_LOG_FUNCTION.

Referenced by AckSeq(), and Reset().

+ Here is the caller graph for this function:

virtual Time ns3::RttEstimator::RetransmitTimeout ( )
pure virtual

Returns the estimated RTO. Pure virtual function.

Returns
the estimated RTO.

Implemented in ns3::RttMeanDeviation.

Referenced by ns3::TcpSocketBase::DoPeerClose(), ns3::TcpSocketBase::NewAck(), ns3::TcpSocketBase::SendDataPacket(), and ns3::TcpSocketBase::SendEmptyPacket().

+ Here is the caller graph for this function:

void ns3::RttEstimator::SentSeq ( SequenceNumber32  seq,
uint32_t  size 
)
virtual

Note that a particular sequence has been sent.

Parameters
seqthe packet sequence number.
sizethe packet size.

Definition at line 137 of file rtt-estimator.cc.

References m_history, m_next, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by ns3::TcpSocketBase::SendDataPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RttEstimator::SetCurrentEstimate ( Time  estimate)

Sets the current RTT estimate (forcefully).

Parameters
estimateThe current RTT estimate.

Definition at line 80 of file rtt-estimator.cc.

References m_currentEstimatedRtt, and NS_LOG_FUNCTION.

void ns3::RttEstimator::SetMinRto ( Time  minRto)

Sets the Minimum RTO.

Parameters
minRtoThe minimum RTO returned by the estimator.

Definition at line 69 of file rtt-estimator.cc.

References m_minRto, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Member Data Documentation

Time ns3::RttEstimator::m_currentEstimatedRtt
protected
RttHistory_t ns3::RttEstimator::m_history
private

Definition at line 141 of file rtt-estimator.h.

Referenced by AckSeq(), ClearSent(), Reset(), and SentSeq().

Time ns3::RttEstimator::m_initialEstimatedRtt
private

Definition at line 143 of file rtt-estimator.h.

Referenced by GetTypeId(), Reset(), and RttEstimator().

uint16_t ns3::RttEstimator::m_maxMultiplier
private

Definition at line 142 of file rtt-estimator.h.

Referenced by GetTypeId(), and IncreaseMultiplier().

Time ns3::RttEstimator::m_minRto
protected

Definition at line 147 of file rtt-estimator.h.

Referenced by GetMinRto(), ns3::RttMeanDeviation::RetransmitTimeout(), and SetMinRto().

uint16_t ns3::RttEstimator::m_multiplier
protected
SequenceNumber32 ns3::RttEstimator::m_next
private

Definition at line 140 of file rtt-estimator.h.

Referenced by ClearSent(), Reset(), and SentSeq().

uint32_t ns3::RttEstimator::m_nSamples
protected

Definition at line 148 of file rtt-estimator.h.

Referenced by ns3::RttMeanDeviation::Measurement(), and Reset().


The documentation for this class was generated from the following files: