src/helper/wifi-helper.cc
author Dean Armstrong <deanarm@gmail.com>
Thu, 02 Dec 2010 07:51:34 +0000
changeset 6673 ec22aa763e2d
parent 6359 9860e12062b7
child 6674 52f8688d6d01
permissions -rw-r--r--
Bug 978: Consolidate Wi-Fi MAC high functionality This change reorganises the Wi-Fi MAC high classes in attempt to reduce duplication of functionality that is required for more than one of the MAC high models. A new class called RegularWifiMac has been created. This derives from the abstract WifiMac, and is parent of AdhocWifiMac, StaWifiMac, ApWifiMac, and MeshWifiInterfaceMac. The QoS and non-QoS class variants are no longer, with a RegularWifiMac attribute "QosSupported" allowing selection between these two modes of operation. QosWifiMacHelper and NqosWifiMacHelper continue to work as previously. Updates to some regression traces are necessary because the reorganisation has led to random number streams being initialised in slightly different orders and thus over-the-air timing changing.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2833
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     2
/*
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     3
 * Copyright (c) 2008 INRIA
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
     4
 * Copyright (c) 2009 MIRKO BANCHI
2833
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     5
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     8
 * published by the Free Software Foundation;
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
     9
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    13
 * GNU General Public License for more details.
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    14
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    15
 * You should have received a copy of the GNU General Public License
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    16
 * along with this program; if not, write to the Free Software
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    18
 *
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    19
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
    20
 * Author: Mirko Banchi <mk.banchi@gmail.com>
2833
f3474fd850b2 add missing license headers
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2822
diff changeset
    21
 */
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    22
#include "wifi-helper.h"
2603
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    23
#include "ns3/wifi-net-device.h"
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    24
#include "ns3/wifi-mac.h"
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    25
#include "ns3/wifi-phy.h"
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    26
#include "ns3/wifi-remote-station-manager.h"
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    27
#include "ns3/wifi-channel.h"
3893
94f771c1373a split WifiChannel in WifiChannel + YansWifiChannel
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3073
diff changeset
    28
#include "ns3/yans-wifi-channel.h"
2603
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    29
#include "ns3/propagation-delay-model.h"
1308da4cb3bf move helpers to their own dir.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2602
diff changeset
    30
#include "ns3/propagation-loss-model.h"
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
#include "ns3/mobility-model.h"
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
#include "ns3/log.h"
2791
a2ab6517516e basic pcap output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2656
diff changeset
    33
#include "ns3/config.h"
2822
b7fc97e2f256 add ns2's stupid prefix on each ascii line output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2805
diff changeset
    34
#include "ns3/simulator.h"
4147
5d8530130930 rename object-names.{cc,h} to names.{cc,h} per convention
Craig Dowell <craigdo@ee.washington.edu>
parents: 4140
diff changeset
    35
#include "ns3/names.h"
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
NS_LOG_COMPONENT_DEFINE ("WifiHelper");
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    39
namespace ns3 {
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    41
WifiPhyHelper::~WifiPhyHelper ()
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    42
{}
2791
a2ab6517516e basic pcap output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2656
diff changeset
    43
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
    44
WifiMacHelper::~WifiMacHelper ()
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
    45
{}
2791
a2ab6517516e basic pcap output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2656
diff changeset
    46
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    47
WifiHelper::WifiHelper ()
4720
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
    48
  : m_standard (WIFI_PHY_STANDARD_80211a)
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    49
{}
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    50
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    51
WifiHelper
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    52
WifiHelper::Default (void)
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
{
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    54
  WifiHelper helper;
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    55
  helper.SetRemoteStationManager ("ns3::ArfWifiManager");
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    56
  return helper;
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    57
}
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    58
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    59
void 
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    60
WifiHelper::SetRemoteStationManager (std::string type,
3786
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    61
                                     std::string n0, const AttributeValue &v0,
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    62
                                     std::string n1, const AttributeValue &v1,
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    63
                                     std::string n2, const AttributeValue &v2,
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    64
                                     std::string n3, const AttributeValue &v3,
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    65
                                     std::string n4, const AttributeValue &v4,
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    66
                                     std::string n5, const AttributeValue &v5,
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    67
                                     std::string n6, const AttributeValue &v6,
9f384deadb46 replace \t with 8 spaces.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3553
diff changeset
    68
                                     std::string n7, const AttributeValue &v7)
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    69
{
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
  m_stationManager = ObjectFactory ();
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    71
  m_stationManager.SetTypeId (type);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    72
  m_stationManager.Set (n0, v0);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    73
  m_stationManager.Set (n1, v1);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
  m_stationManager.Set (n2, v2);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    75
  m_stationManager.Set (n3, v3);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    76
  m_stationManager.Set (n4, v4);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    77
  m_stationManager.Set (n5, v5);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    78
  m_stationManager.Set (n6, v6);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    79
  m_stationManager.Set (n7, v7);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    80
}
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    81
4720
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
    82
void 
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
    83
WifiHelper::SetStandard (enum WifiPhyStandard standard)
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
    84
{
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
    85
  m_standard = standard;
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
    86
}
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
    87
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    88
NetDeviceContainer 
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
    89
WifiHelper::Install (const WifiPhyHelper &phyHelper,
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
    90
                     const WifiMacHelper &macHelper, NodeContainer c) const
2791
a2ab6517516e basic pcap output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2656
diff changeset
    91
{
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    92
  NetDeviceContainer devices;
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    93
  for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2804
diff changeset
    94
    {
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2804
diff changeset
    95
      Ptr<Node> node = *i;
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    96
      Ptr<WifiNetDevice> device = CreateObject<WifiNetDevice> ();
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    97
      Ptr<WifiRemoteStationManager> manager = m_stationManager.Create<WifiRemoteStationManager> ();
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
    98
      Ptr<WifiMac> mac = macHelper.Create ();
3912
4d1a61f80745 new wifi API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3909
diff changeset
    99
      Ptr<WifiPhy> phy = phyHelper.Create (node, device);
2656
b426a0e0355e call SetAddress during construction to assign MAC-level addresses.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2603
diff changeset
   100
      mac->SetAddress (Mac48Address::Allocate ());
4720
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
   101
      mac->ConfigureStandard (m_standard);
15221757964f bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 4605
diff changeset
   102
      phy->ConfigureStandard (m_standard);
2601
4297e8c61615 rework the Wifi API to not use a single WifiNetDevice::Setup method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2592
diff changeset
   103
      device->SetMac (mac);
4297e8c61615 rework the Wifi API to not use a single WifiNetDevice::Setup method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2592
diff changeset
   104
      device->SetPhy (phy);
4297e8c61615 rework the Wifi API to not use a single WifiNetDevice::Setup method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2592
diff changeset
   105
      device->SetRemoteStationManager (manager);
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   106
      node->AddDevice (device);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   107
      devices.Add (device);
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   108
      NS_LOG_DEBUG ("node="<<node<<", mob="<<node->GetObject<MobilityModel> ());
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2804
diff changeset
   109
    }
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   110
  return devices;
2805
cd246cf2edf3 add missing tracing helpers and doxygen
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2804
diff changeset
   111
}
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   112
3915
c798f3d5cb2e add WifiHelper::Install (Ptr<Node>) method per craig's comment.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3914
diff changeset
   113
NetDeviceContainer 
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   114
WifiHelper::Install (const WifiPhyHelper &phy,
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   115
                     const WifiMacHelper &mac, Ptr<Node> node) const
3915
c798f3d5cb2e add WifiHelper::Install (Ptr<Node>) method per craig's comment.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3914
diff changeset
   116
{
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   117
  return Install (phy, mac, NodeContainer (node));
3915
c798f3d5cb2e add WifiHelper::Install (Ptr<Node>) method per craig's comment.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 3914
diff changeset
   118
}
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   119
4140
6bbf05bf4826 Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents: 3915
diff changeset
   120
NetDeviceContainer 
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   121
WifiHelper::Install (const WifiPhyHelper &phy,
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   122
                     const WifiMacHelper &mac, std::string nodeName) const
4140
6bbf05bf4826 Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents: 3915
diff changeset
   123
{
6bbf05bf4826 Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents: 3915
diff changeset
   124
  Ptr<Node> node = Names::Find<Node> (nodeName);
4406
39f119de91ef Add WifiMacHelper
Mirko Banchi <mk.banchi@gmail.com>
parents: 4264
diff changeset
   125
  return Install (phy, mac, NodeContainer (node));
4140
6bbf05bf4826 Brute force all of the helpers to use object name service
Craig Dowell <craigdo@ee.washington.edu>
parents: 3915
diff changeset
   126
}
2791
a2ab6517516e basic pcap output
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2656
diff changeset
   127
4588
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   128
void
4605
fd44ff061631 bug 608: painful to enable logging of all wifi components
Tom Henderson <tomh@tomh.org>
parents: 4588
diff changeset
   129
WifiHelper::EnableLogComponents (void)
4588
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   130
{
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   131
  LogComponentEnable ("Aarfcd", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   132
  LogComponentEnable ("AdhocWifiMac", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   133
  LogComponentEnable ("AmrrWifiRemoteStation", LOG_LEVEL_ALL);
6673
ec22aa763e2d Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents: 6359
diff changeset
   134
  LogComponentEnable ("ApWifiMac", LOG_LEVEL_ALL);
4588
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   135
  LogComponentEnable ("ns3::ArfWifiManager", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   136
  LogComponentEnable ("Cara", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   137
  LogComponentEnable ("DcaTxop", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   138
  LogComponentEnable ("DcfManager", LOG_LEVEL_ALL);
6359
9860e12062b7 Align WifiHelper logging with new ErrorRateModel classes
Tom Henderson <tomh@tomh.org>
parents: 6049
diff changeset
   139
  LogComponentEnable ("DsssErrorRateModel", LOG_LEVEL_ALL);
4588
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   140
  LogComponentEnable ("EdcaTxopN", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   141
  LogComponentEnable ("InterferenceHelper", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   142
  LogComponentEnable ("Jakes", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   143
  LogComponentEnable ("MacLow", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   144
  LogComponentEnable ("MacRxMiddle", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   145
  LogComponentEnable ("MsduAggregator", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   146
  LogComponentEnable ("MsduStandardAggregator", LOG_LEVEL_ALL);
6359
9860e12062b7 Align WifiHelper logging with new ErrorRateModel classes
Tom Henderson <tomh@tomh.org>
parents: 6049
diff changeset
   147
  LogComponentEnable ("NistErrorRateModel", LOG_LEVEL_ALL);
4588
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   148
  LogComponentEnable ("OnoeWifiRemoteStation", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   149
  LogComponentEnable ("PropagationLossModel", LOG_LEVEL_ALL);
6673
ec22aa763e2d Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents: 6359
diff changeset
   150
  LogComponentEnable ("RegularWifiMac", LOG_LEVEL_ALL);
4588
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   151
  LogComponentEnable ("RraaWifiManager", LOG_LEVEL_ALL);
6673
ec22aa763e2d Bug 978: Consolidate Wi-Fi MAC high functionality
Dean Armstrong <deanarm@gmail.com>
parents: 6359
diff changeset
   152
  LogComponentEnable ("StaWifiMac", LOG_LEVEL_ALL);
4588
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   153
  LogComponentEnable ("SupportedRates", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   154
  LogComponentEnable ("WifiChannel", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   155
  LogComponentEnable ("WifiPhyStateHelper", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   156
  LogComponentEnable ("WifiPhy", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   157
  LogComponentEnable ("WifiRemoteStationManager", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   158
  LogComponentEnable ("YansErrorRateModel", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   159
  LogComponentEnable ("YansWifiChannel", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   160
  LogComponentEnable ("YansWifiPhy", LOG_LEVEL_ALL);
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   161
}
0698fdc1aaf9 WifiHelper method to enable all Wifi logging
Tom Henderson <tomh@tomh.org>
parents: 4406
diff changeset
   162
2524
db72c0e7743e port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   163
} // namespace ns3