A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
onoe-wifi-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2003,2007 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 ONOE_WIFI_MANAGER_H
21#define ONOE_WIFI_MANAGER_H
22
23#include "ns3/traced-value.h"
24#include "ns3/wifi-remote-station-manager.h"
25
26namespace ns3
27{
28
29struct OnoeWifiRemoteStation;
30
31/**
32 * \brief an implementation of the rate control algorithm developed
33 * by Atsushi Onoe
34 *
35 * \ingroup wifi
36 *
37 * This algorithm is well known because it has been used as the default
38 * rate control algorithm for the madwifi driver. I am not aware of
39 * any publication or reference about this algorithm beyond the madwifi
40 * source code.
41 *
42 * This RAA does not support HT modes and will error
43 * exit if the user tries to configure this RAA with a Wi-Fi MAC
44 * that supports 802.11n or higher.
45 */
47{
48 public:
49 /**
50 * \brief Get the type ID.
51 * \return the object TypeId
52 */
53 static TypeId GetTypeId();
55 ~OnoeWifiManager() 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 /**
79 * Update the number of retry (both short and long).
80 *
81 * \param station the ONOE wifi remote station
82 */
84 /**
85 * Update the mode.
86 *
87 * \param station the ONOE wifi remote station
88 */
89 void UpdateMode(OnoeWifiRemoteStation* station);
90
91 Time m_updatePeriod; ///< update period
92 uint32_t m_addCreditThreshold; ///< add credit threshold
93 uint32_t m_raiseThreshold; ///< raise threshold
94
95 TracedValue<uint64_t> m_currentRate; //!< Trace rate changes
96};
97
98} // namespace ns3
99
100#endif /* ONOE_WIFI_MANAGER_H */
an implementation of the rate control algorithm developed by Atsushi Onoe
WifiRemoteStation * DoCreateStation() const override
void DoInitialize() override
Initialize() implementation.
void UpdateRetry(OnoeWifiRemoteStation *station)
Update the number of retry (both short and long).
Time m_updatePeriod
update period
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint16_t allowedWidth) override
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 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.
TracedValue< uint64_t > m_currentRate
Trace rate 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 DoGetRtsTxVector(WifiRemoteStation *station) override
void DoReportRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
void DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
uint32_t m_addCreditThreshold
add credit threshold
uint32_t m_raiseThreshold
raise threshold
static TypeId GetTypeId()
Get the type ID.
void DoReportDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
void UpdateMode(OnoeWifiRemoteStation *station)
Update the mode.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
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 for ONOE Wifi manager.
hold per-remote-station state.