A Discrete-Event Network Simulator
API
cara-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: Federico Maguolo <maguolof@dei.unipd.it>
18  */
19 
20 #ifndef CARA_WIFI_MANAGER_H
21 #define CARA_WIFI_MANAGER_H
22 
23 #include "ns3/traced-value.h"
24 #include "ns3/wifi-remote-station-manager.h"
25 
26 namespace ns3
27 {
28 
45 {
46  public:
51  static TypeId GetTypeId();
53  ~CaraWifiManager() override;
54 
55  private:
56  void DoInitialize() override;
57  WifiRemoteStation* DoCreateStation() const override;
58  void DoReportRxOk(WifiRemoteStation* station, double rxSnr, WifiMode txMode) override;
59  void DoReportRtsFailed(WifiRemoteStation* station) override;
60  void DoReportDataFailed(WifiRemoteStation* station) override;
61  void DoReportRtsOk(WifiRemoteStation* station,
62  double ctsSnr,
63  WifiMode ctsMode,
64  double rtsSnr) override;
65  void DoReportDataOk(WifiRemoteStation* station,
66  double ackSnr,
67  WifiMode ackMode,
68  double dataSnr,
69  uint16_t dataChannelWidth,
70  uint8_t dataNss) override;
71  void DoReportFinalRtsFailed(WifiRemoteStation* station) override;
72  void DoReportFinalDataFailed(WifiRemoteStation* station) override;
73  WifiTxVector DoGetDataTxVector(WifiRemoteStation* station, uint16_t allowedWidth) override;
75  bool DoNeedRts(WifiRemoteStation* station, uint32_t size, bool normally) override;
76 
77  uint32_t m_timerTimeout;
78  uint32_t m_successThreshold;
79  uint32_t m_failureThreshold;
80  uint32_t m_probeThreshold;
81 
83 };
84 
85 } // namespace ns3
86 
87 #endif /* CARA_WIFI_MANAGER_H */
implement the CARA rate control algorithm
WifiTxVector DoGetDataTxVector(WifiRemoteStation *station, uint16_t allowedWidth) override
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.
void DoReportFinalDataFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId()
Get the type ID.
uint32_t m_failureThreshold
failure threshold
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
bool DoNeedRts(WifiRemoteStation *station, uint32_t size, bool normally) override
uint32_t m_timerTimeout
timer threshold
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.
WifiRemoteStation * DoCreateStation() const 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 DoReportFinalRtsFailed(WifiRemoteStation *station) override
This method is a pure virtual method that must be implemented by the sub-class.
TracedValue< uint64_t > m_currentRate
Trace rate changes.
uint32_t m_probeThreshold
probe threshold
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.