helps to create WifiNetDevice objects More...
#include "wifi-helper.h"
Public Member Functions | |
WifiHelper () | |
Create a Wifi helper in an empty state: all its parameters must be set before calling ns3::WifiHelper::Install. More... | |
virtual | ~WifiHelper () |
int64_t | AssignStreams (NetDeviceContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by the Phy and Mac aspects of the Wifi models. More... | |
virtual NetDeviceContainer | Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const |
virtual NetDeviceContainer | Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, Ptr< Node > node) const |
virtual NetDeviceContainer | Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, std::string nodeName) const |
void | SetRemoteStationManager (std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue()) |
virtual void | SetStandard (enum WifiPhyStandard standard) |
Static Public Member Functions | |
static NS_DEPRECATED WifiHelper | Default (void) |
static void | EnableLogComponents (void) |
Helper to enable all WifiNetDevice log components with one statement. More... | |
Protected Attributes | |
enum WifiPhyStandard | m_standard |
ObjectFactory | m_stationManager |
helps to create WifiNetDevice objects
This class can help to create a large set of similar WifiNetDevice objects and to configure a large set of their attributes during creation.
Definition at line 231 of file wifi-helper.h.
|
virtual |
Definition at line 664 of file wifi-helper.cc.
ns3::WifiHelper::WifiHelper | ( | ) |
Create a Wifi helper in an empty state: all its parameters must be set before calling ns3::WifiHelper::Install.
The default state is defined as being an Adhoc MAC layer with an ARF rate control algorithm and both objects using their default attribute values. By default, configure MAC and PHY for 802.11a.
Definition at line 668 of file wifi-helper.cc.
References SetRemoteStationManager().
int64_t ns3::WifiHelper::AssignStreams | ( | NetDeviceContainer | c, |
int64_t | stream | ||
) |
Assign a fixed random variable stream number to the random variables used by the Phy and Mac aspects of the Wifi models.
Each device in container c has fixed stream numbers assigned to its random variables. The Wifi channel (e.g. propagation loss model) is excluded. Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.
c | NetDeviceContainer of the set of net devices for which the WifiNetDevice should be modified to use fixed streams |
stream | first stream index to use |
Definition at line 787 of file wifi-helper.cc.
References ns3::EdcaTxopN::AssignStreams(), ns3::NetDeviceContainer::Begin(), ns3::NetDeviceContainer::End(), ns3::PointerValue::Get(), third::mac, and third::wifi.
Referenced by Bug772ChainTest::CreateDevices(), ChainRegressionTest::CreateDevices(), and Bug2222TestCase::DoRun().
|
static |
The default state is defined as being an Adhoc MAC layer with an ARF rate control algorithm and both objects using their default attribute values. By default, configure MAC and PHY for 802.11a.
Definition at line 675 of file wifi-helper.cc.
References SetRemoteStationManager().
|
static |
Helper to enable all WifiNetDevice log components with one statement.
Definition at line 752 of file wifi-helper.cc.
References ns3::LOG_LEVEL_ALL, and ns3::LogComponentEnable().
Referenced by ns3::Wifi80211pHelper::EnableLogComponents(), and ns3::WaveHelper::EnableLogComponents().
|
virtual |
phy | the PHY helper to create PHY objects |
mac | the MAC helper to create MAC objects |
c | the set of nodes on which a wifi device must be created |
Reimplemented in ns3::Wifi80211pHelper.
Definition at line 712 of file wifi-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), ns3::NodeContainer::Begin(), ns3::WifiPhy::ConfigureStandard(), ns3::WifiPhyHelper::Create(), ns3::ObjectFactory::Create(), ns3::WifiMacHelper::Create(), first::devices, ns3::NodeContainer::End(), ns3::Object::GetObject(), m_standard, m_stationManager, third::mac, NS_LOG_DEBUG, and third::phy.
Referenced by OcbWifiMacTestCase::ConfigureAdhocMode(), OcbWifiMacTestCase::ConfigureApStaMode(), BatteryLifetimeTest::ConstantLoadTest(), Bug772ChainTest::CreateDevices(), AodvExample::CreateDevices(), DsdvManetExample::CreateDevices(), ChainRegressionTest::CreateDevices(), BasicEnergyDepletionTest::DepletionTestCase(), WifiMsduAggregatorThroughputTest::DoRun(), WifiAcMappingTest::DoRun(), ns3::aodv::LoopbackTestCase::DoRun(), Bug730TestCase::DoRun(), SetChannelFrequencyTest::DoRun(), Bug2222TestCase::DoRun(), experiment(), ns3::Wifi80211pHelper::Install(), Install(), Experiment::Run(), RoutingExperiment::Run(), VanetRoutingExperiment::SetupAdhocDevices(), BatteryLifetimeTest::VariableLoadTest(), and WifiInterferenceTestCase::WifiSimpleInterference().
|
virtual |
phy | the PHY helper to create PHY objects |
mac | the MAC helper to create MAC objects |
node | the node on which a wifi device must be created |
Definition at line 737 of file wifi-helper.cc.
References Install().
|
virtual |
phy | the PHY helper to create PHY objects |
mac | the MAC helper to create MAC objects |
nodeName | the name of node on which a wifi device must be created |
Definition at line 744 of file wifi-helper.cc.
References Install().
void ns3::WifiHelper::SetRemoteStationManager | ( | std::string | type, |
std::string | n0 = "" , |
||
const AttributeValue & | v0 = EmptyAttributeValue () , |
||
std::string | n1 = "" , |
||
const AttributeValue & | v1 = EmptyAttributeValue () , |
||
std::string | n2 = "" , |
||
const AttributeValue & | v2 = EmptyAttributeValue () , |
||
std::string | n3 = "" , |
||
const AttributeValue & | v3 = EmptyAttributeValue () , |
||
std::string | n4 = "" , |
||
const AttributeValue & | v4 = EmptyAttributeValue () , |
||
std::string | n5 = "" , |
||
const AttributeValue & | v5 = EmptyAttributeValue () , |
||
std::string | n6 = "" , |
||
const AttributeValue & | v6 = EmptyAttributeValue () , |
||
std::string | n7 = "" , |
||
const AttributeValue & | v7 = EmptyAttributeValue () |
||
) |
type | the type of ns3::WifiRemoteStationManager to create. |
n0 | the name of the attribute to set |
v0 | the value of the attribute to set |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
n2 | the name of the attribute to set |
v2 | the value of the attribute to set |
n3 | the name of the attribute to set |
v3 | the value of the attribute to set |
n4 | the name of the attribute to set |
v4 | the value of the attribute to set |
n5 | the name of the attribute to set |
v5 | the value of the attribute to set |
n6 | the name of the attribute to set |
v6 | the value of the attribute to set |
n7 | the name of the attribute to set |
v7 | the value of the attribute to set |
All the attributes specified in this method should exist in the requested station manager.
Definition at line 683 of file wifi-helper.cc.
References m_stationManager, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by OcbWifiMacTestCase::ConfigureAdhocMode(), OcbWifiMacTestCase::ConfigureApStaMode(), OcbWifiMacTestCase::ConfigureOcbMode(), BatteryLifetimeTest::ConstantLoadTest(), Bug772ChainTest::CreateDevices(), AodvExample::CreateDevices(), DsdvManetExample::CreateDevices(), ChainRegressionTest::CreateDevices(), ns3::Wifi80211pHelper::Default(), Default(), BasicEnergyDepletionTest::DepletionTestCase(), WifiMsduAggregatorThroughputTest::DoRun(), WifiAcMappingTest::DoRun(), ns3::aodv::LoopbackTestCase::DoRun(), Bug730TestCase::DoRun(), SetChannelFrequencyTest::DoRun(), experiment(), Experiment::Run(), RoutingExperiment::Run(), VanetRoutingExperiment::SetupAdhocDevices(), BatteryLifetimeTest::VariableLoadTest(), WifiHelper(), and WifiInterferenceTestCase::WifiSimpleInterference().
|
virtual |
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:
Reimplemented in ns3::Wifi80211pHelper.
Definition at line 706 of file wifi-helper.cc.
References m_standard.
Referenced by OcbWifiMacTestCase::ConfigureAdhocMode(), OcbWifiMacTestCase::ConfigureApStaMode(), BatteryLifetimeTest::ConstantLoadTest(), DsdvManetExample::CreateDevices(), BasicEnergyDepletionTest::DepletionTestCase(), WifiMsduAggregatorThroughputTest::DoRun(), Bug730TestCase::DoRun(), SetChannelFrequencyTest::DoRun(), experiment(), Experiment::Run(), RoutingExperiment::Run(), ns3::Wifi80211pHelper::SetStandard(), VanetRoutingExperiment::SetupAdhocDevices(), BatteryLifetimeTest::VariableLoadTest(), and WifiInterferenceTestCase::WifiSimpleInterference().
|
protected |
Definition at line 364 of file wifi-helper.h.
Referenced by Install(), and SetStandard().
|
protected |
Definition at line 363 of file wifi-helper.h.
Referenced by Install(), and SetRemoteStationManager().