12#include "IEEE802_11_Phy.h"
22 double dRxSensitivity;
23 PHY_MODULATION nModulation;
71 UINT numSampleSkipped;
76 UINT64 totalNumAttempt;
77 UINT64 totalNumSuccess;
80}HtRateInfo,*Ptr_HtRateInfo;
94 Ptr_HtRateInfo rateTable;
95}GroupInfo,*Ptr_GroupInfo;
98 NETSIM_ID remoteStationId;
100 NETSIM_ID stationInterface;
119 double nextStatsUpdate;
130 UINT64 totalPacketCount;
131 UINT64 samplePacketCount;
132 PIEEE802_11_PHY_VAR phy;
133}MinstrelHtPerRemoteStation,*Ptr_MinstrelHtPerRemoteStation;
138 NETSIM_ID interfaceId;
139 Ptr_MinstrelHtPerRemoteStation *minstrelHtInfo;
140}MinstrelHtWifiStation,*Ptr_MinstrelHtWifiStation;
142double ht_updateStatsTime;
143double ht_lookAroundRate;
148void Ht_InitMinstrel(NETSIM_ID nDevId,NETSIM_ID nifid);
149static void CheckInit(Ptr_MinstrelHtPerRemoteStation station,NETSIM_ID devid,NETSIM_ID ifid);
150static void InitSampleTable(Ptr_MinstrelHtPerRemoteStation station);
151static void InitGroupTable(Ptr_MinstrelHtPerRemoteStation station);
152static void UpdatePacketCounter(Ptr_MinstrelHtPerRemoteStation station,UINT success,UINT failed);
153static void UpdateRetry(Ptr_MinstrelHtPerRemoteStation station);
154static void UpdateStats(Ptr_MinstrelHtPerRemoteStation station);
155static void UpdateRate(Ptr_MinstrelHtPerRemoteStation station);
156static UINT FindRate(Ptr_MinstrelHtPerRemoteStation station);
157static void SetStationThRate(Ptr_MinstrelHtPerRemoteStation station);
158static void SetStationProbRate(Ptr_MinstrelHtPerRemoteStation station);
159static UINT GetNextSample(Ptr_MinstrelHtPerRemoteStation station);
160static void SetNextSample(Ptr_MinstrelHtPerRemoteStation station);
161static double CalculateEwmsd(
double oldEwmsd,
double currentProb,
double ewmaProb,
double ewmaWeight);
162static double CalculateThroughput(Ptr_MinstrelHtPerRemoteStation station,UINT grpId, UINT rateId);
163static void CalculateRetransmits(Ptr_MinstrelHtPerRemoteStation station,UINT index);
164static UINT CountRetries(Ptr_MinstrelHtPerRemoteStation station);
165static UINT GetLowestIndex(Ptr_MinstrelHtPerRemoteStation station);
166static UINT GetHighestIndex(Ptr_MinstrelHtPerRemoteStation station);
Data structure for physical layer parameters.
double avgAmpduLen
Average number of MPDUs in an A-MPDU.
UINT sampleCount
Max number of samples per update interval.
UINT sampleWait
How many transmission attempts to wait until a new sample.
UINT ampduPacketCount
Number of A-MPDUs transmitted since last update.
double ampduLen
Number of MPDUs tried since last update.
UINT sampleTries
Number of sample tries after waiting sampleWait.
UINT sampleSlow
Number of times a slow rate was sampled.
UINT sampleGroup
The group that the sample rate belongs to.
Ptr_GroupInfo groupTable
Table of groups with stats.
BOOL supported
If the rate is supported.
double throughput
Throughput of this rate (in pkts per second).
UINT adjustedRetryCount
Adjust the retry limit for this rate.
UINT retryCount
Retry limit.
double prob
Current probability within last time interval. (# frame success )/(# total frames)
double ewmsdProb
Exponential weighted moving standard deviation of probability.
BOOL retryUpdated
If number of retries was updated already.