src/wifi/model/constant-rate-wifi-manager.cc
changeset 10139 17a71cd49da3
parent 9705 43fa2408aa05
child 10410 4d4eb8097fa3
equal deleted inserted replaced
10138:2f8e35b43d11 10139:17a71cd49da3
    23 #include "ns3/string.h"
    23 #include "ns3/string.h"
    24 #include "ns3/assert.h"
    24 #include "ns3/assert.h"
    25 #include "ns3/log.h"
    25 #include "ns3/log.h"
    26 
    26 
    27 NS_LOG_COMPONENT_DEFINE ("ConstantRateWifiManager");
    27 NS_LOG_COMPONENT_DEFINE ("ConstantRateWifiManager");
       
    28 
       
    29 #define Min(a,b) ((a < b) ? a : b)
    28 
    30 
    29 namespace ns3 {
    31 namespace ns3 {
    30 
    32 
    31 NS_OBJECT_ENSURE_REGISTERED (ConstantRateWifiManager);
    33 NS_OBJECT_ENSURE_REGISTERED (ConstantRateWifiManager);
    32 
    34 
   104 ConstantRateWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
   106 ConstantRateWifiManager::DoReportFinalDataFailed (WifiRemoteStation *station)
   105 {
   107 {
   106   NS_LOG_FUNCTION (this << station);
   108   NS_LOG_FUNCTION (this << station);
   107 }
   109 }
   108 
   110 
   109 WifiMode
   111 WifiTxVector
   110 ConstantRateWifiManager::DoGetDataMode (WifiRemoteStation *st, uint32_t size)
   112 ConstantRateWifiManager::DoGetDataTxVector (WifiRemoteStation *st, uint32_t size)
   111 {
   113 {
   112   NS_LOG_FUNCTION (this << st << size);
   114   NS_LOG_FUNCTION (this << st << size);
   113   return m_dataMode;
   115   return WifiTxVector (m_dataMode, GetDefaultTxPowerLevel (), GetLongRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (st), GetStbc (st));
   114 }
   116 }
   115 WifiMode
   117 WifiTxVector
   116 ConstantRateWifiManager::DoGetRtsMode (WifiRemoteStation *st)
   118 ConstantRateWifiManager::DoGetRtsTxVector (WifiRemoteStation *st)
   117 {
   119 {
   118   NS_LOG_FUNCTION (this << st);
   120   NS_LOG_FUNCTION (this << st);
   119   return m_ctlMode;
   121   return WifiTxVector (m_ctlMode, GetDefaultTxPowerLevel (), GetShortRetryCount (st), GetShortGuardInterval (st), Min (GetNumberOfReceiveAntennas (st),GetNumberOfTransmitAntennas()), GetNumberOfTransmitAntennas (st), GetStbc (st));
   120 }
   122 }
   121 
   123 
   122 bool
   124 bool
   123 ConstantRateWifiManager::IsLowLatency (void) const
   125 ConstantRateWifiManager::IsLowLatency (void) const
   124 {
   126 {