src/wifi/model/amrr-wifi-manager.cc
changeset 10139 17a71cd49da3
parent 9894 ac4e52a91d5d
child 10410 4d4eb8097fa3
--- a/src/wifi/model/amrr-wifi-manager.cc	Tue Aug 13 10:37:49 2013 -0700
+++ b/src/wifi/model/amrr-wifi-manager.cc	Tue Aug 13 22:05:25 2013 -0700
@@ -24,6 +24,8 @@
 #include "ns3/uinteger.h"
 #include "ns3/double.h"
 
+#define Min(a,b) ((a < b) ? a : b)
+
 NS_LOG_COMPONENT_DEFINE ("AmrrWifiRemoteStation");
 
 namespace ns3 {
@@ -267,8 +269,8 @@
       ResetCnt (station);
     }
 }
-WifiMode
-AmrrWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size)
+WifiTxVector
+AmrrWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
 {
   NS_LOG_FUNCTION (this << st << size);
   AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st;
@@ -313,16 +315,16 @@
         }
     }
 
-  return GetSupported (station, rateIndex);
+  return WifiTxVector (GetSupported (station, rateIndex), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station));
 }
-WifiMode
-AmrrWifiManager::DoGetRtsMode (WifiRemoteStation *st)
+WifiTxVector
+AmrrWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
 {
   NS_LOG_FUNCTION (this << st);
   AmrrWifiRemoteStation *station = (AmrrWifiRemoteStation *)st;
   UpdateMode (station);
   /// \todo can we implement something smarter ?
-  return GetSupported (station, 0);
+  return WifiTxVector (GetSupported (station, 0), GetDefaultTxPowerLevel (), GetLongRetryCount (station), GetShortGuardInterval (station), Min (GetNumberOfReceiveAntennas (station),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (station), GetStbc (station));
 }