A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
parf-wifi-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Universidad de la República - Uruguay
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Matias Richart <mrichart@fing.edu.uy>
18 */
19
20#ifndef PARF_WIFI_MANAGER_H
21#define PARF_WIFI_MANAGER_H
22
23#include "ns3/wifi-remote-station-manager.h"
24
25namespace ns3
26{
27
28struct ParfWifiRemoteStation;
29
30/**
31 * \ingroup wifi
32 * PARF Rate control algorithm
33 *
34 * This class implements the PARF algorithm as described in
35 * <i>Self-management in chaotic wireless deployments</i>, by
36 * Akella, A.; Judd, G.; Seshan, S. and Steenkiste, P. in
37 * Wireless Networks, Kluwer Academic Publishers, 2007, 13, 737-755
38 * https://web.archive.org/web/20210413094117/https://www.cs.odu.edu/~nadeem/classes/cs795-WNS-S13/papers/enter-006.pdf
39 *
40 * This RAA does not support HT modes and will error
41 * exit if the user tries to configure this RAA with a Wi-Fi MAC
42 * that supports 802.11n or higher.
43 */
45{
46 public:
47 /**
48 * Register this type.
49 * \return The object TypeId.
50 */
51 static TypeId GetTypeId();
53 ~ParfWifiManager() override;
54
55 void SetupPhy(const Ptr<WifiPhy> phy) override;
56
57 private:
58 void DoInitialize() override;
59 WifiRemoteStation* DoCreateStation() const override;
60 void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) override;
61 void DoReportRtsFailed(WifiRemoteStation* station) override;
62 void DoReportDataFailed(WifiRemoteStation* station) override;
63 void DoReportRtsOk(WifiRemoteStation* station,
64 double ctsSnr,
65 WifiMode ctsMode,
66 double rtsSnr) override;
68 double ackSnr,
69 WifiMode ackMode,
70 double dataSnr,
71 uint16_t dataChannelWidth,
72 uint8_t dataNss) override;
73 void DoReportFinalRtsFailed(WifiRemoteStation* station) override;
74 void DoReportFinalDataFailed(WifiRemoteStation* station) override;
75 WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, uint16_t allowedWidth) override;
77
78 /** Check for initializations.
79 *
80 * \param station The remote station.
81 */
82 void CheckInit(ParfWifiRemoteStation* station);
83
84 uint32_t m_attemptThreshold; //!< The minimum number of transmission attempts to try a new power
85 //!< or rate. The 'timer' threshold in the ARF algorithm.
86 uint32_t m_successThreshold; //!< The minimum number of successful transmissions to try a new
87 //!< power or rate.
88
89 /**
90 * Minimal power level.
91 * In contrast to rate, power levels do not depend on the remote station.
92 * The levels depend only on the physical layer of the device.
93 */
94 uint8_t m_minPower;
95
96 /**
97 * Maximal power level.
98 */
99 uint8_t m_maxPower;
100
101 /**
102 * The trace source fired when the transmission power changes.
103 */
105 /**
106 * The trace source fired when the transmission rate changes.
107 */
109};
110
111} // namespace ns3
112
113#endif /* PARF_WIFI_MANAGER_H */
PARF Rate control algorithm.
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_successThreshold
The minimum number of successful transmissions to try a new power or rate.
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.
void CheckInit(ParfWifiRemoteStation *station)
Check for initializations.
TracedCallback< double, double, Mac48Address > m_powerChange
The trace source fired when the transmission power changes.
void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode) override
This method is a pure virtual method that must be implemented by the sub-class.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint16_t allowedWidth) override
TracedCallback< DataRate, DataRate, Mac48Address > m_rateChange
The trace source fired when the transmission rate changes.
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.
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_attemptThreshold
The minimum number of transmission attempts to try a new power or rate.
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_maxPower
Maximal power level.
WifiRemoteStation * DoCreateStation() const override
static TypeId GetTypeId()
Register this type.
uint8_t m_minPower
Minimal power level.
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
void DoInitialize() override
Initialize() implementation.
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
represent a single transmission mode
Definition: wifi-mode.h:51
hold a list of per-remote-station state.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold per-remote-station state for PARF Wifi manager.
hold per-remote-station state.