A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::DelayJitterEstimation Class Reference

Quick and dirty delay and jitter estimation, implementing the jitter algorithm originally from RFC 1889 (RTP), and unchanged in RFC 3550 More...

#include "delay-jitter-estimation.h"

+ Collaboration diagram for ns3::DelayJitterEstimation:

Public Member Functions

 DelayJitterEstimation ()
 
Time GetLastDelay () const
 Get the Last Delay object.
 
uint64_t GetLastJitter () const
 The jitter is calculated using the RFC 1889 (RTP) jitter definition.
 
void RecordRx (Ptr< const Packet > packet)
 Invoke this method to update the delay and jitter calculations After a call to this method, GetLastDelay and GetLastJitter will return an updated delay and jitter.
 

Static Public Member Functions

static void PrepareTx (Ptr< const Packet > packet)
 This method should be invoked once on each packet to record within the packet the tx time which is used upon packet reception to calculate the delay and jitter.
 

Private Attributes

Time m_jitter {0}
 Jitter estimation.
 
Time m_transit {0}
 Relative transit time for the previous packet.
 

Detailed Description

Quick and dirty delay and jitter estimation, implementing the jitter algorithm originally from RFC 1889 (RTP), and unchanged in RFC 3550

This implementation uses the integer variant of the algorithm given in RFC 1889 Appendix A.8 ,p. 71, and repeated in RFC 3550 Appendix A.8, p. 94.

Definition at line 28 of file delay-jitter-estimation.h.

Constructor & Destructor Documentation

◆ DelayJitterEstimation()

ns3::DelayJitterEstimation::DelayJitterEstimation ( )

Definition at line 18 of file delay-jitter-estimation.cc.

Member Function Documentation

◆ GetLastDelay()

Time ns3::DelayJitterEstimation::GetLastDelay ( ) const

Get the Last Delay object.

Returns
the updated delay.

Definition at line 56 of file delay-jitter-estimation.cc.

References m_transit.

◆ GetLastJitter()

uint64_t ns3::DelayJitterEstimation::GetLastJitter ( ) const

The jitter is calculated using the RFC 1889 (RTP) jitter definition.

Returns
the updated jitter.

Definition at line 62 of file delay-jitter-estimation.cc.

References m_jitter.

◆ PrepareTx()

void ns3::DelayJitterEstimation::PrepareTx ( Ptr< const Packet > packet)
static

This method should be invoked once on each packet to record within the packet the tx time which is used upon packet reception to calculate the delay and jitter.

The tx time is stored in the packet as an ns3::Tag which means that it does not use any network resources and is not taken into account in transmission delay calculations.

Parameters
packetthe packet to send over a wire

Definition at line 23 of file delay-jitter-estimation.cc.

References ns3::Simulator::Now().

+ Here is the call graph for this function:

◆ RecordRx()

void ns3::DelayJitterEstimation::RecordRx ( Ptr< const Packet > packet)

Invoke this method to update the delay and jitter calculations After a call to this method, GetLastDelay and GetLastJitter will return an updated delay and jitter.

Parameters
packetthe packet received

Definition at line 30 of file delay-jitter-estimation.cc.

References ns3::Abs(), ns3::TimestampTag::GetTimestamp(), m_jitter, m_transit, and ns3::Simulator::Now().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_jitter

Time ns3::DelayJitterEstimation::m_jitter {0}
private

Jitter estimation.

Definition at line 70 of file delay-jitter-estimation.h.

Referenced by GetLastJitter(), and RecordRx().

◆ m_transit

Time ns3::DelayJitterEstimation::m_transit {0}
private

Relative transit time for the previous packet.

Definition at line 71 of file delay-jitter-estimation.h.

Referenced by GetLastDelay(), and RecordRx().


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