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"
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_jitter |
Jitter estimation. More... | |
Time | m_transit |
Relative transit time for the previous packet. More... | |
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 39 of file delay-jitter-estimation.h.
ns3::DelayJitterEstimation::DelayJitterEstimation | ( | ) |
Definition at line 111 of file delay-jitter-estimation.cc.
Time ns3::DelayJitterEstimation::GetLastDelay | ( | void | ) | const |
Definition at line 151 of file delay-jitter-estimation.cc.
References m_transit.
uint64_t ns3::DelayJitterEstimation::GetLastJitter | ( | void | ) | const |
The jitter is calculated using the RFC 1889 (RTP) jitter definition.
Definition at line 156 of file delay-jitter-estimation.cc.
References m_jitter.
packet | the 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 117 of file delay-jitter-estimation.cc.
References ns3::Packet::AddByteTag().
packet | the 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 123 of file delay-jitter-estimation.cc.
References ns3::Abs(), ns3::Packet::FindFirstMatchingByteTag(), ns3::DelayJitterEstimationTimestampTag::GetTxTime(), m_jitter, m_transit, and ns3::Simulator::Now().
|
private |
Jitter estimation.
Definition at line 77 of file delay-jitter-estimation.h.
Referenced by GetLastJitter(), and RecordRx().
|
private |
Relative transit time for the previous packet.
Definition at line 78 of file delay-jitter-estimation.h.
Referenced by GetLastDelay(), and RecordRx().