Update Time scaling usage to use new functions.
authorPeter D. Barnes, Jr. <barnes26@llnl.gov>
Wed, 29 Jan 2014 17:46:21 -0800
changeset 10594 147765b4725b
parent 10593 e2a12de1184d
child 10595 9f815cab8fab
Update Time scaling usage to use new functions. With out this patch these locations will become broken by the upcoming fix to bug 1768.
src/dsr/model/dsr-rcache.cc
src/internet/model/tcp-socket-base.cc
src/internet/model/tcp-westwood.cc
src/lte/test/lte-test-entities.cc
src/mpi/model/null-message-mpi-interface.cc
src/mpi/model/null-message-simulator-impl.cc
src/propagation/model/jakes-process.h
src/wimax/model/bs-uplink-scheduler-mbqos.cc
--- a/src/dsr/model/dsr-rcache.cc	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/dsr/model/dsr-rcache.cc	Wed Jan 29 17:46:21 2014 -0800
@@ -696,7 +696,7 @@
       else
         {
           // Check if the expire time for the new route has expired or not
-          if (rt.GetExpireTime () > 0)
+          if (rt.GetExpireTime () > Time (0))
             {
               rtVector.push_back (rt);
               // This sort function will sort the route cache entries based on the size of route in each of the
--- a/src/internet/model/tcp-socket-base.cc	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/internet/model/tcp-socket-base.cc	Wed Jan 29 17:46:21 2014 -0800
@@ -2083,7 +2083,7 @@
 
   //nextRtt will be zero for dup acks.  Don't want to update lastRtt in that case
   //but still needed to do list clearing that is done in AckSeq. 
-  if(nextRtt != 0)
+  if(nextRtt != Time (0))
   {
     m_lastRtt = nextRtt;
     NS_LOG_FUNCTION(this << m_lastRtt);
--- a/src/internet/model/tcp-westwood.cc	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/internet/model/tcp-westwood.cc	Wed Jan 29 17:46:21 2014 -0800
@@ -329,7 +329,7 @@
   TcpSocketBase::EstimateRtt (tcpHeader);
 
   // Update minRtt
-  if (m_minRtt == 0)
+  if (m_minRtt == Time (0))
     {
       m_minRtt = m_lastRtt;
     }
@@ -345,7 +345,7 @@
   // to trigger a new BW sampling event
   if (m_pType == TcpWestwood::WESTWOODPLUS)
    {
-     if(m_lastRtt != 0 && m_state == ESTABLISHED && !m_IsCount)
+     if(m_lastRtt != Time (0) && m_state == ESTABLISHED && !m_IsCount)
        {
          m_IsCount = true;
          m_bwEstimateEvent.Cancel();
--- a/src/lte/test/lte-test-entities.cc	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/lte/test/lte-test-entities.cc	Wed Jan 29 17:46:21 2014 -0800
@@ -186,7 +186,7 @@
 LteTestRrc::Start ()
 {
   NS_LOG_FUNCTION (this);
-  NS_ASSERT_MSG (m_arrivalTime != 0, "Arrival time must be different from 0");
+  NS_ASSERT_MSG (m_arrivalTime != Time (0), "Arrival time must be different from 0");
 
   // Stats
   m_txPdus++;
--- a/src/mpi/model/null-message-mpi-interface.cc	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/mpi/model/null-message-mpi-interface.cc	Wed Jan 29 17:46:21 2014 -0800
@@ -338,7 +338,7 @@
           Time rxTime (time);
 
           // rxtime == 0 means this is a Null Message
-          if (rxTime > 0)
+          if (rxTime > Time (0))
             {
               count -= sizeof (time) + sizeof (guaranteeUpdate) + sizeof (node) + sizeof (dev);
 
--- a/src/mpi/model/null-message-simulator-impl.cc	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/mpi/model/null-message-simulator-impl.cc	Wed Jan 29 17:46:21 2014 -0800
@@ -355,7 +355,7 @@
   NS_LOG_FUNCTION (this);
 
   m_safeTime = RemoteChannelBundleManager::GetSafeTime ();
-  NS_ASSERT (m_safeTime >= m_currentTs);
+  NS_ASSERT (m_safeTime >= Time (m_currentTs));
 }
 
 Time
--- a/src/propagation/model/jakes-process.h	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/propagation/model/jakes-process.h	Wed Jan 29 17:46:21 2014 -0800
@@ -71,11 +71,11 @@
     Oscillator (std::complex<double> amplitude, double initialPhase, double omega);
     // Get the complex amplitude at moment \param t
     std::complex<double> GetValueAt (Time t) const;
-    /// Complex number \f[Re=\cos(\psi_n), Im = i\sin(\psi_n)]
+    /// Complex number \f$Re=\cos(\psi_n), Im = i\sin(\psi_n)]\f$
     std::complex<double> m_amplitude;
-    /// Phase \f[\phi_n] of the oscillator
+    /// Phase \f$\phi_n\f$ of the oscillator
     double m_phase;
-    /// Rotation speed of the oscillator \f[\omega_d \cos(\alpha_n)]
+    /// Rotation speed of the oscillator \f$\omega_d \cos(\alpha_n)\f$
     double m_omega;
   };
 private:
--- a/src/wimax/model/bs-uplink-scheduler-mbqos.cc	Wed Jan 29 17:44:18 2014 -0800
+++ b/src/wimax/model/bs-uplink-scheduler-mbqos.cc	Wed Jan 29 17:46:21 2014 -0800
@@ -312,7 +312,7 @@
                         (*(ssRecord->GetServiceFlows (ServiceFlow::SF_TYPE_UGS).begin ()))->GetRecord ()->GetLastGrantTime ()
                         + MilliSeconds ((*(ssRecord->GetServiceFlows (ServiceFlow::SF_TYPE_UGS).begin ()))->GetUnsolicitedGrantInterval ());
 
-                      Time frame = Time ((timestamp - Simulator::Now ()) / frame_duration);
+                      int64_t frame = (timestamp - Simulator::Now ()) / frame_duration;
 
                       if (frame <= 1)
                         {
@@ -663,7 +663,7 @@
               Time deadline = job->GetDeadline ();
               Time frame_duration = GetBs ()->GetPhy ()->GetFrameDuration ();
 
-              Time frame = Time ((deadline - Simulator::Now ()) / frame_duration);
+              int64_t frame = (deadline - Simulator::Now ()) / frame_duration;
 
               NS_LOG_DEBUG ("At " << Simulator::Now ().GetSeconds () << " reserved traffic rate: "
                                   << job->GetServiceFlow ()->GetMinReservedTrafficRate ()