A Discrete-Event Network Simulator
API
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/service-flow.h"
32 #include "ns3/propagation-loss-model.h"
33 #include "ns3/simple-ofdm-wimax-channel.h"
34 #include "ns3/bs-uplink-scheduler.h"
35 #include "ns3/bs-uplink-scheduler-mbqos.h"
36 #include "ns3/bs-uplink-scheduler-simple.h"
37 #include "ns3/bs-uplink-scheduler-rtps.h"
38 #include "ns3/bs-scheduler.h"
39 #include "ns3/bs-scheduler-simple.h"
40 #include "ns3/bs-scheduler-rtps.h"
41 #include "ns3/trace-helper.h"
42 
43 namespace ns3 {
44 
45 class WimaxChannel;
46 class WimaxPhy;
47 class UplinkScheduler;
48 
49 
59 {
60 public:
66  {
70  };
71 
76  enum PhyType
77  {
79  };
80 
86  {
92  };
96  WimaxHelper (void);
97  ~WimaxHelper (void);
109  uint32_t nodeid,
110  uint32_t deviceid,
111  char *netdevice,
112  char *connection);
113 
120  Ptr<WimaxPhy> CreatePhy (PhyType phyType);
121 
130 
139 
151 
164  NetDeviceType deviceType,
165  PhyType phyType,
167  SchedulerType schedulerType);
180  NetDeviceType deviceType,
181  PhyType phyType,
182  SchedulerType schedulerType,
183  double frameDuration);
184 
191 
199 
208  Ptr<WimaxPhy> CreatePhyWithoutChannel (PhyType phyType, char * SNRTraceFilePath, bool activateLoss);
209 
218  Ptr<WimaxPhy> CreatePhy (PhyType phyType, char * SNRTraceFilePath, bool activateLoss);
231  NetDeviceType deviceType,
232  PhyType phyType,
234  SchedulerType schedulerType);
235 
244  ServiceFlow::SchedulingType schedulinType,
245  IpcsClassifierRecord classifier);
246 
250  static void EnableLogComponents (void);
251 
260  int64_t AssignStreams (int64_t stream);
261 
273  int64_t AssignStreams (NetDeviceContainer c, int64_t stream);
274 
275 private:
276  static void AsciiRxEvent (Ptr<OutputStreamWrapper> stream, std::string path, Ptr<const Packet> packet, const Mac48Address &source);
277  static void AsciiTxEvent (Ptr<OutputStreamWrapper> stream, std::string path, Ptr<const Packet> packet, const Mac48Address &dest);
289  virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool explicitFilename, bool promiscuous);
290 
302  virtual void EnableAsciiInternal (Ptr<OutputStreamWrapper> stream,
303  std::string prefix,
304  Ptr<NetDevice> nd,
305  bool explicitFilename);
306 
308 };
309 
310 } // namespace ns3
311 
312 #endif /* WIMAX_HELPER_H */
Base class providing common user-level ascii trace operations for helpers representing net devices...
Definition: trace-helper.h:641
tuple channel
Definition: third.py:85
An migration-based uplink scheduler.
Definition: wimax-helper.h:89
static void AsciiRxEvent(Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &source)
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
Definition: wimax-helper.h:85
NetDeviceType
Net Device Type Distinguish a subscriber station(SS) device from base station(BS) device...
Definition: wimax-helper.h:65
Base class providing common user-level pcap operations for helpers representing net devices...
Definition: trace-helper.h:552
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
A simple scheduler - rtPS based scheduler.
Definition: wimax-helper.h:88
static void EnableAsciiForConnection(Ptr< OutputStreamWrapper > oss, uint32_t nodeid, uint32_t deviceid, char *netdevice, char *connection)
Enable ascii trace output on the indicated net device for a given connection.
Definition: wimax-helper.cc:52
holds a vector of ns3::NetDevice pointers
Ptr< WimaxChannel > m_channel
Definition: wimax-helper.h:307
void SetPropagationLossModel(SimpleOfdmWimaxChannel::PropModel propagationModel)
Set the propagation and loss model of the channel.
Definition: wimax-helper.cc:94
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
an EUI-48 address
Definition: mac48-address.h:43
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
static void AsciiTxEvent(Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &dest)
ServiceFlow CreateServiceFlow(ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulinType, IpcsClassifierRecord classifier)
Creates a transport service flow.
Ptr< WimaxPhy > CreatePhyWithoutChannel(PhyType phyType)
Ptr< BSScheduler > CreateBSScheduler(SchedulerType schedulerType)
virtual void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool explicitFilename, bool promiscuous)
Enable pcap output on the indicated net device.
helps to manage and create WimaxNetDevice objects
Definition: wimax-helper.h:58
virtual void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename)
Enable ascii trace output on the indicated net device.
static void EnableLogComponents(void)
Helper to enable all WimaxNetDevice log components with one statement.
Ptr< WimaxPhy > CreatePhy(PhyType phyType)
Definition: wimax-helper.cc:74
Ptr< UplinkScheduler > CreateUplinkScheduler(SchedulerType schedulerType)
WimaxHelper(void)
Create a Wimax helper in an empty state.
Definition: wimax-helper.cc:43
PhyType
WiMAX Physical layer WiMAX Physical layers with different levels of detail.
Definition: wimax-helper.h:76
A simple priority-based FCFS scheduler.
Definition: wimax-helper.h:87