author | Daniel Lertpratchya <nikkipui@gmail.com> |
Mon, 18 Nov 2013 08:55:45 -0800 | |
changeset 10424 | 9d29c9a5ddcb |
parent 10204 | 7a102bb70a36 |
child 10483 | e3a02ed14587 |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7143
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
1889 | 2 |
/* |
3 |
* Copyright (c) 2005,2006 INRIA |
|
4 |
* |
|
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 |
1889 | 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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
|
10139 | 19 |
* Author: ghada Badawy <gbadawy@gmail.com> |
1889 | 20 |
*/ |
21 |
||
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
22 |
#ifndef YANS_WIFI_PHY_H |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
23 |
#define YANS_WIFI_PHY_H |
1889 | 24 |
|
25 |
#include <stdint.h> |
|
26 |
#include "ns3/callback.h" |
|
27 |
#include "ns3/event-id.h" |
|
28 |
#include "ns3/packet.h" |
|
2054
ba8e810bae4c
derive WifiPhy from Object and manage it with a Ptr<>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1988
diff
changeset
|
29 |
#include "ns3/object.h" |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
30 |
#include "ns3/traced-callback.h" |
1889 | 31 |
#include "ns3/nstime.h" |
32 |
#include "ns3/ptr.h" |
|
8981
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
33 |
#include "ns3/random-variable-stream.h" |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
34 |
#include "wifi-phy.h" |
1902
26a57487bb49
no need for ns3 prefix
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1892
diff
changeset
|
35 |
#include "wifi-mode.h" |
1920
1d4864775cf8
replace header mode with preamble mode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1919
diff
changeset
|
36 |
#include "wifi-preamble.h" |
2166
00b5eb43dba2
Improve the accuracy of 802.11a tx duration calculations.
Federico Maguolo <federico.maguolo@dei.unipd.it>
parents:
2159
diff
changeset
|
37 |
#include "wifi-phy-standard.h" |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
38 |
#include "interference-helper.h" |
1889 | 39 |
|
40 |
||
41 |
namespace ns3 { |
|
42 |
||
10139 | 43 |
#define HT_PHY 127 |
44 |
||
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
45 |
class YansWifiChannel; |
3900
1687492ff059
re-enable tracing of wifi phy state.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3897
diff
changeset
|
46 |
class WifiPhyStateHelper; |
1889 | 47 |
|
48 |
||
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
49 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
50 |
* \brief 802.11 PHY layer model |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
51 |
* \ingroup wifi |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
52 |
* |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
53 |
* This PHY implements a model of 802.11a. The model |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
54 |
* implemented here is based on the model described |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
55 |
* in "Yet Another Network Simulator", |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
56 |
* (http://cutebugs.net/files/wns2-yans.pdf). |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
57 |
* |
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
58 |
* |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
59 |
* This PHY model depends on a channel loss and delay |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
60 |
* model as provided by the ns3::PropagationLossModel |
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
61 |
* and ns3::PropagationDelayModel classes, both of which are |
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
62 |
* members of the ns3::YansWifiChannel class. |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
63 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
64 |
class YansWifiPhy : public WifiPhy |
1889 | 65 |
{ |
66 |
public: |
|
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
67 |
static TypeId GetTypeId (void); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
68 |
|
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
69 |
YansWifiPhy (); |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
70 |
virtual ~YansWifiPhy (); |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
71 |
|
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
72 |
void SetChannel (Ptr<YansWifiChannel> channel); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
73 |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
74 |
void SetChannelNumber (uint16_t id); |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
75 |
uint16_t GetChannelNumber () const; |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
76 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
77 |
* Return current center channel frequency in MHz. |
5192 | 78 |
* |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
79 |
* \return the current center channel frequency in MHz |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
80 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
81 |
double GetChannelFrequencyMhz () const; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
82 |
|
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
83 |
void StartReceivePacket (Ptr<Packet> packet, |
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
84 |
double rxPowerDbm, |
10139 | 85 |
WifiTxVector txVector, |
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
86 |
WifiPreamble preamble); |
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
87 |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
88 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
89 |
* Sets the RX loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
90 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
91 |
* \param noiseFigureDb noise figure in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
92 |
*/ |
4315
56a5bf298339
noiseFloor -> noiseFigure (bug 543)
Nicola Baldo <nbaldo@cttc.es>
parents:
4264
diff
changeset
|
93 |
void SetRxNoiseFigure (double noiseFigureDb); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
94 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
95 |
* Sets the minimum available transmission power level (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
96 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
97 |
* \param start the minimum transmission power level (dBm) |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
98 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
99 |
void SetTxPowerStart (double start); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
100 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
101 |
* Sets the maximum available transmission power level (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
102 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
103 |
* \param end the maximum transmission power level (dBm) |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
104 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
105 |
void SetTxPowerEnd (double end); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
106 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
107 |
* Sets the number of transmission power levels available between the |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
108 |
* minimum level and the maximum level. Transmission power levels are |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
109 |
* equally separated (in dBm) with the minimum and the maximum included. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
110 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
111 |
* \param n the number of available levels |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
112 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
113 |
void SetNTxPower (uint32_t n); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
114 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
115 |
* Sets the transmission gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
116 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
117 |
* \param gain the transmission gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
118 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
119 |
void SetTxGain (double gain); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
120 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
121 |
* Sets the reception gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
122 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
123 |
* \param gain the reception gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
124 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
125 |
void SetRxGain (double gain); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
126 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
127 |
* Sets the energy detection threshold (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
128 |
* The energy of a received signal should be higher than |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
129 |
* this threshold (dbm) to allow the PHY layer to detect the signal. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
130 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
131 |
* \param threshold the energy detction threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
132 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
133 |
void SetEdThreshold (double threshold); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
134 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
135 |
* Sets the CCA threshold (dBm). The energy of a received signal |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
136 |
* should be higher than this threshold to allow the PHY |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
137 |
* layer to declare CCA BUSY state. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
138 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
139 |
* \param threshold the CCA threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
140 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
141 |
void SetCcaMode1Threshold (double threshold); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
142 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
143 |
* Sets the error rate model. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
144 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
145 |
* \param rate the error rate model |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
146 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
147 |
void SetErrorRateModel (Ptr<ErrorRateModel> rate); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
148 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
149 |
* Sets the device this PHY is associated with. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
150 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
151 |
* \param device the device this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
152 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
153 |
void SetDevice (Ptr<Object> device); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
154 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
155 |
* Sets the mobility model. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
156 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
157 |
* \param mobility the mobility model this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
158 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
159 |
void SetMobility (Ptr<Object> mobility); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
160 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
161 |
* Return the RX noise figure (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
162 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
163 |
* \return the RX noise figure in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
164 |
*/ |
4315
56a5bf298339
noiseFloor -> noiseFigure (bug 543)
Nicola Baldo <nbaldo@cttc.es>
parents:
4264
diff
changeset
|
165 |
double GetRxNoiseFigure (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
166 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
167 |
* Return the transmission gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
168 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
169 |
* \return the transmission gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
170 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
171 |
double GetTxGain (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
172 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
173 |
* Return the reception gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
174 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
175 |
* \return the reception gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
176 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
177 |
double GetRxGain (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
178 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
179 |
* Return the energy detection threshold (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
180 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
181 |
* \return the energy detection threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
182 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
183 |
double GetEdThreshold (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
184 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
185 |
* Return the CCA threshold (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
186 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
187 |
* \return the CCA threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
188 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
189 |
double GetCcaMode1Threshold (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
190 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
191 |
* Return the error rate model this PHY is using. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
192 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
193 |
* \return the error rate model this PHY is using |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
194 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
195 |
Ptr<ErrorRateModel> GetErrorRateModel (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
196 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
197 |
* Return the device this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
198 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
199 |
* \return the device this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
200 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
201 |
Ptr<Object> GetDevice (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
202 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
203 |
* Return the mobility model this PHY is associated with. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
204 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
205 |
* \return the mobility model this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
206 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
207 |
Ptr<Object> GetMobility (void); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
208 |
|
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
209 |
virtual double GetTxPowerStart (void) const; |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
210 |
virtual double GetTxPowerEnd (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
211 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
212 |
* Return the number of available transmission power levels. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
213 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
214 |
* \return the number of available transmission power levels |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
215 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
216 |
virtual uint32_t GetNTxPower (void) const; |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5747
diff
changeset
|
217 |
virtual void SetReceiveOkCallback (WifiPhy::RxOkCallback callback); |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5747
diff
changeset
|
218 |
virtual void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback); |
10139 | 219 |
virtual void SendPacket (Ptr<const Packet> packet, WifiMode mode, enum WifiPreamble preamble, WifiTxVector txvector); |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
220 |
virtual void RegisterListener (WifiPhyListener *listener); |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
221 |
virtual bool IsStateCcaBusy (void); |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
222 |
virtual bool IsStateIdle (void); |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
223 |
virtual bool IsStateBusy (void); |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5747
diff
changeset
|
224 |
virtual bool IsStateRx (void); |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
225 |
virtual bool IsStateTx (void); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
226 |
virtual bool IsStateSwitching (void); |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
227 |
virtual Time GetStateDuration (void); |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
228 |
virtual Time GetDelayUntilIdle (void); |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
229 |
virtual Time GetLastRxStartTime (void) const; |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
230 |
virtual uint32_t GetNModes (void) const; |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
231 |
virtual WifiMode GetMode (uint32_t mode) const; |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
232 |
virtual double CalculateSnr (WifiMode txMode, double ber) const; |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
233 |
virtual Ptr<WifiChannel> GetChannel (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
234 |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4690
diff
changeset
|
235 |
virtual void ConfigureStandard (enum WifiPhyStandard standard); |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
236 |
|
8981
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
237 |
/** |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
238 |
* Assign a fixed random variable stream number to the random variables |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
239 |
* used by this model. Return the number of streams (possibly zero) that |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
240 |
* have been assigned. |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
241 |
* |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
242 |
* \param stream first stream index to use |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
243 |
* \return the number of stream indices assigned by this model |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
244 |
*/ |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
245 |
int64_t AssignStreams (int64_t stream); |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
246 |
|
10139 | 247 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
248 |
* \param freq the operating frequency on this node (2.4 GHz or 5GHz). |
10139 | 249 |
*/ |
250 |
virtual void SetFrequency (uint32_t freq); |
|
251 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
252 |
* \return the operating frequency on this node |
10139 | 253 |
*/ |
254 |
virtual uint32_t GetFrequency (void) const; |
|
255 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
256 |
* \param tx the number of transmitters on this node. |
10139 | 257 |
*/ |
258 |
virtual void SetNumberOfTransmitAntennas (uint32_t tx); |
|
259 |
virtual uint32_t GetNumberOfTransmitAntennas (void) const; |
|
260 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
261 |
* \param rx the number of receivers on this node. |
10139 | 262 |
*/ |
263 |
virtual void SetNumberOfReceiveAntennas (uint32_t rx) ; |
|
264 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
265 |
* \return the number of receivers on this node. |
10139 | 266 |
*/ |
267 |
virtual uint32_t GetNumberOfReceiveAntennas (void) const; |
|
268 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
269 |
* Enable or disable short/long guard interval. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
270 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
271 |
* \param guardInterval Enable or disable guard interval |
10139 | 272 |
*/ |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
273 |
virtual void SetGuardInterval (bool guardInterval); |
10139 | 274 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
275 |
* Return whether guard interval is being used. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
276 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
277 |
* \return true if guard interval is being used, false otherwise |
10139 | 278 |
*/ |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
279 |
virtual bool GetGuardInterval (void) const; |
10139 | 280 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
281 |
* Enable or disable LDPC. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
282 |
* \param ldpc Enable or disable LDPC |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
283 |
*/ |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
284 |
virtual void SetLdpc (bool ldpc); |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
285 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
286 |
* Return if LDPC is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
287 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
288 |
* \return true if LDPC is supported, false otherwise |
10139 | 289 |
*/ |
290 |
virtual bool GetLdpc (void) const; |
|
291 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
292 |
* Enable or disable STBC. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
293 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
294 |
* \param stbc Enable or disable STBC |
10139 | 295 |
*/ |
296 |
virtual void SetStbc (bool stbc); |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
297 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
298 |
* Return whether STBC is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
299 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
300 |
* \return true if STBC is supported, false otherwise |
10139 | 301 |
*/ |
302 |
virtual bool GetStbc (void) const; |
|
303 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
304 |
* Enable or disable Greenfield support. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
305 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
306 |
* \param greenfield Enable or disable Greenfield |
10139 | 307 |
*/ |
308 |
virtual void SetGreenfield (bool greenfield); |
|
309 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
310 |
* Return whether Greenfield is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
311 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
312 |
* \return true if Greenfield is supported, false otherwise |
10139 | 313 |
*/ |
314 |
virtual bool GetGreenfield (void) const; |
|
315 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
316 |
* Return whether channel bonding is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
317 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
318 |
* \return true if channel bonding is supported, false otherwise |
10139 | 319 |
*/ |
320 |
virtual bool GetChannelBonding (void) const ; |
|
321 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
322 |
* Enable or disable channel bonding support. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
323 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
324 |
* \param channelBonding Enable or disable channel bonding |
10139 | 325 |
*/ |
326 |
virtual void SetChannelBonding (bool channelbonding) ; |
|
327 |
||
328 |
virtual uint32_t GetNBssMembershipSelectors (void) const; |
|
329 |
virtual uint32_t GetBssMembershipSelector (uint32_t selector) const; |
|
330 |
virtual WifiModeList GetMembershipSelectorModes(uint32_t selector); |
|
331 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
332 |
* \return the number of MCS supported by this phy |
10139 | 333 |
*/ |
334 |
virtual uint8_t GetNMcs (void) const; |
|
335 |
virtual uint8_t GetMcs (uint8_t mcs) const; |
|
336 |
/** |
|
337 |
* For a given WifiMode finds the corresponding MCS value and returns it |
|
338 |
* as defined in the IEEE 802.11n standard |
|
339 |
* |
|
340 |
* \param mode the WifiMode |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
341 |
* \return the MCS number that corresponds to the given WifiMode |
10139 | 342 |
*/ |
343 |
virtual uint32_t WifiModeToMcs (WifiMode mode); |
|
344 |
/** |
|
345 |
* For a given MCS finds the corresponding WifiMode and returns it |
|
346 |
* as defined in the IEEE 802.11n standard. |
|
347 |
* |
|
348 |
* \param mcs the MCS number |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
349 |
* \return the WifiMode that corresponds to the given mcs number |
10139 | 350 |
*/ |
351 |
virtual WifiMode McsToWifiMode (uint8_t mcs); |
|
352 |
||
1889 | 353 |
private: |
3906 | 354 |
YansWifiPhy (const YansWifiPhy &o); |
2530
05f9cec44621
avoid memory leaks
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
355 |
virtual void DoDispose (void); |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1920
diff
changeset
|
356 |
void Configure80211a (void); |
4470 | 357 |
void Configure80211b (void); |
6597
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
358 |
void Configure80211g (void); |
4680
a52c39181dd4
Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents:
4492
diff
changeset
|
359 |
void Configure80211_10Mhz (void); |
a52c39181dd4
Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents:
4492
diff
changeset
|
360 |
void Configure80211_5Mhz (); |
2083
c7541b84285e
add the holland 802.11a set of modes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2071
diff
changeset
|
361 |
void ConfigureHolland (void); |
10139 | 362 |
void Configure80211n (void); |
1889 | 363 |
double GetEdThresholdW (void) const; |
364 |
double DbmToW (double dbm) const; |
|
365 |
double DbToRatio (double db) const; |
|
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
366 |
double WToDbm (double w) const; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
367 |
double RatioToDb (double ratio) const; |
1889 | 368 |
double GetPowerDbm (uint8_t power) const; |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5747
diff
changeset
|
369 |
void EndReceive (Ptr<Packet> packet, Ptr<InterferenceHelper::Event> event); |
3897
44645cec42f2
split state management in a helper class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3893
diff
changeset
|
370 |
|
1889 | 371 |
private: |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
372 |
double m_edThresholdW; |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
373 |
double m_ccaMode1ThresholdW; |
2071
122c95ffccdd
use dB instead of dbm where appropriate
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2057
diff
changeset
|
374 |
double m_txGainDb; |
122c95ffccdd
use dB instead of dbm where appropriate
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2057
diff
changeset
|
375 |
double m_rxGainDb; |
1889 | 376 |
double m_txPowerBaseDbm; |
377 |
double m_txPowerEndDbm; |
|
378 |
uint32_t m_nTxPower; |
|
379 |
||
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
380 |
Ptr<YansWifiChannel> m_channel; |
10139 | 381 |
uint16_t m_channelNumber; |
382 |
Ptr<Object> m_device; |
|
383 |
Ptr<Object> m_mobility; |
|
384 |
||
385 |
// number of transmitters |
|
386 |
uint32_t m_numberOfTransmitters; |
|
10204
7a102bb70a36
bug 945: remove deprecated 802.11p code
Junling Bu <linlinjavaer@gmail.com>
parents:
10139
diff
changeset
|
387 |
// number of receivers |
10139 | 388 |
uint32_t m_numberOfReceivers; |
389 |
//if true use LDPC |
|
390 |
bool m_ldpc; |
|
391 |
// True if STBC is used |
|
392 |
bool m_stbc; |
|
393 |
//True if GreenField format is supported |
|
394 |
bool m_greenfield; |
|
395 |
//True is short guard interval is used |
|
396 |
bool m_guardInterval; |
|
397 |
//True if channel bonding is used |
|
398 |
bool m_channelBonding; |
|
399 |
||
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
400 |
|
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
401 |
/** |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
402 |
* This vector holds the set of transmission modes that this |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
403 |
* WifiPhy(-derived class) can support. In conversation we call this |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
404 |
* the DeviceRateSet (not a term you'll find in the standard), and |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
405 |
* it is a superset of standard-defined parameters such as the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
406 |
* OperationalRateSet, and the BSSBasicRateSet (which, themselves, |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
407 |
* have a superset/subset relationship). |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
408 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
409 |
* Mandatory rates relevant to this WifiPhy can be found by |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
410 |
* iterating over this vector looking for WifiMode objects for which |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
411 |
* WifiMode::IsMandatory() is true. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
412 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
413 |
* A quick note is appropriate here (well, here is as good a place |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
414 |
* as any I can find)... |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
415 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
416 |
* In the standard there is no text that explicitly precludes |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
417 |
* production of a device that does not support some rates that are |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
418 |
* mandatory (according to the standard) for PHYs that the device |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
419 |
* happens to fully or partially support. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
420 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
421 |
* This approach is taken by some devices which choose to only support, |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
422 |
* for example, 6 and 9 Mbps ERP-OFDM rates for cost and power |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
423 |
* consumption reasons (i.e., these devices don't need to be designed |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
424 |
* for and waste current on the increased linearity requirement of |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
425 |
* higher-order constellations when 6 and 9 Mbps more than meet their |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
426 |
* data requirements). The wording of the standard allows such devices |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
427 |
* to have an OperationalRateSet which includes 6 and 9 Mbps ERP-OFDM |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
428 |
* rates, despite 12 and 24 Mbps being "mandatory" rates for the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
429 |
* ERP-OFDM PHY. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
430 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
431 |
* Now this doesn't actually have any impact on code, yet. It is, |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
432 |
* however, something that we need to keep in mind for the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
433 |
* future. Basically, the key point is that we can't be making |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
434 |
* assumptions like "the Operational Rate Set will contain all the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
435 |
* mandatory rates". |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
436 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
437 |
WifiModeList m_deviceRateSet; |
10139 | 438 |
|
439 |
std::vector<uint32_t> m_bssMembershipSelectorSet; |
|
440 |
std::vector<uint8_t> m_deviceMcsSet; |
|
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5747
diff
changeset
|
441 |
EventId m_endRxEvent; |
8981
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
442 |
/// Provides uniform random variables. |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
443 |
Ptr<UniformRandomVariable> m_random; |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
444 |
/// Standard-dependent center frequency of 0-th channel, MHz |
4690
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
445 |
double m_channelStartingFrequency; |
3900
1687492ff059
re-enable tracing of wifi phy state.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3897
diff
changeset
|
446 |
Ptr<WifiPhyStateHelper> m_state; |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
447 |
InterferenceHelper m_interference; |
4690
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
448 |
Time m_channelSwitchDelay; |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
3912
diff
changeset
|
449 |
|
1889 | 450 |
}; |
451 |
||
1977
4303409f3d8e
remove uneeded trailing ';'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
452 |
} // namespace ns3 |
1889 | 453 |
|
454 |
||
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
455 |
#endif /* YANS_WIFI_PHY_H */ |