|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/packet.h"
24 #include "ns3/wifi-tx-vector.h"
26 #define Min(a,b) ((a < b) ? a : b)
27 #define Max(a,b) ((a > b) ? a : b)
62 .SetGroupName (
"Wifi")
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",
103 .AddAttribute (
"TurnOnRtsAfterRateIncrease",
104 "If true the RTS mechanism will be turned on when the rate will be increased",
108 .AddTraceSource (
"Rate",
109 "Traced value for rate changes (b/s)",
111 "ns3::TracedValueCallback::Uint64")
134 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HT rates");
138 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support VHT rates");
142 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HE rates");
232 if (((station->
m_failed - 1) % 2) == 1)
264 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
274 double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
276 NS_LOG_FUNCTION (
this << st << ackSnr << ackMode << dataSnr << dataChannelWidth << +dataNss);
323 if (channelWidth > 20 && channelWidth != 22)
344 if (channelWidth > 20 && channelWidth != 22)
364 uint32_t size,
bool normally)
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.
uint32_t m_minSuccessThreshold
minimum success threshold
#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,...
AttributeValue implementation for Boolean.
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
hold per-remote-station state for AARF-CD Wifi manager.
double m_successK
Multiplication factor for the success threshold.
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TypeId GetTypeId(void)
Get the type ID.
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index.
WifiModulationClass GetModulationClass() const
hold a list of per-remote-station state.
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
uint32_t m_minTimerThreshold
minimum timer threshold
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...
uint32_t m_maxSuccessThreshold
maximum success threshold
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
uint32_t m_success
success
bool DoNeedRts(WifiRemoteStation *station, uint32_t size, bool normally) override
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.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
bool m_turnOnRtsAfterRateIncrease
turn on RTS after rate increase
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
void ResetRtsWnd(AarfcdWifiRemoteStation *station)
Reset the RTS window of the given station.
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 CheckRts(AarfcdWifiRemoteStation *station)
Check if the use of RTS for the given station can be turned off.
WifiRemoteStation * DoCreateStation(void) const override
represent a single transmission mode
uint32_t m_rtsCounter
RTS counter.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
an implementation of the AARF-CD algorithm
uint32_t m_rtsWnd
RTS window.
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.
void DoReportDataFailed(WifiRemoteStation *station) override
It is important to realize that "recovery" mode starts after failure of the first transmission after ...
uint32_t m_maxRtsWnd
maximum RTS window
uint32_t m_successThreshold
success threshold
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.
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.
void IncreaseRtsWnd(AarfcdWifiRemoteStation *station)
Increase the RTS window size of the given station.
hold per-remote-station state.
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
uint32_t m_minRtsWnd
minimum RTS window
#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.
bool m_haveASuccess
have a success
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
bool m_turnOffRtsAfterRateDecrease
turn off RTS after rate decrease
virtual ~AarfcdWifiManager()
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Hold an unsigned integer type.
void TurnOnRts(AarfcdWifiRemoteStation *station)
Turn on RTS for the given station.
void DoInitialize(void) override
Initialize() implementation.
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.
void TurnOffRts(AarfcdWifiRemoteStation *station)
Turn off RTS for the given station.
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_timerTimeout
timer timeout
TracedValue< uint64_t > m_currentRate
Trace rate changes.
double m_timerK
Multiplication factor for the timer threshold.
bool m_justModifyRate
just modify rate
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.