A Discrete-Event Network Simulator
API
rraa-wifi-manager.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2004,2005,2006 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Federico Maguolo <maguolof@dei.unipd.it>
19  */
20 
21 #include "ns3/log.h"
22 #include "ns3/packet.h"
23 #include "ns3/simulator.h"
24 #include "rraa-wifi-manager.h"
25 #include "ns3/wifi-phy.h"
26 #include "ns3/wifi-mac.h"
27 
28 #define Min(a,b) ((a < b) ? a : b)
29 
30 namespace ns3 {
31 
32 NS_LOG_COMPONENT_DEFINE ("RraaWifiManager");
33 
41 {
42  uint32_t m_counter;
43  uint32_t m_nFailed;
44  uint32_t m_adaptiveRtsWnd;
45  uint32_t m_rtsCounter;
50  uint8_t m_nRate;
51  uint8_t m_rateIndex;
52 
54 };
55 
57 
58 TypeId
60 {
61  static TypeId tid = TypeId ("ns3::RraaWifiManager")
63  .SetGroupName ("Wifi")
64  .AddConstructor<RraaWifiManager> ()
65  .AddAttribute ("Basic",
66  "If true the RRAA-BASIC algorithm will be used, otherwise the RRAA will be used",
67  BooleanValue (false),
70  .AddAttribute ("Timeout",
71  "Timeout for the RRAA BASIC loss estimation block",
72  TimeValue (Seconds (0.05)),
74  MakeTimeChecker ())
75  .AddAttribute ("FrameLength",
76  "The Data frame length (in bytes) used for calculating mode TxTime.",
77  UintegerValue (1420),
79  MakeUintegerChecker <uint32_t> ())
80  .AddAttribute ("AckFrameLength",
81  "The Ack frame length (in bytes) used for calculating mode TxTime.",
82  UintegerValue (14),
84  MakeUintegerChecker <uint32_t> ())
85  .AddAttribute ("Alpha",
86  "Constant for calculating the MTL threshold.",
87  DoubleValue (1.25),
89  MakeDoubleChecker<double> (1))
90  .AddAttribute ("Beta",
91  "Constant for calculating the ORI threshold.",
92  DoubleValue (2),
94  MakeDoubleChecker<double> (1))
95  .AddAttribute ("Tau",
96  "Constant for calculating the EWND size.",
97  DoubleValue (0.012),
99  MakeDoubleChecker<double> (0))
100  .AddTraceSource ("Rate",
101  "Traced value for rate changes (b/s)",
103  "ns3::TracedValueCallback::Uint64")
104  ;
105  return tid;
106 }
107 
110  m_currentRate (0)
111 {
112  NS_LOG_FUNCTION (this);
113 }
114 
116 {
117  NS_LOG_FUNCTION (this);
118 }
119 
120 void
122 {
123  NS_LOG_FUNCTION (this << phy);
124  m_sifs = phy->GetSifs ();
125  m_difs = m_sifs + 2 * phy->GetSlot ();
126  for (const auto & mode : phy->GetModeList ())
127  {
128  WifiTxVector txVector;
129  txVector.SetMode (mode);
131  /* Calculate the TX Time of the Data and the corresponding Ack */
132  Time dataTxTime = phy->CalculateTxDuration (m_frameLength, txVector, phy->GetPhyBand ());
133  Time ackTxTime = phy->CalculateTxDuration (m_ackLength, txVector, phy->GetPhyBand ());
134  NS_LOG_DEBUG ("Calculating TX times: Mode= " << mode << " DataTxTime= " << dataTxTime << " AckTxTime= " << ackTxTime);
135  AddCalcTxTime (mode, dataTxTime + ackTxTime);
136  }
138 }
139 
140 void
142 {
143  NS_LOG_FUNCTION (this);
145 }
146 
147 void
149 {
150  NS_LOG_FUNCTION (this);
151  if (GetHtSupported ())
152  {
153  NS_FATAL_ERROR ("WifiRemoteStationManager selected does not support HT rates");
154  }
155  if (GetVhtSupported ())
156  {
157  NS_FATAL_ERROR ("WifiRemoteStationManager selected does not support VHT rates");
158  }
159  if (GetHeSupported ())
160  {
161  NS_FATAL_ERROR ("WifiRemoteStationManager selected does not support HE rates");
162  }
163 }
164 
165 Time
167 {
168  NS_LOG_FUNCTION (this << mode);
169  for (TxTime::const_iterator i = m_calcTxTime.begin (); i != m_calcTxTime.end (); i++)
170  {
171  if (mode == i->second)
172  {
173  return i->first;
174  }
175  }
176  NS_ASSERT (false);
177  return Seconds (0);
178 }
179 
180 void
182 {
183  NS_LOG_FUNCTION (this << mode << t);
184  m_calcTxTime.push_back (std::make_pair (t, mode));
185 }
186 
189 {
190  NS_LOG_FUNCTION (this << station << mode);
191  struct WifiRraaThresholds threshold;
192  for (RraaThresholdsTable::const_iterator i = station->m_thresholds.begin (); i != station->m_thresholds.end (); i++)
193  {
194  if (mode == i->second)
195  {
196  return i->first;
197  }
198  }
199  NS_ABORT_MSG ("No thresholds for mode " << mode << " found");
200  return threshold; // Silence compiler warning
201 }
202 
205 {
207  station->m_initialized = false;
208  station->m_adaptiveRtsWnd = 0;
209  station->m_rtsCounter = 0;
210  station->m_adaptiveRtsOn = false;
211  station->m_lastFrameFail = false;
212  return station;
213 }
214 
215 void
217 {
218  NS_LOG_FUNCTION (this << station);
219  if (!station->m_initialized)
220  {
221  //Note: we appear to be doing late initialization of the table
222  //to make sure that the set of supported rates has been initialized
223  //before we perform our own initialization.
224  station->m_nRate = GetNSupported (station);
225  //Initialize at maximal rate
226  station->m_rateIndex = GetMaxRate (station);
227 
228  station->m_initialized = true;
229 
230  station->m_thresholds = RraaThresholdsTable (station->m_nRate);
231  InitThresholds (station);
232  ResetCountersBasic (station);
233  }
234 }
235 
236 void
238 {
239  NS_LOG_FUNCTION (this << station);
240  NS_LOG_DEBUG ("InitThresholds = " << station);
241 
242  double nextCritical = 0;
243  double nextMtl = 0;
244  double mtl = 0;
245  double ori = 0;
246  for (uint8_t i = 0; i < station->m_nRate; i++)
247  {
248  WifiMode mode = GetSupported (station, i);
249  Time totalTxTime = GetCalcTxTime (mode) + m_sifs + m_difs;
250  if (i == GetMaxRate (station))
251  {
252  ori = 0;
253  }
254  else
255  {
256  WifiMode nextMode = GetSupported (station, i + 1);
257  Time nextTotalTxTime = GetCalcTxTime (nextMode) + m_sifs + m_difs;
258  nextCritical = 1 - (nextTotalTxTime.GetSeconds () / totalTxTime.GetSeconds ());
259  nextMtl = m_alpha * nextCritical;
260  ori = nextMtl / m_beta;
261  }
262  if (i == 0)
263  {
264  mtl = 1;
265  }
267  th.m_ewnd = static_cast<uint32_t> (ceil (m_tau / totalTxTime.GetSeconds ()));
268  th.m_ori = ori;
269  th.m_mtl = mtl;
270  station->m_thresholds.push_back (std::make_pair (th, mode));
271  mtl = nextMtl;
272  NS_LOG_DEBUG (mode << " " << th.m_ewnd << " " << th.m_mtl << " " << th.m_ori);
273  }
274 }
275 
276 void
278 {
279  NS_LOG_FUNCTION (this << station);
280  station->m_nFailed = 0;
281  station->m_counter = GetThresholds (station, station->m_rateIndex).m_ewnd;
282  station->m_lastReset = Simulator::Now ();
283 }
284 
285 uint8_t
287 {
288  return station->m_nRate - 1;
289 }
290 
291 void
293 {
294  NS_LOG_FUNCTION (this << st);
295 }
296 
297 void
299 {
300  NS_LOG_FUNCTION (this << st);
301  RraaWifiRemoteStation *station = static_cast<RraaWifiRemoteStation*> (st);
302  station->m_lastFrameFail = true;
303  CheckTimeout (station);
304  station->m_counter--;
305  station->m_nFailed++;
306  RunBasicAlgorithm (station);
307 }
308 
309 void
311  double rxSnr, WifiMode txMode)
312 {
313  NS_LOG_FUNCTION (this << st << rxSnr << txMode);
314 }
315 
316 void
318  double ctsSnr, WifiMode ctsMode, double rtsSnr)
319 {
320  NS_LOG_FUNCTION (this << st << ctsSnr << ctsMode << rtsSnr);
321 }
322 
323 void
325  double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
326 {
327  NS_LOG_FUNCTION (this << st << ackSnr << ackMode << dataSnr << dataChannelWidth << +dataNss);
328  RraaWifiRemoteStation *station = static_cast<RraaWifiRemoteStation*> (st);
329  station->m_lastFrameFail = false;
330  CheckTimeout (station);
331  station->m_counter--;
332  RunBasicAlgorithm (station);
333 }
334 
335 void
337 {
338  NS_LOG_FUNCTION (this << st);
339 }
340 
341 void
343 {
344  NS_LOG_FUNCTION (this << st);
345 }
346 
349 {
350  NS_LOG_FUNCTION (this << st);
351  RraaWifiRemoteStation *station = static_cast<RraaWifiRemoteStation*> (st);
352  uint16_t channelWidth = GetChannelWidth (station);
353  if (channelWidth > 20 && channelWidth != 22)
354  {
355  channelWidth = 20;
356  }
357  CheckInit (station);
358  WifiMode mode = GetSupported (station, station->m_rateIndex);
359  if (m_currentRate != mode.GetDataRate (channelWidth))
360  {
361  NS_LOG_DEBUG ("New datarate: " << mode.GetDataRate (channelWidth));
362  m_currentRate = mode.GetDataRate (channelWidth);
363  }
364  return WifiTxVector (mode, GetDefaultTxPowerLevel (), GetPreambleForTransmission (mode.GetModulationClass (), GetShortPreambleEnabled ()), 800, 1, 1, 0, channelWidth, GetAggregation (station));
365 }
366 
369 {
370  NS_LOG_FUNCTION (this << st);
371  RraaWifiRemoteStation *station = static_cast<RraaWifiRemoteStation*> (st);
372  uint16_t channelWidth = GetChannelWidth (station);
373  if (channelWidth > 20 && channelWidth != 22)
374  {
375  channelWidth = 20;
376  }
377  WifiTxVector rtsTxVector;
378  WifiMode mode;
379  if (GetUseNonErpProtection () == false)
380  {
381  mode = GetSupported (station, 0);
382  }
383  else
384  {
385  mode = GetNonErpSupported (station, 0);
386  }
387  rtsTxVector = WifiTxVector (mode, GetDefaultTxPowerLevel (), GetPreambleForTransmission (mode.GetModulationClass (), GetShortPreambleEnabled ()), 800, 1, 1, 0, channelWidth, GetAggregation (station));
388  return rtsTxVector;
389 }
390 
391 bool
393  uint32_t size, bool normally)
394 {
395  NS_LOG_FUNCTION (this << st << size << normally);
396  RraaWifiRemoteStation *station = static_cast<RraaWifiRemoteStation*> (st);
397  CheckInit (station);
398  if (m_basic)
399  {
400  return normally;
401  }
402  ARts (station);
403  return station->m_adaptiveRtsOn;
404 }
405 
406 void
408 {
409  NS_LOG_FUNCTION (this << station);
410  Time d = Simulator::Now () - station->m_lastReset;
411  if (station->m_counter == 0 || d > m_timeout)
412  {
413  ResetCountersBasic (station);
414  }
415 }
416 
417 void
419 {
420  NS_LOG_FUNCTION (this << station);
421  WifiRraaThresholds thresholds = GetThresholds (station, station->m_rateIndex);
422  double ploss = (station->m_nFailed / thresholds.m_ewnd);
423  if (station->m_counter == 0
424  || ploss > thresholds.m_mtl)
425  {
426  if (ploss > thresholds.m_mtl)
427  {
428  station->m_rateIndex--;
429  }
430  else if (station->m_rateIndex < GetMaxRate (station)
431  && ploss < thresholds.m_ori)
432  {
433  station->m_rateIndex++;
434  }
435  ResetCountersBasic (station);
436  }
437 }
438 
439 void
441 {
442  if (!station->m_adaptiveRtsOn
443  && station->m_lastFrameFail)
444  {
445  station->m_adaptiveRtsWnd++;
446  station->m_rtsCounter = station->m_adaptiveRtsWnd;
447  }
448  else if ((station->m_adaptiveRtsOn && station->m_lastFrameFail)
449  || (!station->m_adaptiveRtsOn && !station->m_lastFrameFail))
450  {
451  station->m_adaptiveRtsWnd = station->m_adaptiveRtsWnd / 2;
452  station->m_rtsCounter = station->m_adaptiveRtsWnd;
453  }
454  if (station->m_rtsCounter > 0)
455  {
456  station->m_adaptiveRtsOn = true;
457  station->m_rtsCounter--;
458  }
459  else
460  {
461  station->m_adaptiveRtsOn = false;
462  }
463 }
464 
467 {
468  NS_LOG_FUNCTION (this << station << +index);
469  WifiMode mode = GetSupported (station, index);
470  return GetThresholds (station, mode);
471 }
472 
473 } //namespace ns3
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::WifiRemoteStationManager::GetDefaultTxPowerLevel
uint8_t GetDefaultTxPowerLevel(void) const
Definition: wifi-remote-station-manager.cc:1206
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::RraaWifiManager::m_difs
Time m_difs
Value of DIFS configured in the device.
Definition: rraa-wifi-manager.h:179
ns3::RraaWifiRemoteStation::m_counter
uint32_t m_counter
Counter for transmission attempts.
Definition: rraa-wifi-manager.cc:42
ns3::RraaWifiManager::DoReportFinalDataFailed
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: rraa-wifi-manager.cc:342
ns3::RraaWifiManager::ARts
void ARts(RraaWifiRemoteStation *station)
Activate the use of RTS for the given station if the conditions are met.
Definition: rraa-wifi-manager.cc:440
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:67
ns3::MakeTimeChecker
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:533
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3::WifiRraaThresholds::m_mtl
double m_mtl
Maximum Tolerable Loss threshold.
Definition: rraa-wifi-manager.h:36
ns3::WifiRemoteStationManager::GetUseNonErpProtection
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
Definition: wifi-remote-station-manager.cc:1051
ns3::WifiRraaThresholds::m_ewnd
uint32_t m_ewnd
Evaluation Window.
Definition: rraa-wifi-manager.h:37
ns3::RraaWifiManager::DoInitialize
void DoInitialize(void) override
Initialize() implementation.
Definition: rraa-wifi-manager.cc:148
ns3::Simulator::Now
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiRemoteStationManager::GetSupported
WifiMode GetSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether mode associated with the specified station at the specified index.
Definition: wifi-remote-station-manager.cc:1635
ns3::RraaWifiRemoteStation::m_rateIndex
uint8_t m_rateIndex
Current rate index.
Definition: rraa-wifi-manager.cc:51
ns3::RraaThresholdsTable
std::vector< std::pair< WifiRraaThresholds, WifiMode > > RraaThresholdsTable
List of thresholds for each mode.
Definition: rraa-wifi-manager.h:43
ns3::RraaWifiRemoteStation::m_nFailed
uint32_t m_nFailed
Number of failed transmission attempts.
Definition: rraa-wifi-manager.cc:43
ns3::RraaWifiManager
Robust Rate Adaptation Algorithm.
Definition: rraa-wifi-manager.h:59
ns3::RraaWifiManager::GetMaxRate
uint8_t GetMaxRate(RraaWifiRemoteStation *station) const
Return the index for the maximum transmission rate for the given station.
Definition: rraa-wifi-manager.cc:286
ns3::RraaWifiManager::DoGetRtsTxVector
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
Definition: rraa-wifi-manager.cc:368
ns3::RraaWifiManager::GetThresholds
WifiRraaThresholds GetThresholds(RraaWifiRemoteStation *station, WifiMode mode) const
Get the thresholds for the given station and mode.
Definition: rraa-wifi-manager.cc:188
ns3::WifiMode::GetModulationClass
WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:159
ns3::RraaWifiManager::DoReportDataFailed
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: rraa-wifi-manager.cc:298
ns3::WifiRemoteStationManager
hold a list of per-remote-station state.
Definition: wifi-remote-station-manager.h:121
ns3::WifiRemoteStationManager::GetHtSupported
bool GetHtSupported(void) const
Return whether the device has HT capability support enabled.
Definition: wifi-remote-station-manager.cc:232
ns3::RraaWifiRemoteStation::m_lastFrameFail
bool m_lastFrameFail
Flag if the last frame sent has failed.
Definition: rraa-wifi-manager.cc:48
ns3::WifiRemoteStationManager::GetVhtSupported
bool GetVhtSupported(void) const
Return whether the device has VHT capability support enabled.
Definition: wifi-remote-station-manager.cc:244
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition: wifi-tx-vector.cc:226
ns3::WifiRemoteStationManager::GetNSupported
uint8_t GetNSupported(const WifiRemoteStation *station) const
Return the number of modes supported by the given station.
Definition: wifi-remote-station-manager.cc:1743
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition: wifi-tx-vector.h:71
third.mac
mac
Definition: third.py:99
ns3::RraaWifiManager::CheckInit
void CheckInit(RraaWifiRemoteStation *station)
Check for initializations.
Definition: rraa-wifi-manager.cc:216
ns3::RraaWifiManager::m_frameLength
uint32_t m_frameLength
Data frame length used for calculate mode TxTime.
Definition: rraa-wifi-manager.h:181
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: boolean.h:85
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
ns3::DoubleValue
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
ns3::WifiRemoteStationManager::GetShortPreambleEnabled
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PHY preambles.
Definition: wifi-remote-station-manager.cc:226
ns3::RraaWifiManager::SetupPhy
void SetupPhy(const Ptr< WifiPhy > phy) override
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
Definition: rraa-wifi-manager.cc:121
ns3::RraaWifiManager::SetupMac
void SetupMac(const Ptr< WifiMac > mac) override
Set up MAC associated with this device since it is the object that knows the full set of timing param...
Definition: rraa-wifi-manager.cc:141
ns3::MakeTraceSourceAccessor
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Definition: trace-source-accessor.h:202
ns3::RraaWifiManager::m_sifs
Time m_sifs
Value of SIFS configured in the device.
Definition: rraa-wifi-manager.h:178
ns3::Ptr< WifiPhy >
ns3::RraaWifiManager::m_calcTxTime
TxTime m_calcTxTime
To hold all the calculated TxTime for all modes.
Definition: rraa-wifi-manager.h:177
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
ns3::WifiRraaThresholds
WifiRraaThresholds structure.
Definition: rraa-wifi-manager.h:34
ns3::WifiMode
represent a single transmission mode
Definition: wifi-mode.h:48
ns3::RraaWifiManager::DoGetDataTxVector
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
Definition: rraa-wifi-manager.cc:348
ns3::RraaWifiManager::RunBasicAlgorithm
void RunBasicAlgorithm(RraaWifiRemoteStation *station)
Find an appropriate rate for the given station, using a basic algorithm.
Definition: rraa-wifi-manager.cc:418
ns3::RraaWifiManager::m_alpha
double m_alpha
Alpha value for RRAA (value for calculating MTL threshold)
Definition: rraa-wifi-manager.h:186
ns3::RraaWifiManager::DoReportDataOk
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.
Definition: rraa-wifi-manager.cc:324
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
ns3::RraaWifiManager::m_ackLength
uint32_t m_ackLength
Ack frame length used for calculate mode TxTime.
Definition: rraa-wifi-manager.h:182
ns3::WifiRraaThresholds::m_ori
double m_ori
Opportunistic Rate Increase threshold.
Definition: rraa-wifi-manager.h:35
ns3::RraaWifiManager::~RraaWifiManager
virtual ~RraaWifiManager()
Definition: rraa-wifi-manager.cc:115
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::RraaWifiManager::m_timeout
Time m_timeout
timeout
Definition: rraa-wifi-manager.h:185
ns3::RraaWifiManager::DoReportRtsFailed
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: rraa-wifi-manager.cc:292
ns3::RraaWifiManager::DoNeedRts
bool DoNeedRts(WifiRemoteStation *st, uint32_t size, bool normally) override
Definition: rraa-wifi-manager.cc:392
ns3::WifiRemoteStationManager::SetupPhy
virtual void SetupPhy(const Ptr< WifiPhy > phy)
Set up PHY associated with this device since it is the object that knows the full set of transmit rat...
Definition: wifi-remote-station-manager.cc:142
ns3::RraaWifiManager::GetCalcTxTime
Time GetCalcTxTime(WifiMode mode) const
Get the estimated TxTime of a packet with a given mode.
Definition: rraa-wifi-manager.cc:166
ns3::RraaWifiRemoteStation::m_nRate
uint8_t m_nRate
Number of supported rates.
Definition: rraa-wifi-manager.cc:50
ns3::RraaWifiManager::m_basic
bool m_basic
basic
Definition: rraa-wifi-manager.h:184
ns3::RraaWifiManager::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: rraa-wifi-manager.cc:59
ns3::RraaWifiManager::RraaWifiManager
RraaWifiManager()
Definition: rraa-wifi-manager.cc:108
ns3::MakeDoubleAccessor
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: double.h:42
ns3::GetPreambleForTransmission
WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble)
Return the preamble to be used for the transmission.
Definition: wifi-phy-common.cc:87
ns3::WIFI_PREAMBLE_LONG
@ WIFI_PREAMBLE_LONG
Definition: wifi-phy-common.h:69
ns3::WifiRemoteStation
hold per-remote-station state.
Definition: wifi-remote-station-manager.h:62
ns3::RraaWifiRemoteStation::m_adaptiveRtsOn
bool m_adaptiveRtsOn
Check if Adaptive RTS mechanism is on.
Definition: rraa-wifi-manager.cc:47
ns3::RraaWifiRemoteStation
hold per-remote-station state for RRAA Wifi manager.
Definition: rraa-wifi-manager.cc:41
ns3::WifiRemoteStationManager::GetAggregation
bool GetAggregation(const WifiRemoteStation *station) const
Return whether the given station supports A-MPDU.
Definition: wifi-remote-station-manager.cc:1707
ns3::RraaWifiManager::m_tau
double m_tau
Tau value for RRAA (value for calculating EWND size).
Definition: rraa-wifi-manager.h:188
ns3::RraaWifiManager::m_currentRate
TracedValue< uint64_t > m_currentRate
Trace rate changes.
Definition: rraa-wifi-manager.h:190
ns3::RraaWifiRemoteStation::m_lastReset
Time m_lastReset
Time of the last reset.
Definition: rraa-wifi-manager.cc:46
ns3::RraaWifiManager::AddCalcTxTime
void AddCalcTxTime(WifiMode mode, Time t)
Add transmission time for the given mode to an internal list.
Definition: rraa-wifi-manager.cc:181
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::WifiRemoteStationManager::GetNonErpSupported
WifiMode GetNonErpSupported(const WifiRemoteStation *station, uint8_t i) const
Return whether non-ERP mode associated with the specified station at the specified index.
Definition: wifi-remote-station-manager.cc:1649
ns3::RraaWifiManager::DoReportRxOk
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: rraa-wifi-manager.cc:310
ns3::RraaWifiRemoteStation::m_thresholds
RraaThresholdsTable m_thresholds
RRAA thresholds for this station.
Definition: rraa-wifi-manager.cc:53
ns3::TimeValue
AttributeValue implementation for Time.
Definition: nstime.h:1353
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition: log-macros-enabled.h:244
ns3::RraaWifiManager::CheckTimeout
void CheckTimeout(RraaWifiRemoteStation *station)
Check if the counter should be reset.
Definition: rraa-wifi-manager.cc:407
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::RraaWifiManager::DoCreateStation
WifiRemoteStation * DoCreateStation(void) const override
Definition: rraa-wifi-manager.cc:204
ns3::RraaWifiManager::DoReportFinalRtsFailed
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: rraa-wifi-manager.cc:336
ns3::RraaWifiManager::m_beta
double m_beta
Beta value for RRAA (value for calculating ORI threshold).
Definition: rraa-wifi-manager.h:187
ns3::WifiRemoteStationManager::GetChannelWidth
uint16_t GetChannelWidth(const WifiRemoteStation *station) const
Return the channel width supported by the station.
Definition: wifi-remote-station-manager.cc:1683
ns3::WifiMode::GetDataRate
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Definition: wifi-mode.cc:100
ns3::MakeUintegerAccessor
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: uinteger.h:45
ns3::RraaWifiManager::InitThresholds
void InitThresholds(RraaWifiRemoteStation *station)
Initialize the thresholds internal list for the given station.
Definition: rraa-wifi-manager.cc:237
ns3::WifiRemoteStationManager::SetupMac
virtual void SetupMac(const Ptr< WifiMac > mac)
Set up MAC associated with this device since it is the object that knows the full set of timing param...
Definition: wifi-remote-station-manager.cc:161
ns3::RraaWifiRemoteStation::m_adaptiveRtsWnd
uint32_t m_adaptiveRtsWnd
Window size for the Adaptive RTS mechanism.
Definition: rraa-wifi-manager.cc:44
ns3::WifiTxVector::SetPreambleType
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
Definition: wifi-tx-vector.cc:248
ns3::RraaWifiManager::ResetCountersBasic
void ResetCountersBasic(RraaWifiRemoteStation *station)
Reset the counters of the given station.
Definition: rraa-wifi-manager.cc:277
rraa-wifi-manager.h
ns3::RraaWifiManager::DoReportRtsOk
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.
Definition: rraa-wifi-manager.cc:317
ns3::Time::GetSeconds
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:380
ns3::WifiRemoteStationManager::GetHeSupported
bool GetHeSupported(void) const
Return whether the device has HE capability support enabled.
Definition: wifi-remote-station-manager.cc:256
third.phy
phy
Definition: third.py:93
ns3::MakeTimeAccessor
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: nstime.h:1354
NS_ABORT_MSG
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
ns3::RraaWifiRemoteStation::m_rtsCounter
uint32_t m_rtsCounter
Counter for RTS transmission attempts.
Definition: rraa-wifi-manager.cc:45
ns3::RraaWifiRemoteStation::m_initialized
bool m_initialized
For initializing variables.
Definition: rraa-wifi-manager.cc:49