A Discrete-Event Network Simulator
API
ns3::WifiMacHelper Class Reference

create MAC layers for a ns3::WifiNetDevice. More...

#include "wifi-mac-helper.h"

+ Inheritance diagram for ns3::WifiMacHelper:
+ Collaboration diagram for ns3::WifiMacHelper:

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< WifiMacCreate (void) const
 
virtual void SetType (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(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue())
 

Protected Attributes

ObjectFactory m_mac
 

Detailed Description

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, DcfManager, 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 is a merge of two previous helpers (ns3::NqosWifiMacHelper and ns::3 QosWifiMacHelper) that Mirko Banchi (mk.ba.nosp@m.nchi.nosp@m.@gmai.nosp@m.l.co.nosp@m.m) originally contributed. It should now be used instead of those two deprecated helpers.

This class may be further subclassed (WaveMacHelper is an example of this).

Definition at line 51 of file wifi-mac-helper.h.

Constructor & Destructor Documentation

ns3::WifiMacHelper::WifiMacHelper ( )

Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers.

Definition at line 29 of file wifi-mac-helper.cc.

References SetType().

+ Here is the call graph for this function:

ns3::WifiMacHelper::~WifiMacHelper ( )
virtual

Destroy a WifiMacHelper.

Definition at line 36 of file wifi-mac-helper.cc.

Member Function Documentation

Ptr< WifiMac > ns3::WifiMacHelper::Create ( void  ) const
virtual
Returns
a new MAC object.

This allows the ns3::WifiHelper class to create MAC objects from ns3::WifiHelper::Install.

Reimplemented in ns3::QosWifiMacHelper, and ns3::NqosWifiMacHelper.

Definition at line 69 of file wifi-mac-helper.cc.

References ns3::ObjectFactory::Create(), m_mac, and third::mac.

Referenced by ns3::WaveHelper::Install(), and ns3::WifiHelper::Install().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiMacHelper::SetType ( 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 (),
std::string  n8 = "",
const AttributeValue v8 = EmptyAttributeValue (),
std::string  n9 = "",
const AttributeValue v9 = EmptyAttributeValue (),
std::string  n10 = "",
const AttributeValue v10 = EmptyAttributeValue () 
)
virtual
Parameters
typethe type of ns3::WifiMac to create. Valid values of the type field must be a type subclassed from WifiMac.
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set
n4the name of the attribute to set
v4the value of the attribute to set
n5the name of the attribute to set
v5the value of the attribute to set
n6the name of the attribute to set
v6the value of the attribute to set
n7the name of the attribute to set
v7the value of the attribute to set
n8the name of the attribute to set
v8the value of the attribute to set
n9the name of the attribute to set
v9the value of the attribute to set
n10the name of the attribute to set
v10the value of the attribute to set

All the attributes specified in this method should exist in the requested mac.

Reimplemented in ns3::QosWaveMacHelper, ns3::QosWifiMacHelper, ns3::NqosWifiMacHelper, and ns3::NqosWaveMacHelper.

Definition at line 41 of file wifi-mac-helper.cc.

References m_mac, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

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(), Experiment::Run(), RoutingExperiment::Run(), ns3::NqosWaveMacHelper::SetType(), ns3::QosWaveMacHelper::SetType(), VanetRoutingExperiment::SetupAdhocDevices(), BatteryLifetimeTest::VariableLoadTest(), WifiMacHelper(), and WifiInterferenceTestCase::WifiSimpleInterference().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

ObjectFactory ns3::WifiMacHelper::m_mac
protected

Definition at line 116 of file wifi-mac-helper.h.

Referenced by Create(), and SetType().


The documentation for this class was generated from the following files: