A Discrete-Event Network Simulator
API
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ns3::DelayJitterEstimation Class Reference

quick and dirty delay and jitter estimation More...

#include "delay-jitter-estimation.h"

Public Member Functions

 DelayJitterEstimation ()
 
Time GetLastDelay (void) const
 
uint64_t GetLastJitter (void) const
 The jitter is calculated using the RFC 1889 (RTP) jitter definition. More...
 
void RecordRx (Ptr< const Packet > packet)
 

Static Public Member Functions

static void PrepareTx (Ptr< const Packet > packet)
 

Private Attributes

Time m_delay
 Delay estimation. More...
 
int64x64_t m_jitter
 Jitter estimation. More...
 
Time m_previousRx
 Previous Rx time. More...
 
Time m_previousRxTx
 Previous Rx or Tx time. More...
 

Detailed Description

quick and dirty delay and jitter estimation

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

Constructor & Destructor Documentation

◆ DelayJitterEstimation()

ns3::DelayJitterEstimation::DelayJitterEstimation ( )

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

Member Function Documentation

◆ GetLastDelay()

Time ns3::DelayJitterEstimation::GetLastDelay ( void  ) const
Returns
the updated delay.

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

References m_delay.

◆ GetLastJitter()

uint64_t ns3::DelayJitterEstimation::GetLastJitter ( void  ) const

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

Returns
the updated jitter.

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

References ns3::int64x64_t::GetHigh(), and m_jitter.

◆ PrepareTx()

void ns3::DelayJitterEstimation::PrepareTx ( Ptr< const Packet packet)
static
Parameters
packetthe packet to send over a wire

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.

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

References ns3::Packet::AddByteTag().

◆ RecordRx()

void ns3::DelayJitterEstimation::RecordRx ( Ptr< const Packet packet)
Parameters
packetthe packet received

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.

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

References ns3::Abs(), ns3::Packet::FindFirstMatchingByteTag(), ns3::DelayJitterEstimationTimestampTag::GetTxTime(), m_delay, m_jitter, m_previousRx, m_previousRxTx, and ns3::Simulator::Now().

Member Data Documentation

◆ m_delay

Time ns3::DelayJitterEstimation::m_delay
private

Delay estimation.

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

Referenced by GetLastDelay(), and RecordRx().

◆ m_jitter

int64x64_t ns3::DelayJitterEstimation::m_jitter
private

Jitter estimation.

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

Referenced by GetLastJitter(), and RecordRx().

◆ m_previousRx

Time ns3::DelayJitterEstimation::m_previousRx
private

Previous Rx time.

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

Referenced by RecordRx().

◆ m_previousRxTx

Time ns3::DelayJitterEstimation::m_previousRxTx
private

Previous Rx or Tx time.

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

Referenced by RecordRx().


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