A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
wifi-helper.h
Go to the documentation of this file.
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
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20
* Mirko Banchi <mk.banchi@gmail.com>
21
*/
22
23
#ifndef WIFI_HELPER_H
24
#define WIFI_HELPER_H
25
26
#include <string>
27
#include "ns3/attribute.h"
28
#include "ns3/object-factory.h"
29
#include "ns3/node-container.h"
30
#include "ns3/net-device-container.h"
31
#include "ns3/wifi-phy-standard.h"
32
#include "ns3/trace-helper.h"
33
34
namespace
ns3
{
35
36
class
WifiPhy;
37
class
WifiMac;
38
class
WifiNetDevice;
39
class
Node;
40
47
class
WifiPhyHelper
48
{
49
public
:
50
virtual
~WifiPhyHelper
();
51
65
virtual
Ptr<WifiPhy>
Create
(
Ptr<Node>
node,
Ptr<NetDevice>
device)
const
= 0;
66
};
67
68
75
class
WifiMacHelper
76
{
77
public
:
78
virtual
~WifiMacHelper
();
85
virtual
Ptr<WifiMac>
Create
(
void
)
const
= 0;
86
};
87
88
96
class
WifiHelper
97
{
98
public
:
99
virtual
~WifiHelper
();
100
105
WifiHelper
();
106
114
static
WifiHelper
Default
(
void
);
115
138
void
SetRemoteStationManager
(std::string type,
139
std::string n0 =
""
,
const
AttributeValue
&v0 =
EmptyAttributeValue
(),
140
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
141
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
142
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
143
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
144
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
145
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
146
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
());
153
virtual
NetDeviceContainer
Install
(
const
WifiPhyHelper
&
phy
,
154
const
WifiMacHelper
&
mac
,
NodeContainer
c)
const
;
161
virtual
NetDeviceContainer
Install
(
const
WifiPhyHelper
&phy,
162
const
WifiMacHelper
&mac,
Ptr<Node>
node)
const
;
169
virtual
NetDeviceContainer
Install
(
const
WifiPhyHelper
&phy,
170
const
WifiMacHelper
&mac, std::string nodeName)
const
;
195
virtual
void
SetStandard
(
enum
WifiPhyStandard
standard);
196
200
static
void
EnableLogComponents
(
void
);
201
216
int64_t
AssignStreams
(
NetDeviceContainer
c, int64_t stream);
217
218
219
protected
:
220
ObjectFactory
m_stationManager
;
221
enum
WifiPhyStandard
m_standard
;
222
};
223
224
}
//namespace ns3
225
226
#endif
/* WIFI_HELPER_H */
ns3::WifiPhyHelper::~WifiPhyHelper
virtual ~WifiPhyHelper()
Definition:
wifi-helper.cc:48
ns3::Ptr< WifiPhy >
ns3::WifiHelper::SetRemoteStationManager
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:74
ns3::WifiHelper::~WifiHelper
virtual ~WifiHelper()
Definition:
wifi-helper.cc:56
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:68
ns3::WifiPhyHelper
create PHY objects
Definition:
wifi-helper.h:47
ns3::WifiMacHelper::Create
virtual Ptr< WifiMac > Create(void) const =0
ns3::WifiHelper
helps to create WifiNetDevice objects
Definition:
wifi-helper.h:96
ns3::WifiHelper::WifiHelper
WifiHelper()
Create a Wifi helper in an empty state: all its parameters must be set before calling ns3::WifiHelper...
Definition:
wifi-helper.cc:60
ns3::WifiHelper::Install
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer c) const
Definition:
wifi-helper.cc:103
ns3::WifiPhyStandard
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
Definition:
wifi-phy-standard.h:30
third.phy
tuple phy
Definition:
third.py:86
ns3::EmptyAttributeValue
A class for an empty attribute value.
Definition:
attribute.h:234
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:41
ns3::WifiHelper::SetStandard
virtual void SetStandard(enum WifiPhyStandard standard)
Definition:
wifi-helper.cc:97
ns3::WifiHelper::AssignStreams
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the Phy and Mac aspects ...
Definition:
wifi-helper.cc:178
third.mac
tuple mac
Definition:
third.py:92
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:38
ns3::WifiHelper::m_stationManager
ObjectFactory m_stationManager
Definition:
wifi-helper.h:220
ns3::WifiMacHelper
create MAC objects
Definition:
wifi-helper.h:75
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:47
ns3::WifiHelper::EnableLogComponents
static void EnableLogComponents(void)
Helper to enable all WifiNetDevice log components with one statement.
Definition:
wifi-helper.cc:143
ns3::WifiPhyHelper::Create
virtual Ptr< WifiPhy > Create(Ptr< Node > node, Ptr< NetDevice > device) const =0
ns3::WifiMacHelper::~WifiMacHelper
virtual ~WifiMacHelper()
Definition:
wifi-helper.cc:52
ns3::WifiHelper::m_standard
enum WifiPhyStandard m_standard
Definition:
wifi-helper.h:221
ns3::WifiHelper::Default
static WifiHelper Default(void)
Definition:
wifi-helper.cc:66
src
wifi
helper
wifi-helper.h
Generated on Wed Sep 30 2015 15:55:52 for ns-3 by
1.8.9.1