ns3::YansWifiPhyHelper Class Reference

Make it easy to create and manager PHY objects for the yans model. More...

#include <yans-wifi-helper.h>

Inheritance diagram for ns3::YansWifiPhyHelper:
Inheritance graph
[legend]
Collaboration diagram for ns3::YansWifiPhyHelper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 YansWifiPhyHelper ()
void SetChannel (Ptr< YansWifiChannel > channel)
void Set (std::string name, const AttributeValue &v)
void SetErrorRateModel (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 YansWifiPhyHelper Default (void)
static void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid)
static void EnablePcap (std::string filename, NetDeviceContainer d)
static void EnablePcap (std::string filename, NodeContainer n)
static void EnablePcapAll (std::string filename)
static void EnableAscii (std::ostream &os, uint32_t nodeid, uint32_t deviceid)
static void EnableAscii (std::ostream &os, NetDeviceContainer d)
static void EnableAscii (std::ostream &os, NodeContainer n)
static void EnableAsciiAll (std::ostream &os)

Private Member Functions

virtual Ptr< WifiPhyCreate (Ptr< Node > node, Ptr< WifiNetDevice > device) const

Private Attributes

ObjectFactory m_phy
ObjectFactory m_errorRateModel
Ptr< YansWifiChannelm_channel

Detailed Description

Make it easy to create and manager PHY objects for the yans model.

The yans PHY model is described in "Yet Another Network Simulator", http://cutebugs.net/files/wns2-yans.pdf

The Pcap and ascii traces generated by the EnableAscii and EnablePcap methods defined in this class correspond to PHY-level traces. That is, they capture traffic at the top of the PHY layer, just below the MAC layer.

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


Constructor & Destructor Documentation

ns3::YansWifiPhyHelper::YansWifiPhyHelper (  ) 

Create a phy helper without any parameter set. The user must set them all to be able to call Install later.

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


Member Function Documentation

Ptr< WifiPhy > ns3::YansWifiPhyHelper::Create ( Ptr< Node node,
Ptr< WifiNetDevice device 
) const [private, virtual]
Parameters:
node the node on which we wish to create a wifi PHY
device the device within which this PHY will be created
Returns:
a newly-created PHY object.

This method implements the pure virtual method defined in ns3::WifiPhyHelper.

Implements ns3::WifiPhyHelper.

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

YansWifiPhyHelper ns3::YansWifiPhyHelper::Default ( void   )  [static]

Create a phy helper in a default working state.

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

void ns3::YansWifiPhyHelper::EnableAscii ( std::ostream &  os,
NodeContainer  n 
) [static]
Parameters:
os output stream
n node container

Enable ascii output on each device which is of the ns3::WifiNetDevice type and which is located in one of the input node and dump that to the specified stdc++ output stream.

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

References ns3::NetDeviceContainer::Begin(), EnableAscii(), and ns3::NetDeviceContainer::End().

void ns3::YansWifiPhyHelper::EnableAscii ( std::ostream &  os,
NetDeviceContainer  d 
) [static]
Parameters:
os output stream
d device container

Enable ascii output on each device which is of the ns3::WifiNetDevice type and which is located in the input device container and dump that to the specified stdc++ output stream.

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

References ns3::AsciiPhyRxOkEvent(), ns3::AsciiPhyTxEvent(), ns3::Config::Connect(), ns3::Packet::EnablePrinting(), and ns3::MakeBoundCallback().

void ns3::YansWifiPhyHelper::EnableAscii ( std::ostream &  os,
uint32_t  nodeid,
uint32_t  deviceid 
) [static]
Parameters:
os output stream
nodeid the id of the node to generate ascii output for.
deviceid the id of the device to generate ascii output for.

Enable ascii output on the specified deviceid within the specified nodeid if it is of type ns3::WifiNetDevice and dump that to the specified stdc++ output stream.

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

Referenced by EnableAscii().

void ns3::YansWifiPhyHelper::EnableAsciiAll ( std::ostream &  os  )  [static]
Parameters:
os output stream

Enable ascii output on each device which is of the ns3::WifiNetDevice type and dump that to the specified stdc++ output stream.

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

References ns3::NetDeviceContainer::Add().

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
NodeContainer  n 
) [static]
Parameters:
filename filename prefix to use for pcap files.
n container of nodes.

Enable pcap output on each device which is of the ns3::WifiNetDevice type and which is located in one of the input nodes.

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

References ns3::NetDeviceContainer::Begin(), EnablePcap(), and ns3::NetDeviceContainer::End().

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
NetDeviceContainer  d 
) [static]
Parameters:
filename filename prefix to use for pcap files.
d container of devices of type ns3::WifiNetDevice

Enable pcap output on each input device which is of the ns3::WifiNetDevice type.

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

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
uint32_t  nodeid,
uint32_t  deviceid 
) [static]
Parameters:
filename filename prefix to use for pcap files.
nodeid the id of the node to generate pcap output for.
deviceid the id of the device to generate pcap output for.

Generate a pcap file which contains the link-level data observed by the specified deviceid within the specified nodeid. The pcap data is stored in the file prefix-nodeid-deviceid.pcap.

This method should be invoked after the network topology has been fully constructed.

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

Referenced by EnablePcap().

void ns3::YansWifiPhyHelper::EnablePcapAll ( std::string  filename  )  [static]
Parameters:
filename filename prefix to use for pcap files.

Enable pcap output on each device which is of the ns3::WifiNetDevice type

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

References ns3::NetDeviceContainer::Add().

void ns3::YansWifiPhyHelper::Set ( std::string  name,
const AttributeValue v 
)
Parameters:
name the name of the attribute to set
v the value of the attribute

Set an attribute of the underlying PHY object.

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

void ns3::YansWifiPhyHelper::SetChannel ( Ptr< YansWifiChannel channel  ) 
Parameters:
channel the channel to associate to this helper

Every PHY created by a call to Install is associated to this channel.

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

void ns3::YansWifiPhyHelper::SetErrorRateModel ( 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:
name the name of the error rate 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

Set the error rate model and its attributes to use when Install is called.

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

References m_channel.


Member Data Documentation

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

Referenced by SetErrorRateModel().

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

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


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:35 2009 for NS-3 by  doxygen 1.6.3