src/devices/wifi/wifi.h
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--
merged with nsnam
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2030
e32adc825a74 start of work towards a wifi documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
/**
2217
0b4567d545de Doxygen organization
Tom Henderson <tomh@tomh.org>
parents: 2061
diff changeset
     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
9250a25ee683 Doxygen cleanup
Tom Henderson <tomh@tomh.org>
parents: 4431
diff changeset
    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
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2030
diff changeset
    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
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    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
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2030
diff changeset
    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
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    19
 * We have today 6 MAC high models, 3 for non QoS MACs and 3 for QoS MACs.
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    20
 *   
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    21
 *  a)non QoS MACs:
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    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
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    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
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    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
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    31
 *     is implemented by the ns3::NqapWifiMac class.
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    32
 *
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    33
 *  b)QoS MACs:
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    34
 *
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    35
 *   - like above but these MAC models are also able to manage QoS traffic.
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    36
 *     These MAC layers are implemented respectively by ns3::QadhocWifiMac,
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    37
 *     ns3::QstaWifiMac and ns3::QapWifiMac classes.
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    38
 *     With these MAC models is possible to work with traffic belonging to 
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    39
 *     four different access classes: AC_VO for voice traffic, AC_VI for video
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    40
 *     traffic, AC_BE for best-effort traffic and AC_BK for background traffic.
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    41
 *     In order to determine MSDU's access class, every packet forwarded down
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    42
 *     to these MAC layers should be marked using ns3::QosTag in order to set
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    43
 *     a TID (traffic id) for that packet otherwise it will be considered
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    44
 *     belonging to AC_BE access class. 
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    45
 *     How TIDs are mapped to access classes are shown in the table below. 
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    46
 *   
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    47
 *     TID-AccessClass mapping:
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    48
 *     
4431
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    49
 *      <table border=1>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    50
 *      <tr>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    51
 *        <td><b> TID </b></td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    52
 *        <td><b> Access class </b></td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    53
 *      </tr>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    54
 *      <tr>
4481
9250a25ee683 Doxygen cleanup
Tom Henderson <tomh@tomh.org>
parents: 4431
diff changeset
    55
 *        <td> 7 </td>
4431
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    56
 *        <td> AC_VO </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    57
 *      </tr> 
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    58
 *      <tr>  
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    59
 *        <td> 6 </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    60
 *        <td> AC_VO </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    61
 *      </tr> 
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    62
 *      <tr>  
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    63
 *        <td> 5 </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    64
 *        <td> AC_VI </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    65
 *      </tr> 
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    66
 *      <tr>  
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    67
 *        <td> 4 </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    68
 *        <td> AC_VI </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    69
 *      </tr> 
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    70
 *      <tr>  
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    71
 *        <td> 3 </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    72
 *        <td> AC_BE </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    73
 *      </tr> 
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    74
 *      <tr>  
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    75
 *        <td> 0 </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    76
 *        <td> AC_BE </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    77
 *      </tr> 
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    78
 *      <tr>  
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    79
 *        <td> 2 </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    80
 *        <td> AC_BK </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    81
 *      </tr> 
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    82
 *      <tr>  
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    83
 *        <td> 1 </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    84
 *        <td> AC_BK </td>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    85
 *      </tr>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    86
 *      </table>
fcb74b52e91b fix access class table
Mirko Banchi <mk.banchi@gmail.com>
parents: 4428
diff changeset
    87
 *  
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2030
diff changeset
    88
 * The MAC low layer is split in 3 components:
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2030
diff changeset
    89
 *   - ns3::MacLow which takes care of RTS/CTS/DATA/ACK transactions.
2285
7c716f6fc4de doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2061
diff changeset
    90
 *   - ns3::DcfManager and ns3::DcfState which implements the DCF function.
4428
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    91
 *   - ns3::DcaTxop or ns3::EdcaTxopN which handle the packet queue, packet 
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    92
 *     fragmentation, and packet retransmissions if they are needed.
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    93
 *     ns3::DcaTxop object is used by non QoS high MACs. ns3::EdcaTxopN is
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    94
 *     used by Qos high MACs and performs also QoS operations like 802.11n MSDU
e404c4e63681 update wifi.h
Mirko Banchi <mk.banchi@gmail.com>
parents: 4111
diff changeset
    95
 *     aggregation.
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2030
diff changeset
    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
9250a25ee683 Doxygen cleanup
Tom Henderson <tomh@tomh.org>
parents: 4431
diff changeset
    99
 * "Yet Another Network Simulator", available at: http://cutebugs.net/files/wns2-yans.pdf and recently extended to cover 802.11b physical layer.
9250a25ee683 Doxygen cleanup
Tom Henderson <tomh@tomh.org>
parents: 4431
diff changeset
   100
 * 
9250a25ee683 Doxygen cleanup
Tom Henderson <tomh@tomh.org>
parents: 4431
diff changeset
   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
7c716f6fc4de doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2061
diff changeset
   106
 *   - ns3::OnoeMacStations
7c716f6fc4de doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2061
diff changeset
   107
 *   - ns3::AmrrMacStations
2059
d8b7b2de044e doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2030
diff changeset
   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
 */