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
wimax-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007,2008, 2009 INRIA, UDCAST
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
* Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19
* Amine Ismail <amine.ismail@sophia.inria.fr>
20
*/
21
22
#ifndef WIMAX_HELPER_H
23
#define WIMAX_HELPER_H
24
25
#include <string>
26
#include "ns3/object-factory.h"
27
#include "ns3/node-container.h"
28
#include "ns3/net-device-container.h"
29
#include "ns3/bs-net-device.h"
30
#include "ns3/ss-net-device.h"
31
#include "ns3/deprecated.h"
32
#include "ns3/service-flow.h"
33
#include "ns3/propagation-loss-model.h"
34
#include "ns3/simple-ofdm-wimax-channel.h"
35
#include "ns3/bs-uplink-scheduler.h"
36
#include "ns3/bs-uplink-scheduler-mbqos.h"
37
#include "ns3/bs-uplink-scheduler-simple.h"
38
#include "ns3/bs-uplink-scheduler-rtps.h"
39
#include "ns3/bs-scheduler.h"
40
#include "ns3/bs-scheduler-simple.h"
41
#include "ns3/bs-scheduler-rtps.h"
42
#include "ns3/trace-helper.h"
43
44
namespace
ns3 {
45
46
class
WimaxChannel;
47
class
WimaxPhy;
48
class
UplinkScheduler;
49
50
59
class
WimaxHelper
:
public
PcapHelperForDevice
,
public
AsciiTraceHelperForDevice
60
{
61
public
:
66
enum
NetDeviceType
67
{
68
DEVICE_TYPE_SUBSCRIBER_STATION
,
69
DEVICE_TYPE_BASE_STATION
71
};
72
77
enum
PhyType
78
{
79
SIMPLE_PHY_TYPE_OFDM
80
};
81
86
enum
SchedulerType
87
{
88
SCHED_TYPE_SIMPLE
,
89
SCHED_TYPE_RTPS
,
90
SCHED_TYPE_MBQOS
93
};
97
WimaxHelper
(
void
);
98
~WimaxHelper
(
void
);
109
static
void
EnableAsciiForConnection
(
Ptr<OutputStreamWrapper>
oss,
110
uint32_t nodeid,
111
uint32_t deviceid,
112
char
*netdevice,
113
char
*connection);
114
121
Ptr<WimaxPhy>
CreatePhy
(
PhyType
phyType);
122
130
Ptr<UplinkScheduler>
CreateUplinkScheduler
(
SchedulerType
schedulerType);
131
139
Ptr<BSScheduler>
CreateBSScheduler
(
SchedulerType
schedulerType);
140
151
NetDeviceContainer
Install
(
NodeContainer
c,
NetDeviceType
type,
PhyType
phyType,
SchedulerType
schedulerType);
152
164
NetDeviceContainer
Install
(
NodeContainer
c,
165
NetDeviceType
deviceType,
166
PhyType
phyType,
167
Ptr<WimaxChannel>
channel,
168
SchedulerType
schedulerType);
180
NetDeviceContainer
Install
(
NodeContainer
c,
181
NetDeviceType
deviceType,
182
PhyType
phyType,
183
SchedulerType
schedulerType,
184
double
frameDuration);
185
191
void
SetPropagationLossModel
(
SimpleOfdmWimaxChannel::PropModel
propagationModel);
192
199
Ptr<WimaxPhy>
CreatePhyWithoutChannel
(
PhyType
phyType);
200
209
Ptr<WimaxPhy>
CreatePhyWithoutChannel
(
PhyType
phyType,
char
* SNRTraceFilePath,
bool
activateLoss);
210
219
Ptr<WimaxPhy>
CreatePhy
(
PhyType
phyType,
char
* SNRTraceFilePath,
bool
activateLoss);
231
Ptr<WimaxNetDevice>
Install
(
Ptr<Node>
node,
232
NetDeviceType
deviceType,
233
PhyType
phyType,
234
Ptr<WimaxChannel>
channel,
235
SchedulerType
schedulerType);
236
244
ServiceFlow
CreateServiceFlow
(
ServiceFlow::Direction
direction,
245
ServiceFlow::SchedulingType
schedulinType,
246
IpcsClassifierRecord
classifier);
247
251
static
void
EnableLogComponents
(
void
);
252
261
int64_t
AssignStreams
(int64_t stream);
262
274
int64_t
AssignStreams
(
NetDeviceContainer
c, int64_t stream);
275
276
private
:
277
static
void
AsciiRxEvent
(
Ptr<OutputStreamWrapper>
stream, std::string path,
Ptr<const Packet>
packet,
const
Mac48Address
&source);
278
static
void
AsciiTxEvent
(
Ptr<OutputStreamWrapper>
stream, std::string path,
Ptr<const Packet>
packet,
const
Mac48Address
&dest);
291
virtual
void
EnablePcapInternal
(std::string prefix,
Ptr<NetDevice>
nd,
bool
explicitFilename,
bool
promiscuous);
292
305
virtual
void
EnableAsciiInternal
(
Ptr<OutputStreamWrapper>
stream,
306
std::string prefix,
307
Ptr<NetDevice>
nd,
308
bool
explicitFilename);
309
310
Ptr<WimaxChannel>
m_channel
;
311
};
312
313
}
// namespace ns3
314
315
#endif
/* WIMAX_HELPER_H */
src
wimax
helper
wimax-helper.h
Generated on Tue Oct 9 2012 16:45:49 for ns-3 by
1.8.1.2