author | Ghada Badawy <gbadawy@gmail.com> |
Tue, 13 Aug 2013 22:05:25 -0700 | |
changeset 10139 | 17a71cd49da3 |
parent 8981 | 7e1c95c4d1a7 |
child 10424 | 9d29c9a5ddcb |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7334
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> |
|
19 |
*/ |
|
20 |
||
1890
a2b30c6456c9
Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1889
diff
changeset
|
21 |
#ifndef WIFI_PHY_H |
a2b30c6456c9
Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1889
diff
changeset
|
22 |
#define WIFI_PHY_H |
1889 | 23 |
|
24 |
#include <stdint.h> |
|
25 |
#include "ns3/callback.h" |
|
26 |
#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
|
27 |
#include "ns3/object.h" |
1889 | 28 |
#include "ns3/nstime.h" |
29 |
#include "ns3/ptr.h" |
|
1902
26a57487bb49
no need for ns3 prefix
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1892
diff
changeset
|
30 |
#include "wifi-mode.h" |
1920
1d4864775cf8
replace header mode with preamble mode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1919
diff
changeset
|
31 |
#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
|
32 |
#include "wifi-phy-standard.h" |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
33 |
#include "ns3/traced-callback.h" |
10139 | 34 |
#include "wifi-tx-vector.h" |
1889 | 35 |
|
36 |
namespace ns3 { |
|
37 |
||
1891
add6fb8761f3
use WifiMode rather than TransmissionMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1890
diff
changeset
|
38 |
class WifiChannel; |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
39 |
class NetDevice; |
1889 | 40 |
|
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
41 |
/** |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
42 |
* \brief receive notifications about phy events. |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
43 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
44 |
class WifiPhyListener |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
45 |
{ |
1889 | 46 |
public: |
1890
a2b30c6456c9
Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1889
diff
changeset
|
47 |
virtual ~WifiPhyListener (); |
1889 | 48 |
|
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
49 |
/** |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
50 |
* \param duration the expected duration of the packet reception. |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
51 |
* |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
52 |
* We have received the first bit of a packet. We decided |
1889 | 53 |
* that we could synchronize on this packet. It does not mean |
54 |
* we will be able to successfully receive completely the |
|
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
55 |
* whole packet. It means that we will report a BUSY status until |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
56 |
* one of the following happens: |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
57 |
* - NotifyRxEndOk |
8867
743aeb2fef78
fixed typo in doxygen of WifiPhyListener
Nicola Baldo <nbaldo@cttc.es>
parents:
7600
diff
changeset
|
58 |
* - NotifyRxEndError |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
59 |
* - NotifyTxStart |
1889 | 60 |
*/ |
61 |
virtual void NotifyRxStart (Time duration) = 0; |
|
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
62 |
/** |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
63 |
* We have received the last bit of a packet for which |
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
64 |
* NotifyRxStart was invoked first and, the packet has |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
65 |
* been successfully received. |
1889 | 66 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
67 |
virtual void NotifyRxEndOk (void) = 0; |
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
68 |
/** |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
69 |
* We have received the last bit of a packet for which |
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
70 |
* NotifyRxStart was invoked first and, the packet has |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
71 |
* _not_ been successfully received. |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
72 |
*/ |
1889 | 73 |
virtual void NotifyRxEndError (void) = 0; |
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
74 |
/** |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
75 |
* \param duration the expected transmission duration. |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
76 |
* |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
77 |
* We are about to send the first bit of the packet. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
78 |
* We do not send any event to notify the end of |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
79 |
* transmission. Listeners should assume that the |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
80 |
* channel implicitely reverts to the idle state |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
81 |
* unless they have received a cca busy report. |
1889 | 82 |
*/ |
83 |
virtual void NotifyTxStart (Time duration) = 0; |
|
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
84 |
|
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
85 |
/** |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
86 |
* \param duration the expected busy duration. |
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
87 |
* |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
88 |
* This method does not really report a real state |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
89 |
* change as opposed to the other methods in this class. |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
90 |
* It merely reports that, unless the medium is reported |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
91 |
* busy through NotifyTxStart or NotifyRxStart/End, |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
92 |
* it will be busy as defined by the currently selected |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
93 |
* CCA mode. |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
94 |
* |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
95 |
* Typical client code which wants to have a clear picture |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
96 |
* of the CCA state will need to keep track of the time at |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
97 |
* which the last NotifyCcaBusyStart method is called and |
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
98 |
* what duration it reported. |
2684
68c643329c2b
improve doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2659
diff
changeset
|
99 |
*/ |
3905
99c9346b5d71
split interference calculation from YansWifiPhy. Move them to InterferenceHelper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3899
diff
changeset
|
100 |
virtual void NotifyMaybeCcaBusyStart (Time duration) = 0; |
5189 | 101 |
/** |
102 |
* \param duration the expected channel switching duration. |
|
103 |
* |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
104 |
* We do not send any event to notify the end of |
5189 | 105 |
* channel switching. Listeners should assume that the |
106 |
* channel implicitely reverts to the idle or busy states. |
|
107 |
*/ |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
108 |
virtual void NotifySwitchingStart (Time duration) = 0; |
1889 | 109 |
}; |
110 |
||
111 |
||
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
112 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
113 |
* \brief 802.11 PHY layer model |
7139
79dd02ed46ec
doxygen wifi module grouping all wifi classes
Nicola Baldo <nbaldo@cttc.es>
parents:
6852
diff
changeset
|
114 |
* \ingroup wifi |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
115 |
* |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
116 |
*/ |
2054
ba8e810bae4c
derive WifiPhy from Object and manage it with a Ptr<>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1988
diff
changeset
|
117 |
class WifiPhy : public Object |
1889 | 118 |
{ |
119 |
public: |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
120 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
121 |
* The state of the PHY layer. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
122 |
*/ |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
123 |
enum State |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
124 |
{ |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
125 |
/** |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
126 |
* The PHY layer is IDLE. |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
127 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
128 |
IDLE, |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
129 |
/** |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
130 |
* The PHY layer has sense the medium busy through the CCA mechanism |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
131 |
*/ |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
132 |
CCA_BUSY, |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
133 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
134 |
* The PHY layer is sending a packet. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
135 |
*/ |
2055
8899d6ef5d52
phy state logger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2054
diff
changeset
|
136 |
TX, |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
137 |
/** |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
138 |
* The PHY layer is receiving a packet. |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
139 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
140 |
RX, |
5189 | 141 |
/** |
142 |
* The PHY layer is switching to other channel. |
|
143 |
*/ |
|
144 |
SWITCHING |
|
2055
8899d6ef5d52
phy state logger
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2054
diff
changeset
|
145 |
}; |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
146 |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
147 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
148 |
* arg1: packet received successfully |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
149 |
* arg2: snr of packet |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
150 |
* arg3: mode of packet |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
151 |
* arg4: type of preamble used for packet. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
152 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
153 |
typedef Callback<void,Ptr<Packet>, double, WifiMode, enum WifiPreamble> RxOkCallback; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
154 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
155 |
* arg1: packet received unsuccessfully |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
156 |
* arg2: snr of packet |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
157 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
158 |
typedef Callback<void,Ptr<const Packet>, double> RxErrorCallback; |
1889 | 159 |
|
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
160 |
static TypeId GetTypeId (void); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
161 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
162 |
WifiPhy (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
163 |
virtual ~WifiPhy (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
164 |
|
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
165 |
virtual double GetTxPowerStart (void) const = 0; |
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
166 |
virtual double GetTxPowerEnd (void) const = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
167 |
/** |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2166
diff
changeset
|
168 |
* \returns the number of tx power levels available for this PHY. |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
169 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
170 |
virtual uint32_t GetNTxPower (void) const = 0; |
1891
add6fb8761f3
use WifiMode rather than TransmissionMode
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1890
diff
changeset
|
171 |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
172 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
173 |
* \param callback the callback to invoke |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
174 |
* upon successful packet reception. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
175 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
176 |
virtual void SetReceiveOkCallback (RxOkCallback callback) = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
177 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
178 |
* \param callback the callback to invoke |
6273
8d70de29d514
spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents:
5820
diff
changeset
|
179 |
* upon erroneous packet reception. |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
180 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
181 |
virtual void SetReceiveErrorCallback (RxErrorCallback callback) = 0; |
1889 | 182 |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
183 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
184 |
* \param packet the packet to send |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
185 |
* \param mode the transmission mode to use to send this packet |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
186 |
* \param preamble the type of preamble to use to send this packet. |
10139 | 187 |
* \param txvector the txvector that has tx parameters as txPowerLevel a power level to use to send this packet. The real |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
188 |
* transmission power is calculated as txPowerMin + txPowerLevel * (txPowerMax - txPowerMin) / nTxLevels |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
189 |
*/ |
10139 | 190 |
virtual void SendPacket (Ptr<const Packet> packet, WifiMode mode, enum WifiPreamble preamble, WifiTxVector txvector) = 0; |
1889 | 191 |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
192 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
193 |
* \param listener the new listener |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
194 |
* |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
195 |
* Add the input listener to the list of objects to be notified of |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
196 |
* PHY-level events. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
197 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
198 |
virtual void RegisterListener (WifiPhyListener *listener) = 0; |
1889 | 199 |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
200 |
/** |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
201 |
* \returns true of the current state of the PHY layer is WifiPhy::IDLE, false otherwise. |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
202 |
*/ |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
203 |
virtual bool IsStateIdle (void) = 0; |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
204 |
/** |
3890 | 205 |
* \returns true of the current state of the PHY layer is WifiPhy::CCA_BUSY, false otherwise. |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
206 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
207 |
virtual bool IsStateCcaBusy (void) = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
208 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
209 |
* \returns true of the current state of the PHY layer is not WifiPhy::IDLE, false otherwise. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
210 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
211 |
virtual bool IsStateBusy (void) = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
212 |
/** |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
213 |
* \returns true of the current state of the PHY layer is WifiPhy::RX, false otherwise. |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
214 |
*/ |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
215 |
virtual bool IsStateRx (void) = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
216 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
217 |
* \returns true of the current state of the PHY layer is WifiPhy::TX, false otherwise. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
218 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
219 |
virtual bool IsStateTx (void) = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
220 |
/** |
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
221 |
* \returns true of the current state of the PHY layer is WifiPhy::SWITCHING, false otherwise. |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
222 |
*/ |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
223 |
virtual bool IsStateSwitching (void) = 0; |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
224 |
/** |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
225 |
* \returns the amount of time since the current state has started. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
226 |
*/ |
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) = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
228 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
229 |
* \returns the predicted delay until this PHY can become WifiPhy::IDLE. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
230 |
* |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
231 |
* The PHY will never become WifiPhy::IDLE _before_ the delay returned by |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
232 |
* this method but it could become really idle later. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
233 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
234 |
virtual Time GetDelayUntilIdle (void) = 0; |
1889 | 235 |
|
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
236 |
virtual Time GetLastRxStartTime (void) const = 0; |
2139
a2cf93c741c3
add WifiPhy::GetLastRxStart
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2083
diff
changeset
|
237 |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
238 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
239 |
* \param size the number of bytes in the packet to send |
10139 | 240 |
* \param txvector the transmission parameters used for this packet |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
241 |
* \param preamble the type of preamble to use for this packet. |
7143
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
242 |
* \return the total amount of time this PHY will stay busy for |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
243 |
* the transmission of these bytes. |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
244 |
*/ |
10139 | 245 |
static Time CalculateTxDuration (uint32_t size, WifiTxVector txvector, enum WifiPreamble preamble); |
246 |
||
247 |
/** |
|
248 |
* \param payloadMode the WifiMode use for the transmission of the payload |
|
249 |
* \param preamble the type of preamble |
|
250 |
* \param txvector the transmission parameters used for this packet |
|
251 |
||
252 |
* \return the training symbol duration |
|
253 |
*/ |
|
254 |
static uint32_t GetPlcpHtTrainingSymbolDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble, WifiTxVector txvector); |
|
255 |
/** |
|
256 |
* \param payloadMode the WifiMode use for the transmission of the payload |
|
257 |
* \param preamble the type of preamble |
|
258 |
* |
|
259 |
* \return the WifiMode used for the transmission of the HT-SIG in Mixed Format and greenfield format PLCP header |
|
260 |
*/ |
|
261 |
static WifiMode GetMFPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble); |
|
262 |
/** |
|
263 |
* \param payloadMode the WifiMode use for the transmission of the payload |
|
264 |
* \param preamble the type of preamble |
|
265 |
* |
|
266 |
* \return the duration of the GT-SIG in Mixed Format and greenfield format PLCP header |
|
267 |
*/ |
|
268 |
static uint32_t GetPlcpHtSigHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble); |
|
269 |
||
7143
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
270 |
|
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
271 |
/** |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
272 |
* \param payloadMode the WifiMode use for the transmission of the payload |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
273 |
* \param preamble the type of preamble |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
274 |
* |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
275 |
* \return the WifiMode used for the transmission of the PLCP header |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
276 |
*/ |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
277 |
static WifiMode GetPlcpHeaderMode (WifiMode payloadMode, WifiPreamble preamble); |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
278 |
|
7600
57ba46094a0d
fix various doxygen errors
Vedran Miletić <rivanvx@gmail.com>
parents:
7385
diff
changeset
|
279 |
/** |
7143
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
280 |
* \param payloadMode the WifiMode use for the transmission of the payload |
7600
57ba46094a0d
fix various doxygen errors
Vedran Miletić <rivanvx@gmail.com>
parents:
7385
diff
changeset
|
281 |
* \param preamble the type of preamble |
7143
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
282 |
* |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
283 |
* \return the duration of the PLCP header in microseconds |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
284 |
*/ |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
285 |
static uint32_t GetPlcpHeaderDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble); |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
286 |
|
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
287 |
/** |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
288 |
* \param payloadMode the WifiMode use for the transmission of the payload |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
289 |
* \param preamble the type of preamble |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
290 |
* |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
291 |
* \return the duration of the PLCP preamble in microseconds |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
292 |
*/ |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
293 |
static uint32_t GetPlcpPreambleDurationMicroSeconds (WifiMode payloadMode, WifiPreamble preamble); |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
294 |
|
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
295 |
/** |
7600
57ba46094a0d
fix various doxygen errors
Vedran Miletić <rivanvx@gmail.com>
parents:
7385
diff
changeset
|
296 |
* \param size the number of bytes in the packet to send |
10139 | 297 |
* \param txvector the transmission parameters used for this packet |
7143
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
298 |
* |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
299 |
* \return the duration of the payload in microseconds |
0146b1916bc0
wifi tx duration calculations moved from InterferenceHelper to WifiPhy
Nicola Baldo <nicola@baldo.biz>
parents:
7141
diff
changeset
|
300 |
*/ |
10139 | 301 |
static double GetPayloadDurationMicroSeconds (uint32_t size, WifiTxVector txvector); |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
302 |
|
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
303 |
/** |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
304 |
* The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
305 |
* (e.g., by a WifiRemoteStationManager) to determine the set of |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
306 |
* transmission/reception modes that this WifiPhy(-derived class) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
307 |
* can support - a set of WifiMode objects which we call the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
308 |
* DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
309 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
310 |
* It is important to note that the DeviceRateSet is a superset (not |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
311 |
* necessarily proper) of the OperationalRateSet (which is |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
312 |
* logically, if not actually, a property of the associated |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
313 |
* WifiRemoteStationManager), which itself is a superset (again, not |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
314 |
* necessarily proper) of the BSSBasicRateSet. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
315 |
* |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
316 |
* \returns the number of transmission modes supported by this PHY. |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
317 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
318 |
* \sa WifiPhy::GetMode() |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
319 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
320 |
virtual uint32_t GetNModes (void) const = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
321 |
/** |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
322 |
* The WifiPhy::GetNModes() and WifiPhy::GetMode() methods are used |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
323 |
* (e.g., by a WifiRemoteStationManager) to determine the set of |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
324 |
* transmission/reception modes that this WifiPhy(-derived class) |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
325 |
* can support - a set of WifiMode objects which we call the |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
326 |
* DeviceRateSet, and which is stored as WifiPhy::m_deviceRateSet. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
327 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
328 |
* It is important to note that the DeviceRateSet is a superset (not |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
329 |
* necessarily proper) of the OperationalRateSet (which is |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
330 |
* logically, if not actually, a property of the associated |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
331 |
* WifiRemoteStationManager), which itself is a superset (again, not |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
332 |
* necessarily proper) of the BSSBasicRateSet. |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
333 |
* |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
334 |
* \param mode index in array of supported modes |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
335 |
* \returns the mode whose index is specified. |
6372
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
336 |
* |
0fafd9716f44
Bug 853: Consider mandatory rates for Wi-Fi control responses
Dean Armstrong <deanarm@gmail.com>
parents:
6360
diff
changeset
|
337 |
* \sa WifiPhy::GetNModes() |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
338 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
339 |
virtual WifiMode GetMode (uint32_t mode) const = 0; |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
340 |
/** |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
341 |
* \param txMode the transmission mode |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
342 |
* \param ber the probability of bit error rate |
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
343 |
* \returns the minimum snr which is required to achieve |
3912
4d1a61f80745
new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3906
diff
changeset
|
344 |
* the requested ber for the specified transmission mode. (W/W) |
2057
73723aad7527
dox for WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2056
diff
changeset
|
345 |
*/ |
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
346 |
virtual double CalculateSnr (WifiMode txMode, double ber) const = 0; |
10139 | 347 |
/** |
348 |
* The WifiPhy::NBssMembershipSelectors() and WifiPhy::BssMembershipSelector() methods are used |
|
349 |
* (e.g., by a WifiRemoteStationManager) to determine the set of |
|
350 |
* transmission/reception modes that this WifiPhy(-derived class) |
|
351 |
* can support - a set of WifiMode objects which we call the |
|
352 |
* BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. |
|
353 |
* |
|
354 |
* This was introduced with 11n |
|
355 |
* |
|
356 |
* \param selector index in array of supported memeberships |
|
357 |
* \returns the memebership selector whose index is specified. |
|
358 |
* |
|
359 |
* \sa WifiPhy::NBssMembershipSelectors() |
|
360 |
*/ |
|
361 |
virtual uint32_t GetNBssMembershipSelectors (void) const=0; |
|
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
362 |
|
10139 | 363 |
virtual uint32_t GetBssMembershipSelector (uint32_t selector) const=0; |
364 |
/** |
|
365 |
* The WifiPhy::GetMembershipSelectorModes() method is used |
|
366 |
* (e.g., by a WifiRemoteStationManager) to determine the set of |
|
367 |
* transmission/reception modes that this WifiPhy(-derived class) |
|
368 |
* can support - a set of WifiMode objects which we call the |
|
369 |
* BssMemebershipSelectorSet, and which is stored as WifiPhy::m_bssMembershipSelectorSet. |
|
370 |
* |
|
371 |
* This was introduced with 11n |
|
372 |
* |
|
373 |
* \param selector index in array of supported memeberships |
|
374 |
* \returns a WifiModeList that contains the WifiModes associrated with the selected index. |
|
375 |
* |
|
376 |
* \sa WifiPhy::GetMembershipSelectorModes() |
|
377 |
*/ |
|
378 |
virtual WifiModeList GetMembershipSelectorModes(uint32_t selector)=0; |
|
379 |
/** |
|
380 |
* The WifiPhy::GetNMcs() and WifiPhy::GetMcs() methods are used |
|
381 |
* (e.g., by a WifiRemoteStationManager) to determine the set of |
|
382 |
* transmission/reception MCS indexes that this WifiPhy(-derived class) |
|
383 |
* can support - a set of Mcs indexes which we call the |
|
384 |
* DeviceMcsSet, and which is stored as WifiPhy::m_deviceMcsSet. |
|
385 |
* |
|
386 |
* This was introduced with 11n |
|
387 |
* |
|
388 |
* \param Mcs index in array of supported Mcs |
|
389 |
* \returns the Mcs index whose index is specified. |
|
390 |
* |
|
391 |
* \sa WifiPhy::GetNMcs() |
|
392 |
*/ |
|
393 |
virtual uint8_t GetNMcs (void) const=0; |
|
394 |
virtual uint8_t GetMcs (uint8_t mcs) const=0; |
|
395 |
||
396 |
/* Converts from DataRate to MCS index and vice versa */ |
|
397 |
virtual uint32_t WifiModeToMcs (WifiMode mode)=0; |
|
398 |
virtual WifiMode McsToWifiMode (uint8_t mcs)=0; |
|
399 |
||
400 |
||
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
401 |
/** |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
402 |
* \brief Set channel number. |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
403 |
* |
4690
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
404 |
* Channel center frequency = Channel starting frequency + 5 MHz * (nch - 1) |
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
405 |
* |
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
406 |
* where Starting channel frequency is standard-dependent, see SetStandard() |
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
407 |
* as defined in IEEE 802.11-2007 17.3.8.3.2. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
408 |
*/ |
4690
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
409 |
virtual void SetChannelNumber (uint16_t id) = 0; |
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
410 |
/// Return current channel number, see SetChannelNumber() |
86343f7d6bfd
Initial multichannel support in Yans Wifi PHY.
Pavel Boyko <boyko@iitp.ru>
parents:
4680
diff
changeset
|
411 |
virtual uint16_t GetChannelNumber () const = 0; |
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4715
diff
changeset
|
412 |
|
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4715
diff
changeset
|
413 |
virtual void ConfigureStandard (enum WifiPhyStandard standard) = 0; |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
414 |
|
3888
a15618dcd0eb
rename WifiPhy to YansWifiPhy and add WifiPhy abstract base class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3887
diff
changeset
|
415 |
virtual Ptr<WifiChannel> GetChannel (void) const = 0; |
1889 | 416 |
|
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
417 |
static WifiMode GetDsssRate1Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
418 |
static WifiMode GetDsssRate2Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
419 |
static WifiMode GetDsssRate5_5Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
420 |
static WifiMode GetDsssRate11Mbps (); |
6597
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
421 |
static WifiMode GetErpOfdmRate6Mbps (); |
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
422 |
static WifiMode GetErpOfdmRate9Mbps (); |
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
423 |
static WifiMode GetErpOfdmRate12Mbps (); |
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
424 |
static WifiMode GetErpOfdmRate18Mbps (); |
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
425 |
static WifiMode GetErpOfdmRate24Mbps (); |
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
426 |
static WifiMode GetErpOfdmRate36Mbps (); |
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
427 |
static WifiMode GetErpOfdmRate48Mbps (); |
7fbc895f7361
Bug 852: Support ERP-OFDM rates and thus '802.11g'
Dean Armstrong <deanarm@gmail.com>
parents:
6372
diff
changeset
|
428 |
static WifiMode GetErpOfdmRate54Mbps (); |
6360
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
429 |
static WifiMode GetOfdmRate6Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
430 |
static WifiMode GetOfdmRate9Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
431 |
static WifiMode GetOfdmRate12Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
432 |
static WifiMode GetOfdmRate18Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
433 |
static WifiMode GetOfdmRate24Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
434 |
static WifiMode GetOfdmRate36Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
435 |
static WifiMode GetOfdmRate48Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
436 |
static WifiMode GetOfdmRate54Mbps (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
437 |
static WifiMode GetOfdmRate3MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
438 |
static WifiMode GetOfdmRate4_5MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
439 |
static WifiMode GetOfdmRate6MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
440 |
static WifiMode GetOfdmRate9MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
441 |
static WifiMode GetOfdmRate12MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
442 |
static WifiMode GetOfdmRate18MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
443 |
static WifiMode GetOfdmRate24MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
444 |
static WifiMode GetOfdmRate27MbpsBW10MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
445 |
static WifiMode GetOfdmRate1_5MbpsBW5MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
446 |
static WifiMode GetOfdmRate2_25MbpsBW5MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
447 |
static WifiMode GetOfdmRate3MbpsBW5MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
448 |
static WifiMode GetOfdmRate4_5MbpsBW5MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
449 |
static WifiMode GetOfdmRate6MbpsBW5MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
450 |
static WifiMode GetOfdmRate9MbpsBW5MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
451 |
static WifiMode GetOfdmRate12MbpsBW5MHz (); |
d8975477ff6a
Bug 871: Rework construction of Wi-Fi rates
Dean Armstrong <deanarm@gmail.com>
parents:
6273
diff
changeset
|
452 |
static WifiMode GetOfdmRate13_5MbpsBW5MHz (); |
10139 | 453 |
static WifiMode GetOfdmRate6_5MbpsBW20MHz (); |
454 |
static WifiMode GetOfdmRate13MbpsBW20MHz (); |
|
455 |
static WifiMode GetOfdmRate19_5MbpsBW20MHz (); |
|
456 |
static WifiMode GetOfdmRate26MbpsBW20MHz (); |
|
457 |
static WifiMode GetOfdmRate39MbpsBW20MHz (); |
|
458 |
static WifiMode GetOfdmRate52MbpsBW20MHz (); |
|
459 |
static WifiMode GetOfdmRate58_5MbpsBW20MHz (); |
|
460 |
static WifiMode GetOfdmRate65MbpsBW20MHz (); |
|
461 |
static WifiMode GetOfdmRate13_5MbpsBW40MHz (); |
|
462 |
static WifiMode GetOfdmRate27MbpsBW40MHz (); |
|
463 |
static WifiMode GetOfdmRate40_5MbpsBW40MHz (); |
|
464 |
static WifiMode GetOfdmRate54MbpsBW40MHz (); |
|
465 |
static WifiMode GetOfdmRate81MbpsBW40MHz (); |
|
466 |
static WifiMode GetOfdmRate108MbpsBW40MHz (); |
|
467 |
static WifiMode GetOfdmRate121_5MbpsBW40MHz (); |
|
468 |
static WifiMode GetOfdmRate135MbpsBW40MHz (); |
|
469 |
//Rates for clause 20 with short guard interval |
|
470 |
static WifiMode GetOfdmRate7_2MbpsBW20MHz (); |
|
471 |
static WifiMode GetOfdmRate14_4MbpsBW20MHz (); |
|
472 |
static WifiMode GetOfdmRate21_7MbpsBW20MHz (); |
|
473 |
static WifiMode GetOfdmRate28_9MbpsBW20MHz (); |
|
474 |
static WifiMode GetOfdmRate43_3MbpsBW20MHz (); |
|
475 |
static WifiMode GetOfdmRate57_8MbpsBW20MHz (); |
|
476 |
static WifiMode GetOfdmRate65MbpsBW20MHzShGi (); |
|
477 |
static WifiMode GetOfdmRate72_2MbpsBW20MHz (); |
|
478 |
static WifiMode GetOfdmRate15MbpsBW40MHz (); |
|
479 |
static WifiMode GetOfdmRate30MbpsBW40MHz (); |
|
480 |
static WifiMode GetOfdmRate45MbpsBW40MHz (); |
|
481 |
static WifiMode GetOfdmRate60MbpsBW40MHz (); |
|
482 |
static WifiMode GetOfdmRate90MbpsBW40MHz (); |
|
483 |
static WifiMode GetOfdmRate120MbpsBW40MHz (); |
|
484 |
static WifiMode GetOfdmRate135MbpsBW40MHzShGi (); |
|
485 |
static WifiMode GetOfdmRate150MbpsBW40MHz (); |
|
4470 | 486 |
|
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
487 |
|
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
488 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
489 |
* Public method used to fire a PhyTxBegin trace. Implemented for encapsulation |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
490 |
* purposes. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
491 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
492 |
void NotifyTxBegin (Ptr<const Packet> packet); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
493 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
494 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
495 |
* Public method used to fire a PhyTxEnd trace. Implemented for encapsulation |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
496 |
* purposes. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
497 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
498 |
void NotifyTxEnd (Ptr<const Packet> packet); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
499 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
500 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
501 |
* Public method used to fire a PhyTxDrop trace. Implemented for encapsulation |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
502 |
* purposes. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
503 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
504 |
void NotifyTxDrop (Ptr<const Packet> packet); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
505 |
|
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
506 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
507 |
* Public method used to fire a PhyRxBegin trace. Implemented for encapsulation |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
508 |
* purposes. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
509 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
510 |
void NotifyRxBegin (Ptr<const Packet> packet); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
511 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
512 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
513 |
* Public method used to fire a PhyRxEnd trace. Implemented for encapsulation |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
514 |
* purposes. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
515 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
516 |
void NotifyRxEnd (Ptr<const Packet> packet); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
517 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
518 |
/** |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
519 |
* Public method used to fire a PhyRxDrop trace. Implemented for encapsulation |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
520 |
* purposes. |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
521 |
*/ |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
522 |
void NotifyRxDrop (Ptr<const Packet> packet); |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
523 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
524 |
/** |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
525 |
* |
7334
21b6b53ba0d5
[Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents:
7143
diff
changeset
|
526 |
* Public method used to fire a MonitorSniffer trace for a wifi packet being received. Implemented for encapsulation |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
527 |
* purposes. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
528 |
* |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
529 |
* @param packet the packet being received |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
530 |
* @param channelFreqMhz the frequency in MHz at which the packet is |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
531 |
* received. Note that in real devices this is normally the |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
532 |
* frequency to which the receiver is tuned, and this can be |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
533 |
* different than the frequency at which the packet was originally |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
534 |
* transmitted. This is because it is possible to have the receiver |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
535 |
* tuned on a given channel and still to be able to receive packets |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
536 |
* on a nearby channel. |
4757 | 537 |
* @param channelNumber the channel on which the packet is received |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
538 |
* @param rate the PHY data rate in units of 500kbps (i.e., the same |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
539 |
* units used both for the radiotap and for the prism header) |
4645
d53223aae797
get rid of some doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4497
diff
changeset
|
540 |
* @param isShortPreamble true if short preamble is used, false otherwise |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
541 |
* @param signalDbm signal power in dBm |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
542 |
* @param noiseDbm noise power in dBm |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
543 |
*/ |
7334
21b6b53ba0d5
[Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents:
7143
diff
changeset
|
544 |
void NotifyMonitorSniffRx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, |
4497
43c7dfd72eb1
make it fit on my monitor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4492
diff
changeset
|
545 |
double signalDbm, double noiseDbm); |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
546 |
|
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
547 |
/** |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
548 |
* |
7334
21b6b53ba0d5
[Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents:
7143
diff
changeset
|
549 |
* Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted. Implemented for encapsulation |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
550 |
* purposes. |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
551 |
* |
4757 | 552 |
* @param packet the packet being transmitted |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
553 |
* @param channelFreqMhz the frequency in MHz at which the packet is |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
554 |
* transmitted. |
4757 | 555 |
* @param channelNumber the channel on which the packet is transmitted |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
556 |
* @param rate the PHY data rate in units of 500kbps (i.e., the same |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
557 |
* units used both for the radiotap and for the prism header) |
4645
d53223aae797
get rid of some doxygen warnings
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4497
diff
changeset
|
558 |
* @param isShortPreamble true if short preamble is used, false otherwise |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
559 |
*/ |
10139 | 560 |
void NotifyMonitorSniffTx (Ptr<const Packet> packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, bool isShortPreamble, uint8_t txPower); |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
561 |
|
8981
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
562 |
/** |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
563 |
* Assign a fixed random variable stream number to the random variables |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
564 |
* used by this model. Return the number of streams (possibly zero) that |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
565 |
* have been assigned. |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
566 |
* |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
567 |
* \param stream first stream index to use |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
568 |
* \return the number of stream indices assigned by this model |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
569 |
*/ |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
570 |
virtual int64_t AssignStreams (int64_t stream) = 0; |
7e1c95c4d1a7
Replace src/wifi usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents:
8867
diff
changeset
|
571 |
|
10139 | 572 |
/** |
573 |
* \param the operating frequency on this node. |
|
574 |
*/ |
|
575 |
virtual void SetFrequency (uint32_t freq)=0; |
|
576 |
virtual uint32_t GetFrequency (void) const=0; |
|
577 |
/** |
|
578 |
* \param the number of transmitters on this node. |
|
579 |
*/ |
|
580 |
virtual void SetNumberOfTransmitAntennas (uint32_t tx)=0; |
|
581 |
||
582 |
virtual uint32_t GetNumberOfTransmitAntennas (void) const=0; |
|
583 |
/** |
|
584 |
* \param the number of recievers on this node. |
|
585 |
*/ |
|
586 |
virtual void SetNumberOfReceiveAntennas (uint32_t rx)=0 ; |
|
587 |
/** |
|
588 |
* \returns the number of recievers on this node. |
|
589 |
*/ |
|
590 |
virtual uint32_t GetNumberOfReceiveAntennas (void) const=0; |
|
591 |
/** |
|
592 |
* \paramif short guard interval is supported or not |
|
593 |
*/ |
|
594 |
virtual void SetGuardInterval (bool GuardInterval)=0; |
|
595 |
/** |
|
596 |
* \returns if short guard interval is supported or not |
|
597 |
*/ |
|
598 |
virtual bool GetGuardInterval (void) const = 0; |
|
599 |
/** |
|
600 |
* \paramif LDPC is supported or not |
|
601 |
*/ |
|
602 |
virtual void SetLdpc (bool Ldpc)=0; |
|
603 |
/** |
|
604 |
* \returns if LDPC is supported or not |
|
605 |
*/ |
|
606 |
virtual bool GetLdpc (void) const=0; |
|
607 |
/** |
|
608 |
* \paramif STBC is supported or not |
|
609 |
*/ |
|
610 |
virtual void SetStbc (bool stbc)=0; |
|
611 |
/** |
|
612 |
* \returns if STBC is supported or not |
|
613 |
*/ |
|
614 |
virtual bool GetStbc (void) const=0; |
|
615 |
||
616 |
/** |
|
617 |
* \paramif GreenField is supported or not |
|
618 |
*/ |
|
619 |
virtual void SetGreenfield (bool greenfield)=0; |
|
620 |
/** |
|
621 |
* \returns if Green field is supported or not |
|
622 |
*/ |
|
623 |
virtual bool GetGreenfield (void) const=0; |
|
624 |
/** |
|
625 |
* \paramif channel bonding 40 MHz is supported or not |
|
626 |
*/ |
|
627 |
virtual bool GetChannelBonding (void) const = 0; |
|
628 |
/** |
|
629 |
* \returns if channel bonding is supported or not |
|
630 |
*/ |
|
631 |
virtual void SetChannelBonding (bool channelbonding) = 0 ; |
|
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
632 |
|
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
633 |
private: |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
634 |
/** |
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
635 |
* The trace source fired when a packet begins the transmission process on |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
636 |
* the medium. |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
637 |
* |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
638 |
* \see class CallBackTraceSource |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
639 |
*/ |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
640 |
TracedCallback<Ptr<const Packet> > m_phyTxBeginTrace; |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
641 |
|
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
642 |
/** |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
643 |
* The trace source fired when a packet ends the transmission process on |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
644 |
* the medium. |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
645 |
* |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
646 |
* \see class CallBackTraceSource |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
647 |
*/ |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
648 |
TracedCallback<Ptr<const Packet> > m_phyTxEndTrace; |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
649 |
|
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
650 |
/** |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
651 |
* The trace source fired when the phy layer drops a packet as it tries |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
652 |
* to transmit it. |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
653 |
* |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
654 |
* \see class CallBackTraceSource |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
655 |
*/ |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
656 |
TracedCallback<Ptr<const Packet> > m_phyTxDropTrace; |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
657 |
|
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
658 |
/** |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
659 |
* The trace source fired when a packet begins the reception process from |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
660 |
* the medium. |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
661 |
* |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
662 |
* \see class CallBackTraceSource |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
663 |
*/ |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
664 |
TracedCallback<Ptr<const Packet> > m_phyRxBeginTrace; |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
665 |
|
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
666 |
/** |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
667 |
* The trace source fired when a packet ends the reception process from |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
668 |
* the medium. |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
669 |
* |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
670 |
* \see class CallBackTraceSource |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
671 |
*/ |
4264
9d2e96c4e6e4
Piles of changes for tracing rework
Craig Dowell <craigdo@ee.washington.edu>
parents:
4263
diff
changeset
|
672 |
TracedCallback<Ptr<const Packet> > m_phyRxEndTrace; |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
673 |
|
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
674 |
/** |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
675 |
* The trace source fired when the phy layer drops a packet it has received. |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
676 |
* |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
677 |
* \see class CallBackTraceSource |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
678 |
*/ |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
679 |
TracedCallback<Ptr<const Packet> > m_phyRxDropTrace; |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
680 |
|
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
681 |
/** |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
682 |
* A trace source that emulates a wifi device in monitor mode |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
683 |
* sniffing a packet being received. |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
684 |
* |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
685 |
* As a reference with the real world, firing this trace |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
686 |
* corresponds in the madwifi driver to calling the function |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
687 |
* ieee80211_input_monitor() |
4263
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
688 |
* |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
689 |
* \see class CallBackTraceSource |
fec2f830d015
trace consistency changes
Craig Dowell <craigdo@ee.washington.edu>
parents:
4039
diff
changeset
|
690 |
*/ |
7334
21b6b53ba0d5
[Bug 827] Rename promisc trace to monitor in WifiPhy
Ruben Merz <ruben@net.t-labs.tu-berlin.de>
parents:
7143
diff
changeset
|
691 |
TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool, double, double> m_phyMonitorSniffRxTrace; |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
692 |
|
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
693 |
/** |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
694 |
* A trace source that emulates a wifi device in monitor mode |
7141
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
695 |
* sniffing a packet being transmitted. |
072fb225b714
run check-style.py on src/wifi
Nicola Baldo <nicola@baldo.biz>
parents:
7139
diff
changeset
|
696 |
* |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
697 |
* As a reference with the real world, firing this trace |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
698 |
* corresponds in the madwifi driver to calling the function |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
699 |
* ieee80211_input_monitor() |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
700 |
* |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
701 |
* \see class CallBackTraceSource |
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
702 |
*/ |
10139 | 703 |
TracedCallback<Ptr<const Packet>, uint16_t, uint16_t, uint32_t, bool,uint8_t> m_phyMonitorSniffTxTrace; |
4492
3ebeb7bf3c15
added support for radiotap and prism headers
Nicola Baldo <nbaldo@cttc.es>
parents:
4470
diff
changeset
|
704 |
|
1889 | 705 |
}; |
706 |
||
5820
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
707 |
/** |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
708 |
* \param os output stream |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
709 |
* \param state wifi state to stringify |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
710 |
*/ |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
711 |
std::ostream& operator<< (std::ostream& os, enum WifiPhy::State state); |
1c02054740eb
Renaming WifiPhy state SYNC to RX to avoid confusion with "synchronizing".
Timo Bingmann <tbns@idlebox.net>
parents:
5189
diff
changeset
|
712 |
|
1977
4303409f3d8e
remove uneeded trailing ';'
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1964
diff
changeset
|
713 |
} // namespace ns3 |
1889 | 714 |
|
1890
a2b30c6456c9
Phy80211 -> WifiPhy
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1889
diff
changeset
|
715 |
#endif /* WIFI_PHY_H */ |