doc/manual/wifi.texi
author Tom Henderson <tomh@tomh.org>
Fri, 04 Sep 2009 17:23:34 -0700
changeset 4755 04a9a7e9a624
parent 4587 a02d5aeae94b
child 5434 81a3858041a8
permissions -rw-r--r--
Manual spelling fixes from Johannes Buchner
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     1
@node Wifi NetDevice
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     2
@chapter Wifi NetDevice
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     3
@anchor{chap:wifi}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     4
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     5
ns-3 nodes can contain a collection of NetDevice objects, much like an actual 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     6
computer contains separate interface cards for Ethernet, Wifi, Bluetooth, etc.  This chapter describes the ns-3 WifiNetDevice and related models.  By
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     7
adding WifiNetDevice objects to ns-3 nodes, one can create models of
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     8
802.11-based infrastructure and ad hoc networks.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
     9
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    10
@menu
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    11
* Overview of the model::
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    12
* Using the WifiNetDevice::
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    13
* The WifiChannel and WifiPhy models::
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    14
* The MAC model::
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    15
* Wifi Attributes::
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    16
* Wifi Tracing::
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    17
@end menu
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    18
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    19
@node Overview of the model
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    20
@section Overview of the model
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    21
4587
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    22
The WifiNetDevice models a wireless network interface controller based
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    23
on the IEEE 802.11 standard.  We will go into more detail below but in brief,
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    24
ns-3 provides models for these aspects of 802.11:
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    25
@itemize @bullet
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    26
@item basic 802.11 DCF with @strong{infrastructure} and @strong{adhoc} modes
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    27
@item @strong{802.11a} and @strong{802.11b} physical layers
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    28
@item QoS-based EDCA and queueing extensions of @strong{802.11e}
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    29
@item various propagation loss models including @strong{Nakagami, Rayleigh, Friis, LogDistance, FixedRss, Random} 
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    30
@item two propagation delay models, a distance-based and random model
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    31
@item various rate control algorithms including @strong{Aarf, Arf, Cara, Onoe, Rraa, and ConstantRate} 
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    32
@item @emph{(under development)} 802.11s (mesh)
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    33
@item @emph{(under development)} Minstrel rate control
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    34
@end itemize
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    35
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    36
The set of 802.11 models provided in ns-3 attempts to provide
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    37
an accurate MAC-level implementation of the 802.11 specification
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    38
and to provide a not-so-slow PHY-level model of the 802.11a
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    39
specification.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    40
4587
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
    41
The implementation is modular and provides roughly four levels of models:
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    42
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    43
@item the @strong{PHY layer models}
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    44
@item the so-called @strong{MAC low models}: they implement DCF and EDCAF
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    45
@item the so-called @strong{MAC high models}: they implement the MAC-level
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    46
beacon generation, probing, and association state machines, and
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    47
@item a set of @strong{Rate control algorithms} used by the MAC low models
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    48
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    49
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    50
There are presently six @strong{MAC high models}, three for non-QoS MACs and three
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    51
for QoS MACs.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    52
@itemize @bullet
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    53
@item @strong{non-QoS MACs:}
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    54
@enumerate
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    55
@item a simple adhoc state machine that does not perform any
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    56
kind of beacon generation, probing, or association. This
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    57
state machine is implemented by the @code{ns3::AdhocWifiMac} class.
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    58
@item  an active probing and association state machine that handles
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    59
automatic re-association whenever too many beacons are missed
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    60
is implemented by the @code{ns3::NqstaWifiMac} class.
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    61
@item an access point that generates periodic beacons, and that
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    62
accepts every attempt to associate. This AP state machine
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    63
is implemented by the @code{ns3::NqapWifiMac} class.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    64
@end enumerate
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    65
@item @strong{QoS MACs:}
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    66
@enumerate
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    67
@item a simple adhoc state machine like above but also able to manage QoS traffic.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    68
This state machine is implemented by @code{ns3::QadhocWifiMac} class.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    69
@item a station state machine like above but also able to manage QoS traffic.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    70
Implemented by @code{ns3::QstaWifiMac}.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    71
@item a QoS access point state machine like above implemented by @code{ns3::QapWifiMac}.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    72
@end enumerate
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    73
@end itemize
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    74
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    75
With QoS MAC models is possible to work with traffic belonging to 
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    76
four different access classes: @strong{AC_VO} for voice traffic, @strong{AC_VI}
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    77
for video traffic, @strong{AC_BE} for best-effort traffic and @strong{AC_BK} 
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    78
for background traffic.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    79
In order to determine MSDU's access class, every packet forwarded down
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    80
to these MAC layers should be marked using @code{ns3::QosTag} in order to set
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    81
a TID (traffic id) for that packet otherwise it will be considered
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    82
belonging to @strong{AC_BE} access class.
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    83
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    84
The @strong{MAC low layer} is split into three components:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    85
@enumerate
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    86
@item @code{ns3::MacLow} which takes care of RTS/CTS/DATA/ACK transactions.
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    87
@item @code{ns3::DcfManager} and @code{ns3::DcfState} which implements the DCF and EDCAF functions.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    88
@item @code{ns3::DcaTxop} or @code{ns3::EdcaTxopN} which handle the packet queue,
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    89
packet fragmentation, and packet retransmissions if they are needed.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    90
@code{ns3::DcaTxop} object is used by non-QoS high MACs. @code{ns3::EdcaTxopN} is
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    91
used by QoS high MACs and performs also QoS operations like 802.11n MSDU
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
    92
aggregation.
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    93
@end enumerate
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    94
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    95
There are also several @strong{rate control algorithms} that can be used by the Mac low layer:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    96
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    97
@item @code{ns3::ArfMacStations}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    98
@item @code{ns3::AArfMacStations}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
    99
@item @code{ns3::IdealMacStations}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   100
@item @code{ns3::CrMacStations}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   101
@item @code{ns3::OnoeMacStations}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   102
@item @code{ns3::AmrrMacStations}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   103
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   104
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   105
The PHY layer implements a single model in the 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   106
@code{ns3::WifiPhy class}: the
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   107
physical layer model implemented there is described fully in a paper 
4587
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
   108
entitled @uref{http://cutebugs.net/files/wns2-yans.pdf,,"Yet Another Network Simulator"}.  Validation results for 802.11b are available in this
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
   109
@uref{http://www.nsnam.org/~pei/80211b.pdf,,technical report}. 
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   110
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   111
In ns-3, nodes can have multiple WifiNetDevices on separate channels,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   112
and the WifiNetDevice can coexist with other device types; this removes
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   113
an architectural limitation found in ns-2.  Presently, however, there
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   114
is no model for cross-channel interference or coupling.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   115
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   116
The source code for the Wifi NetDevice lives in the directory
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   117
@code{src/devices/wifi}.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   118
4127
3c5cb537653f add wifi-architecture figure to manual
Tom Henderson <tomh@tomh.org>
parents: 4024
diff changeset
   119
@float Figure,fig:WifiArchitecture
3c5cb537653f add wifi-architecture figure to manual
Tom Henderson <tomh@tomh.org>
parents: 4024
diff changeset
   120
@caption{Wifi NetDevice architecture.}
3c5cb537653f add wifi-architecture figure to manual
Tom Henderson <tomh@tomh.org>
parents: 4024
diff changeset
   121
@image{../WifiArchitecture,5in}
3c5cb537653f add wifi-architecture figure to manual
Tom Henderson <tomh@tomh.org>
parents: 4024
diff changeset
   122
@end float
3c5cb537653f add wifi-architecture figure to manual
Tom Henderson <tomh@tomh.org>
parents: 4024
diff changeset
   123
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   124
@node Using the WifiNetDevice
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   125
@section Using the WifiNetDevice
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   126
4587
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
   127
The modularity provided by the implementation makes low-level 
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
   128
configuration of the WifiNetDevice powerful but complex.  For this reason,
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
   129
we provide some helper classes to perform common operations in a simple
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
   130
matter, and leverage the ns-3 attribute system to allow users to control
4755
04a9a7e9a624 Manual spelling fixes from Johannes Buchner
Tom Henderson <tomh@tomh.org>
parents: 4587
diff changeset
   131
the parametrization of the underlying models.
4587
a02d5aeae94b some wifi manual updates
Tom Henderson <tomh@tomh.org>
parents: 4432
diff changeset
   132
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   133
Users who use the low-level ns-3 API and who wish to add a WifiNetDevice
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   134
to their node must create an instance of a WifiNetDevice, plus 
4755
04a9a7e9a624 Manual spelling fixes from Johannes Buchner
Tom Henderson <tomh@tomh.org>
parents: 4587
diff changeset
   135
a number of constituent objects, and bind them together appropriately
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   136
(the WifiNetDevice is very modular in this regard, for future
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   137
extensibility).  At the low-level API, this can be done
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   138
with about 20 lines of code (see @code{ns3::WifiHelper::Install}, and
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   139
@code{ns3::YansWifiPhyHelper::Create}).  They also must create,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   140
at some point, a WifiChannel, which also contains a number of
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   141
constituent objects (see @code{ns3::YansWifiChannelHelper::Create}).
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   142
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   143
However, a few helpers are available for users to add these devices
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   144
and channels with only a few lines of code, if they are willing to
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   145
use defaults, and the helpers provide additional API to allow the
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   146
passing of attribute values to change default values.  The scripts
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   147
in @code{src/examples} can be browsed to see how this is done.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   148
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   149
@subsection YansWifiChannelHelper
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   150
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   151
The YansWifiChannelHelper has an unusual name.  Readers may wonder why
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   152
it is named this way.  The reference is to the 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   153
@uref{http://cutebugs.net/files/wns2-yans.pdf,,yans simulator},
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   154
from which this model is taken.  The helper can be used to create
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   155
a WifiChannel with a default PropagationLoss and PropagationDelay model.  
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   156
Specifically, the default is a channel model
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   157
with a propagation delay equal to a constant, the speed of light,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   158
and a propagation loss based on a log distance model with a reference 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   159
loss of 46.6777 dB at reference distance of 1m.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   160
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   161
Users will typically type code such as:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   162
@verbatim
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   163
  YansWifiChannelHelper wifiChannelHelper = YansWifiChannelHelper::Default ();
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   164
  Ptr<WifiChannel> wifiChannel = wifiChannelHelper.Create ();
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   165
@end verbatim
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   166
to get the defaults.  Note the distinction above in creating a helper
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   167
object vs. an actual simulation object.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   168
In ns-3, helper objects (used at the helper API only) are created on the
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   169
stack (they could also be created with operator new and later deleted).
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   170
However, the actual ns-3 objects typically inherit from 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   171
@code{class ns3::Object} and are assigned to a smart pointer.  See the
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   172
chapter on 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   173
@uref{Object model} for a discussion of the ns-3 object model, if you
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   174
are not familiar with it.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   175
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   176
@emph{Todo:  Add notes about how to configure attributes with this helper API}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   177
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   178
@subsection YansWifiPhyHelper
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   179
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   180
Physical devices (base class @code{ns3::Phy}) connect to 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   181
@code{ns3::Channel} models in ns-3.  We need to create Phy objects appropriate
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   182
for the YansWifiChannel; here the @code{YansWifiPhyHelper} will
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   183
do the work.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   184
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   185
The YansWifiPhyHelper class configures an object factory to create instances
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   186
of a @code{YansWifiPhy} and
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   187
adds some other objects to it, including possibly a supplemental 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   188
ErrorRateModel and a pointer to a MobilityModel.  The user code is
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   189
typically:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   190
@verbatim
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   191
  YansWifiPhyHelper wifiPhyHelper = YansWifiPhyHelper::Default ();
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   192
  wifiPhyHelper.SetChannel (wifiChannel);
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   193
@end verbatim
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   194
Note that we haven't actually created any WifiPhy objects yet; we've 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   195
just prepared the YansWifiPhyHelper by telling it which channel it is 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   196
connected to.  The phy objects are created in the next step.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   197
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   198
@subsection NqosWifiMacHelper and QosWifiMacHelper
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   199
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   200
The @code{ns3::NqosWifiMacHelper} and @code{ns3::QosWifiMacHelper} configure an
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   201
object factory to create instances of a @code{ns3::WifiMac}. They are used to
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   202
configure MAC parameters like type of MAC, values of contention windows and so on.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   203
Setting up a non-QoS MAC layers the object we use is @code{ns3::NqosWifiMacHelper}.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   204
For example the following user code configures a non-QoS MAC sta and changes its default
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   205
values for contention window and Aifsn:
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   206
@verbatim
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   207
  NqosWifiMacHelper wifiMacHelper = NqosWifiMacHelper::Default ();
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   208
  Ssid ssid = Ssid ("ns-3-ssid");
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   209
  wifiMacHelper.SetType ("ns3::NqstaWifiMac", "Ssid", SsidValue (ssid), "ActiveProbing", BooleanValue (false));
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   210
  wifiMacHelper.SetDcaParameters ("MinCw", UintegerValue (20), "Aifsn", UintegerValue (3));
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   211
@end verbatim
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   212
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   213
Setting up a QoS MACs we use a @code{ns3::QosWifiMacHelper} instead.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   214
This object could be also used to change default EDCA parameters, and to set a possible MSDU aggregator
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   215
for a particular access class in order to use 802.11n MSDU aggregation feature.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   216
A possible user code:
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   217
@verbatim
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   218
  QosWifiMacHelper wifiMacHelper = QosWifiMacHelper::Default ();
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   219
  wifiMacHelper.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true),
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   220
                         "BeaconInterval", TimeValue (Seconds (2.5)));
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   221
  wifiMacHelper.SetEdcaParametersForAc (AC_VO, "MinCw", UintegerValue (2));
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   222
  wifiMacHelper.SetMsduAggregatorForAc (AC_VO, "ns3::MsduStandardAggregator", "MaxAmsduSize", UintegerValue (3839));
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   223
@end verbatim
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   224
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   225
Call to QosWifiMacHelper::Default () is needed in order to set default EDCA parameters properly for all
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   226
access classes. Otherwise we should set them one by one:
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   227
@verbatim
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   228
  QosWifiMacHelper wifiMacHelper;
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   229
  wifiMacHelper.SetEdcaParametersForAc (AC_VO, "MinCw", UintegerValue (2), "MaxCw", UintegerValue (7),
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   230
                                               "Aifsn", UintegerValue (2));
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   231
  wifiMacHelper.SetEdcaParametersForAc (AC_VI, "MinCw", UintegerValue (7), "MaxCw", UintegerValue (15),
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   232
                                               "Aifsn", UintegerValue (2));
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   233
  ...
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   234
@end verbatim
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   235
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   236
@subsection WifiHelper
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   237
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   238
We're now ready to create WifiNetDevices.  First, let's create
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   239
a WifiHelper with default settings:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   240
@verbatim
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   241
  WifiHelper wifiHelper = WifiHelper::Default ();
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   242
@end verbatim
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   243
What does this do?  It sets the RemoteStationManager to
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   244
@code{ns3::ArfWifiManager}.
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   245
Now, let's use the wifiPhyHelper and wifiMacHelper created above to install WifiNetDevices
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   246
on a set of nodes in a NodeContainer "c":
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   247
@verbatim
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   248
  NetDeviceContainer wifiContainer = WifiHelper::Install (wifiPhyHelper, wifiMacHelper, c);
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   249
@end verbatim
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   250
This creates the WifiNetDevice which includes also a WifiRemoteStationManager,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   251
a WifiMac, and a WifiPhy (connected to the matching WifiChannel).
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   252
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   253
There are many ns-3 @uref{Attributes} that can be set on the above
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   254
helpers to deviate from the default behavior; the example scripts
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   255
show how to do some of this reconfiguration.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   256
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   257
@subsection AdHoc WifiNetDevice configuration 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   258
This is a typical example of how a user might configure an adhoc network.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   259
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   260
@emph{Write me}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   261
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   262
@subsection Infrastructure (Access Point and clients) WifiNetDevice configuration 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   263
This is a typical example of how a user might configure an access point and a set of clients. 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   264
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   265
@emph{Write me}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   266
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   267
@node The WifiChannel and WifiPhy models
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   268
@section The WifiChannel and WifiPhy models
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   269
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   270
The WifiChannel subclass can be used to connect together a set of
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   271
@code{ns3::WifiNetDevice} network interfaces. The class @code{ns3::WifiPhy}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   272
is the
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   273
object within the WifiNetDevice that receives bits from the channel.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   274
A WifiChannel contains
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   275
a @code{ns3::PropagationLossModel} and a @code{ns3::PropagationDelayModel} 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   276
which can
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   277
be overridden by the WifiChannel::SetPropagationLossModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   278
and the WifiChannel::SetPropagationDelayModel methods. By default,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   279
no propagation models are set.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   280
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   281
The WifiPhy models an 802.11a channel, in terms of frequency, modulation,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   282
and bit rates, and interacts with the PropagationLossModel and 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   283
PropagationDelayModel found in the channel.  
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   284
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   285
This section summarizes
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   286
the description of the BER calculations found in the yans paper
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   287
taking into account the
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   288
Forward Error Correction present in 802.11a and describes
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   289
the algorithm we implemented to decide whether or not a 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   290
packet can be successfully received.  See @uref{http://cutebugs.net/files/wns2-yans.pdf,,"Yet Another Network Simulator"} for more details.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   291
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   292
The PHY layer can be in one of three states:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   293
@enumerate
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   294
@item TX: the PHY is currently transmitting a signal
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   295
on behalf of its associated MAC
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   296
@item RX: the PHY is synchronized on a signal and
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   297
is waiting until it has received its last bit to forward
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   298
it to the MAC.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   299
@item IDLE: the PHY is not in the TX or RX states.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   300
@end enumerate
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   301
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   302
When the first bit of a new packet is received while
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   303
the PHY is not IDLE (that is, it is already synchronized
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   304
on the reception of another earlier packet or it is
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   305
sending data itself), the received packet is dropped. 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   306
Otherwise, if the PHY is IDLE, we calculate the received
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   307
energy of the first bit of this new signal and compare it 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   308
against our Energy Detection threshold (as defined 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   309
by the Clear Channel Assessment function mode 1). 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   310
If the energy of the packet k is higher, then the PHY moves 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   311
to RX state and schedules an event when the last bit of 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   312
the packet is expected to be received. Otherwise, the 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   313
PHY stays in IDLE state and drops the packet.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   314
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   315
The energy of the received signal is assumed
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   316
to be zero outside of the reception interval of packet k and
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   317
is calculated from the transmission power with a path-loss 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   318
propagation model in the reception interval.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   319
where the path loss exponent, @math{n}, is chosen equal to 3, 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   320
the reference distance, @math{d_0} is choosen equal to 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   321
@math{1.0m} and 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   322
the reference energy is based based on a Friis
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   323
propagation model.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   324
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   325
When the last bit of the packet upon which the PHY is 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   326
synchronized is received, we need to calculate the 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   327
probability that the packet is received with any error
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   328
to decide whether or not 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   329
the packet on which we were synchronized could
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   330
be successfully received or not: a random number 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   331
is drawn from a uniform distribution and is compared against
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   332
the probability of error.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   333
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   334
To evaluate the probability of error, we start from the piecewise linear 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   335
functions shown in Figure @ref{fig:snir} and calculate the 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   336
SNIR function. 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   337
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   338
@float Figure,fig:snir
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   339
@caption{SNIR function over time}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   340
@image{figures/snir,,3in} 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   341
@end float 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   342
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   343
From the SNIR function we can derive bit error rates for BPSK and QAM
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   344
modulations.  Then, for each interval l where BER is
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   345
constant, we define the upper bound of a probability that an error is
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   346
present in the chunk of bits located in the interval l for packet k.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   347
If we assume an AWGN channel, 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   348
binary convolutional coding (which is the case in 802.11a)
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   349
and hard-decision Viterbi decoding, the error rate is thus derived,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   350
and the packet error probability for packet k can be computed.. 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   351
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   352
@subsection WifiChannel configuration
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   353
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   354
WifiChannel models include both a PropagationDelayModel and a 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   355
PropagationLossModel.  The following PropagationDelayModels are available:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   356
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   357
@item ConstantSpeedPropagationDelayModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   358
@item RandomPropagationDelayModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   359
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   360
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   361
The following PropagationLossModels are available:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   362
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   363
@item RandomPropagationLossModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   364
@item FriisPropagationLossModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   365
@item LogDistancePropagationLossModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   366
@item JakesPropagationLossModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   367
@item CompositePropagationLossModel
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   368
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   369
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   370
@node The MAC model
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   371
@section The MAC model
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   372
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   373
The 802.11 Distributed Coordination Function is used to
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   374
calculate when to grant access to the transmission medium. While
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   375
implementing the DCF would have been particularly easy if we
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   376
had used a recurring timer that expired every slot, we
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   377
chose to use the method described in @emph{(missing reference here from
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   378
Yans paper)}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   379
where the backoff timer duration is lazily calculated whenever
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   380
needed since it is claimed to have much better performance than
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   381
the simpler recurring timer solution.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   382
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   383
The higher-level MAC functions are implemented in a set of other
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   384
C++ classes and deal with:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   385
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   386
@item packet fragmentation and defragmentation,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   387
@item use of the rts/cts protocol,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   388
@item rate control algorithm,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   389
@item connection and disconnection to and from an Access Point,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   390
@item the MAC transmission queue,
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   391
@item beacon generation,
4432
7fd695d4b9a7 update manual
Mirko Banchi <mk.banchi@gmail.com>
parents: 4127
diff changeset
   392
@item msdu aggregation,
4024
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   393
@item etc.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   394
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   395
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   396
@node Wifi Attributes
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   397
@section Wifi Attributes
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   398
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   399
The WifiNetDevice makes heavy use of the ns-3 @ref{Attributes} subsystem for
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   400
configuration and default value management.  Presently, approximately
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   401
100 values are stored in this system.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   402
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   403
For instance, class @code{ns-3::WifiMac} exports these attributes:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   404
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   405
@item CtsTimeout: When this timeout expires, the RTS/CTS handshake has failed.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   406
@item AckTimeout: When this timeout expires, the DATA/ACK handshake has failed.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   407
@item Sifs: The value of the SIFS constant.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   408
@item EifsNoDifs: The value of EIFS-DIFS
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   409
@item Slot: The duration of a Slot.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   410
@item Pifs: The value of the PIFS constant.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   411
@item MaxPropagationDelay: The maximum propagation delay. Unused for now.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   412
@item MaxMsduSize: The maximum size of an MSDU accepted by the MAC layer.This value conforms to the specification.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   413
@item Ssid: The ssid we want to belong to.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   414
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   415
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   416
@node Wifi Tracing
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   417
@section Wifi Tracing
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   418
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   419
@emph{This needs revised/updating based on the latest Doxygen}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   420
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   421
ns-3 has a sophisticated tracing infrastructure that allows users to hook
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   422
into existing trace sources, or to define and export new ones.  
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   423
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   424
Wifi-related trace sources that are available by default include:
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   425
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   426
@item @code{ns3::WifiNetDevice}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   427
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   428
@item Rx: Received payload from the MAC layer.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   429
@item Tx: Send payload to the MAC layer.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   430
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   431
@item @code{ns3::WifiPhy}
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   432
@itemize @bullet
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   433
@item State: The WifiPhy state
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   434
@item RxOk: A packet has been received successfully.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   435
@item RxError: A packet has been received unsuccessfully.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   436
@item Tx: Packet transmission is starting.
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   437
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   438
@end itemize
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   439
Briefly, this means, for example, that a user can hook a processing 
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   440
function to the "State" tracing hook above and be notified whenever the
dfd0bc16dc99 add device chapters to manual
Tom Henderson <tomh@tomh.org>
parents:
diff changeset
   441
WifiPhy model changes state.