A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
yans-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
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
#ifndef YANS_WIFI_HELPER_H
22
#define YANS_WIFI_HELPER_H
23
24
#include "
wifi-helper.h
"
25
#include "ns3/yans-wifi-channel.h"
26
27
namespace
ns3
{
28
36
class
YansWifiChannelHelper
37
{
38
public
:
43
YansWifiChannelHelper
();
44
52
static
YansWifiChannelHelper
Default
(
void
);
53
82
void
AddPropagationLoss
(std::string name,
83
std::string n0 =
""
,
const
AttributeValue
&v0 =
EmptyAttributeValue
(),
84
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
85
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
86
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
87
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
88
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
89
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
90
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
());
112
void
SetPropagationDelay
(std::string name,
113
std::string n0 =
""
,
const
AttributeValue
&v0 =
EmptyAttributeValue
(),
114
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
115
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
116
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
117
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
118
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
119
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
120
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
());
121
127
Ptr<YansWifiChannel>
Create
(
void
)
const
;
128
141
int64_t
AssignStreams
(
Ptr<YansWifiChannel>
c, int64_t stream);
142
143
144
private
:
145
std::vector<ObjectFactory>
m_propagationLoss
;
146
ObjectFactory
m_propagationDelay
;
147
};
148
149
160
class
YansWifiPhyHelper
:
public
WifiPhyHelper
161
{
162
public
:
166
YansWifiPhyHelper
();
167
173
void
SetChannel
(
Ptr<YansWifiChannel>
channel
);
179
void
SetChannel
(std::string channelName);
180
181
private
:
189
Ptr<WifiPhy>
Create
(
Ptr<Node>
node,
Ptr<NetDevice>
device)
const override
;
190
191
Ptr<YansWifiChannel>
m_channel
;
192
};
193
194
}
//namespace ns3
195
196
#endif
/* YANS_WIFI_HELPER_H */
ns3::YansWifiChannelHelper::Default
static YansWifiChannelHelper Default(void)
Create a channel helper in a default working state.
Definition:
yans-wifi-helper.cc:41
ns3::YansWifiPhyHelper
Make it easy to create and manage PHY objects for the YANS model.
Definition:
yans-wifi-helper.h:161
ns3::YansWifiChannelHelper::SetPropagationDelay
void SetPropagationDelay(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())
Definition:
yans-wifi-helper.cc:74
ns3::YansWifiChannelHelper::AssignStreams
int64_t AssignStreams(Ptr< YansWifiChannel > c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the channel.
Definition:
yans-wifi-helper.cc:121
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::YansWifiPhyHelper::YansWifiPhyHelper
YansWifiPhyHelper()
Create a PHY helper.
Definition:
yans-wifi-helper.cc:126
wifi-helper.h
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:69
third.channel
channel
Definition:
third.py:92
ns3::YansWifiChannelHelper::AddPropagationLoss
void AddPropagationLoss(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())
Definition:
yans-wifi-helper.cc:50
ns3::YansWifiPhyHelper::SetChannel
void SetChannel(Ptr< YansWifiChannel > channel)
Definition:
yans-wifi-helper.cc:134
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::YansWifiChannelHelper::Create
Ptr< YansWifiChannel > Create(void) const
Definition:
yans-wifi-helper.cc:98
ns3::YansWifiPhyHelper::m_channel
Ptr< YansWifiChannel > m_channel
YANS wifi channel.
Definition:
yans-wifi-helper.h:191
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::YansWifiChannelHelper::m_propagationDelay
ObjectFactory m_propagationDelay
propagation delay model
Definition:
yans-wifi-helper.h:146
ns3::YansWifiPhyHelper::Create
Ptr< WifiPhy > Create(Ptr< Node > node, Ptr< NetDevice > device) const override
Definition:
yans-wifi-helper.cc:147
ns3::EmptyAttributeValue
A class for an empty attribute value.
Definition:
attribute.h:233
ns3::YansWifiChannelHelper::m_propagationLoss
std::vector< ObjectFactory > m_propagationLoss
vector of propagation loss models
Definition:
yans-wifi-helper.h:145
ns3::WifiPhyHelper
create PHY objects
Definition:
wifi-helper.h:48
ns3::YansWifiChannelHelper
manage and create wifi channel objects for the YANS model.
Definition:
yans-wifi-helper.h:37
ns3::YansWifiChannelHelper::YansWifiChannelHelper
YansWifiChannelHelper()
Create a channel helper without any parameter set.
Definition:
yans-wifi-helper.cc:36
src
wifi
helper
yans-wifi-helper.h
Generated on Fri Oct 1 2021 17:03:42 for ns-3 by
1.8.20