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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
#ifndef YANS_WIFI_HELPER_H
21
#define YANS_WIFI_HELPER_H
22
23
#include "
wifi-helper.h
"
24
#include "ns3/trace-helper.h"
25
#include "ns3/yans-wifi-channel.h"
26
#include "ns3/deprecated.h"
27
28
namespace
ns3 {
29
37
class
YansWifiChannelHelper
38
{
39
public
:
44
YansWifiChannelHelper
();
45
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
140
int64_t
AssignStreams
(
Ptr<YansWifiChannel>
c, int64_t stream);
141
142
143
private
:
144
std::vector<ObjectFactory>
m_propagationLoss
;
145
ObjectFactory
m_propagationDelay
;
146
};
147
158
class
YansWifiPhyHelper
:
public
WifiPhyHelper
,
159
public
PcapHelperForDevice
,
160
public
AsciiTraceHelperForDevice
161
{
162
public
:
167
YansWifiPhyHelper
();
168
172
static
YansWifiPhyHelper
Default
(
void
);
173
179
void
SetChannel
(
Ptr<YansWifiChannel>
channel);
185
void
SetChannel
(std::string channelName);
192
void
Set
(std::string name,
const
AttributeValue
&v);
214
void
SetErrorRateModel
(std::string name,
215
std::string n0 =
""
,
const
AttributeValue
&v0 =
EmptyAttributeValue
(),
216
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
217
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
218
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
219
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
220
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
221
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
222
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
());
223
229
enum
SupportedPcapDataLinkTypes
230
{
231
DLT_IEEE802_11
=
PcapHelper::DLT_IEEE802_11
,
232
DLT_PRISM_HEADER
=
PcapHelper::DLT_PRISM_HEADER
,
233
DLT_IEEE802_11_RADIO
=
PcapHelper::DLT_IEEE802_11_RADIO
234
};
235
245
void
SetPcapDataLinkType
(
enum
SupportedPcapDataLinkTypes
dlt);
246
247
private
:
255
virtual
Ptr<WifiPhy>
Create
(
Ptr<Node>
node,
Ptr<WifiNetDevice>
device)
const
;
256
268
virtual
void
EnablePcapInternal
(std::string prefix,
269
Ptr<NetDevice>
nd,
270
bool
promiscuous,
271
bool
explicitFilename);
272
285
virtual
void
EnableAsciiInternal
(
Ptr<OutputStreamWrapper>
stream,
286
std::string prefix,
287
Ptr<NetDevice>
nd,
288
bool
explicitFilename);
289
290
ObjectFactory
m_phy
;
291
ObjectFactory
m_errorRateModel
;
292
Ptr<YansWifiChannel>
m_channel
;
293
uint32_t
m_pcapDlt
;
294
};
295
296
}
// namespace ns3
297
298
#endif
/* YANS_WIFI_HELPER_H */
src
wifi
helper
yans-wifi-helper.h
Generated on Tue Nov 13 2012 10:32:24 for ns-3 by
1.8.1.2