25 #define Min(a,b) ((a < b) ? a : b) 26 #define Max(a,b) ((a > b) ? a : b) 57 .SetGroupName (
"Wifi")
59 .AddAttribute (
"SuccessK",
"Multiplication factor for the success threshold in the AARF algorithm.",
62 MakeDoubleChecker<double> ())
63 .AddAttribute (
"TimerK",
64 "Multiplication factor for the timer threshold in the AARF algorithm.",
67 MakeDoubleChecker<double> ())
68 .AddAttribute (
"MaxSuccessThreshold",
69 "Maximum value of the success threshold in the AARF algorithm.",
72 MakeUintegerChecker<uint32_t> ())
73 .AddAttribute (
"MinTimerThreshold",
74 "The minimum value for the 'timer' threshold in the AARF algorithm.",
77 MakeUintegerChecker<uint32_t> ())
78 .AddAttribute (
"MinSuccessThreshold",
79 "The minimum value for the success threshold in the AARF algorithm.",
82 MakeUintegerChecker<uint32_t> ())
83 .AddTraceSource (
"Rate",
84 "Traced value for rate changes (b/s)",
86 "ns3::TracedValueCallback::Uint64")
109 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HT rates");
113 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support VHT rates");
117 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HE rates");
185 if (((station->
m_retry - 1) % 2) == 1)
211 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
219 double ackSnr,
WifiMode ackMode,
double dataSnr)
259 if (channelWidth > 20 && channelWidth != 22)
270 return WifiTxVector (mode,
GetDefaultTxPowerLevel (),
GetPreambleForTransmission (mode.
GetModulationClass (),
GetShortPreambleEnabled (),
UseGreenfieldForDestination (
GetAddress (station))), 800, 1, 1, 0, channelWidth,
GetAggregation (station),
false);
281 if (channelWidth > 20 && channelWidth != 22)
296 rtsTxVector =
WifiTxVector (mode,
GetDefaultTxPowerLevel (),
GetPreambleForTransmission (mode.
GetModulationClass (),
GetShortPreambleEnabled (),
UseGreenfieldForDestination (
GetAddress (station))), 800, 1, 1, 0, channelWidth,
GetAggregation (station),
false);
uint32_t m_minSuccessThreshold
minimum success threshold
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
uint32_t m_success
success
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint8_t GetNSupported(const WifiRemoteStation *station) const
Return the number of modes supported by the given station.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
double m_successK
Multiplication factor for the success threshold.
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
bool IsLowLatency(void) const
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble, bool useGreenfield)
Return the preamble to be used for the transmission.
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index. ...
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
void DoReportDataFailed(WifiRemoteStation *station)
It is important to realize that "recovery" mode starts after failure of the first transmission after ...
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void DoInitialize(void)
Initialize() implementation.
void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)
This method is a pure virtual method that must be implemented by the sub-class.
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PLCP preambles.
void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
WifiRemoteStation * DoCreateStation(void) const
void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
Hold an unsigned integer type.
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum.
uint32_t m_minTimerThreshold
minimum timer threshold
hold a list of per-remote-station state.
WifiModulationClass GetModulationClass() const
AARF Rate control algorithmThis class implements the AARF rate control algorithm which was initially ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool UseGreenfieldForDestination(Mac48Address dest) const
double m_timerK
Multiplication factor for the timer threshold.
Mac48Address GetAddress(const WifiRemoteStation *station) const
Return the address of the station.
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether non-ERP mode associated with the specified station at the specified index...
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
uint32_t m_successThreshold
success threshold
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
hold per-remote-station state for AARF Wifi manager.
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)
This method is a pure virtual method that must be implemented by the sub-class.
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
TracedValue< uint64_t > m_currentRate
Trace rate changes.
uint8_t GetDefaultTxPowerLevel(void) const
virtual ~AarfWifiManager()
void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_timerTimeout
timer timeout
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface.
uint32_t m_maxSuccessThreshold
maximum success threshold
TypeId SetParent(TypeId tid)
Set the parent TypeId.
hold per-remote-station state.
static TypeId GetTypeId(void)
Get the type ID.
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.