22 #include "ns3/assert.h"
24 #include "ns3/simulator.h"
25 #include "ns3/boolean.h"
26 #include "ns3/double.h"
27 #include "ns3/uinteger.h"
30 #define Min(a,b) ((a < b) ? a : b)
31 #define Max(a,b) ((a > b) ? a : b)
63 .AddConstructor<AarfcdWifiManager> ()
64 .AddAttribute (
"SuccessK",
"Multiplication factor for the success threshold in the AARF algorithm.",
67 MakeDoubleChecker<double> ())
68 .AddAttribute (
"TimerK",
69 "Multiplication factor for the timer threshold in the AARF algorithm.",
72 MakeDoubleChecker<double> ())
73 .AddAttribute (
"MaxSuccessThreshold",
74 "Maximum value of the success threshold in the AARF algorithm.",
77 MakeUintegerChecker<uint32_t> ())
78 .AddAttribute (
"MinTimerThreshold",
79 "The minimum value for the 'timer' threshold in the AARF algorithm.",
82 MakeUintegerChecker<uint32_t> ())
83 .AddAttribute (
"MinSuccessThreshold",
84 "The minimum value for the success threshold in the AARF algorithm.",
87 MakeUintegerChecker<uint32_t> ())
88 .AddAttribute (
"MinRtsWnd",
89 "Minimum value for Rts window of Aarf-CD",
92 MakeUintegerChecker<uint32_t> ())
93 .AddAttribute (
"MaxRtsWnd",
94 "Maximum value for Rts window of Aarf-CD",
97 MakeUintegerChecker<uint32_t> ())
98 .AddAttribute (
"TurnOffRtsAfterRateDecrease",
99 "If true the RTS mechanism will be turned off when the rate will be decreased",
102 MakeBooleanChecker ())
103 .AddAttribute (
"TurnOnRtsAfterRateIncrease",
104 "If true the RTS mechanism will be turned on when the rate will be increased",
107 MakeBooleanChecker ())
216 if (((station->
m_retry - 1) % 2) == 1)
246 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
255 double ackSnr,
WifiMode ackMode,
double dataSnr)
uint32_t GetNSupported(const WifiRemoteStation *station) const
virtual void DoReportDataFailed(WifiRemoteStation *station)
uint32_t m_successThreshold
#define NS_LOG_FUNCTION(parameters)
virtual bool DoNeedRts(WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
uint32_t m_maxSuccessThreshold
#define NS_ASSERT(condition)
#define NS_LOG_COMPONENT_DEFINE(name)
virtual void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)
bool m_turnOnRtsAfterRateIncrease
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint32_t size)
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)
uint32_t GetNumberOfReceiveAntennas(const WifiRemoteStation *station) const
WifiMode GetSupported(const WifiRemoteStation *station, uint32_t i) const
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)
bool GetStbc(const WifiRemoteStation *station) const
void TurnOnRts(AarfcdWifiRemoteStation *station)
void TurnOffRts(AarfcdWifiRemoteStation *station)
Hold an unsigned integer type.
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
void ResetRtsWnd(AarfcdWifiRemoteStation *station)
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
hold a list of per-remote-station state.
void CheckRts(AarfcdWifiRemoteStation *station)
virtual ~AarfcdWifiManager()
virtual bool IsLowLatency(void) const
virtual void DoReportRtsFailed(WifiRemoteStation *station)
bool GetShortGuardInterval(const WifiRemoteStation *station) const
uint32_t m_minSuccessThreshold
virtual WifiRemoteStation * DoCreateStation(void) const
uint8_t GetDefaultTxPowerLevel(void) const
uint32_t m_minTimerThreshold
bool m_turnOffRtsAfterRateDecrease
uint32_t GetLongRetryCount(const WifiRemoteStation *station) const
#define NS_LOG_DEBUG(msg)
uint32_t GetShortRetryCount(const WifiRemoteStation *station) const
uint32_t GetNumberOfTransmitAntennas(void)
static TypeId GetTypeId(void)
an implementation of the AARF-CD algorithmThis algorithm was first described in "Efficient Collision ...
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)
Hold an floating point type.
void IncreaseRtsWnd(AarfcdWifiRemoteStation *station)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
hold per-remote-station state.
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)