diff --git a/src/wifi/doc/source/wifi-changelog.rst b/src/wifi/doc/source/wifi-changelog.rst index ca54b1400..d304d3ca0 100644 --- a/src/wifi/doc/source/wifi-changelog.rst +++ b/src/wifi/doc/source/wifi-changelog.rst @@ -17,7 +17,8 @@ Prior to ns-3.36, channels, channel widths, and operating bands were set separately. As of ns-3.36, a new tuple object that we call ChannelSettings has consolidated all of these settings. Users should specify the channel number, channel width, frequency band, and primary channel index as a tuple (and -continue to set the Wi-Fi standard separately). +continue to set the Wi-Fi standard separately). Since ns-3.43, this attribute +can contain multiple tuples to support 80+80MHz operating channels. For instance, where pre-ns-3.36 code may have said:: diff --git a/src/wifi/doc/source/wifi-user.rst b/src/wifi/doc/source/wifi-user.rst index 3cb9ceba9..4b4aefb6c 100644 --- a/src/wifi/doc/source/wifi-user.rst +++ b/src/wifi/doc/source/wifi-user.rst @@ -213,22 +213,22 @@ Channel, frequency, channel width, and band configuration There is a unique ``ns3::WifiPhy`` attribute, named ``ChannelSettings``, that enables to set channel number, channel width, frequency band and primary20 index -all together, in order to eliminate the possibility of inconsistent settings. +for each segment all together, in order to eliminate the possibility of inconsistent settings. The ``ChannelSettings`` attribute can be set in a number of ways (see below) by -providing either a StringValue object or a TupleValue object: +providing either a StringValue object or an AttributeContainerValue object: * Defining a StringValue object to set the ``ChannelSettings`` attribute .. sourcecode:: cpp - StringValue value("{38, 40, BAND_5GHZ, 0}")); + StringValue value("{38, 40, BAND_5GHZ, 0}"); -* Defining a TupleValue object to set the ``ChannelSettings`` attribute +* Defining an AttributeContainerValue object to set the ``ChannelSettings`` attribute .. sourcecode:: cpp - TupleValue value; - value.Set(WifiPhy::ChannelTuple {38, 40, WIFI_PHY_BAND_5GHZ, 0}); + AttributeContainerValue, ';'> value; + value.Set(WifiPhy::ChannelSegments{{38, 40, WIFI_PHY_BAND_5GHZ, 0}}); In both cases, the operating channel will be channel 38 in the 5 GHz band, which has a width of 40 MHz, and the primary20 channel will be the 20 MHz subchannel @@ -246,8 +246,8 @@ The operating channel settings can then be configured in a number of ways: .. sourcecode:: cpp - TupleValue value; - value.Set(WifiPhy::ChannelTuple {38, 40, WIFI_PHY_BAND_5GHZ, 0}); + AttributeContainerValue, ';'> value; + value.Set(WifiPhy::ChannelSegments{{38, 40, WIFI_PHY_BAND_5GHZ, 0}}); YansWifiPhyHelper wifiPhyHelper = YansWifiPhyHelper::Default(); wifiPhyHelper.Set("ChannelSettings", value); @@ -283,7 +283,8 @@ The following values for WifiStandard are defined in WIFI_STANDARD_80211p, WIFI_STANDARD_80211n, WIFI_STANDARD_80211ac, - WIFI_STANDARD_80211ax + WIFI_STANDARD_80211ax, + WIFI_STANDARD_80211be By default, the WifiHelper (the typical use case for WifiPhy creation) will configure the WIFI_STANDARD_80211ax standard by default. Other values @@ -301,12 +302,12 @@ as soon as the WifiStandard is set. Here are the rules (applied in the given ord * If the band is unspecified (i.e., it is set to WIFI_PHY_BAND_UNSPECIFIED or "BAND_UNSPECIFIED"), the default band for the configured standard is set - (5 GHz band for 802.11{a, ac, ax, p} and 2.4 GHz band for all the others). + (5 GHz band for 802.11{a, ac, ax, be, p} and 2.4 GHz band for all the others). * If both the channel width and the channel number are unspecified (i.e., they are set to zero), the default channel width for the configured standard and - band is set (22 MHz for 802.11b, 10 MHz for 802.11p, 80 MHz for 802.11ac and - for 802.11ax if the band is 5 GHz, and 20 MHz for all other cases). + band is set (22 MHz for 802.11b, 10 MHz for 802.11p, 80 MHz for 802.11ac, + for 802.11ax and for 802.11be if the band is 5 GHz, and 20 MHz for all other cases). * If the channel width is unspecified but the channel number is valid, the settings are valid only if there exists a unique channel with the given number for the @@ -497,6 +498,31 @@ WifiPhy::Primary20MHzIndex The configured WifiPhy primary 20MHz channel index can be got via the attribute ``Primary20MHzIndex`` in the class ``WifiPhy``. +Non-contiguous 160 MHz operating channel configuration (80+80 MHz) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +An 80+80 MHz operating channel can be configured by setting each 80 MHz channel +for each segment. For example, the following example code snippet configures an +non-contiguous 160 MHz channel where the first segment operates on channel 42 +and the second segment operates on channel 106: + +:: + + Ptr wifiPhy = ...; + wifiPhy->SetAttribute("ChannelSettings", StringValue("{42, 80, BAND_5GHZ, 0};{106, 80, BAND_5GHZ, 0}")); + +It is still possible to have channel numbers set to zero in order to select the default 80+80 MHz channel: + +:: + + Ptr wifiPhy = ...; + wifiPhy->SetAttribute("ChannelSettings", StringValue("{0, 80, BAND_UNSPECIFIED, 0};{0, 80, BAND_UNSPECIFIED, 0}")); + +which results in the use of channels 42 and 106. + +Note that only the primary 20 MHz channel index of the first specified segment is considered. +80+80MHz requires the use of ``SpectrumWifiPhy``. + Order of operation issues +++++++++++++++++++++++++