Change some traces
authorManuel Requena <manuel.requena@cttc.es>
Tue, 31 Jan 2012 11:14:14 +0100
changeset 8618 e09a5d6ed1c5
parent 8617 fd58bf72304c
child 8619 1fc386c8148c
Change some traces
src/lte/model/lte-rlc-um.cc
--- a/src/lte/model/lte-rlc-um.cc	Tue Jan 31 11:13:28 2012 +0100
+++ b/src/lte/model/lte-rlc-um.cc	Tue Jan 31 11:14:14 2012 +0100
@@ -69,7 +69,7 @@
 void
 LteRlcUm::DoTransmitPdcpPdu (Ptr<Packet> p)
 {
-  NS_LOG_FUNCTION (this);
+  NS_LOG_FUNCTION (this << p->GetSize ());
 
   /** Store arrival time */
   RlcTag timeTag (Simulator::Now ());
@@ -488,6 +488,12 @@
       ReassembleSnLessThan (m_vrUr);
     }
 
+  // m_vrUh can change previously, set new modulus base
+  // for the t-Reordering timer-related comparisons
+  m_vrUr.SetModulusBase (m_vrUh - m_windowSize);
+  m_vrUx.SetModulusBase (m_vrUh - m_windowSize);
+  m_vrUh.SetModulusBase (m_vrUh - m_windowSize);
+
   // - if t-Reordering is running:
   //    - if VR(UX) <= VR(UR); or
   //    - if VR(UX) falls outside of the reordering window and VR(UX) is not equal to VR(UH)::
@@ -512,11 +518,11 @@
     {
       NS_LOG_LOGIC ("Reordering timer is not running");
 
-      if ( m_vrUx > m_vrUr )
+      if ( m_vrUh > m_vrUr )
         {
-          NS_LOG_LOGIC ("VR(UX) > VR(UR). " << m_vrUx << " > " << m_vrUr);
+          NS_LOG_LOGIC ("VR(UH) > VR(UR)");
           NS_LOG_LOGIC ("Start reordering timer");
-          m_reorderingTimer = Simulator::Schedule (Time ("1.0s"),
+          m_reorderingTimer = Simulator::Schedule (Time ("0.1s"),
                                                    &LteRlcUm::ExpireReorderingTimer ,this);
           m_vrUx = m_vrUh;
           NS_LOG_LOGIC ("New VR(UX) = " << m_vrUx);
@@ -547,12 +553,12 @@
 
   if ( ((m_vrUh - m_windowSize) <= seqNumber) && (seqNumber < m_vrUh))
     {
-      NS_LOG_LOGIC (seqNumber << "is INSIDE the reordering window");
+      NS_LOG_LOGIC (seqNumber << " is INSIDE the reordering window");
       return true;
     }
   else
     {
-      NS_LOG_LOGIC (seqNumber << "is OUTSIDE the reordering window");
+      NS_LOG_LOGIC (seqNumber << " is OUTSIDE the reordering window");
       return false;
     }
 }
@@ -1062,7 +1068,7 @@
 void
 LteRlcUm::ExpireReorderingTimer (void)
 {
-  NS_LOG_LOGIC ("TODO: Reordering Timer has expired...");
+  NS_LOG_LOGIC ("Reordering timer has expired");
 
   // 5.1.2.2.4 Actions when t-Reordering expires
   // When t-Reordering expires, the receiving UM RLC entity shall:
@@ -1081,15 +1087,17 @@
       newVrUr++;
     }
   m_vrUr = newVrUr;
+  NS_LOG_LOGIC ("New VR(UR) = " << m_vrUr);
 
   ReassembleSnLessThan (m_vrUr);
 
   if ( m_vrUh > m_vrUr)
     {
       NS_LOG_LOGIC ("Start reordering timer");
-      m_reorderingTimer = Simulator::Schedule (Time ("1.0s"),
+      m_reorderingTimer = Simulator::Schedule (Time ("0.1s"),
                                                &LteRlcUm::ExpireReorderingTimer, this);
       m_vrUx = m_vrUh;
+      NS_LOG_LOGIC ("New VR(UX) = " << m_vrUx);
     }
 }