author | Alexander Krotov <krotov@iitp.ru> |
Sat, 04 Aug 2018 20:02:47 +0300 | |
changeset 13716 | 0b3abcc6f68f |
parent 13665 | b2861f3dc03d |
child 13834 | 2670ce559a9b |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7141
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
2 |
/* |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
3 |
* Copyright (c) 2005,2006 INRIA |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
4 |
* |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
* |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
*/ |
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10139
diff
changeset
|
20 |
|
4340 | 21 |
#ifndef AARF_WIFI_MANAGER_H |
22 |
#define AARF_WIFI_MANAGER_H |
|
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
|
12687
05d210a15753
wifi: Add wifi-manager-example to test all wifi managers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
24 |
#include "ns3/traced-value.h" |
05d210a15753
wifi: Add wifi-manager-example to test all wifi managers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
25 |
#include "wifi-remote-station-manager.h" |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
|
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
27 |
namespace ns3 { |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
28 |
|
2059 | 29 |
/** |
30 |
* \brief AARF Rate control algorithm |
|
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
31 |
* \ingroup wifi |
2059 | 32 |
* |
33 |
* This class implements the AARF rate control algorithm which |
|
34 |
* was initially described in <i>IEEE 802.11 Rate Adaptation: |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
35 |
* A Practical Approach</i>, by M. Lacage, M.H. Manshaei, and |
2059 | 36 |
* T. Turletti. |
12153
090887671b94
wifi: (fixes #1797) Assert when non-HT RAA is used with HT/VHT device
Matias Richart <mrichart@fing.edu.uy>
parents:
11947
diff
changeset
|
37 |
* |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12153
diff
changeset
|
38 |
* This RAA does not support HT, VHT nor HE modes and will error |
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12153
diff
changeset
|
39 |
* exit if the user tries to configure this RAA with a Wi-Fi MAC |
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12153
diff
changeset
|
40 |
* that has VhtSupported, HtSupported or HeSupported set. |
2059 | 41 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
42 |
class AarfWifiManager : public WifiRemoteStationManager |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
43 |
{ |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
44 |
public: |
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
45 |
/** |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
46 |
* \brief Get the type ID. |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
47 |
* \return the object TypeId |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
48 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
49 |
static TypeId GetTypeId (void); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
50 |
AarfWifiManager (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
51 |
virtual ~AarfWifiManager (); |
12153
090887671b94
wifi: (fixes #1797) Assert when non-HT RAA is used with HT/VHT device
Matias Richart <mrichart@fing.edu.uy>
parents:
11947
diff
changeset
|
52 |
|
090887671b94
wifi: (fixes #1797) Assert when non-HT RAA is used with HT/VHT device
Matias Richart <mrichart@fing.edu.uy>
parents:
11947
diff
changeset
|
53 |
// Inherited from WifiRemoteStationManager |
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
54 |
void SetHtSupported (bool enable); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
55 |
void SetVhtSupported (bool enable); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
56 |
void SetHeSupported (bool enable); |
12583
40a9ab9779c6
wifi: Add initial support for 802.11ax
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12153
diff
changeset
|
57 |
|
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
58 |
private: |
13665 | 59 |
//overridden from base class |
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
60 |
WifiRemoteStation * DoCreateStation (void) const; |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
61 |
void DoReportRxOk (WifiRemoteStation *station, |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
62 |
double rxSnr, WifiMode txMode); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
63 |
void DoReportRtsFailed (WifiRemoteStation *station); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
64 |
void DoReportDataFailed (WifiRemoteStation *station); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
65 |
void DoReportRtsOk (WifiRemoteStation *station, |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
66 |
double ctsSnr, WifiMode ctsMode, double rtsSnr); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
67 |
void DoReportDataOk (WifiRemoteStation *station, |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
68 |
double ackSnr, WifiMode ackMode, double dataSnr); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
69 |
void DoReportFinalRtsFailed (WifiRemoteStation *station); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
70 |
void DoReportFinalDataFailed (WifiRemoteStation *station); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
71 |
WifiTxVector DoGetDataTxVector (WifiRemoteStation *station); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
72 |
WifiTxVector DoGetRtsTxVector (WifiRemoteStation *station); |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
73 |
bool IsLowLatency (void) const; |
6065 | 74 |
|
12691
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
75 |
uint32_t m_minTimerThreshold; ///< minimum timer threshold |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
76 |
uint32_t m_minSuccessThreshold; ///< minimum success threshold |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
77 |
double m_successK; ///< Multiplication factor for the success threshold |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
78 |
uint32_t m_maxSuccessThreshold; ///< maximum success threshold |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
79 |
double m_timerK; ///< Multiplication factor for the timer threshold |
e33cd795e21a
wifi: Doxygen updates for model files (thanks to Robert Ammon)
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12687
diff
changeset
|
80 |
|
12687
05d210a15753
wifi: Add wifi-manager-example to test all wifi managers
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
12583
diff
changeset
|
81 |
TracedValue<uint64_t> m_currentRate; //!< Trace rate changes |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
82 |
}; |
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
83 |
|
11450
9f4ae69f12b7
cleanup wifi module
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10139
diff
changeset
|
84 |
} //namespace ns3 |
1895
6c2d6a5631bc
add more files to build
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
85 |
|
4340 | 86 |
#endif /* AARF_WIFI_MANAGER_H */ |