8#include "nr-pdcp-tag.h"
11#include "ns3/uinteger.h"
16NS_OBJECT_ENSURE_REGISTERED(NrPdcpTag);
19 : m_senderTimestamp(Seconds(0))
25 : m_senderTimestamp(senderTimestamp)
35 TypeId(
"ns3::NrPdcpTag").SetParent<Tag>().SetGroupName(
"Nr").AddConstructor<
NrPdcpTag>();
40NrPdcpTag::GetInstanceTypeId()
const
46NrPdcpTag::GetSerializedSize()
const
52NrPdcpTag::Serialize(TagBuffer i)
const
54 int64_t senderTimestamp = m_senderTimestamp.GetNanoSeconds();
55 i.Write((
const uint8_t*)&senderTimestamp,
sizeof(int64_t));
59NrPdcpTag::Deserialize(TagBuffer i)
61 int64_t senderTimestamp;
62 i.Read((uint8_t*)&senderTimestamp, 8);
63 m_senderTimestamp = NanoSeconds(senderTimestamp);
67NrPdcpTag::Print(std::ostream& os)
const
69 os << m_senderTimestamp;
75 return m_senderTimestamp;
81 this->m_senderTimestamp = senderTimestamp;
static TypeId GetTypeId()
Get the type ID.
Time GetSenderTimestamp() const
void SetSenderTimestamp(Time senderTimestamp)