A Discrete-Event Network Simulator
API
minstrel-ht-wifi-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 Duy Nguyen
4  * Copyright (c) 2015 Ghada Badawy
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  *Authors: Duy Nguyen <duy@soe.ucsc.edu>
20  * Ghada Badawy <gbadawy@gmail.com>
21  * Matias Richart <mrichart@fing.edu.uy>
22  *
23  * MinstrelHt is a rate adaptation algorithm for high-throughput (HT) 802.11
24  */
25 
26 #ifndef MINSTREL_HT_WIFI_MANAGER_H
27 #define MINSTREL_HT_WIFI_MANAGER_H
28 
29 #include "ns3/wifi-remote-station-manager.h"
30 #include "minstrel-wifi-manager.h"
31 #include "ns3/wifi-mpdu-type.h"
32 
33 namespace ns3 {
34 
38 typedef std::map<WifiMode, Time> TxTime;
39 
45  {
46  GROUP_HT = 0,
48  GROUP_HE
49  };
50 
58 inline std::ostream& operator<< (std::ostream& os, McsGroupType type)
59 {
60  switch (type)
61  {
62  case GROUP_HT:
63  return (os << "HT");
64  case GROUP_VHT:
65  return (os << "VHT");
66  case GROUP_HE:
67  return (os << "HE");
68  default:
69  return (os << "INVALID");
70  }
71 }
72 
79 struct McsGroup
80 {
81  uint8_t streams;
82  uint16_t gi;
83  uint16_t chWidth;
85  bool isSupported;
86  // To accurately account for TX times, we separate the TX time of the first
87  // MPDU in an A-MPDU from the rest of the MPDUs.
90 };
91 
96 typedef std::vector<McsGroup> MinstrelMcsGroups;
97 
103 {
109  bool supported;
110  uint8_t mcsIndex;
111  uint32_t retryCount;
113  uint32_t numRateAttempt;
114  uint32_t numRateSuccess;
115  double prob;
117 
122  double ewmaProb;
123  double ewmsdProb;
126  uint32_t numSamplesSkipped;
127  uint64_t successHist;
128  uint64_t attemptHist;
129  double throughput;
130 };
131 
136 typedef std::vector<MinstrelHtRateInfo> MinstrelHtRate;
137 
141 struct GroupInfo
142 {
146  uint8_t m_col;
147  uint8_t m_index;
148  bool m_supported;
149  uint16_t m_maxTpRate;
150  uint16_t m_maxTpRate2;
151  uint16_t m_maxProbRate;
153 };
154 
159 typedef std::vector<struct GroupInfo> McsGroupData;
160 
165 static const uint8_t MAX_HT_SUPPORTED_STREAMS = 4;
166 static const uint8_t MAX_VHT_SUPPORTED_STREAMS = 8;
167 static const uint8_t MAX_HE_SUPPORTED_STREAMS = 8;
168 static const uint8_t MAX_HT_STREAM_GROUPS = 4;
169 static const uint8_t MAX_VHT_STREAM_GROUPS = 8;
170 static const uint8_t MAX_HE_STREAM_GROUPS = 12;
171 static const uint8_t MAX_HT_GROUP_RATES = 8;
172 static const uint8_t MAX_VHT_GROUP_RATES = 10;
173 static const uint8_t MAX_HE_GROUP_RATES = 12;
174 static const uint8_t MAX_HT_WIDTH = 40;
175 static const uint8_t MAX_VHT_WIDTH = 160;
176 static const uint8_t MAX_HE_WIDTH = 160;
177 
223 {
224 public:
229  static TypeId GetTypeId (void);
231  virtual ~MinstrelHtWifiManager ();
232 
233  void SetupPhy (const Ptr<WifiPhy> phy) override;
234  void SetupMac (const Ptr<WifiMac> mac) override;
235  int64_t AssignStreams (int64_t stream) override;
236 
243  typedef void (*RateChangeTracedCallback)(const uint64_t rate, const Mac48Address remoteAddress);
244 
245 
246 private:
247  void DoInitialize (void) override;
248  WifiRemoteStation * DoCreateStation (void) const override;
249  void DoReportRxOk (WifiRemoteStation *station,
250  double rxSnr, WifiMode txMode) override;
251  void DoReportRtsFailed (WifiRemoteStation *station) override;
252  void DoReportDataFailed (WifiRemoteStation *station) override;
253  void DoReportRtsOk (WifiRemoteStation *station,
254  double ctsSnr, WifiMode ctsMode, double rtsSnr) override;
255  void DoReportDataOk (WifiRemoteStation *station, double ackSnr, WifiMode ackMode,
256  double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
257  void DoReportFinalRtsFailed (WifiRemoteStation *station) override;
258  void DoReportFinalDataFailed (WifiRemoteStation *station) override;
260  WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station) override;
261  void DoReportAmpduTxStatus (WifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus,
262  double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override;
263  bool DoNeedRetransmission (WifiRemoteStation *st, Ptr<const Packet> packet, bool normally) override;
264 
274  bool IsValidMcs (Ptr<WifiPhy> phy, uint8_t streams, uint16_t chWidth, WifiMode mode);
275 
287  Time CalculateMpduTxDuration (Ptr<WifiPhy> phy, uint8_t streams, uint16_t gi,
288  uint16_t chWidth, WifiMode mode, MpduType mpduType);
289 
297  Time GetMpduTxTime (uint8_t groupId, WifiMode mode) const;
298 
306  void AddMpduTxTime (uint8_t groupId, WifiMode mode, Time t);
307 
315  Time GetFirstMpduTxTime (uint8_t groupId, WifiMode mode) const;
316 
324  void AddFirstMpduTxTime (uint8_t groupId, WifiMode mode, Time t);
325 
331 
339  void UpdatePacketCounters (MinstrelHtWifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus);
340 
347  uint16_t GetNextSample (MinstrelHtWifiRemoteStation *station);
348 
355 
362  uint16_t FindRate (MinstrelHtWifiRemoteStation *station);
363 
370 
376  void RateInit (MinstrelHtWifiRemoteStation *station);
377 
387  double CalculateThroughput (MinstrelHtWifiRemoteStation *station, uint8_t groupId, uint8_t rateId, double ewmaProb);
388 
395  void SetBestStationThRates (MinstrelHtWifiRemoteStation *station, uint16_t index);
396 
403  void SetBestProbabilityRate (MinstrelHtWifiRemoteStation *station, uint16_t index);
404 
411  void CalculateRetransmits (MinstrelHtWifiRemoteStation *station, uint16_t index);
412 
420  void CalculateRetransmits (MinstrelHtWifiRemoteStation *station, uint8_t groupId, uint8_t rateId);
421 
443  Time CalculateTimeUnicastPacket (Time dataTransmissionTime, uint32_t shortRetries, uint32_t longRetries);
444 
454  double CalculateEwmsd (double oldEwmsd, double currentProb, double ewmaProb, double weight);
455 
462 
469 
475  void PrintTable (MinstrelHtWifiRemoteStation *station);
476 
484  void StatsDump (MinstrelHtWifiRemoteStation *station, uint8_t groupId, std::ofstream &of);
485 
491  void CheckInit (MinstrelHtWifiRemoteStation *station);
492 
499  uint32_t CountRetries (MinstrelHtWifiRemoteStation * station);
500 
506  void UpdateRate (MinstrelHtWifiRemoteStation *station);
507 
514  uint8_t GetRateId (uint16_t index);
515 
522  uint8_t GetGroupId (uint16_t index);
523 
535  uint16_t GetIndex (uint8_t groupId, uint8_t rateId);
536 
545  uint8_t GetHtGroupId (uint8_t txstreams, uint16_t gi, uint16_t chWidth);
546 
555  uint8_t GetVhtGroupId (uint8_t txstreams, uint16_t gi, uint16_t chWidth);
556 
565  uint8_t GetHeGroupId (uint8_t txstreams, uint16_t gi, uint16_t chWidth);
566 
573  uint16_t GetLowestIndex (MinstrelHtWifiRemoteStation *station);
574 
582  uint16_t GetLowestIndex (MinstrelHtWifiRemoteStation *station, uint8_t groupId);
583 
589 
594  WifiModeList GetVhtDeviceMcsList (void) const;
595 
600  WifiModeList GetHtDeviceMcsList (void) const;
601 
605  uint8_t m_ewmaLevel;
606  uint8_t m_nSampleCol;
607  uint32_t m_frameLength;
608  uint8_t m_numGroups;
609  uint8_t m_numRates;
612 
614 
616 
618 
620 };
621 
622 } // namespace ns3
623 
624 #endif /* MINSTREL_HT_WIFI_MANAGER_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::MinstrelHtWifiManager::m_currentRate
TracedValue< uint64_t > m_currentRate
Trace rate changes.
Definition: minstrel-ht-wifi-manager.h:619
ns3::MinstrelHtWifiManager::CountRetries
uint32_t CountRetries(MinstrelHtWifiRemoteStation *station)
Count retries.
Definition: minstrel-ht-wifi-manager.cc:1033
ns3::MAX_HT_STREAM_GROUPS
static const uint8_t MAX_HT_STREAM_GROUPS
Maximal number of groups per stream in HT (2 possible channel widths and 2 possible GI configurations...
Definition: minstrel-ht-wifi-manager.h:168
ns3::WifiModeList
std::vector< WifiMode > WifiModeList
In various parts of the code, folk are interested in maintaining a list of transmission modes.
Definition: wifi-mode.h:254
ns3::McsGroup::gi
uint16_t gi
guard interval duration (nanoseconds)
Definition: minstrel-ht-wifi-manager.h:82
ns3::GroupInfo::m_maxTpRate
uint16_t m_maxTpRate
The max throughput rate of this group in bps.
Definition: minstrel-ht-wifi-manager.h:149
ns3::McsGroup::ratesTxTimeTable
TxTime ratesTxTimeTable
rates transmit time table
Definition: minstrel-ht-wifi-manager.h:88
minstrel-wifi-manager.h
ns3::McsGroup
Data structure to contain the information that defines a group.
Definition: minstrel-ht-wifi-manager.h:80
ns3::MinstrelHtRateInfo::prob
double prob
Current probability within last time interval.
Definition: minstrel-ht-wifi-manager.h:115
ns3::MinstrelHtWifiManager::GetVhtDeviceMcsList
WifiModeList GetVhtDeviceMcsList(void) const
Returns a list of only the VHT MCS supported by the device.
Definition: minstrel-ht-wifi-manager.cc:1952
ns3::MinstrelHtWifiManager::FindRate
uint16_t FindRate(MinstrelHtWifiRemoteStation *station)
Find a rate to use from Minstrel Table.
Definition: minstrel-ht-wifi-manager.cc:1101
ns3::MinstrelHtWifiManager::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: minstrel-ht-wifi-manager.cc:525
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::GROUP_HE
@ GROUP_HE
Definition: minstrel-ht-wifi-manager.h:48
ns3::MAX_VHT_WIDTH
static const uint8_t MAX_VHT_WIDTH
Maximal channel width in MHz.
Definition: minstrel-ht-wifi-manager.h:175
ns3::MinstrelHtWifiManager::GetVhtGroupId
uint8_t GetVhtGroupId(uint8_t txstreams, uint16_t gi, uint16_t chWidth)
Returns the groupId of a VHT MCS with the given number of streams, GI and channel width used.
Definition: minstrel-ht-wifi-manager.cc:1838
ns3::MAX_HE_STREAM_GROUPS
static const uint8_t MAX_HE_STREAM_GROUPS
Maximal number of groups per stream in HE (4 possible channel widths and 3 possible GI configurations...
Definition: minstrel-ht-wifi-manager.h:170
ns3::MinstrelHtWifiManager::PrintTable
void PrintTable(MinstrelHtWifiRemoteStation *station)
Printing Minstrel Table.
Definition: minstrel-ht-wifi-manager.cc:1710
ns3::GroupInfo::m_index
uint8_t m_index
Sample table index.
Definition: minstrel-ht-wifi-manager.h:147
ns3::McsGroup::chWidth
uint16_t chWidth
channel width (MHz)
Definition: minstrel-ht-wifi-manager.h:83
ns3::MinstrelHtRateInfo::throughput
double throughput
Throughput of this rate (in packets per second).
Definition: minstrel-ht-wifi-manager.h:129
ns3::MinstrelHtWifiManager::m_lookAroundRate
uint8_t m_lookAroundRate
The % to try other rates than our current rate.
Definition: minstrel-ht-wifi-manager.h:604
ns3::MinstrelHtRateInfo::prevNumRateAttempt
uint32_t prevNumRateAttempt
Number of transmission attempts with previous rate.
Definition: minstrel-ht-wifi-manager.h:124
ns3::MinstrelHtWifiManager::m_nSampleCol
uint8_t m_nSampleCol
Number of sample columns.
Definition: minstrel-ht-wifi-manager.h:606
ns3::WifiRemoteStationManager
hold a list of per-remote-station state.
Definition: wifi-remote-station-manager.h:121
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::GroupInfo::m_maxProbRate
uint16_t m_maxProbRate
The highest success probability rate of this group in bps.
Definition: minstrel-ht-wifi-manager.h:151
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
ns3::MinstrelHtWifiManager::DoReportFinalRtsFailed
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: minstrel-ht-wifi-manager.cc:531
third.mac
mac
Definition: third.py:99
ns3::MinstrelHtWifiManager::DoReportDataFailed
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: minstrel-ht-wifi-manager.cc:545
ns3::MAX_HT_SUPPORTED_STREAMS
static const uint8_t MAX_HT_SUPPORTED_STREAMS
Constants for maximum values.
Definition: minstrel-ht-wifi-manager.h:165
ns3::GroupInfo::m_col
uint8_t m_col
MCS rates are divided into groups based on the number of streams and flags that they use.
Definition: minstrel-ht-wifi-manager.h:146
ns3::MinstrelHtWifiManager::PrintSampleTable
void PrintSampleTable(MinstrelHtWifiRemoteStation *station)
Printing Sample Table.
ns3::MinstrelHtWifiManager::IsValidMcs
bool IsValidMcs(Ptr< WifiPhy > phy, uint8_t streams, uint16_t chWidth, WifiMode mode)
Check the validity of a combination of number of streams, chWidth and mode.
Definition: minstrel-ht-wifi-manager.cc:349
ns3::MAX_HE_GROUP_RATES
static const uint8_t MAX_HE_GROUP_RATES
Number of rates (or MCS) per HE group.
Definition: minstrel-ht-wifi-manager.h:173
ns3::MinstrelHtRateInfo::numRateSuccess
uint32_t numRateSuccess
Number of successful frames transmitted so far.
Definition: minstrel-ht-wifi-manager.h:114
ns3::MinstrelHtWifiManager::GetIndex
uint16_t GetIndex(uint8_t groupId, uint8_t rateId)
Returns the global index corresponding to the groupId and rateId.
Definition: minstrel-ht-wifi-manager.cc:1804
ns3::TxTime
std::map< WifiMode, Time > TxTime
Data structure to save transmission time calculations per rate.
Definition: minstrel-ht-wifi-manager.h:38
ns3::MinstrelHtWifiManager::MinstrelHtWifiManager
MinstrelHtWifiManager()
Definition: minstrel-ht-wifi-manager.cc:130
ns3::MinstrelHtWifiManager::DoGetDataTxVector
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
Definition: minstrel-ht-wifi-manager.cc:865
ns3::MinstrelHtRateInfo::retryCount
uint32_t retryCount
Retry limit.
Definition: minstrel-ht-wifi-manager.h:111
ns3::MAX_HE_SUPPORTED_STREAMS
static const uint8_t MAX_HE_SUPPORTED_STREAMS
Maximal number of streams supported by the HE PHY layer.
Definition: minstrel-ht-wifi-manager.h:167
ns3::MAX_VHT_GROUP_RATES
static const uint8_t MAX_VHT_GROUP_RATES
Number of rates (or MCS) per VHT group.
Definition: minstrel-ht-wifi-manager.h:172
ns3::MinstrelHtWifiManager::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: minstrel-ht-wifi-manager.cc:175
ns3::MinstrelHtRateInfo::mcsIndex
uint8_t mcsIndex
The index in the operationalMcsSet of the WifiRemoteStationManager.
Definition: minstrel-ht-wifi-manager.h:110
ns3::MinstrelHtRateInfo::successHist
uint64_t successHist
Aggregate of all transmission successes.
Definition: minstrel-ht-wifi-manager.h:127
ns3::MinstrelHtWifiManager::CalculateTimeUnicastPacket
Time CalculateTimeUnicastPacket(Time dataTransmissionTime, uint32_t shortRetries, uint32_t longRetries)
Estimate the time to transmit the given packet with the given number of retries.
ns3::Ptr< WifiPhy >
ns3::MAX_VHT_STREAM_GROUPS
static const uint8_t MAX_VHT_STREAM_GROUPS
Maximal number of groups per stream in VHT (4 possible channel widths and 2 possible GI configuration...
Definition: minstrel-ht-wifi-manager.h:169
ns3::MinstrelHtWifiManager::InitSampleTable
void InitSampleTable(MinstrelHtWifiRemoteStation *station)
Initialize Sample Table.
Definition: minstrel-ht-wifi-manager.cc:1679
ns3::MinstrelHtWifiManager::GetHeGroupId
uint8_t GetHeGroupId(uint8_t txstreams, uint16_t gi, uint16_t chWidth)
Returns the groupId of an HE MCS with the given number of streams, GI and channel width used.
Definition: minstrel-ht-wifi-manager.cc:1865
ns3::MinstrelHtWifiManager::CalculateRetransmits
void CalculateRetransmits(MinstrelHtWifiRemoteStation *station, uint16_t index)
Calculate the number of retransmissions to set for the index rate.
Definition: minstrel-ht-wifi-manager.cc:1605
ns3::MAX_VHT_SUPPORTED_STREAMS
static const uint8_t MAX_VHT_SUPPORTED_STREAMS
Maximal number of streams supported by the VHT PHY layer.
Definition: minstrel-ht-wifi-manager.h:166
ns3::WifiMode
represent a single transmission mode
Definition: wifi-mode.h:48
ns3::MinstrelHtWifiManager::GetRateId
uint8_t GetRateId(uint16_t index)
Return the rateId inside a group, from the global index.
Definition: minstrel-ht-wifi-manager.cc:1813
ns3::MinstrelHtWifiManager::GetLowestIndex
uint16_t GetLowestIndex(MinstrelHtWifiRemoteStation *station)
Returns the lowest global index of the rates supported by the station.
Definition: minstrel-ht-wifi-manager.cc:1908
ns3::MAX_HE_WIDTH
static const uint8_t MAX_HE_WIDTH
Maximal channel width in MHz.
Definition: minstrel-ht-wifi-manager.h:176
ns3::MinstrelHtWifiManager::UpdateRetry
void UpdateRetry(MinstrelHtWifiRemoteStation *station)
Update the number of retries and reset accordingly.
Definition: minstrel-ht-wifi-manager.cc:833
ns3::MinstrelHtRateInfo::ewmsdProb
double ewmsdProb
Exponential weighted moving standard deviation of probability.
Definition: minstrel-ht-wifi-manager.h:123
ns3::MinstrelHtWifiManager::UpdatePacketCounters
void UpdatePacketCounters(MinstrelHtWifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus)
Update the number of sample count variables.
Definition: minstrel-ht-wifi-manager.cc:841
ns3::MinstrelHtWifiManager::CalculateThroughput
double CalculateThroughput(MinstrelHtWifiRemoteStation *station, uint8_t groupId, uint8_t rateId, double ewmaProb)
Return the average throughput of the MCS defined by groupId and rateId.
Definition: minstrel-ht-wifi-manager.cc:1322
ns3::MinstrelHtWifiManager::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: minstrel-ht-wifi-manager.cc:572
ns3::MinstrelHtWifiManager::m_numRates
uint8_t m_numRates
Number of rates per group Minstrel should consider.
Definition: minstrel-ht-wifi-manager.h:609
ns3::MinstrelHtWifiManager::SetNextSample
void SetNextSample(MinstrelHtWifiRemoteStation *station)
Set the next sample from Sample Table.
Definition: minstrel-ht-wifi-manager.cc:1070
ns3::MinstrelHtRateInfo::ewmaProb
double ewmaProb
Exponential weighted moving average of probability.
Definition: minstrel-ht-wifi-manager.h:122
ns3::MinstrelHtRateInfo::prevNumRateSuccess
uint32_t prevNumRateSuccess
Number of successful frames transmitted with previous rate.
Definition: minstrel-ht-wifi-manager.h:125
ns3::MinstrelHtWifiManager::AddMpduTxTime
void AddMpduTxTime(uint8_t groupId, WifiMode mode, Time t)
Save a TxTime to the vector of groups.
Definition: minstrel-ht-wifi-manager.cc:402
ns3::GROUP_HT
@ GROUP_HT
Definition: minstrel-ht-wifi-manager.h:46
ns3::MinstrelHtWifiManager::CalculateMpduTxDuration
Time CalculateMpduTxDuration(Ptr< WifiPhy > phy, uint8_t streams, uint16_t gi, uint16_t chWidth, WifiMode mode, MpduType mpduType)
Estimates the TxTime of a frame with a given mode and group (stream, guard interval and channel width...
Definition: minstrel-ht-wifi-manager.cc:360
ns3::MinstrelHtWifiManager::DoReportFinalDataFailed
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: minstrel-ht-wifi-manager.cc:633
ns3::MinstrelHtWifiManager::AssignStreams
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Definition: minstrel-ht-wifi-manager.cc:155
ns3::MinstrelHtWifiManager::m_frameLength
uint32_t m_frameLength
Frame length used for calculate modes TxTime in bytes.
Definition: minstrel-ht-wifi-manager.h:607
ns3::MinstrelHtWifiManager::StatsDump
void StatsDump(MinstrelHtWifiRemoteStation *station, uint8_t groupId, std::ofstream &of)
Print group statistics.
Definition: minstrel-ht-wifi-manager.cc:1734
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::MinstrelHtRateInfo::attemptHist
uint64_t attemptHist
Aggregate of all transmission attempts.
Definition: minstrel-ht-wifi-manager.h:128
ns3::MinstrelHtWifiRemoteStation
MinstrelHtWifiRemoteStation structure.
Definition: minstrel-ht-wifi-manager.cc:55
ns3::MinstrelHtWifiManager::~MinstrelHtWifiManager
virtual ~MinstrelHtWifiManager()
Definition: minstrel-ht-wifi-manager.cc:144
ns3::GroupInfo::m_ratesTable
MinstrelHtRate m_ratesTable
Information about rates of this group.
Definition: minstrel-ht-wifi-manager.h:152
ns3::MinstrelHtWifiManager::m_uniformRandomVariable
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables.
Definition: minstrel-ht-wifi-manager.h:617
ns3::MinstrelHtRateInfo::numSamplesSkipped
uint32_t numSamplesSkipped
Number of times this rate statistics were not updated because no attempts have been made.
Definition: minstrel-ht-wifi-manager.h:126
ns3::MinstrelHtWifiManager::GetNextSample
uint16_t GetNextSample(MinstrelHtWifiRemoteStation *station)
Getting the next sample from Sample Table.
Definition: minstrel-ht-wifi-manager.cc:1056
ns3::MinstrelHtRateInfo::adjustedRetryCount
uint32_t adjustedRetryCount
Adjust the retry limit for this rate.
Definition: minstrel-ht-wifi-manager.h:112
ns3::MinstrelHtWifiManager::SetBestProbabilityRate
void SetBestProbabilityRate(MinstrelHtWifiRemoteStation *station, uint16_t index)
Set index rate as maxProbRate if it is better than current value.
Definition: minstrel-ht-wifi-manager.cc:1352
ns3::MinstrelHtWifiManager::DoNeedRetransmission
bool DoNeedRetransmission(WifiRemoteStation *st, Ptr< const Packet > packet, bool normally) override
Definition: minstrel-ht-wifi-manager.cc:997
ns3::GroupInfo::m_maxTpRate2
uint16_t m_maxTpRate2
The second max throughput rate of this group in bps.
Definition: minstrel-ht-wifi-manager.h:150
ns3::MinstrelHtWifiManager::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: minstrel-ht-wifi-manager.cc:166
ns3::MinstrelHtWifiManager::GetHtDeviceMcsList
WifiModeList GetHtDeviceMcsList(void) const
Returns a list of only the HT MCS supported by the device.
Definition: minstrel-ht-wifi-manager.cc:1963
ns3::McsGroupData
std::vector< struct GroupInfo > McsGroupData
Data structure for a table of groups.
Definition: minstrel-ht-wifi-manager.h:159
ns3::MinstrelHtRate
std::vector< MinstrelHtRateInfo > MinstrelHtRate
Data structure for a Minstrel Rate table.
Definition: minstrel-ht-wifi-manager.h:136
ns3::MinstrelHtWifiManager::m_numGroups
uint8_t m_numGroups
Number of groups Minstrel should consider.
Definition: minstrel-ht-wifi-manager.h:608
ns3::WifiRemoteStation
hold per-remote-station state.
Definition: wifi-remote-station-manager.h:62
ns3::MAX_HT_GROUP_RATES
static const uint8_t MAX_HT_GROUP_RATES
Number of rates (or MCS) per HT group.
Definition: minstrel-ht-wifi-manager.h:171
ns3::MinstrelHtRateInfo::supported
bool supported
If the rate is supported.
Definition: minstrel-ht-wifi-manager.h:109
ns3::MinstrelHtWifiManager::GetHtGroupId
uint8_t GetHtGroupId(uint8_t txstreams, uint16_t gi, uint16_t chWidth)
Returns the groupId of an HT MCS with the given number of streams, GI and channel width used.
Definition: minstrel-ht-wifi-manager.cc:1829
ns3::MinstrelHtRateInfo::numRateAttempt
uint32_t numRateAttempt
Number of transmission attempts so far.
Definition: minstrel-ht-wifi-manager.h:113
ns3::GroupInfo
A struct to contain information of a group.
Definition: minstrel-ht-wifi-manager.h:142
ns3::MinstrelHtWifiManager::RateInit
void RateInit(MinstrelHtWifiRemoteStation *station)
Initialize Minstrel Table.
Definition: minstrel-ht-wifi-manager.cc:1472
ns3::MinstrelMcsGroups
std::vector< McsGroup > MinstrelMcsGroups
Data structure for a table of group definitions.
Definition: minstrel-ht-wifi-manager.h:96
ns3::MinstrelHtWifiManager
Implementation of Minstrel-HT Rate Control Algorithm.
Definition: minstrel-ht-wifi-manager.h:223
ns3::MinstrelHtWifiManager::UpdateRate
void UpdateRate(MinstrelHtWifiRemoteStation *station)
Update rate.
Definition: minstrel-ht-wifi-manager.cc:732
ns3::MinstrelHtWifiManager::DoInitialize
void DoInitialize(void) override
Initialize() implementation.
Definition: minstrel-ht-wifi-manager.cc:183
ns3::McsGroup::isSupported
bool isSupported
flag whether group is supported
Definition: minstrel-ht-wifi-manager.h:85
ns3::GROUP_VHT
@ GROUP_VHT
Definition: minstrel-ht-wifi-manager.h:47
ns3::MinstrelHtWifiManager::SetBestStationThRates
void SetBestStationThRates(MinstrelHtWifiRemoteStation *station, uint16_t index)
Set index rate as maxTpRate or maxTp2Rate if is better than current values.
Definition: minstrel-ht-wifi-manager.cc:1413
ns3::MinstrelHtRateInfo
A struct to contain all statistics information related to a data rate.
Definition: minstrel-ht-wifi-manager.h:103
ns3::MinstrelHtWifiManager::m_printStats
bool m_printStats
If statistics table should be printed.
Definition: minstrel-ht-wifi-manager.h:611
ns3::TracedValue< uint64_t >
ns3::MinstrelHtWifiManager::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: minstrel-ht-wifi-manager.cc:76
ns3::MinstrelHtWifiManager::GetFirstMpduTxTime
Time GetFirstMpduTxTime(uint8_t groupId, WifiMode mode) const
Obtain the TxTime saved in the group information.
Definition: minstrel-ht-wifi-manager.cc:377
ns3::MinstrelHtWifiManager::m_legacyManager
Ptr< MinstrelWifiManager > m_legacyManager
Pointer to an instance of MinstrelWifiManager.
Definition: minstrel-ht-wifi-manager.h:615
ns3::MinstrelHtWifiManager::DoReportAmpduTxStatus
void DoReportAmpduTxStatus(WifiRemoteStation *station, uint16_t nSuccessfulMpdus, uint16_t nFailedMpdus, double rxSnr, double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss) override
Typically called per A-MPDU, either when a Block ACK was successfully received or when a BlockAckTime...
Definition: minstrel-ht-wifi-manager.cc:680
ns3::MinstrelHtWifiManager::RateChangeTracedCallback
void(* RateChangeTracedCallback)(const uint64_t rate, const Mac48Address remoteAddress)
TracedCallback signature for rate change events.
Definition: minstrel-ht-wifi-manager.h:243
ns3::MinstrelHtWifiManager::m_ewmaLevel
uint8_t m_ewmaLevel
Exponential weighted moving average level (or coefficient).
Definition: minstrel-ht-wifi-manager.h:605
ns3::MinstrelHtWifiManager::m_useLatestAmendmentOnly
bool m_useLatestAmendmentOnly
Flag if only the latest supported amendment by both peers should be used.
Definition: minstrel-ht-wifi-manager.h:610
ns3::MAX_HT_WIDTH
static const uint8_t MAX_HT_WIDTH
Maximal channel width in MHz.
Definition: minstrel-ht-wifi-manager.h:174
ns3::GroupInfo::m_supported
bool m_supported
If the rates of this group are supported by the station.
Definition: minstrel-ht-wifi-manager.h:148
ns3::MinstrelHtWifiManager::CalculateEwmsd
double CalculateEwmsd(double oldEwmsd, double currentProb, double ewmaProb, double weight)
Perform EWMSD (Exponentially Weighted Moving Standard Deviation) calculation.
Definition: minstrel-ht-wifi-manager.cc:1664
ns3::MinstrelHtWifiManager::m_updateStats
Time m_updateStats
How frequent do we calculate the stats.
Definition: minstrel-ht-wifi-manager.h:602
ns3::MinstrelHtWifiManager::GetGroupId
uint8_t GetGroupId(uint16_t index)
Return the groupId from the global index.
Definition: minstrel-ht-wifi-manager.cc:1822
ns3::MinstrelHtWifiManager::GetMpduTxTime
Time GetMpduTxTime(uint8_t groupId, WifiMode mode) const
Obtain the TxTime saved in the group information.
Definition: minstrel-ht-wifi-manager.cc:393
ns3::MinstrelHtWifiManager::AddFirstMpduTxTime
void AddFirstMpduTxTime(uint8_t groupId, WifiMode mode, Time t)
Save a TxTime to the vector of groups.
Definition: minstrel-ht-wifi-manager.cc:386
ns3::McsGroup::streams
uint8_t streams
number of spatial streams
Definition: minstrel-ht-wifi-manager.h:81
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:137
ns3::MinstrelHtWifiManager::GetHeDeviceMcsList
WifiModeList GetHeDeviceMcsList() const
Returns a list of only the HE MCS supported by the device.
Definition: minstrel-ht-wifi-manager.cc:1941
ns3::MinstrelHtWifiManager::m_legacyUpdateStats
Time m_legacyUpdateStats
How frequent do we calculate the stats for legacy MinstrelWifiManager.
Definition: minstrel-ht-wifi-manager.h:603
ns3::MinstrelHtWifiManager::UpdateStats
void UpdateStats(MinstrelHtWifiRemoteStation *station)
Update the Minstrel Table.
Definition: minstrel-ht-wifi-manager.cc:1206
ns3::McsGroupType
McsGroupType
Available MCS group types.
Definition: minstrel-ht-wifi-manager.h:45
ns3::MinstrelHtRateInfo::perfectTxTime
Time perfectTxTime
Perfect transmission time calculation, or frame calculation.
Definition: minstrel-ht-wifi-manager.h:108
ns3::MinstrelHtWifiManager::CheckInit
void CheckInit(MinstrelHtWifiRemoteStation *station)
Check for initializations.
Definition: minstrel-ht-wifi-manager.cc:462
ns3::McsGroup::ratesFirstMpduTxTimeTable
TxTime ratesFirstMpduTxTimeTable
rates MPDU transmit time table
Definition: minstrel-ht-wifi-manager.h:89
ns3::MinstrelHtWifiManager::DoGetRtsTxVector
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
Definition: minstrel-ht-wifi-manager.cc:922
ns3::MinstrelHtWifiManager::m_minstrelGroups
MinstrelMcsGroups m_minstrelGroups
Global array for groups information.
Definition: minstrel-ht-wifi-manager.h:613
third.phy
phy
Definition: third.py:93
ns3::McsGroup::type
McsGroupType type
identifies the group,
Definition: minstrel-ht-wifi-manager.h:84
ns3::MinstrelHtWifiManager::DoReportRtsFailed
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Definition: minstrel-ht-wifi-manager.cc:511
ns3::MpduType
MpduType
The type of an MPDU.
Definition: wifi-mpdu-type.h:31
ns3::MinstrelHtWifiManager::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: minstrel-ht-wifi-manager.cc:504
ns3::MinstrelHtRateInfo::retryUpdated
bool retryUpdated
If number of retries was updated already.
Definition: minstrel-ht-wifi-manager.h:116
ns3::MinstrelHtWifiManager::DoCreateStation
WifiRemoteStation * DoCreateStation(void) const override
Definition: minstrel-ht-wifi-manager.cc:409