author | Ghada Badawy <gbadawy@gmail.com> |
Wed, 28 Jan 2015 10:11:32 -0800 | |
changeset 11174 | 780a43e4980c |
parent 11159 | b744c32b69bc |
child 11348 | ded786322135 |
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 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
72 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
73 |
* Set the YansWifiChannel this YansWifiPhy is to be connected to. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
74 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
75 |
* \param channel the YansWifiChannel this YansWifiPhy is to be connected to |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
76 |
*/ |
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
77 |
void SetChannel (Ptr<YansWifiChannel> channel); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
78 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
79 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
80 |
* Set the current channel number. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
81 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
82 |
* \param id the channel number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
83 |
*/ |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
84 |
void SetChannelNumber (uint16_t id); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
85 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
86 |
* Return the current channel number. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
87 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
88 |
* \return the current channel number |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
89 |
*/ |
11159
b744c32b69bc
patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents:
11065
diff
changeset
|
90 |
uint16_t GetChannelNumber (void) const; |
b744c32b69bc
patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents:
11065
diff
changeset
|
91 |
/** |
b744c32b69bc
patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents:
11065
diff
changeset
|
92 |
* \return the required time for channel switch operation of this WifiPhy |
b744c32b69bc
patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents:
11065
diff
changeset
|
93 |
*/ |
b744c32b69bc
patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents:
11065
diff
changeset
|
94 |
Time GetChannelSwitchDelay (void) const; |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
95 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
96 |
* Return current center channel frequency in MHz. |
5192 | 97 |
* |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
98 |
* \return the current center channel frequency in MHz |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
99 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
100 |
double GetChannelFrequencyMhz () const; |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
101 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
102 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
103 |
* Starting receiving the packet (i.e. the first bit of the preamble has arrived). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
104 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
105 |
* \param packet the arriving packet |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
106 |
* \param rxPowerDbm the receive power in dBm |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
107 |
* \param txVector the TXVECTOR of the arriving packet |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
108 |
* \param preamble the preamble of the arriving packet |
11174
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
109 |
* \param packetType The type of the received packet (values: 0 not an A-MPDU, 1 corresponds to any packets in an A-MPDU except the last one, 2 is the last packet in an A-MPDU) |
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
110 |
* \param rxDuration the duration needed for the reception of the arriving packet |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
111 |
*/ |
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
112 |
void StartReceivePacket (Ptr<Packet> packet, |
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
113 |
double rxPowerDbm, |
10139 | 114 |
WifiTxVector txVector, |
11174
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
115 |
WifiPreamble preamble, |
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
116 |
uint8_t packetType, |
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
117 |
Time rxDuration); |
3893
94f771c1373a
split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3888
diff
changeset
|
118 |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
119 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
120 |
* 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
|
121 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
122 |
* \param noiseFigureDb noise figure in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
123 |
*/ |
4315
56a5bf298339
noiseFloor -> noiseFigure (bug 543)
Nicola Baldo <nbaldo@cttc.es>
parents:
4264
diff
changeset
|
124 |
void SetRxNoiseFigure (double noiseFigureDb); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
125 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
126 |
* Sets the minimum available transmission power level (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
127 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
128 |
* \param start the minimum transmission power level (dBm) |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
129 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
130 |
void SetTxPowerStart (double start); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
131 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
132 |
* Sets the maximum available transmission power level (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
133 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
134 |
* \param end the maximum transmission power level (dBm) |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
135 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
136 |
void SetTxPowerEnd (double end); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
137 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
138 |
* 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
|
139 |
* 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
|
140 |
* 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
|
141 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
142 |
* \param n the number of available levels |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
143 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
144 |
void SetNTxPower (uint32_t n); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
145 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
146 |
* Sets the transmission gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
147 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
148 |
* \param gain the transmission gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
149 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
150 |
void SetTxGain (double gain); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
151 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
152 |
* Sets the reception gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
153 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
154 |
* \param gain the reception gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
155 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
156 |
void SetRxGain (double gain); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
157 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
158 |
* Sets the energy detection threshold (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
159 |
* 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
|
160 |
* 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
|
161 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
162 |
* \param threshold the energy detction threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
163 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
164 |
void SetEdThreshold (double threshold); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
165 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
166 |
* 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
|
167 |
* 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
|
168 |
* layer to declare CCA BUSY state. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
169 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
170 |
* \param threshold the CCA threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
171 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
172 |
void SetCcaMode1Threshold (double threshold); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
173 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
174 |
* Sets the error rate model. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
175 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
176 |
* \param rate the error rate model |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
177 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
178 |
void SetErrorRateModel (Ptr<ErrorRateModel> rate); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
179 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
180 |
* Sets the device this PHY is associated with. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
181 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
182 |
* \param device the device this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
183 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
184 |
void SetDevice (Ptr<Object> device); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
185 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
186 |
* Sets the mobility model. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
187 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
188 |
* \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
|
189 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
190 |
void SetMobility (Ptr<Object> mobility); |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
191 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
192 |
* Return the RX noise figure (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
193 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
194 |
* \return the RX noise figure in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
195 |
*/ |
4315
56a5bf298339
noiseFloor -> noiseFigure (bug 543)
Nicola Baldo <nbaldo@cttc.es>
parents:
4264
diff
changeset
|
196 |
double GetRxNoiseFigure (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
197 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
198 |
* Return the transmission gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
199 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
200 |
* \return the transmission gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
201 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
202 |
double GetTxGain (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
203 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
204 |
* Return the reception gain (dB). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
205 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
206 |
* \return the reception gain in dB |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
207 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
208 |
double GetRxGain (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
209 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
210 |
* Return the energy detection threshold (dBm). |
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 energy detection threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
213 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
214 |
double GetEdThreshold (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
215 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
216 |
* Return the CCA threshold (dBm). |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
217 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
218 |
* \return the CCA threshold in dBm |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
219 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
220 |
double GetCcaMode1Threshold (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
221 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
222 |
* Return the error rate model this PHY is using. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
223 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
224 |
* \return the error rate model this PHY is using |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
225 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3904
diff
changeset
|
226 |
Ptr<ErrorRateModel> GetErrorRateModel (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
227 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
228 |
* Return the device this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
229 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
230 |
* \return the device this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
231 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
232 |
Ptr<Object> GetDevice (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
233 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
234 |
* Return the mobility model this PHY is associated with. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
235 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
236 |
* \return the mobility model this PHY is associated with |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
237 |
*/ |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
238 |
Ptr<Object> GetMobility (void); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
239 |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
240 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
241 |
* Return the minimum available transmission power level (dBm). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
242 |
* \return the minimum available transmission power level (dBm) |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
243 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
244 |
virtual double GetTxPowerStart (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
245 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
246 |
* Return the maximum available transmission power level (dBm). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
247 |
* \return the maximum available transmission power level (dBm) |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
248 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
249 |
virtual double GetTxPowerEnd (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
250 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
251 |
* Return the number of available transmission power levels. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
252 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
253 |
* \return the number of available transmission power levels |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
254 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
255 |
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
|
256 |
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
|
257 |
virtual void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback); |
11174
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
258 |
virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txvector, enum WifiPreamble preamble, uint8_t packetType); |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
259 |
virtual void RegisterListener (WifiPhyListener *listener); |
11159
b744c32b69bc
patch to support IEEE 1609.4 MAC extension in wave module
Junling Bu <linlinjavaer@gmail.com>
parents:
11065
diff
changeset
|
260 |
virtual void UnregisterListener (WifiPhyListener *listener); |
10883
d919e7194e23
add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents:
10801
diff
changeset
|
261 |
virtual void SetSleepMode (void); |
d919e7194e23
add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents:
10801
diff
changeset
|
262 |
virtual void ResumeFromSleep (void); |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
263 |
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
|
264 |
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
|
265 |
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
|
266 |
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
|
267 |
virtual bool IsStateTx (void); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
268 |
virtual bool IsStateSwitching (void); |
10883
d919e7194e23
add support for a Wifi sleep mode
Stefano Avallone <stefano.avallone@unina.it>
parents:
10801
diff
changeset
|
269 |
virtual bool IsStateSleep (void); |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
270 |
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
|
271 |
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
|
272 |
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
|
273 |
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
|
274 |
virtual WifiMode GetMode (uint32_t mode) const; |
10600
48c3c6b355a1
Bug 1848 - yans-wifi-phy can receive frames sent using unsupported mode
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10507
diff
changeset
|
275 |
virtual bool IsModeSupported (WifiMode mode) const; |
10801
02d564a4c823
Bug 1907- Add IsMcsSupported()
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10600
diff
changeset
|
276 |
virtual bool IsMcsSupported (WifiMode mode); |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
277 |
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
|
278 |
virtual Ptr<WifiChannel> GetChannel (void) const; |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
279 |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4690
diff
changeset
|
280 |
virtual void ConfigureStandard (enum WifiPhyStandard standard); |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
281 |
|
8981
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
282 |
/** |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
283 |
* 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
|
284 |
* 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
|
285 |
* have been assigned. |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
286 |
* |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
287 |
* \param stream first stream index to use |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
288 |
* \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
|
289 |
*/ |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
290 |
int64_t AssignStreams (int64_t stream); |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
7385
diff
changeset
|
291 |
|
10139 | 292 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
293 |
* \param freq the operating frequency on this node (2.4 GHz or 5GHz). |
10139 | 294 |
*/ |
295 |
virtual void SetFrequency (uint32_t freq); |
|
296 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
297 |
* \return the operating frequency on this node |
10139 | 298 |
*/ |
299 |
virtual uint32_t GetFrequency (void) const; |
|
300 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
301 |
* \param tx the number of transmitters on this node. |
10139 | 302 |
*/ |
303 |
virtual void SetNumberOfTransmitAntennas (uint32_t tx); |
|
304 |
virtual uint32_t GetNumberOfTransmitAntennas (void) const; |
|
305 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
306 |
* \param rx the number of receivers on this node. |
10139 | 307 |
*/ |
308 |
virtual void SetNumberOfReceiveAntennas (uint32_t rx) ; |
|
309 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
310 |
* \return the number of receivers on this node. |
10139 | 311 |
*/ |
312 |
virtual uint32_t GetNumberOfReceiveAntennas (void) const; |
|
313 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
314 |
* Enable or disable short/long guard interval. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
315 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
316 |
* \param guardInterval Enable or disable guard interval |
10139 | 317 |
*/ |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
318 |
virtual void SetGuardInterval (bool guardInterval); |
10139 | 319 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
320 |
* Return whether guard interval is being used. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
321 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
322 |
* \return true if guard interval is being used, false otherwise |
10139 | 323 |
*/ |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
324 |
virtual bool GetGuardInterval (void) const; |
10139 | 325 |
/** |
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
326 |
* Enable or disable LDPC. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
327 |
* \param ldpc Enable or disable LDPC |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
328 |
*/ |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
329 |
virtual void SetLdpc (bool ldpc); |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
330 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
331 |
* Return if LDPC is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
332 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
333 |
* \return true if LDPC is supported, false otherwise |
10139 | 334 |
*/ |
335 |
virtual bool GetLdpc (void) const; |
|
336 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
337 |
* Enable or disable STBC. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
338 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
339 |
* \param stbc Enable or disable STBC |
10139 | 340 |
*/ |
341 |
virtual void SetStbc (bool stbc); |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
342 |
/** |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
343 |
* Return whether STBC is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
344 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
345 |
* \return true if STBC is supported, false otherwise |
10139 | 346 |
*/ |
347 |
virtual bool GetStbc (void) const; |
|
348 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
349 |
* Enable or disable Greenfield support. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
350 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
351 |
* \param greenfield Enable or disable Greenfield |
10139 | 352 |
*/ |
353 |
virtual void SetGreenfield (bool greenfield); |
|
354 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
355 |
* Return whether Greenfield is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
356 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
357 |
* \return true if Greenfield is supported, false otherwise |
10139 | 358 |
*/ |
359 |
virtual bool GetGreenfield (void) const; |
|
360 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
361 |
* Return whether channel bonding is supported. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
362 |
* |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
363 |
* \return true if channel bonding is supported, false otherwise |
10139 | 364 |
*/ |
365 |
virtual bool GetChannelBonding (void) const ; |
|
366 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
367 |
* Enable or disable channel bonding support. |
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
368 |
* |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
369 |
* \param channelbonding Enable or disable channel bonding |
10139 | 370 |
*/ |
371 |
virtual void SetChannelBonding (bool channelbonding) ; |
|
372 |
||
373 |
virtual uint32_t GetNBssMembershipSelectors (void) const; |
|
374 |
virtual uint32_t GetBssMembershipSelector (uint32_t selector) const; |
|
375 |
virtual WifiModeList GetMembershipSelectorModes(uint32_t selector); |
|
376 |
/** |
|
10424
9d29c9a5ddcb
doxygen warnings for wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10204
diff
changeset
|
377 |
* \return the number of MCS supported by this phy |
10139 | 378 |
*/ |
379 |
virtual uint8_t GetNMcs (void) const; |
|
380 |
virtual uint8_t GetMcs (uint8_t mcs) const; |
|
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
381 |
|
10139 | 382 |
virtual uint32_t WifiModeToMcs (WifiMode mode); |
383 |
virtual WifiMode McsToWifiMode (uint8_t mcs); |
|
384 |
||
1889 | 385 |
private: |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
386 |
//YansWifiPhy (const YansWifiPhy &o); |
2530
05f9cec44621
avoid memory leaks
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
387 |
virtual void DoDispose (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
388 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
389 |
* Configure YansWifiPhy with appropriate channel frequency and |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
390 |
* supported rates for 802.11a standard. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
391 |
*/ |
1964
041240a915f8
build and link
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1920
diff
changeset
|
392 |
void Configure80211a (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
393 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
394 |
* Configure YansWifiPhy with appropriate channel frequency and |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
395 |
* supported rates for 802.11b standard. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
396 |
*/ |
4470 | 397 |
void Configure80211b (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
398 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
399 |
* Configure YansWifiPhy with appropriate channel frequency and |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
400 |
* supported rates for 802.11g standard. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
401 |
*/ |
6597
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
402 |
void Configure80211g (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
403 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
404 |
* Configure YansWifiPhy with appropriate channel frequency and |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
405 |
* supported rates for 802.11a standard with 10MHz channel spacing. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
406 |
*/ |
4680
a52c39181dd4
Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents:
4492
diff
changeset
|
407 |
void Configure80211_10Mhz (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
408 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
409 |
* Configure YansWifiPhy with appropriate channel frequency and |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
410 |
* supported rates for 802.11a standard with 5MHz channel spacing. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
411 |
*/ |
4680
a52c39181dd4
Support for 5 and 10Mhz wifi channels
Ramon Bauza <monbauza@gmail.com>
parents:
4492
diff
changeset
|
412 |
void Configure80211_5Mhz (); |
2083
c7541b84285e
add the holland 802.11a set of modes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2071
diff
changeset
|
413 |
void ConfigureHolland (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
414 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
415 |
* Configure YansWifiPhy with appropriate channel frequency and |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
416 |
* supported rates for 802.11n standard. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
417 |
*/ |
10139 | 418 |
void Configure80211n (void); |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
419 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
420 |
* Return the energy detection threshold. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
421 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
422 |
* \return the energy detection threshold. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
423 |
*/ |
1889 | 424 |
double GetEdThresholdW (void) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
425 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
426 |
* Convert from dBm to Watts. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
427 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
428 |
* \param dbm the power in dBm |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
429 |
* \return the equivalent Watts for the given dBm |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
430 |
*/ |
1889 | 431 |
double DbmToW (double dbm) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
432 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
433 |
* Convert from dB to ratio. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
434 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
435 |
* \param db |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
436 |
* \return ratio |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
437 |
*/ |
1889 | 438 |
double DbToRatio (double db) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
439 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
440 |
* Convert from Watts to dBm. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
441 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
442 |
* \param w the power in Watts |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
443 |
* \return the equivalent dBm for the given Watts |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
444 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
445 |
double WToDbm (double w) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
446 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
447 |
* Convert from ratio to dB. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
448 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
449 |
* \param ratio |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
450 |
* \return dB |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
451 |
*/ |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
452 |
double RatioToDb (double ratio) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
453 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
454 |
* Get the power of the given power level in dBm. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
455 |
* In YansWifiPhy implementation, the power levels are equally spaced (in dBm). |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
456 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
457 |
* \param power the power level |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
458 |
* \return the transmission power in dBm at the given power level |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
459 |
*/ |
1889 | 460 |
double GetPowerDbm (uint8_t power) const; |
10483
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
461 |
/** |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
462 |
* The last bit of the packet has arrived. |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
463 |
* |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
464 |
* \param packet the packet that the last bit has arrived |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
465 |
* \param event the corresponding event of the first time the packet arrives |
e3a02ed14587
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10424
diff
changeset
|
466 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5747
diff
changeset
|
467 |
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
|
468 |
|
1889 | 469 |
private: |
11174
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
470 |
virtual void DoInitialize (void); |
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
471 |
|
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
472 |
bool m_initialized; //!< Flag for runtime initialization |
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
473 |
double m_edThresholdW; //!< Energy detection threshold in watts |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
474 |
double m_ccaMode1ThresholdW; //!< Clear channel assessment (CCA) threshold in watts |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
475 |
double m_txGainDb; //!< Transmission gain (dB) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
476 |
double m_rxGainDb; //!< Reception gain (dB) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
477 |
double m_txPowerBaseDbm; //!< Minimum transmission power (dBm) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
478 |
double m_txPowerEndDbm; //!< Maximum transmission power (dBm) |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
479 |
uint32_t m_nTxPower; //!< Number of available transmission power levels |
10139 | 480 |
|
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
481 |
Ptr<YansWifiChannel> m_channel; //!< YansWifiChannel that this YansWifiPhy is connected to |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
482 |
uint16_t m_channelNumber; //!< Operating channel number |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
483 |
Ptr<Object> m_device; //!< Pointer to the device |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
484 |
Ptr<Object> m_mobility; //!< Pointer to the mobility model |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
485 |
|
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
486 |
uint32_t m_numberOfTransmitters; //!< Number of transmitters |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
487 |
uint32_t m_numberOfReceivers; //!< Number of receivers |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
488 |
bool m_ldpc; //!< Flag if LDPC is used |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
489 |
bool m_stbc; //!< Flag if STBC is used |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
490 |
bool m_greenfield; //!< Flag if GreenField format is supported |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
491 |
bool m_guardInterval; //!< Flag if short guard interval is used |
11065
2e6f9e4be3a3
fix misspelled attribute and doxygen in YansWifiPhy
Sébastien Deronne <sebastien.deronne@gmail.com>
parents:
10883
diff
changeset
|
492 |
bool m_channelBonding; //!< Flag if channel bonding is used |
10139 | 493 |
|
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
494 |
|
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
495 |
/** |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
496 |
* 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
|
497 |
* 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
|
498 |
* 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
|
499 |
* 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
|
500 |
* 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
|
501 |
* 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
|
502 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
503 |
* 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
|
504 |
* 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
|
505 |
* WifiMode::IsMandatory() is true. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
506 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
507 |
* 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
|
508 |
* 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
|
509 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
510 |
* 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
|
511 |
* 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
|
512 |
* 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
|
513 |
* 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
|
514 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
515 |
* 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
|
516 |
* 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
|
517 |
* 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
|
518 |
* 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
|
519 |
* 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
|
520 |
* 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
|
521 |
* 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
|
522 |
* 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
|
523 |
* ERP-OFDM PHY. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
524 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
525 |
* 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
|
526 |
* 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
|
527 |
* 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
|
528 |
* 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
|
529 |
* mandatory rates". |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
530 |
*/ |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
531 |
WifiModeList m_deviceRateSet; |
10139 | 532 |
|
533 |
std::vector<uint32_t> m_bssMembershipSelectorSet; |
|
534 |
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
|
535 |
EventId m_endRxEvent; |
10507
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
536 |
|
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
537 |
Ptr<UniformRandomVariable> m_random; //!< Provides uniform random variables. |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
538 |
double m_channelStartingFrequency; //!< Standard-dependent center frequency of 0-th channel in MHz |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
539 |
Ptr<WifiPhyStateHelper> m_state; //!< Pointer to WifiPhyStateHelper |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
540 |
InterferenceHelper m_interference; //!< Pointer to InterferenceHelper |
2081aa152526
[doxygen] wifi module
Daniel Lertpratchya <nikkipui@gmail.com>
parents:
10483
diff
changeset
|
541 |
Time m_channelSwitchDelay; //!< Time required to switch between channel |
11174
780a43e4980c
add MPDU aggregation (with contributions from Sebastien Deronne and Ioannis Selinis)
Ghada Badawy <gbadawy@gmail.com>
parents:
11159
diff
changeset
|
542 |
uint16_t m_mpdusNum; //!< carries the number of expected mpdus that are part of an A-MPDU |
1889 | 543 |
}; |
544 |
||
1977
4303409f3d8e
remove uneeded trailing ';'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
545 |
} // namespace ns3 |
1889 | 546 |
|
547 |
||
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
548 |
#endif /* YANS_WIFI_PHY_H */ |