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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
9#ifndef ONOE_WIFI_MANAGER_H
10#define ONOE_WIFI_MANAGER_H
11
12#include "ns3/traced-value.h"
13#include "ns3/wifi-remote-station-manager.h"
14
15namespace ns3
16{
17
18struct OnoeWifiRemoteStation;
19
20/**
21 * \brief an implementation of the rate control algorithm developed
22 * by Atsushi Onoe
23 *
24 * \ingroup wifi
25 *
26 * This algorithm is well known because it has been used as the default
27 * rate control algorithm for the madwifi driver. I am not aware of
28 * any publication or reference about this algorithm beyond the madwifi
29 * source code.
30 *
31 * This RAA does not support HT modes and will error
32 * exit if the user tries to configure this RAA with a Wi-Fi MAC
33 * that supports 802.11n or higher.
34 */
36{
37 public:
38 /**
39 * \brief Get the type ID.
40 * \return the object TypeId
41 */
42 static TypeId GetTypeId();
44 ~OnoeWifiManager() override;
45
46 private:
47 void DoInitialize() override;
48 WifiRemoteStation* DoCreateStation() const override;
49 void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) override;
50 void DoReportRtsFailed(WifiRemoteStation* station) override;
51 void DoReportDataFailed(WifiRemoteStation* station) override;
52 void DoReportRtsOk(WifiRemoteStation* station,
53 double ctsSnr,
54 WifiMode ctsMode,
55 double rtsSnr) override;
57 double ackSnr,
58 WifiMode ackMode,
59 double dataSnr,
60 MHz_u dataChannelWidth,
61 uint8_t dataNss) override;
62 void DoReportFinalRtsFailed(WifiRemoteStation* station) override;
63 void DoReportFinalDataFailed(WifiRemoteStation* station) override;
64 WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, MHz_u allowedWidth) override;
66
67 /**
68 * Update the number of retry (both short and long).
69 *
70 * \param station the ONOE wifi remote station
71 */
73 /**
74 * Update the mode.
75 *
76 * \param station the ONOE wifi remote station
77 */
78 void UpdateMode(OnoeWifiRemoteStation* station);
79
80 Time m_updatePeriod; ///< update period
81 uint32_t m_addCreditThreshold; ///< add credit threshold
82 uint32_t m_raiseThreshold; ///< raise threshold
83
84 TracedValue<uint64_t> m_currentRate; //!< Trace rate changes
85};
86
87} // namespace ns3
88
89#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
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.
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
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, MHz_u allowedWidth) override
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 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.
void UpdateMode(OnoeWifiRemoteStation *station)
Update the mode.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Trace classes with value semantics.
a unique identifier for an interface.
Definition type-id.h:48
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...
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.