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

manage and create wifi channel objects for the yans model. More...

#include "yans-wifi-helper.h"

+ Collaboration diagram for ns3::YansWifiChannelHelper:

Public Member Functions

 YansWifiChannelHelper ()
 Create a channel helper without any parameter set. More...
 
void AddPropagationLoss (std::string name, 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())
 
int64_t AssignStreams (Ptr< YansWifiChannel > c, int64_t stream)
 Assign a fixed random variable stream number to the random variables used by the channel. More...
 
Ptr< YansWifiChannelCreate (void) const
 
void SetPropagationDelay (std::string name, 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())
 

Static Public Member Functions

static YansWifiChannelHelper Default (void)
 Create a channel helper in a default working state. More...
 

Private Attributes

ObjectFactory m_propagationDelay
 propagation delay model More...
 
std::vector< ObjectFactorym_propagationLoss
 vector of propagation loss models More...
 

Detailed Description

manage and create wifi channel objects for the yans model.

The intent of this class is to make it easy to create a channel object which implements the yans channel model. The yans channel model is described in "Yet Another Network Simulator", http://cutebugs.net/files/wns2-yans.pdf

Definition at line 36 of file yans-wifi-helper.h.

Constructor & Destructor Documentation

◆ YansWifiChannelHelper()

ns3::YansWifiChannelHelper::YansWifiChannelHelper ( )

Create a channel helper without any parameter set.

The user must set them all to be able to call Create later.

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

Member Function Documentation

◆ AddPropagationLoss()

void ns3::YansWifiChannelHelper::AddPropagationLoss ( std::string  name,
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 () 
)
Parameters
namethe name of the model to add
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

Add a propagation loss model to the set of currently-configured loss models. This method is additive to allow you to construct complex propagation loss models such as a log distance + jakes model, etc.

The order in which PropagationLossModels are added may be significant. Some propagation models are dependent of the "txPower" (eg. Nakagami model), and are therefore not commutative. The final receive power (excluding receiver gains) are calculated in the order the models are added.

Definition at line 50 of file yans-wifi-helper.cc.

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

Referenced by DsdvManetExample::CreateDevices(), Default(), RoutingExperiment::Run(), VanetRoutingExperiment::SetupAdhocDevices(), and WifiInterferenceTestCase::WifiSimpleInterference().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AssignStreams()

int64_t ns3::YansWifiChannelHelper::AssignStreams ( Ptr< YansWifiChannel c,
int64_t  stream 
)

Assign a fixed random variable stream number to the random variables used by the channel.

Typically this corresponds to random variables used in the propagation loss models. Return the number of streams (possibly zero) that have been assigned.

Parameters
cNetDeviceContainer of the set of net devices for which the WifiNetDevice should be modified to use fixed streams
streamfirst stream index to use
Returns
the number of stream indices assigned by this helper

Definition at line 121 of file yans-wifi-helper.cc.

Referenced by PeerManagementProtocolRegressionTest::CreateDevices(), Bug772ChainTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), and ChainRegressionTest::CreateDevices().

+ Here is the caller graph for this function:

◆ Create()

Ptr< YansWifiChannel > ns3::YansWifiChannelHelper::Create ( void  ) const

◆ Default()

YansWifiChannelHelper ns3::YansWifiChannelHelper::Default ( void  )
static

Create a channel helper in a default working state.

By default, we create a channel model with a propagation delay equal to a constant, the speed of light, and a propagation loss based on a log distance model with a reference loss of 46.6777 dB at reference distance of 1m.

Returns
YansWifiChannelHelper

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

References AddPropagationLoss(), and SetPropagationDelay().

Referenced by WaveNetDeviceExample::CreateWaveNodes(), ns3::aodv::LoopbackTestCase::DoRun(), and Experiment::Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetPropagationDelay()

void ns3::YansWifiChannelHelper::SetPropagationDelay ( std::string  name,
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 () 
)
Parameters
namethe name of the model to set
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

Configure a propagation delay for this channel.

Definition at line 74 of file yans-wifi-helper.cc.

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

Referenced by BatteryLifetimeTest::ConstantLoadTest(), DsdvManetExample::CreateDevices(), Default(), BasicEnergyDepletionTest::DepletionTestCase(), RoutingExperiment::Run(), VanetRoutingExperiment::SetupAdhocDevices(), BatteryLifetimeTest::VariableLoadTest(), and WifiInterferenceTestCase::WifiSimpleInterference().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_propagationDelay

ObjectFactory ns3::YansWifiChannelHelper::m_propagationDelay
private

propagation delay model

Definition at line 146 of file yans-wifi-helper.h.

Referenced by Create(), and SetPropagationDelay().

◆ m_propagationLoss

std::vector<ObjectFactory> ns3::YansWifiChannelHelper::m_propagationLoss
private

vector of propagation loss models

Definition at line 145 of file yans-wifi-helper.h.

Referenced by AddPropagationLoss(), and Create().


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