wifi: Restore (deprecated) API removed in commit bd1ad3994
This commit is contained in:
@@ -63,6 +63,19 @@ Wifi80211pHelper::SetStandard (enum WifiStandard standard)
|
||||
}
|
||||
}
|
||||
|
||||
// NS_DEPRECATED_3_32
|
||||
void
|
||||
Wifi80211pHelper::SetStandard (enum WifiPhyStandard standard)
|
||||
{
|
||||
if ((standard == WIFI_PHY_STANDARD_80211a) || (standard == WIFI_PHY_STANDARD_80211_10MHZ))
|
||||
{
|
||||
WifiHelper::SetStandard (WIFI_STANDARD_80211p);
|
||||
}
|
||||
else
|
||||
{
|
||||
NS_FATAL_ERROR ("802.11p only use 802.11 standard with 10MHz or 20MHz");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Wifi80211pHelper::EnableLogComponents (void)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#ifndef WIFI_802_11P_HELPER_H
|
||||
#define WIFI_802_11P_HELPER_H
|
||||
#include "ns3/wifi-helper.h"
|
||||
#include "ns3/deprecated.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
@@ -59,6 +60,16 @@ public:
|
||||
*/
|
||||
virtual void SetStandard (enum WifiStandard standard);
|
||||
|
||||
/**
|
||||
* \param standard the phy standard to configure during installation
|
||||
*
|
||||
* Users can only configure 802.11p with 10MHz or 5 MHz channel bandwidth.
|
||||
* The default 802.11p standard uses 10MHz.
|
||||
* \deprecated This method will go away in a future release of ns-3.
|
||||
*/
|
||||
NS_DEPRECATED_3_32
|
||||
virtual void SetStandard (WifiPhyStandard standard);
|
||||
|
||||
/**
|
||||
* \param phy the PHY helper to create PHY objects
|
||||
* \param macHelper the MAC helper to create MAC objects
|
||||
|
||||
@@ -749,6 +749,40 @@ WifiHelper::SetStandard (WifiStandard standard)
|
||||
m_standard = standard;
|
||||
}
|
||||
|
||||
// NS_DEPRECATED_3_32
|
||||
void
|
||||
WifiHelper::SetStandard (WifiPhyStandard standard)
|
||||
{
|
||||
switch (standard)
|
||||
{
|
||||
case WIFI_PHY_STANDARD_80211a:
|
||||
m_standard = WIFI_STANDARD_80211a;
|
||||
return;
|
||||
case WIFI_PHY_STANDARD_80211b:
|
||||
m_standard = WIFI_STANDARD_80211b;
|
||||
return;
|
||||
case WIFI_PHY_STANDARD_80211g:
|
||||
m_standard = WIFI_STANDARD_80211g;
|
||||
return;
|
||||
case WIFI_PHY_STANDARD_holland:
|
||||
m_standard = WIFI_STANDARD_holland;
|
||||
return;
|
||||
// remove the next value from WifiPhyStandard when deprecation ends
|
||||
case WIFI_PHY_STANDARD_80211n_2_4GHZ:
|
||||
m_standard = WIFI_STANDARD_80211n_2_4GHZ;
|
||||
return;
|
||||
// remove the next value from WifiPhyStandard when deprecation ends
|
||||
case WIFI_PHY_STANDARD_80211n_5GHZ:
|
||||
m_standard = WIFI_STANDARD_80211n_5GHZ;
|
||||
return;
|
||||
case WIFI_PHY_STANDARD_80211ac:
|
||||
m_standard = WIFI_STANDARD_80211ac;
|
||||
return;
|
||||
default:
|
||||
NS_FATAL_ERROR ("Unsupported value of WifiPhyStandard");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
WifiHelper::SetSelectQueueCallback (SelectQueueCallback f)
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "ns3/trace-helper.h"
|
||||
#include "ns3/wifi-phy.h"
|
||||
#include "ns3/qos-utils.h"
|
||||
#include "ns3/deprecated.h"
|
||||
#include "wifi-mac-helper.h"
|
||||
#include <functional>
|
||||
|
||||
@@ -498,6 +499,33 @@ public:
|
||||
*/
|
||||
virtual void SetStandard (WifiStandard standard);
|
||||
|
||||
/**
|
||||
* \param standard the PHY standard to configure during installation
|
||||
*
|
||||
* This method sets standards-compliant defaults for WifiMac
|
||||
* parameters such as SIFS time, slot time, timeout values, etc.,
|
||||
* based on the standard selected. It results in
|
||||
* WifiMac::ConfigureStandard(standard) being called on each
|
||||
* installed MAC object.
|
||||
*
|
||||
* The default standard of 802.11a will be applied if SetStandard()
|
||||
* is not called.
|
||||
*
|
||||
* Note that WifiMac::ConfigureStandard () will overwrite certain
|
||||
* defaults in the attribute system, so if a user wants to manipulate
|
||||
* any default values affected by ConfigureStandard() while using this
|
||||
* helper, the user should use a post-install configuration such as
|
||||
* Config::Set() on any objects that this helper creates, such as:
|
||||
* \code
|
||||
* Config::Set ("/NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Mac/Slot", TimeValue (MicroSeconds (slot)));
|
||||
* \endcode
|
||||
* \deprecated This method will go away in future release of ns-3.
|
||||
*
|
||||
* \sa Config::Set
|
||||
*/
|
||||
NS_DEPRECATED_3_32
|
||||
virtual void SetStandard (WifiPhyStandard standard);
|
||||
|
||||
/**
|
||||
* Helper to enable all WifiNetDevice log components with one statement
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,12 @@ enum WifiPhyStandard
|
||||
WIFI_PHY_STANDARD_80211b,
|
||||
/** ERP-OFDM PHY (Clause 19, Section 19.5) */
|
||||
WIFI_PHY_STANDARD_80211g,
|
||||
/** OFDM PHY for the 5 GHz band (Clause 17 with 10 MHz channel bandwidth) */
|
||||
/** this value is NS_DEPRECATED_3_32 */
|
||||
WIFI_PHY_STANDARD_80211_10MHZ,
|
||||
/** OFDM PHY for the 5 GHz band (Clause 17 with 5 MHz channel bandwidth) */
|
||||
/** this value is NS_DEPRECATED_3_32 */
|
||||
WIFI_PHY_STANDARD_80211_5MHZ,
|
||||
/** OFDM PHY (Clause 17 - amendment for 10 MHz and 5 MHz channels) */
|
||||
WIFI_PHY_STANDARD_80211p,
|
||||
/** This is intended to be the configuration used in this paper:
|
||||
@@ -46,6 +52,12 @@ enum WifiPhyStandard
|
||||
* ACM MOBICOM, 2001.
|
||||
*/
|
||||
WIFI_PHY_STANDARD_holland,
|
||||
/** HT PHY for the 2.4 GHz band (clause 20) */
|
||||
/** this value is NS_DEPRECATED_3_32 */
|
||||
WIFI_PHY_STANDARD_80211n_2_4GHZ,
|
||||
/** HT PHY for the 5 GHz band (clause 20) */
|
||||
/** this value is NS_DEPRECATED_3_32 */
|
||||
WIFI_PHY_STANDARD_80211n_5GHZ,
|
||||
/** HT PHY (clause 20) */
|
||||
WIFI_PHY_STANDARD_80211n,
|
||||
/** VHT PHY (clause 22) */
|
||||
|
||||
Reference in New Issue
Block a user