23 #ifndef MINSTREL_WIFI_MANAGER_H
24 #define MINSTREL_WIFI_MANAGER_H
28 #include "ns3/nstime.h"
29 #include "ns3/random-variable-stream.h"
33 struct MinstrelWifiRemoteStation;
115 double ctsSnr,
WifiMode ctsMode,
double rtsSnr);
117 double ackSnr,
WifiMode ackMode,
double dataSnr);
155 typedef std::vector<std::pair<Time,WifiMode> >
TxTime;
uint32_t m_nsupported
modes supported
void CheckInit(MinstrelWifiRemoteStation *station)
check for initializations
void PrintTable(MinstrelWifiRemoteStation *station)
printing Minstrel Table
keep track of time values and allow control of global simulation resolution
Implementation of Minstrel Rate Control AlgorithmPorting Minstrel from Madwifi and Linux Kernel http:...
uint32_t numRateSuccess
number of successful pkts
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)
Time m_updateStats
how frequent do we calculate the stats(1/10 seconds)
void UpdateStats(MinstrelWifiRemoteStation *station)
updating the Minstrel Table every 1/10 seconds
uint32_t GetNextSample(MinstrelWifiRemoteStation *station)
getting the next sample from Sample Table
SampleRate m_sampleTable
sample table
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
uint32_t retryCount
retry limit
uint32_t FindRate(MinstrelWifiRemoteStation *station)
find a rate to use from Minstrel Table
uint32_t m_pktLen
packet length used for calculate mode TxTime
uint32_t adjustedRetryCount
adjust the retry limit for this rate
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
uint32_t prevNumRateSuccess
from last rate
void PrintSampleTable(MinstrelWifiRemoteStation *station)
printing Sample Table
uint32_t prevNumRateAttempt
from last rate
virtual void SetupPhy(Ptr< WifiPhy > phy)
uint64_t attemptHist
aggregate of all attempts
double m_ewmaLevel
exponential weighted moving average
uint64_t successHist
aggregate of all successes
virtual WifiRemoteStation * DoCreateStation(void) const
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint32_t size)
void AddCalcTxTime(WifiMode mode, Time t)
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)
hold a list of per-remote-station state.
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
uint32_t numRateAttempt
how many number of attempts so far
TxTime m_calcTxTime
to hold all the calculated TxTime for all modes
virtual bool IsLowLatency(void) const
int64_t AssignStreams(int64_t stream)
uint32_t throughput
throughput of a rate
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables.
void UpdateRetry(MinstrelWifiRemoteStation *station)
update the number of retries and reset accordingly
double m_lookAroundRate
the % to try other rates than our current rate
static TypeId GetTypeId(void)
void InitSampleTable(MinstrelWifiRemoteStation *station)
initialize Sample Table
virtual void DoReportRtsFailed(WifiRemoteStation *station)
Time GetCalcTxTime(WifiMode mode) const
for estimating the TxTime of a packet with a given mode
virtual void DoReportDataFailed(WifiRemoteStation *station)
std::vector< struct RateInfo > MinstrelRate
uint32_t m_sampleCol
number of sample columns
virtual ~MinstrelWifiManager()
std::vector< std::pair< Time, WifiMode > > TxTime
virtual void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)
a unique identifier for an interface.
MinstrelRate m_minstrelTable
minstrel table
void RateInit(MinstrelWifiRemoteStation *station)
initialize Minstrel Table
std::vector< std::vector< uint32_t > > SampleRate
hold per-remote-station state.
uint32_t prob
(# pkts success )/(# total pkts)