create MAC layers for a ns3::WifiNetDevice. More...
#include "wifi-mac-helper.h"
Public Member Functions | |
WifiMacHelper () | |
Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers. More... | |
virtual | ~WifiMacHelper () |
Destroy a WifiMacHelper. More... | |
virtual Ptr< WifiMac > | Create (Ptr< NetDevice > device, WifiStandard standard) const |
template<typename... Args> | |
void | SetAckManager (std::string type, Args &&... args) |
Helper function used to set the Acknowledgment Manager. More... | |
template<typename... Args> | |
void | SetProtectionManager (std::string type, Args &&... args) |
Helper function used to set the Protection Manager. More... | |
template<typename... Args> | |
void | SetType (std::string type, Args &&... args) |
Protected Attributes | |
ObjectFactory | m_ackManager |
Factory to create an acknowledgment manager. More... | |
ObjectFactory | m_mac |
MAC object factory. More... | |
ObjectFactory | m_protectionManager |
Factory to create a protection manager. More... | |
create MAC layers for a ns3::WifiNetDevice.
This class can create MACs of type ns3::ApWifiMac, ns3::StaWifiMac and ns3::AdhocWifiMac. Its purpose is to allow a WifiHelper to configure and install WifiMac objects on a collection of nodes. The WifiMac objects themselves are mainly composed of TxMiddle, RxMiddle, ChannelAccessManager, MacLow, WifiRemoteStationManager, MpduAggregator and MsduAggregartor objects, so this helper offers the opportunity to configure attribute values away from their default values, on a per-NodeContainer basis. By default, it creates an Adhoc MAC layer without QoS. Typically, it is used to set type and attribute values, then hand this object over to the WifiHelper that finishes the job of installing.
This class may be further subclassed (WaveMacHelper is an example of this).
Definition at line 47 of file wifi-mac-helper.h.
ns3::WifiMacHelper::WifiMacHelper | ( | ) |
Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers.
Definition at line 30 of file wifi-mac-helper.cc.
References m_ackManager, m_protectionManager, SetType(), and ns3::ObjectFactory::SetTypeId().
|
virtual |
Destroy a WifiMacHelper.
Definition at line 40 of file wifi-mac-helper.cc.
|
virtual |
device | the device within which the MAC object will reside |
standard | the standard to configure during installation |
This allows the ns3::WifiHelper class to create MAC objects from ns3::WifiHelper::Install.
Definition at line 45 of file wifi-mac-helper.cc.
References ns3::Mac48Address::Allocate(), ns3::ObjectFactory::Create(), m_ackManager, m_mac, m_protectionManager, and third::mac.
Referenced by ns3::WaveHelper::Install(), and ns3::WifiHelper::Install().
void ns3::WifiMacHelper::SetAckManager | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the Acknowledgment Manager.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of Acknowledgment Manager |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 134 of file wifi-mac-helper.h.
References m_ackManager, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
void ns3::WifiMacHelper::SetProtectionManager | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the Protection Manager.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of Protection Manager |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 126 of file wifi-mac-helper.h.
References m_protectionManager, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
void ns3::WifiMacHelper::SetType | ( | std::string | type, |
Args &&... | args | ||
) |
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of ns3::WifiMac to create. |
args | A sequence of name-value pairs of the attributes to set. |
All the attributes specified in this method should exist in the requested MAC.
Definition at line 118 of file wifi-mac-helper.h.
References m_mac, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by OcbWifiMacTestCase::ConfigureAdhocMode(), OcbWifiMacTestCase::ConfigureApStaMode(), BatteryLifetimeTest::ConstantLoadTest(), Bug772ChainTest::CreateDevices(), TracerouteExample::CreateDevices(), AodvExample::CreateDevices(), DsdvManetExample::CreateDevices(), ChainRegressionTest::CreateDevices(), BasicEnergyDepletionTest::DepletionTestCase(), WifiMsduAggregatorThroughputTest::DoRun(), WifiAcMappingTest::DoRun(), ns3::aodv::LoopbackTestCase::DoRun(), SetChannelFrequencyTest::DoRun(), experiment(), RoutingExperiment::Run(), ns3::NqosWaveMacHelper::SetType(), ns3::QosWaveMacHelper::SetType(), VanetRoutingExperiment::SetupAdhocDevices(), BatteryLifetimeTest::VariableLoadTest(), and WifiMacHelper().
|
protected |
Factory to create an acknowledgment manager.
Definition at line 104 of file wifi-mac-helper.h.
Referenced by Create(), SetAckManager(), and WifiMacHelper().
|
protected |
MAC object factory.
Definition at line 102 of file wifi-mac-helper.h.
|
protected |
Factory to create a protection manager.
Definition at line 103 of file wifi-mac-helper.h.
Referenced by Create(), SetProtectionManager(), and WifiMacHelper().