22 #include "wifi-helper.h" 
   23 #include "ns3/wifi-net-device.h" 
   24 #include "ns3/wifi-mac.h" 
   25 #include "ns3/regular-wifi-mac.h" 
   26 #include "ns3/dca-txop.h" 
   27 #include "ns3/edca-txop-n.h" 
   28 #include "ns3/minstrel-wifi-manager.h" 
   29 #include "ns3/wifi-phy.h" 
   30 #include "ns3/wifi-remote-station-manager.h" 
   31 #include "ns3/wifi-channel.h" 
   32 #include "ns3/yans-wifi-channel.h" 
   33 #include "ns3/propagation-delay-model.h" 
   34 #include "ns3/propagation-loss-model.h" 
   35 #include "ns3/mobility-model.h" 
   37 #include "ns3/config.h" 
   38 #include "ns3/pointer.h" 
   39 #include "ns3/simulator.h" 
   40 #include "ns3/names.h" 
   46 WifiPhyHelper::~WifiPhyHelper ()
 
   50 WifiMacHelper::~WifiMacHelper ()
 
   80   m_stationManager.
Set (n0, v0);
 
   81   m_stationManager.
Set (n1, v1);
 
   82   m_stationManager.
Set (n2, v2);
 
   83   m_stationManager.
Set (n3, v3);
 
   84   m_stationManager.
Set (n4, v4);
 
   85   m_stationManager.
Set (n5, v5);
 
   86   m_stationManager.
Set (n6, v6);
 
   87   m_stationManager.
Set (n7, v7);
 
   93   m_standard = standard;
 
  101   for (NodeContainer::Iterator i = c.
Begin (); i != c.
End (); ++i)
 
  109       mac->ConfigureStandard (m_standard);
 
  110       phy->ConfigureStandard (m_standard);
 
  111       device->SetMac (mac);
 
  112       device->SetPhy (phy);
 
  113       device->SetRemoteStationManager (manager);
 
  115       devices.
Add (device);
 
  132   Ptr<Node> node = Names::Find<Node> (nodeName);
 
  145       for (NodeContainer::Iterator i = c.
Begin (); i != c.
End (); ++i)
 
  148           node->SetCognitiveRadio(
true);
 
  149             for (
int x=0; x<MAX_RADIO; x++)
 
  156               mac->ConfigureStandard (m_standard);
 
  157               if (x == TRANSMITTER_RADIO)
 
  158                 mac->SetTxRadio (
true);
 
  159               if (x == RECEIVER_RADIO)
 
  161                   mac->SetRxRadio(
true, node, repo, puModel, phy);
 
  163               phy->ConfigureStandard (m_standard);
 
  164               device->SetMac (mac);
 
  165               device->SetPhy (phy);
 
  166               device->SetRemoteStationManager (manager);
 
  168               devices.
Add (device);
 
  213   int64_t currentStream = stream;
 
  215   for (NetDeviceContainer::Iterator i = c.
Begin (); i != c.
End (); ++i)
 
  222           currentStream += wifi->GetPhy ()->AssignStreams (currentStream);
 
  229               currentStream += minstrel->AssignStreams (currentStream);
 
  238               rmac->GetAttribute (
"DcaTxop", ptr);
 
  240               currentStream += dcaTxop->AssignStreams (currentStream);
 
  242               rmac->GetAttribute (
"VO_EdcaTxopN", ptr);
 
  244               currentStream += vo_edcaTxopN->
AssignStreams (currentStream);
 
  246               rmac->GetAttribute (
"VI_EdcaTxopN", ptr);
 
  248               currentStream += vi_edcaTxopN->
AssignStreams (currentStream);
 
  250               rmac->GetAttribute (
"BE_EdcaTxopN", ptr);
 
  252               currentStream += be_edcaTxopN->
AssignStreams (currentStream);
 
  254               rmac->GetAttribute (
"BK_EdcaTxopN", ptr);
 
  256               currentStream += bk_edcaTxopN->
AssignStreams (currentStream);
 
  260   return (currentStream - stream);
 
Iterator Begin(void) const 
Get an iterator which refers to the first NetDevice in the container. 
NetDeviceContainer InstallCR(Ptr< Repository > repo, Ptr< PUModel > puModel, const MobilityHelper &mobiHelper, const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const 
void SetRemoteStationManager(std::string type, 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())
Hold a value for an Attribute. 
virtual Ptr< WifiMac > Create(void) const =0
#define NS_LOG_COMPONENT_DEFINE(name)
void SetTypeId(TypeId tid)
Iterator End(void) const 
Get an iterator which indicates past-the-last Node in the container. 
helps to create WifiNetDevice objects 
NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const 
Keep track of the current position and velocity of an object. 
void Install(Ptr< Node > node) const 
"Layout" a single node according to the current position allocator type. 
static Mac48Address Allocate(void)
Ptr< Object > Create(void) const 
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container. 
holds a vector of ns3::NetDevice pointers 
void SetStandard(enum WifiPhyStandard standard)
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
int64_t AssignStreams(int64_t stream)
hold a list of per-remote-station state. 
keep track of a set of node pointers. 
hold objects of type Ptr<T> 
Iterator Begin(void) const 
Get an iterator which refers to the first Node in the container. 
void Set(std::string name, const AttributeValue &value)
virtual Ptr< WifiPhy > Create(Ptr< Node > node, Ptr< WifiNetDevice > device) const =0
Helper class used to assign positions and mobility models to nodes. 
instantiate subclasses of ns3::Object. 
static void EnableLogComponents(void)
uint32_t AddDevice(Ptr< NetDevice > device)
#define NS_LOG_DEBUG(msg)
Iterator End(void) const 
Get an iterator which indicates past-the-last NetDevice in the container. 
handle packet fragmentation and retransmissions.This class implements the packet fragmentation and re...
Ptr< T > GetObject(void) const 
void LogComponentEnable(char const *name, enum LogLevel level)
static WifiHelper Default(void)