|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef RRAA_WIFI_MANAGER_H
22 #define RRAA_WIFI_MANAGER_H
24 #include "ns3/nstime.h"
25 #include "ns3/traced-value.h"
26 #include "ns3/wifi-remote-station-manager.h"
30 struct RraaWifiRemoteStation;
78 double rxSnr,
WifiMode txMode)
override;
82 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
override;
84 double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
override;
90 uint32_t size,
bool normally)
override;
175 typedef std::vector<std::pair<Time,WifiMode> >
TxTime;
a unique identifier for an interface.
Time m_difs
Value of DIFS configured in the device.
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
void ARts(RraaWifiRemoteStation *station)
Activate the use of RTS for the given station if the conditions are met.
double m_mtl
Maximum Tolerable Loss threshold.
uint32_t m_ewnd
Evaluation Window.
void DoInitialize(void) override
Initialize() implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< std::pair< WifiRraaThresholds, WifiMode > > RraaThresholdsTable
List of thresholds for each mode.
Robust Rate Adaptation Algorithm.
uint8_t GetMaxRate(RraaWifiRemoteStation *station) const
Return the index for the maximum transmission rate for the given station.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
WifiRraaThresholds GetThresholds(RraaWifiRemoteStation *station, WifiMode mode) const
Get the thresholds for the given station and mode.
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
hold a list of per-remote-station state.
std::vector< std::pair< Time, WifiMode > > TxTime
typedef for a vector of a pair of Time, WifiMode.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void CheckInit(RraaWifiRemoteStation *station)
Check for initializations.
uint32_t m_frameLength
Data frame length used for calculate mode TxTime.
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...
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...
Time m_sifs
Value of SIFS configured in the device.
TxTime m_calcTxTime
To hold all the calculated TxTime for all modes.
WifiRraaThresholds structure.
represent a single transmission mode
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
void RunBasicAlgorithm(RraaWifiRemoteStation *station)
Find an appropriate rate for the given station, using a basic algorithm.
double m_alpha
Alpha value for RRAA (value for calculating MTL threshold)
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.
uint32_t m_ackLength
Ack frame length used for calculate mode TxTime.
double m_ori
Opportunistic Rate Increase threshold.
virtual ~RraaWifiManager()
Simulation virtual time values and global simulation resolution.
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
bool DoNeedRts(WifiRemoteStation *st, uint32_t size, bool normally) override
Time GetCalcTxTime(WifiMode mode) const
Get the estimated TxTime of a packet with a given mode.
static TypeId GetTypeId(void)
Get the type ID.
hold per-remote-station state.
hold per-remote-station state for RRAA Wifi manager.
double m_tau
Tau value for RRAA (value for calculating EWND size).
TracedValue< uint64_t > m_currentRate
Trace rate changes.
void AddCalcTxTime(WifiMode mode, Time t)
Add transmission time for the given mode to an internal list.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
void CheckTimeout(RraaWifiRemoteStation *station)
Check if the counter should be reset.
WifiRemoteStation * DoCreateStation(void) const override
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
double m_beta
Beta value for RRAA (value for calculating ORI threshold).
void InitThresholds(RraaWifiRemoteStation *station)
Initialize the thresholds internal list for the given station.
void ResetCountersBasic(RraaWifiRemoteStation *station)
Reset the counters of the given station.
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.