author | Pavel Boyko <boyko@iitp.ru> |
Tue, 16 Jun 2009 17:58:16 +0400 | |
changeset 5074 | 355de6af8ea9 |
parent 4481 | 9250a25ee683 |
child 4606 | 2f630742976e |
permissions | -rw-r--r-- |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1 |
/** |
2217 | 2 |
* \ingroup devices |
2061
e78f3fc300b6
define a new dox module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
3 |
* \defgroup Wifi Wifi Models |
e78f3fc300b6
define a new dox module
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2059
diff
changeset
|
4 |
* |
4011
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
5 |
* \section WifiModelOverview Wifi Models Overview |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
6 |
* |
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
* The set of 802.11 models provided in ns-3 attempts to provide |
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* an accurate MAC-level implementation of the 802.11 specification |
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
* and to provide a not-so-slow PHY-level model of the 802.11a |
4481 | 10 |
* and 802.11b specifications. |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* |
2059 | 12 |
* The current implementation provides roughly 4 levels of models: |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* - the PHY layer models |
4428 | 14 |
* - the so-called MAC low models: they implement DCF and EDCAF |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* - the so-called MAC high models: they implement the MAC-level |
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
* beacon generation, probing, and association state machines. |
2059 | 17 |
* - a set of Rate control algorithms used by the MAC low models. |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
* |
4428 | 19 |
* We have today 6 MAC high models, 3 for non QoS MACs and 3 for QoS MACs. |
20 |
* |
|
21 |
* a)non QoS MACs: |
|
22 |
* |
|
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
* - a simple adhoc state machine which does not perform any |
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
* kind of beacon generation, probing, or association. This |
4428 | 25 |
* state machine is implemented by the ns3::AdhocWifiMac class. |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
* - an active probing and association state machine which handles |
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
27 |
* automatic re-association whenever too many beacons are missed |
4428 | 28 |
* is implemented by the ns3::NqstaWifiMac class. |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
29 |
* - an access point which generates periodic beacons, and which |
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
* accepts every attempt to associate. This AP state machine |
4428 | 31 |
* is implemented by the ns3::NqapWifiMac class. |
32 |
* |
|
33 |
* b)QoS MACs: |
|
34 |
* |
|
35 |
* - like above but these MAC models are also able to manage QoS traffic. |
|
36 |
* These MAC layers are implemented respectively by ns3::QadhocWifiMac, |
|
37 |
* ns3::QstaWifiMac and ns3::QapWifiMac classes. |
|
38 |
* With these MAC models is possible to work with traffic belonging to |
|
39 |
* four different access classes: AC_VO for voice traffic, AC_VI for video |
|
40 |
* traffic, AC_BE for best-effort traffic and AC_BK for background traffic. |
|
41 |
* In order to determine MSDU's access class, every packet forwarded down |
|
42 |
* to these MAC layers should be marked using ns3::QosTag in order to set |
|
43 |
* a TID (traffic id) for that packet otherwise it will be considered |
|
44 |
* belonging to AC_BE access class. |
|
45 |
* How TIDs are mapped to access classes are shown in the table below. |
|
46 |
* |
|
47 |
* TID-AccessClass mapping: |
|
48 |
* |
|
4431 | 49 |
* <table border=1> |
50 |
* <tr> |
|
51 |
* <td><b> TID </b></td> |
|
52 |
* <td><b> Access class </b></td> |
|
53 |
* </tr> |
|
54 |
* <tr> |
|
4481 | 55 |
* <td> 7 </td> |
4431 | 56 |
* <td> AC_VO </td> |
57 |
* </tr> |
|
58 |
* <tr> |
|
59 |
* <td> 6 </td> |
|
60 |
* <td> AC_VO </td> |
|
61 |
* </tr> |
|
62 |
* <tr> |
|
63 |
* <td> 5 </td> |
|
64 |
* <td> AC_VI </td> |
|
65 |
* </tr> |
|
66 |
* <tr> |
|
67 |
* <td> 4 </td> |
|
68 |
* <td> AC_VI </td> |
|
69 |
* </tr> |
|
70 |
* <tr> |
|
71 |
* <td> 3 </td> |
|
72 |
* <td> AC_BE </td> |
|
73 |
* </tr> |
|
74 |
* <tr> |
|
75 |
* <td> 0 </td> |
|
76 |
* <td> AC_BE </td> |
|
77 |
* </tr> |
|
78 |
* <tr> |
|
79 |
* <td> 2 </td> |
|
80 |
* <td> AC_BK </td> |
|
81 |
* </tr> |
|
82 |
* <tr> |
|
83 |
* <td> 1 </td> |
|
84 |
* <td> AC_BK </td> |
|
85 |
* </tr> |
|
86 |
* </table> |
|
87 |
* |
|
2059 | 88 |
* The MAC low layer is split in 3 components: |
89 |
* - ns3::MacLow which takes care of RTS/CTS/DATA/ACK transactions. |
|
2285 | 90 |
* - ns3::DcfManager and ns3::DcfState which implements the DCF function. |
4428 | 91 |
* - ns3::DcaTxop or ns3::EdcaTxopN which handle the packet queue, packet |
92 |
* fragmentation, and packet retransmissions if they are needed. |
|
93 |
* ns3::DcaTxop object is used by non QoS high MACs. ns3::EdcaTxopN is |
|
94 |
* used by Qos high MACs and performs also QoS operations like 802.11n MSDU |
|
95 |
* aggregation. |
|
2059 | 96 |
* |
2291
93f5111037d4
add an extra link to the PHY model paper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2289
diff
changeset
|
97 |
* The PHY layer implements a single model in the ns3::WifiPhy class: the |
93f5111037d4
add an extra link to the PHY model paper
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2289
diff
changeset
|
98 |
* physical layer model implemented there is described fully in a paper titled |
4481 | 99 |
* "Yet Another Network Simulator", available at: http://cutebugs.net/files/wns2-yans.pdf and recently extended to cover 802.11b physical layer. |
100 |
* |
|
101 |
* The Wifi Model also provides a set of Rate control algorithms: |
|
2595
b504951bcca8
fix doxygen errors
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2291
diff
changeset
|
102 |
* - ns3::ArfMacStations |
b504951bcca8
fix doxygen errors
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2291
diff
changeset
|
103 |
* - ns3::AArfMacStations |
b504951bcca8
fix doxygen errors
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2291
diff
changeset
|
104 |
* - ns3::IdealMacStations |
b504951bcca8
fix doxygen errors
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2291
diff
changeset
|
105 |
* - ns3::CrMacStations |
2285 | 106 |
* - ns3::OnoeMacStations |
107 |
* - ns3::AmrrMacStations |
|
2059 | 108 |
* |
4011
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
109 |
* \section WifiTracingModel Wifi Tracing Model |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
110 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
111 |
* Like all ns-3 devices, the Wifi Model provides a number of trace sources. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
112 |
* These trace sources can be hooked using your own custom trace code, or you |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
113 |
* can use our helper functions to arrange for tracing to be enabled on devices |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
114 |
* you specify. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
115 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
116 |
* \subsection WifiTracingModelUpperHooks Upper-Level (MAC) Hooks |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
117 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
118 |
* From the point of view of tracing in the net device, there are several |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
119 |
* interesting points to insert trace hooks. The first is at the interface |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
120 |
* between the device and higher layers. We provide trace hooks at this point |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
121 |
* in packet flow, which corresponds to a transition from the network to data |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
122 |
* link layer, and call them collectively the device MAC hooks. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
123 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
124 |
* The first trace hook is called "Rx" and is fired using the |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
125 |
* ns3::WifiNetDevice::m_rxLogger trace hook. The perspective here is looking |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
126 |
* down into the WifiNetDevice so a receive indicates a packet being sent up |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
127 |
* from the channel to be forwarded up to higher layers. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
128 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
129 |
* The second trace hook is called "Tx" and is fired using the |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
130 |
* ns3::WifiNetDevice::m_txLogger trace hook. This trace hook indicates a |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
131 |
* packet has been sent from higher layers down to the net device for |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
132 |
* transmission onto the network. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
133 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
134 |
* \subsection WifiTracingModelLowerHooks Low-Level (PHY) Hooks |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
135 |
* |
4011
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
136 |
* Another interesting place to insert trace hooks is in the state machine |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
137 |
* that is driving the actual device transmission and reception logic. We |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
138 |
* provide the following hooks to instrument the lower levels of the device. |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
139 |
* |
4011
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
140 |
* First, we provide a trace hook to indicate state changes. This trace |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
141 |
* source is called "State" and is fired using the |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
142 |
* ns3::WifiPhyStateHelper::m_stateLogger trace source. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
143 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
144 |
* We also provide a trace hook to indicate the successful reception of a |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
145 |
* packet from the channel. This trace source is called "RxOk" and is |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
146 |
* accessed using the ns3::WifiPhyStateHelper::m_rxOkTrace trace source. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
147 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
148 |
* There also exists a trace hook to indicate an unsuccessful reception of a |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
149 |
* packet from the channel. This trace source is called "RxError" and is |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
150 |
* accessed using the ns3::WifiPhyStateHelper::m_rxErrorTrace trace source. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
151 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
152 |
* There is a trace hook to indicate that transmission of a packet is |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
153 |
* starting onto the channel. This trace source is called "Tx" (don't |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
154 |
* confuse it with the higher layer "Tx" hook) and is |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
155 |
* fired using the ns3::WifiPhyStateHelper::m_txTrace trace source. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
156 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
157 |
* \subsection WifiTracingModelRemoteHooks Remote Station Hooks |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
158 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
159 |
* We provide access to changes in the the per-remote-station RTS counter |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
160 |
* through the "Ssrc" trace source which is fired using the |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
161 |
* ns3::WifiRemoteStation::m_ssrc trace hook. |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
162 |
* |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
163 |
* Finally, we provide access to the per-remote-station SLRC couter that |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
164 |
* indications the number of retransmissions of data. Changes to this |
2fd3041c3c29
some device trace source documentation
Craig Dowell <craigdo@ee.washington.edu>
parents:
2595
diff
changeset
|
165 |
* counter are traced using the ns3::WifiRemoteStation::m_slrc source. |
4111
57c61d98942b
Wifi internal architecture diagram
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
4011
diff
changeset
|
166 |
* |
57c61d98942b
Wifi internal architecture diagram
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
4011
diff
changeset
|
167 |
* \subsection wifil2stack Layer 2 Stack Overview |
57c61d98942b
Wifi internal architecture diagram
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
4011
diff
changeset
|
168 |
* \image html WifiArchitecture.png "Overview of the Wifi L2 sublayers traversed for transmitting and receiving a packet" |
2030
e32adc825a74
start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
169 |
*/ |