A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
delay-jitter-estimation.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
#ifndef DELAY_JITTER_ESTIMATION_H
9
#define DELAY_JITTER_ESTIMATION_H
10
11
#include "ns3/nstime.h"
12
#include "ns3/packet.h"
13
14
namespace
ns3
15
{
16
17
/**
18
* \ingroup stats
19
*
20
* \brief Quick and dirty delay and jitter estimation,
21
* implementing the jitter algorithm originally from
22
* \RFC{1889} (RTP), and unchanged in \RFC{3550}
23
*
24
* This implementation uses the integer variant of the algorithm
25
* given in RFC 1889 Appendix A.8 ,p. 71, and repeated in
26
* RFC 3550 Appendix A.8, p. 94.
27
*/
28
class
DelayJitterEstimation
29
{
30
public
:
31
DelayJitterEstimation
();
32
33
/**
34
* This method should be invoked once on each packet to
35
* record within the packet the tx time which is used upon
36
* packet reception to calculate the delay and jitter. The
37
* tx time is stored in the packet as an ns3::Tag which means
38
* that it does not use any network resources and is not
39
* taken into account in transmission delay calculations.
40
*
41
* \param packet the packet to send over a wire
42
*/
43
static
void
PrepareTx
(
Ptr<const Packet>
packet);
44
45
/**
46
* Invoke this method to update the delay and jitter calculations
47
* After a call to this method, \ref GetLastDelay and \ref GetLastJitter
48
* will return an updated delay and jitter.
49
*
50
* \param packet the packet received
51
*/
52
void
RecordRx
(
Ptr<const Packet>
packet);
53
54
/**
55
* Get the Last Delay object.
56
*
57
* \return the updated delay.
58
*/
59
Time
GetLastDelay
()
const
;
60
61
/**
62
* The jitter is calculated using the \RFC{1889} (RTP) jitter
63
* definition.
64
*
65
* \return the updated jitter.
66
*/
67
uint64_t
GetLastJitter
()
const
;
68
69
private
:
70
Time
m_jitter
{0};
//!< Jitter estimation
71
Time
m_transit
{0};
//!< Relative transit time for the previous packet
72
};
73
74
}
// namespace ns3
75
76
#endif
/* DELAY_JITTER_ESTIMATION_H */
ns3::DelayJitterEstimation
Quick and dirty delay and jitter estimation, implementing the jitter algorithm originally from RFC 18...
Definition
delay-jitter-estimation.h:29
ns3::DelayJitterEstimation::GetLastDelay
Time GetLastDelay() const
Get the Last Delay object.
Definition
delay-jitter-estimation.cc:56
ns3::DelayJitterEstimation::RecordRx
void RecordRx(Ptr< const Packet > packet)
Invoke this method to update the delay and jitter calculations After a call to this method,...
Definition
delay-jitter-estimation.cc:30
ns3::DelayJitterEstimation::DelayJitterEstimation
DelayJitterEstimation()
Definition
delay-jitter-estimation.cc:18
ns3::DelayJitterEstimation::GetLastJitter
uint64_t GetLastJitter() const
The jitter is calculated using the RFC 1889 (RTP) jitter definition.
Definition
delay-jitter-estimation.cc:62
ns3::DelayJitterEstimation::PrepareTx
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 us...
Definition
delay-jitter-estimation.cc:23
ns3::DelayJitterEstimation::m_transit
Time m_transit
Relative transit time for the previous packet.
Definition
delay-jitter-estimation.h:71
ns3::DelayJitterEstimation::m_jitter
Time m_jitter
Jitter estimation.
Definition
delay-jitter-estimation.h:70
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
helper
delay-jitter-estimation.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0