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