A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
wifi-helper.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Author: Mirko Banchi <mk.banchi@gmail.com>
21  */
22 #ifndef WIFI_HELPER_H
23 #define WIFI_HELPER_H
24 
25 #include <string>
26 #include "ns3/attribute.h"
27 #include "ns3/object-factory.h"
28 #include "ns3/node-container.h"
29 #include "ns3/net-device-container.h"
30 #include "ns3/wifi-phy-standard.h"
31 #include "ns3/trace-helper.h"
32 #include "ns3/common-cognitive-header.h"
33 #include "ns3/pu-model.h"
34 #include "ns3/repository.h"
35 #include "ns3/mobility-helper.h"
36 
37 namespace ns3 {
38 
39 class WifiPhy;
40 class WifiMac;
41 class WifiNetDevice;
42 class Node;
43 
51 {
52 public:
53  virtual ~WifiPhyHelper ();
54 
63  virtual Ptr<WifiPhy> Create (Ptr<Node> node, Ptr<WifiNetDevice> device) const = 0;
64 };
65 
73 {
74 public:
75  virtual ~WifiMacHelper ();
82  virtual Ptr<WifiMac> Create (void) const = 0;
83 };
84 
93 {
94 public:
99  WifiHelper ();
100 
108  static WifiHelper Default (void);
109 
132  void SetRemoteStationManager (std::string type,
133  std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
134  std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
135  std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
136  std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
137  std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
138  std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
139  std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
140  std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
148  const WifiMacHelper &mac, NodeContainer c) const;
156  const WifiMacHelper &mac, Ptr<Node> node) const;
164  const WifiMacHelper &mac, std::string nodeName) const;
165 
179  const MobilityHelper &mobiHelper,
180  const WifiPhyHelper &phy, const WifiMacHelper &mac,
181  NodeContainer c) const;
182 
188  void SetStandard (enum WifiPhyStandard standard);
189 
193  static void EnableLogComponents (void);
194 
209  int64_t AssignStreams (NetDeviceContainer c, int64_t stream);
210 
211 private:
212  ObjectFactory m_stationManager;
213  enum WifiPhyStandard m_standard;
214 };
215 
216 } // namespace ns3
217 
218 #endif /* WIFI_HELPER_H */
NetDeviceContainer InstallCR(Ptr< Repository > repo, Ptr< PUModel > puModel, const MobilityHelper &mobiHelper, const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const
Definition: wifi-helper.cc:137
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())
Definition: wifi-helper.cc:68
Hold a value for an Attribute.
Definition: attribute.h:51
create PHY objects
Definition: wifi-helper.h:50
virtual Ptr< WifiMac > Create(void) const =0
helps to create WifiNetDevice objects
Definition: wifi-helper.h:92
NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const
Definition: wifi-helper.cc:97
A class for an empty attribute value.
Definition: attribute.h:204
holds a vector of ns3::NetDevice pointers
void SetStandard(enum WifiPhyStandard standard)
Definition: wifi-helper.cc:91
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Definition: wifi-helper.cc:211
keep track of a set of node pointers.
virtual Ptr< WifiPhy > Create(Ptr< Node > node, Ptr< WifiNetDevice > device) const =0
create MAC objects
Definition: wifi-helper.h:72
Helper class used to assign positions and mobility models to nodes.
instantiate subclasses of ns3::Object.
static void EnableLogComponents(void)
Definition: wifi-helper.cc:176
static WifiHelper Default(void)
Definition: wifi-helper.cc:60