1.1 --- a/doc/manual/wifi.texi Thu Apr 30 14:11:58 2009 +0200
1.2 +++ b/doc/manual/wifi.texi Fri May 01 14:34:27 2009 +0200
1.3 @@ -30,34 +30,55 @@
1.4 The current implementation provides roughly four levels of models:
1.5 @itemize @bullet
1.6 @item the @strong{PHY layer models}
1.7 -@item the so-called @strong{MAC low models}: they implement DCF
1.8 +@item the so-called @strong{MAC low models}: they implement DCF and EDCAF
1.9 @item the so-called @strong{MAC high models}: they implement the MAC-level
1.10 beacon generation, probing, and association state machines, and
1.11 @item a set of @strong{Rate control algorithms} used by the MAC low models
1.12 @end itemize
1.13
1.14 -There are presently three @strong{MAC high models}:
1.15 +There are presently six @strong{MAC high models}, three for non-QoS MACs and three
1.16 +for QoS MACs.
1.17 +@itemize @bullet
1.18 +@item @strong{non-QoS MACs:}
1.19 @enumerate
1.20 @item a simple adhoc state machine that does not perform any
1.21 kind of beacon generation, probing, or association. This
1.22 -state machine is implemented by the @code{ns3::AdhocWifiNetDevice}
1.23 -and @code{ns3::MacHighAdhoc} classes.
1.24 +state machine is implemented by the @code{ns3::AdhocWifiMac} class.
1.25 @item an active probing and association state machine that handles
1.26 automatic re-association whenever too many beacons are missed
1.27 -is implemented by the @code{ns3::NqstaWifiNetDevice} and
1.28 -@code{ns3::MacHighNqsta} classes.
1.29 +is implemented by the @code{ns3::NqstaWifiMac} class.
1.30 @item an access point that generates periodic beacons, and that
1.31 accepts every attempt to associate. This AP state machine
1.32 -is implemented by the @code{ns3::NqapWifiNetDevice} and
1.33 -@code{ns3::MacHighNqap} classes.
1.34 -@end enumerate
1.35 +is implemented by the @code{ns3::NqapWifiMac} class.
1.36 +@end enumerate
1.37 +@item @strong{QoS MACs:}
1.38 +@enumerate
1.39 +@item a simple adhoc state machine like above but also able to manage QoS traffic.
1.40 +This state machine is implemented by @code{ns3::QadhocWifiMac} class.
1.41 +@item a station state machine like above but also able to manage QoS traffic.
1.42 +Implemented by @code{ns3::QstaWifiMac}.
1.43 +@item a QoS access point state machine like above implemented by @code{ns3::QapWifiMac}.
1.44 +@end enumerate
1.45 +@end itemize
1.46 +
1.47 +With QoS MAC models is possible to work with traffic belonging to
1.48 +four different access classes: @strong{AC_VO} for voice traffic, @strong{AC_VI}
1.49 +for video traffic, @strong{AC_BE} for best-effort traffic and @strong{AC_BK}
1.50 +for background traffic.
1.51 +In order to determine MSDU's access class, every packet forwarded down
1.52 +to these MAC layers should be marked using @code{ns3::QosTag} in order to set
1.53 +a TID (traffic id) for that packet otherwise it will be considered
1.54 +belonging to @strong{AC_BE} access class.
1.55
1.56 The @strong{MAC low layer} is split into three components:
1.57 @enumerate
1.58 @item @code{ns3::MacLow} which takes care of RTS/CTS/DATA/ACK transactions.
1.59 -@item @code{ns3::DcfManager} and @code{ns3::DcfState} which implements the DCF function.
1.60 -@item @code{ns3::DcaTxop} which handles the packet queue, packet fragmentation,
1.61 -and packet retransmissions if they are needed.
1.62 +@item @code{ns3::DcfManager} and @code{ns3::DcfState} which implements the DCF and EDCAF functions.
1.63 +@item @code{ns3::DcaTxop} or @code{ns3::EdcaTxopN} which handle the packet queue,
1.64 +packet fragmentation, and packet retransmissions if they are needed.
1.65 +@code{ns3::DcaTxop} object is used by non-QoS high MACs. @code{ns3::EdcaTxopN} is
1.66 +used by QoS high MACs and performs also QoS operations like 802.11n MSDU
1.67 +aggregation.
1.68 @end enumerate
1.69
1.70 There are also several @strong{rate control algorithms} that can be used by the Mac low layer:
1.71 @@ -96,7 +117,7 @@
1.72 a number of consitutent objects, and bind them together appropriately
1.73 (the WifiNetDevice is very modular in this regard, for future
1.74 extensibility). At the low-level API, this can be done
1.75 -with about 20 lines of code (see @code{ns3::WifiHelper::Install} and
1.76 +with about 20 lines of code (see @code{ns3::WifiHelper::Install}, and
1.77 @code{ns3::YansWifiPhyHelper::Create}). They also must create,
1.78 at some point, a WifiChannel, which also contains a number of
1.79 constituent objects (see @code{ns3::YansWifiChannelHelper::Create}).
1.80 @@ -156,6 +177,44 @@
1.81 just prepared the YansWifiPhyHelper by telling it which channel it is
1.82 connected to. The phy objects are created in the next step.
1.83
1.84 +@subsection NqosWifiMacHelper and QosWifiMacHelper
1.85 +
1.86 +The @code{ns3::NqosWifiMacHelper} and @code{ns3::QosWifiMacHelper} configure an
1.87 +object factory to create instances of a @code{ns3::WifiMac}. They are used to
1.88 +configure MAC parameters like type of MAC, values of contention windows and so on.
1.89 +Setting up a non-QoS MAC layers the object we use is @code{ns3::NqosWifiMacHelper}.
1.90 +For example the following user code configures a non-QoS MAC sta and changes its default
1.91 +values for contention window and Aifsn:
1.92 +@verbatim
1.93 + NqosWifiMacHelper wifiMacHelper = NqosWifiMacHelper::Default ();
1.94 + Ssid ssid = Ssid ("ns-3-ssid");
1.95 + wifiMacHelper.SetType ("ns3::NqstaWifiMac", "Ssid", SsidValue (ssid), "ActiveProbing", BooleanValue (false));
1.96 + wifiMacHelper.SetDcaParameters ("MinCw", UintegerValue (20), "Aifsn", UintegerValue (3));
1.97 +@end verbatim
1.98 +
1.99 +Setting up a QoS MACs we use a @code{ns3::QosWifiMacHelper} instead.
1.100 +This object could be also used to change default EDCA parameters, and to set a possible MSDU aggregator
1.101 +for a particular access class in order to use 802.11n MSDU aggregation feature.
1.102 +A possible user code:
1.103 +@verbatim
1.104 + QosWifiMacHelper wifiMacHelper = QosWifiMacHelper::Default ();
1.105 + wifiMacHelper.SetType ("ns3::QapWifiMac", "Ssid", SsidValue (ssid), "BeaconGeneration", BooleanValue (true),
1.106 + "BeaconInterval", TimeValue (Seconds (2.5)));
1.107 + wifiMacHelper.SetEdcaParametersForAc (AC_VO, "MinCw", UintegerValue (2));
1.108 + wifiMacHelper.SetMsduAggregatorForAc (AC_VO, "ns3::MsduStandardAggregator", "MaxAmsduSize", UintegerValue (3839));
1.109 +@end verbatim
1.110 +
1.111 +Call to QosWifiMacHelper::Default () is needed in order to set default EDCA parameters properly for all
1.112 +access classes. Otherwise we should set them one by one:
1.113 +@verbatim
1.114 + QosWifiMacHelper wifiMacHelper;
1.115 + wifiMacHelper.SetEdcaParametersForAc (AC_VO, "MinCw", UintegerValue (2), "MaxCw", UintegerValue (7),
1.116 + "Aifsn", UintegerValue (2));
1.117 + wifiMacHelper.SetEdcaParametersForAc (AC_VI, "MinCw", UintegerValue (7), "MaxCw", UintegerValue (15),
1.118 + "Aifsn", UintegerValue (2));
1.119 + ...
1.120 +@end verbatim
1.121 +
1.122 @subsection WifiHelper
1.123
1.124 We're now ready to create WifiNetDevices. First, let's create
1.125 @@ -164,12 +223,11 @@
1.126 WifiHelper wifiHelper = WifiHelper::Default ();
1.127 @end verbatim
1.128 What does this do? It sets the RemoteStationManager to
1.129 -@code{ns3::ArfWifiManager} and the upper MAC to @code{ns3::AdhocWifiMac}
1.130 -by default (which can be overridden by other arguments).
1.131 -Now, let's use the wifiPhyHelper created above to install WifiNetDevices
1.132 +@code{ns3::ArfWifiManager}.
1.133 +Now, let's use the wifiPhyHelper and wifiMacHelper created above to install WifiNetDevices
1.134 on a set of nodes in a NodeContainer "c":
1.135 @verbatim
1.136 - NetDeviceContainer wifiContainer = WifiHelper::Install (wifiPhyHelper, c);
1.137 + NetDeviceContainer wifiContainer = WifiHelper::Install (wifiPhyHelper, wifiMacHelper, c);
1.138 @end verbatim
1.139 This creates the WifiNetDevice which includes also a WifiRemoteStationManager,
1.140 a WifiMac, and a WifiPhy (connected to the matching WifiChannel).
1.141 @@ -313,6 +371,7 @@
1.142 @item connection and disconnection to and from an Access Point,
1.143 @item the MAC transmission queue,
1.144 @item beacon generation,
1.145 +@item msdu aggregation,
1.146 @item etc.
1.147 @end itemize
1.148