ns3::YansWifiPhyHelper Class Reference

Make it easy to create and manage 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 Types

enum  PcapFormat

Public Member Functions

 YansWifiPhyHelper ()
void SetChannel (Ptr< YansWifiChannel > channel)
void SetChannel (std::string channelName)
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())
void SetPcapFormat (enum PcapFormat format)
void EnablePcap (std::string filename, uint32_t nodeid, uint32_t deviceid)
void EnablePcap (std::string filename, Ptr< NetDevice > nd)
void EnablePcap (std::string filename, std::string ndName)
void EnablePcap (std::string filename, NetDeviceContainer d)
void EnablePcap (std::string filename, NodeContainer n)
void EnablePcapAll (std::string filename)

Static Public Member Functions

static YansWifiPhyHelper Default (void)
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


Detailed Description

Make it easy to create and manage 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.


Member Enumeration Documentation

PCAP formats


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.


Member Function Documentation

virtual 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.

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

Create a phy helper in a default working state.

static 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.

static 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.

static 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.

static 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.

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
NodeContainer  n 
)

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.

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
NetDeviceContainer  d 
)

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.

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
std::string  ndName 
)

Parameters:
filename filename prefix to use for pcap files.
ndName Name of net device on which you want to enable tracing.
Enable pcap output on each input device which is of the ns3::WifiNetDevice type.

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
Ptr< NetDevice nd 
)

Parameters:
filename filename prefix to use for pcap files.
nd Net device on which you want to enable tracing.
Enable pcap output on each input device which is of the ns3::WifiNetDevice type.

void ns3::YansWifiPhyHelper::EnablePcap ( std::string  filename,
uint32_t  nodeid,
uint32_t  deviceid 
)

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. By default, no PHY layer information is provided. An optional header with PHY layer information, such as the radiotap or the prism header, can be used by invoking SetPcapFormat().

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

void ns3::YansWifiPhyHelper::EnablePcapAll ( std::string  filename  ) 

Parameters:
filename filename prefix to use for pcap files.
Enable pcap output on each device which is of the ns3::WifiNetDevice type

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.

void ns3::YansWifiPhyHelper::SetChannel ( std::string  channelName  ) 

Parameters:
channelName The name of the channel to associate to this helper
Every PHY created by a call to Install is associated to this channel.

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.

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.

void ns3::YansWifiPhyHelper::SetPcapFormat ( enum PcapFormat  format  ) 

Set the format of PCAP traces to be used. This function has to be called before EnablePcap(), so that the header of the pcap file can be written correctly.

In madwifi, this corresponds to setting /proc/sys/net/ath0/dev_type to a particular value. See http://madwifi-project.org/wiki/UserDocs/MonitorModeInterface for more information.

Parameters:
format the PcapFormat to be used


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

Generated on Fri Apr 9 15:01:10 2010 for NS-3 by  doxygen 1.5.8