23 #include "ns3/simulator.h"
24 #include "ns3/string.h"
48 virtual void Print (std::ostream &os)
const;
67 static TypeId tid =
TypeId (
"anon::DelayJitterEstimationTimestampTag")
69 .SetGroupName(
"Network")
71 .AddAttribute (
"CreationTime",
72 "The time at which the timestamp was created",
112 : m_jitter (
Time (0)),
139 Time transit = arrival - r_ts;
162 return (
m_jitter / 16).GetTimeStep ();
void RecordRx(Ptr< const Packet > packet)
Time GetLastDelay(void) const
static void PrepareTx(Ptr< const Packet > packet)
uint64_t GetLastJitter(void) const
The jitter is calculated using the RFC 1889 (RTP) jitter definition.
Time m_transit
Relative transit time for the previous packet.
Time m_jitter
Jitter estimation.
Tag to perform Delay and Jitter estimations.
Time GetTxTime(void) const
Get the Transmission time stored in the tag.
DelayJitterEstimationTimestampTag()
virtual uint32_t GetSerializedSize(void) const
virtual void Print(std::ostream &os) const
static TypeId GetTypeId(void)
Get the type ID.
virtual void Deserialize(TagBuffer i)
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Time m_creationTime
The time stored in the tag.
virtual void Serialize(TagBuffer i) const
bool FindFirstMatchingByteTag(Tag &tag) const
Finds the first tag matching the parameter Tag type.
void AddByteTag(const Tag &tag) const
Tag each byte included in this packet with a new byte tag.
Control the scheduling of simulation events.
static Time Now(void)
Return the current simulation virtual time.
void WriteU64(uint64_t v)
tag a set of bytes in a packet
Simulation virtual time values and global simulation resolution.
int64_t GetTimeStep(void) const
Get the raw time value, in the current resolution unit.
AttributeValue implementation for Time.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
int64x64_t Abs(const int64x64_t &value)
Absolute value.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.