|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #include "ns3/wifi-tx-vector.h"
25 #define Min(a,b) ((a < b) ? a : b)
26 #define Max(a,b) ((a > b) ? a : b)
56 .SetGroupName (
"Wifi")
58 .AddAttribute (
"SuccessK",
"Multiplication factor for the success threshold in the AARF algorithm.",
61 MakeDoubleChecker<double> ())
62 .AddAttribute (
"TimerK",
63 "Multiplication factor for the timer threshold in the AARF algorithm.",
66 MakeDoubleChecker<double> ())
67 .AddAttribute (
"MaxSuccessThreshold",
68 "Maximum value of the success threshold in the AARF algorithm.",
71 MakeUintegerChecker<uint32_t> ())
72 .AddAttribute (
"MinTimerThreshold",
73 "The minimum value for the 'timer' threshold in the AARF algorithm.",
76 MakeUintegerChecker<uint32_t> ())
77 .AddAttribute (
"MinSuccessThreshold",
78 "The minimum value for the success threshold in the AARF algorithm.",
81 MakeUintegerChecker<uint32_t> ())
82 .AddTraceSource (
"Rate",
83 "Traced value for rate changes (b/s)",
85 "ns3::TracedValueCallback::Uint64")
108 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HT rates");
112 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support VHT rates");
116 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HE rates");
182 if (((station->
m_failed - 1) % 2) == 1)
208 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
216 double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
218 NS_LOG_FUNCTION (
this << st << ackSnr << ackMode << dataSnr << dataChannelWidth << +dataNss);
255 if (channelWidth > 20 && channelWidth != 22)
276 if (channelWidth > 20 && channelWidth != 22)
a unique identifier for an interface.
uint8_t GetDefaultTxPowerLevel(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_success
success
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
uint32_t m_maxSuccessThreshold
maximum success threshold
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index.
void DoInitialize(void) override
Initialize() implementation.
WifiModulationClass GetModulationClass() const
void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr) override
This method is a pure virtual method that must be implemented by the sub-class.
hold a list of per-remote-station state.
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
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...
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PHY preambles.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_minTimerThreshold
minimum timer threshold
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
double m_successK
Multiplication factor for the success threshold.
static TypeId GetTypeId(void)
Get the type ID.
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
void DoReportDataFailed(WifiRemoteStation *station) override
It is important to realize that "recovery" mode starts after failure of the first transmission after ...
represent a single transmission mode
double m_timerK
Multiplication factor for the timer threshold.
virtual ~AarfWifiManager()
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble)
Return the preamble to be used for the transmission.
uint32_t m_successThreshold
success threshold
hold per-remote-station state.
WifiRemoteStation * DoCreateStation(void) const override
hold per-remote-station state for AARF Wifi manager.
uint32_t m_timerTimeout
timer timeout
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether non-ERP mode associated with the specified station at the specified index.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override
This method is a pure virtual method that must be implemented by the sub-class.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
AARF Rate control algorithm.
uint32_t m_minSuccessThreshold
minimum success threshold
Hold an unsigned integer type.
TracedValue< uint64_t > m_currentRate
Trace rate changes.
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.