A Discrete-Event Network Simulator
API
rraa-wifi-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006 INRIA
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Federico Maguolo <maguolof@dei.unipd.it>
19  */
20 
21 #ifndef RRAA_WIFI_MANAGER_H
22 #define RRAA_WIFI_MANAGER_H
23 
24 #include "ns3/nstime.h"
26 
27 namespace ns3 {
28 
29 struct RraaWifiRemoteStation;
30 
45 {
46 public:
47  static TypeId GetTypeId (void);
48 
49  RraaWifiManager ();
50  virtual ~RraaWifiManager ();
51 
52  // Inherited from WifiRemoteStationManager
53  virtual void SetHtSupported (bool enable);
54  virtual void SetVhtSupported (bool enable);
55 
56 private:
58  {
59  uint32_t datarate;
60  double pori;
61  double pmtl;
62  uint32_t ewnd;
63  };
64 
65  //overriden from base class
66  virtual WifiRemoteStation * DoCreateStation (void) const;
67  virtual void DoReportRxOk (WifiRemoteStation *station,
68  double rxSnr, WifiMode txMode);
69  virtual void DoReportRtsFailed (WifiRemoteStation *station);
70  virtual void DoReportDataFailed (WifiRemoteStation *station);
71  virtual void DoReportRtsOk (WifiRemoteStation *station,
72  double ctsSnr, WifiMode ctsMode, double rtsSnr);
73  virtual void DoReportDataOk (WifiRemoteStation *station,
74  double ackSnr, WifiMode ackMode, double dataSnr);
75  virtual void DoReportFinalRtsFailed (WifiRemoteStation *station);
76  virtual void DoReportFinalDataFailed (WifiRemoteStation *station);
79  virtual bool DoNeedRts (WifiRemoteStation *st,
80  Ptr<const Packet> packet, bool normally);
81  virtual bool IsLowLatency (void) const;
82 
91  uint32_t GetMaxRate (RraaWifiRemoteStation *station);
100  uint32_t GetMinRate (RraaWifiRemoteStation *station);
106  void CheckTimeout (RraaWifiRemoteStation *station);
119  void ARts (RraaWifiRemoteStation *station);
134  struct ThresholdsItem GetThresholds (WifiMode mode, RraaWifiRemoteStation *station) const;
143  struct ThresholdsItem GetThresholds (RraaWifiRemoteStation *station, uint32_t rate) const;
144 
145  bool m_basic;
147  uint32_t m_ewndfor54;
148  uint32_t m_ewndfor48;
149  uint32_t m_ewndfor36;
150  uint32_t m_ewndfor24;
151  uint32_t m_ewndfor18;
152  uint32_t m_ewndfor12;
153  uint32_t m_ewndfor9;
154  uint32_t m_ewndfor6;
155  double m_porifor48;
156  double m_porifor36;
157  double m_porifor24;
158  double m_porifor18;
159  double m_porifor12;
160  double m_porifor9;
161  double m_porifor6;
162  double m_pmtlfor54;
163  double m_pmtlfor48;
164  double m_pmtlfor36;
165  double m_pmtlfor24;
166  double m_pmtlfor18;
167  double m_pmtlfor12;
168  double m_pmtlfor9;
169 };
170 
171 } //namespace ns3
172 
173 #endif /* RRAA_WIFI_MANAGER_H */
uint32_t GetMaxRate(RraaWifiRemoteStation *station)
Return the index for the maximum transmission rate for the given station.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
virtual void DoReportRxOk(WifiRemoteStation *station, double rxSnr, WifiMode txMode)
This method is a pure virtual method that must be implemented by the sub-class.
static TypeId GetTypeId(void)
virtual void DoReportRtsOk(WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)
This method is a pure virtual method that must be implemented by the sub-class.
void RunBasicAlgorithm(RraaWifiRemoteStation *station)
Find an appropriate rate for the given station, using a basic algorithm.
struct ThresholdsItem GetThresholds(WifiMode mode, RraaWifiRemoteStation *station) const
Get a threshold for the given mode.
virtual bool DoNeedRts(WifiRemoteStation *st, Ptr< const Packet > packet, bool normally)
virtual bool IsLowLatency(void) const
virtual void DoReportRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
void ResetCountersBasic(RraaWifiRemoteStation *station)
Reset the counters of the given station.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:99
virtual WifiTxVector DoGetRtsTxVector(WifiRemoteStation *station)
virtual WifiRemoteStation * DoCreateStation(void) const
void CheckTimeout(RraaWifiRemoteStation *station)
Check if the counter should be resetted.
virtual void DoReportDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
virtual WifiTxVector DoGetDataTxVector(WifiRemoteStation *station)
virtual void SetHtSupported(bool enable)
Enable or disable HT capability support.
hold a list of per-remote-station state.
Robust Rate Adaptation AlgorithmThis is an implementation of RRAA as described in "Robust rate adapta...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void SetVhtSupported(bool enable)
Enable or disable VHT capability support.
void ARts(RraaWifiRemoteStation *station)
Activate the use of RTS for the given station if the conditions are met.
virtual void DoReportDataOk(WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)
This method is a pure virtual method that must be implemented by the sub-class.
hold per-remote-station state for RRAA Wifi manager.
uint32_t GetMinRate(RraaWifiRemoteStation *station)
Return the index for the minimum transmission rate for the given station.
virtual void DoReportFinalDataFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
virtual void DoReportFinalRtsFailed(WifiRemoteStation *station)
This method is a pure virtual method that must be implemented by the sub-class.
a unique identifier for an interface.
Definition: type-id.h:58
hold per-remote-station state.