manage and create wifi channel objects for the yans model. More...
#include "yans-wifi-helper.h"
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< YansWifiChannel > | Create (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< ObjectFactory > | m_propagationLoss |
vector of propagation loss models More... | |
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.
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 34 of file yans-wifi-helper.cc.
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 () |
||
) |
name | the name of the model to add |
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 |
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 48 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().
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.
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 119 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().
Ptr< YansWifiChannel > ns3::YansWifiChannelHelper::Create | ( | void | ) | const |
Create a channel based on the configuration parameters set previously.
Definition at line 96 of file yans-wifi-helper.cc.
References third::channel, ns3::ObjectFactory::Create(), m_propagationDelay, m_propagationLoss, and ns3::PropagationLossModel::SetNext().
Referenced by OcbWifiMacTestCase::ConfigureAdhocMode(), OcbWifiMacTestCase::ConfigureApStaMode(), OcbWifiMacTestCase::ConfigureOcbMode(), BatteryLifetimeTest::ConstantLoadTest(), PeerManagementProtocolRegressionTest::CreateDevices(), Bug772ChainTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), AodvExample::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), DsdvManetExample::CreateDevices(), ChainRegressionTest::CreateDevices(), MeshTest::CreateNodes(), WaveNetDeviceExample::CreateWaveNodes(), TestCaseHelper::CreatWaveDevice(), BasicEnergyDepletionTest::DepletionTestCase(), WifiMsduAggregatorThroughputTest::DoRun(), WifiAcMappingTest::DoRun(), ns3::aodv::LoopbackTestCase::DoRun(), Experiment::Run(), RoutingExperiment::Run(), VanetRoutingExperiment::SetupAdhocDevices(), BatteryLifetimeTest::VariableLoadTest(), and WifiInterferenceTestCase::WifiSimpleInterference().
|
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 39 of file yans-wifi-helper.cc.
References AddPropagationLoss(), and SetPropagationDelay().
Referenced by WaveNetDeviceExample::CreateWaveNodes(), ns3::aodv::LoopbackTestCase::DoRun(), and Experiment::Run().
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 () |
||
) |
name | the name of the model to set |
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 |
Configure a propagation delay for this channel.
Definition at line 72 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().
|
private |
propagation delay model
Definition at line 146 of file yans-wifi-helper.h.
Referenced by Create(), and SetPropagationDelay().
|
private |
vector of propagation loss models
Definition at line 145 of file yans-wifi-helper.h.
Referenced by AddPropagationLoss(), and Create().