A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::YansWifiChannelHelper Class Reference

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

#include <yans-wifi-helper.h>

Public Member Functions

 YansWifiChannelHelper ()
 
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)
 
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)
 

Private Attributes

ObjectFactory m_propagationDelay
 
std::vector< ObjectFactorym_propagationLoss
 

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 37 of file yans-wifi-helper.h.

Constructor & Destructor Documentation

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 91 of file yans-wifi-helper.cc.

Member Function Documentation

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 105 of file yans-wifi-helper.cc.

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

Referenced by ns3::olsr::Bug780Test::CreateNodes(), and Default().

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 176 of file yans-wifi-helper.cc.

Referenced by ns3::aodv::Bug772ChainTest::CreateDevices(), ns3::aodv::ChainRegressionTest::CreateDevices(), and ns3::olsr::Bug780Test::CreateNodes().

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.

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

References AddPropagationLoss(), and SetPropagationDelay().

Referenced by ns3::aodv::Bug772ChainTest::CreateDevices(), ns3::aodv::ChainRegressionTest::CreateDevices(), ns3::olsr::TcRegressionTest::CreateNodes(), and ns3::aodv::LoopbackTestCase::DoRun().

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 129 of file yans-wifi-helper.cc.

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

Referenced by BatteryLifetimeTest::ConstantLoadTest(), ns3::olsr::Bug780Test::CreateNodes(), Default(), BasicEnergyDepletionTest::DepletionTestCase(), and BatteryLifetimeTest::VariableLoadTest().


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