src/wifi/model/arf-wifi-manager.cc
changeset 7141 072fb225b714
parent 6852 8f1a53d3f6ca
child 7385 10beb0e53130
--- a/src/wifi/model/arf-wifi-manager.cc	Fri May 06 13:21:20 2011 -0700
+++ b/src/wifi/model/arf-wifi-manager.cc	Sat May 07 21:49:46 2011 +0200
@@ -3,7 +3,7 @@
  * Copyright (c) 2004,2005,2006 INRIA
  *
  * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as 
+ * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation;
  *
  * This program is distributed in the hope that it will be useful,
@@ -35,7 +35,7 @@
   uint32_t m_failed;
   bool m_recovery;
   uint32_t m_retry;
-  
+
   uint32_t m_timerTimeout;
   uint32_t m_successThreshold;
 
@@ -44,7 +44,7 @@
 
 NS_OBJECT_ENSURE_REGISTERED (ArfWifiManager);
 
-TypeId 
+TypeId
 ArfWifiManager::GetTypeId (void)
 {
   static TypeId tid = TypeId ("ns3::ArfWifiManager")
@@ -59,14 +59,16 @@
                    UintegerValue (10),
                    MakeUintegerAccessor (&ArfWifiManager::m_successThreshold),
                    MakeUintegerChecker<uint32_t> ())
-    ;
+  ;
   return tid;
 }
 
 ArfWifiManager::ArfWifiManager ()
-{}
+{
+}
 ArfWifiManager::~ArfWifiManager ()
-{}
+{
+}
 WifiRemoteStation *
 ArfWifiManager::DoCreateStation (void) const
 {
@@ -84,9 +86,10 @@
   return station;
 }
 
-void 
+void
 ArfWifiManager::DoReportRtsFailed (WifiRemoteStation *station)
-{}
+{
+}
 /**
  * It is important to realize that "recovery" mode starts after failure of
  * the first transmission after a rate increase and ends at the first successful
@@ -96,7 +99,7 @@
  * The fundamental reason for this is that there is a backoff between each data
  * transmission, be it an initial transmission or a retransmission.
  */
-void 
+void
 ArfWifiManager::DoReportDataFailed (WifiRemoteStation *st)
 {
   ArfWifiRemoteStation *station = (ArfWifiRemoteStation *)st;
@@ -105,7 +108,7 @@
   station->m_retry++;
   station->m_success = 0;
 
-  if (station->m_recovery) 
+  if (station->m_recovery)
     {
       NS_ASSERT (station->m_retry >= 1);
       if (station->m_retry == 1)
@@ -117,8 +120,8 @@
             }
         }
       station->m_timer = 0;
-    } 
-  else 
+    }
+  else
     {
       NS_ASSERT (station->m_retry >= 1);
       if (((station->m_retry - 1) % 2) == 1)
@@ -129,20 +132,21 @@
               station->m_rate--;
             }
         }
-      if (station->m_retry >= 2) 
+      if (station->m_retry >= 2)
         {
           station->m_timer = 0;
         }
     }
 }
-void 
+void
 ArfWifiManager::DoReportRxOk (WifiRemoteStation *station,
                               double rxSnr, WifiMode txMode)
-{}
+{
+}
 void ArfWifiManager::DoReportRtsOk (WifiRemoteStation *station,
                                     double ctsSnr, WifiMode ctsMode, double rtsSnr)
 {
-  NS_LOG_DEBUG ("station="<<station<<" rts ok");
+  NS_LOG_DEBUG ("station=" << station << " rts ok");
 }
 void ArfWifiManager::DoReportDataOk (WifiRemoteStation *st,
                                      double ackSnr, WifiMode ackMode, double dataSnr)
@@ -154,23 +158,25 @@
   station->m_recovery = false;
   station->m_retry = 0;
   NS_LOG_DEBUG ("station=" << station << " data ok success=" << station->m_success << ", timer=" << station->m_timer);
-  if ((station->m_success == m_successThreshold ||
-       station->m_timer == m_timerThreshold) &&
-      (station->m_rate < (station->m_state->m_operationalRateSet.size () - 1)))
+  if ((station->m_success == m_successThreshold
+       || station->m_timer == m_timerThreshold)
+      && (station->m_rate < (station->m_state->m_operationalRateSet.size () - 1)))
     {
-      NS_LOG_DEBUG ("station="<<station<<" inc rate");
+      NS_LOG_DEBUG ("station=" << station << " inc rate");
       station->m_rate++;
       station->m_timer = 0;
       station->m_success = 0;
       station->m_recovery = true;
     }
 }
-void 
+void
 ArfWifiManager::DoReportFinalRtsFailed (WifiRemoteStation *station)
-{}
-void 
+{
+}
+void
 ArfWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
-{}
+{
+}
 
 WifiMode
 ArfWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size)
@@ -187,7 +193,7 @@
   return GetSupported (station, 0);
 }
 
-bool 
+bool
 ArfWifiManager::IsLowLatency (void) const
 {
   return true;