25 #define Min(a,b) ((a < b) ? a : b) 56 .SetGroupName (
"Wifi")
58 .AddAttribute (
"TimerThreshold",
"The 'timer' threshold in the ARF algorithm.",
61 MakeUintegerChecker<uint32_t> ())
62 .AddAttribute (
"SuccessThreshold",
63 "The minimum number of successful transmissions to try a new rate.",
66 MakeUintegerChecker<uint32_t> ())
67 .AddTraceSource (
"Rate",
68 "Traced value for rate changes (b/s)",
70 "ns3::TracedValueCallback::Uint64")
148 if (((station->
m_retry - 1) % 2) == 1)
171 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
178 double ackSnr,
WifiMode ackMode,
double dataSnr)
218 if (channelWidth > 20 && channelWidth != 22)
229 return WifiTxVector (mode,
GetDefaultTxPowerLevel (),
GetPreambleForTransmission (mode,
GetAddress (station)), 800, 1, 1, 0, channelWidth,
GetAggregation (station),
false);
240 if (channelWidth > 20 && channelWidth != 22)
255 rtsTxVector =
WifiTxVector (mode,
GetDefaultTxPowerLevel (),
GetPreambleForTransmission (mode,
GetAddress (station)), 800, 1, 1, 0, channelWidth,
GetAggregation (station),
false);
271 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HT rates");
281 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support VHT rates");
291 NS_FATAL_ERROR (
"WifiRemoteStationManager selected does not support HE rates");
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint32_t m_retry
retry count
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
uint32_t m_timerThreshold
timer threshold
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
virtual ~ArfWifiManager()
void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
#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.
void SetHeSupported(bool enable)
Enable or disable HE capability support.
uint32_t m_success
success count
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
uint32_t m_timerTimeout
timer timeout
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index. ...
hold per-remote-station state for ARF Wifi manager.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
static TypeId GetTypeId(void)
Get the type ID.
WifiRemoteStationState * m_state
Remote station state.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
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.
Hold an unsigned integer type.
WifiPreamble GetPreambleForTransmission(WifiMode mode, Mac48Address dest)
Return the preamble to be used for the transmission.
uint32_t m_successThreshold
success threshold
hold a list of per-remote-station state.
void DoReportDataFailed(WifiRemoteStation *station)
It is important to realize that "recovery" mode starts after failure of the first transmission after ...
TracedValue< uint64_t > m_currentRate
Trace rate changes.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t m_failed
failed count
WifiModeList m_operationalRateSet
This member is the list of WifiMode objects that comprise the OperationalRateSet parameter for this r...
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...
void SetVhtSupported(bool enable)
Enable or disable VHT capability support.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
ARF Rate control algorithm.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
bool IsLowLatency(void) const
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.
uint8_t GetDefaultTxPowerLevel(void) const
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)
void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
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.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
hold per-remote-station state.
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
WifiRemoteStation * DoCreateStation(void) const
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.
void SetHtSupported(bool enable)
Enable or disable HT capability support.
uint32_t m_timer
timer value
uint32_t m_successThreshold
success threshold
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.