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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Matias Richart <mrichart@fing.edu.uy>
7 */
8
9#ifndef PARF_WIFI_MANAGER_H
10#define PARF_WIFI_MANAGER_H
11
12#include "ns3/wifi-remote-station-manager.h"
13
14namespace ns3
15{
16
17struct ParfWifiRemoteStation;
18
19/**
20 * @ingroup wifi
21 * PARF Rate control algorithm
22 *
23 * This class implements the PARF algorithm as described in
24 * <i>Self-management in chaotic wireless deployments</i>, by
25 * Akella, A.; Judd, G.; Seshan, S. and Steenkiste, P. in
26 * Wireless Networks, Kluwer Academic Publishers, 2007, 13, 737-755
27 * https://web.archive.org/web/20210413094117/https://www.cs.odu.edu/~nadeem/classes/cs795-WNS-S13/papers/enter-006.pdf
28 *
29 * This RAA does not support HT modes and will error
30 * exit if the user tries to configure this RAA with a Wi-Fi MAC
31 * that supports 802.11n or higher.
32 */
34{
35 public:
36 /**
37 * Register this type.
38 * @return The object TypeId.
39 */
40 static TypeId GetTypeId();
42 ~ParfWifiManager() override;
43
44 void SetupPhy(const Ptr<WifiPhy> phy) override;
45
46 private:
47 void DoInitialize() override;
48 WifiRemoteStation* DoCreateStation() const override;
49 void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) override;
53 double ctsSnr,
55 double rtsSnr) override;
57 double ackSnr,
59 double dataSnr,
61 uint8_t dataNss) override;
66
67 /** Check for initializations.
68 *
69 * @param station The remote station.
70 */
72
73 uint32_t m_attemptThreshold; //!< The minimum number of transmission attempts to try a new power
74 //!< or rate. The 'timer' threshold in the ARF algorithm.
75 uint32_t m_successThreshold; //!< The minimum number of successful transmissions to try a new
76 //!< power or rate.
77
78 /**
79 * Minimal power level.
80 * In contrast to rate, power levels do not depend on the remote station.
81 * The levels depend only on the physical layer of the device.
82 */
83 uint8_t m_minPower;
84
85 /**
86 * Maximal power level.
87 */
88 uint8_t m_maxPower;
89
90 /**
91 * The trace source fired when the transmission power changes.
92 */
94 /**
95 * The trace source fired when the transmission rate changes.
96 */
98};
99
100} // namespace ns3
101
102#endif /* PARF_WIFI_MANAGER_H */
PARF Rate control algorithm.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, MHz_u allowedWidth) override
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 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.
void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr, MHz_u dataChannelWidth, uint8_t dataNss) override
This method is a pure virtual method that must be implemented by the sub-class.
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:66
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:49
represent a single transmission mode
Definition wifi-mode.h:40
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...
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
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.