A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
delay-jitter-estimation.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 INRIA
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19#ifndef DELAY_JITTER_ESTIMATION_H
20#define DELAY_JITTER_ESTIMATION_H
21
22#include "ns3/nstime.h"
23#include "ns3/packet.h"
24
25namespace ns3
26{
27
40{
41 public:
43
54 static void PrepareTx(Ptr<const Packet> packet);
55
63 void RecordRx(Ptr<const Packet> packet);
64
70 Time GetLastDelay() const;
71
78 uint64_t GetLastJitter() const;
79
80 private:
83};
84
85} // namespace ns3
86
87#endif /* DELAY_JITTER_ESTIMATION_H */
Quick and dirty delay and jitter estimation, implementing the jitter algorithm originally from RFC 18...
Time GetLastDelay() const
Get the Last Delay object.
void RecordRx(Ptr< const Packet > packet)
Invoke this method to update the delay and jitter calculations After a call to this method,...
uint64_t GetLastJitter() const
The jitter is calculated using the RFC 1889 (RTP) jitter definition.
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...
Time m_transit
Relative transit time for the previous packet.
Time m_jitter
Jitter estimation.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Every class exported by the ns3 library is enclosed in the ns3 namespace.