|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef RRPAA_WIFI_MANAGER_H
22 #define RRPAA_WIFI_MANAGER_H
24 #include "ns3/nstime.h"
25 #include "ns3/random-variable-stream.h"
26 #include "ns3/wifi-remote-station-manager.h"
30 struct RrpaaWifiRemoteStation;
103 double rxSnr,
WifiMode txMode)
override;
107 double ctsSnr,
WifiMode ctsMode,
double rtsSnr)
override;
109 double dataSnr, uint16_t dataChannelWidth, uint8_t dataNss)
override;
115 uint32_t size,
bool normally)
override;
198 typedef std::vector<std::pair<Time,WifiMode> >
TxTime;
a unique identifier for an interface.
double m_alpha
Alpha value for RRPAA (value for calculating MTL threshold)
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
Time m_timeout
Timeout for the RRAA BASIC loss estimation block.
WifiRrpaaThresholds GetThresholds(RrpaaWifiRemoteStation *station, WifiMode mode) const
Get the thresholds for the given station and mode.
void CheckTimeout(RrpaaWifiRemoteStation *station)
Check if the counter should be reset.
uint32_t m_ackLength
Ack frame length used for calculate mode TxTime (in bytes).
void DoInitialize(void) override
Initialize() implementation.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
double m_mtl
The Maximum Tolerable Loss threshold.
std::vector< std::pair< Time, WifiMode > > TxTime
typedef for a vector of a pair of Time, WifiMode.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< std::pair< WifiRrpaaThresholds, WifiMode > > RrpaaThresholdsTable
List of thresholds for each mode.
virtual ~RrpaaWifiManager()
void DoReportFinalDataFailed(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.
bool m_basic
If using the basic algorithm (without RTS/CTS).
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Time m_sifs
Value of SIFS configured in the device.
void CheckInit(RrpaaWifiRemoteStation *station)
Check for initializations.
void ResetCountersBasic(RrpaaWifiRemoteStation *station)
Reset the counters of the given station.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station) override
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Robust Rate and Power Adaptation Algorithm.
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Hold per-remote-station state for RRPAA Wifi manager.
double m_ori
The Opportunistic Rate Increase threshold.
void AddCalcTxTime(WifiMode mode, Time t)
Add transmission time for the given mode to an internal list.
int64_t AssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
represent a single transmission mode
void RunBasicAlgorithm(RrpaaWifiRemoteStation *station)
Find an appropriate rate and power for the given station, using a basic algorithm.
void RunAdaptiveRtsAlgorithm(RrpaaWifiRemoteStation *station)
Run an enhanced algorithm which activates the use of RTS for the given station if the conditions are ...
Ptr< UniformRandomVariable > m_uniformRandomVariable
Provides uniform random variables for probabilistic changes.
uint8_t m_minPowerLevel
Differently form rate, power levels do not depend on the remote station.
double m_gamma
Gamma value for RRPAA (value for pdTable decrements).
Simulation virtual time values and global simulation resolution.
double m_beta
Beta value for RRPAA (value for calculating ORI threshold).
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...
uint8_t m_nPowerLevels
Number of power levels.
TxTime m_calcTxTime
To hold all the calculated TxTime for all modes.
hold per-remote-station state.
uint8_t m_maxPowerLevel
Maximal power level.
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.
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
WifiRemoteStation * DoCreateStation(void) const override
static TypeId GetTypeId(void)
Register this type.
uint32_t m_ewnd
The Estimation Window size.
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...
uint32_t m_frameLength
Data frame length used for calculate mode TxTime (in bytes).
Forward calls to a chain of Callback.
Time m_difs
Value of DIFS configured in the device.
double m_tau
Tau value for RRPAA (value for calculating EWND size).
std::vector< std::vector< double > > RrpaaProbabilitiesTable
List of probabilities.
bool DoNeedRts(WifiRemoteStation *st, uint32_t size, bool normally) override
void InitThresholds(RrpaaWifiRemoteStation *station)
Initialize the thresholds internal list for the given station.
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.
Time GetCalcTxTime(WifiMode mode) const
Get the estimated TxTime of a packet with a given mode.
double m_delta
Delta value for RRPAA (value for pdTable increments).
TracedCallback< DataRate, DataRate, Mac48Address > m_rateChange
The trace source fired when the transmission rate change.
TracedCallback< double, double, Mac48Address > m_powerChange
The trace source fired when the transmission power change.