--- a/src/lte/model/lte-pdcp.cc Fri Nov 25 17:07:42 2011 +0100
+++ b/src/lte/model/lte-pdcp.cc Tue Nov 29 14:10:48 2011 +0100
@@ -163,15 +163,16 @@
NS_LOG_LOGIC ("PDCP header: " << pdcpHeader);
p->AddHeader (pdcpHeader);
+ // Sender timestamp
PdcpTag pdcpTag (Simulator::Now ());
- p->AddPacketTag (pdcpTag);
+ p->AddByteTag (pdcpTag);
+ m_txPdu (m_rnti, m_lcid, p->GetSize ());
LteRlcSapProvider::TransmitPdcpPduParameters params;
params.rnti = m_rnti;
params.lcid = m_lcid;
params.pdcpPdu = p;
- m_txPdu (m_rnti, m_lcid, p->GetSize ());
m_rlcSapProvider->TransmitPdcpPdu (params);
}
@@ -180,33 +181,30 @@
{
NS_LOG_FUNCTION (this);
+ // Receiver timestamp
+ PdcpTag pdcpTag;
+ Time delay;
+ if (p->FindFirstMatchingByteTag (pdcpTag))
+ {
+ delay = Simulator::Now() - pdcpTag.GetSenderTimestamp ();
+ }
+ m_rxPdu(m_rnti, m_lcid, p->GetSize (), delay.GetNanoSeconds ());
+
LtePdcpHeader pdcpHeader;
p->RemoveHeader (pdcpHeader);
NS_LOG_LOGIC ("PDCP header: " << pdcpHeader);
- PdcpTag pdcpTag;
- Time delay;
- if (p->FindFirstMatchingByteTag(pdcpTag))
- {
- delay = Simulator::Now() - pdcpTag.GetSenderTimestamp ();
- }
- else
- {
- NS_LOG_WARN (this << " could not find PdcpTag");
- }
-
m_rxSequenceNumber = pdcpHeader.GetSequenceNumber () + 1;
if (m_rxSequenceNumber > m_maxPdcpSn)
{
m_rxSequenceNumber = 0;
}
- m_rxPdu(m_rnti, m_lcid, p->GetSize (), delay.GetNanoSeconds ());
+
LtePdcpSapUser::ReceiveRrcPduParameters params;
params.rrcPdu = p;
params.rnti = m_rnti;
params.lcid = m_lcid;
m_pdcpSapUser->ReceiveRrcPdu (params);
-
}
void