A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
arf-wifi-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2005,2006 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19
20#ifndef ARF_WIFI_MANAGER_H
21#define ARF_WIFI_MANAGER_H
22
23#include "ns3/traced-value.h"
24#include "ns3/wifi-remote-station-manager.h"
25
26namespace ns3
27{
28
29/**
30 * \ingroup wifi
31 * \brief ARF Rate control algorithm
32 *
33 * This class implements the so-called ARF algorithm which was
34 * initially described in <i>WaveLAN-II: A High-performance wireless
35 * LAN for the unlicensed band</i>, by A. Kamerman and L. Monteban. in
36 * Bell Lab Technical Journal, pages 118-133, Summer 1997.
37 *
38 * This implementation differs from the initial description in that it
39 * uses a packet-based timer rather than a time-based timer as described
40 * in XXX (I cannot find back the original paper which described how
41 * the time-based timer could be easily replaced with a packet-based
42 * timer.)
43 *
44 * This RAA does not support HT modes and will error
45 * exit if the user tries to configure this RAA with a Wi-Fi MAC
46 * that supports 802.11n or higher.
47 */
49{
50 public:
51 /**
52 * \brief Get the type ID.
53 * \return the object TypeId
54 */
55 static TypeId GetTypeId();
57 ~ArfWifiManager() override;
58
59 private:
60 void DoInitialize() override;
61 WifiRemoteStation* DoCreateStation() const override;
62 void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) override;
63 void DoReportRtsFailed(WifiRemoteStation* station) override;
64 void DoReportDataFailed(WifiRemoteStation* station) override;
65 void DoReportRtsOk(WifiRemoteStation* station,
66 double ctsSnr,
67 WifiMode ctsMode,
68 double rtsSnr) override;
70 double ackSnr,
71 WifiMode ackMode,
72 double dataSnr,
73 uint16_t dataChannelWidth,
74 uint8_t dataNss) override;
75 void DoReportFinalRtsFailed(WifiRemoteStation* station) override;
76 void DoReportFinalDataFailed(WifiRemoteStation* station) override;
77 WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, uint16_t allowedWidth) override;
79
80 uint32_t m_timerThreshold; ///< timer threshold
81 uint32_t m_successThreshold; ///< success threshold
82
83 TracedValue<uint64_t> m_currentRate; //!< Trace rate changes
84};
85
86} // namespace ns3
87
88#endif /* ARF_WIFI_MANAGER_H */
ARF Rate control algorithm.
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint16_t allowedWidth) override
static TypeId GetTypeId()
Get the type ID.
void DoReportFinalRtsFailed(WifiRemoteStation *station) 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() const override
WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station) override
uint32_t m_successThreshold
success 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.
void DoInitialize() override
Initialize() implementation.
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.
uint32_t m_timerThreshold
timer threshold
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
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 DoReportDataFailed(WifiRemoteStation *station) override
It is important to realize that "recovery" mode starts after failure of the first transmission after ...
TracedValue< uint64_t > m_currentRate
Trace rate changes.
Trace classes with value semantics.
Definition: traced-value.h:116
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.