A Discrete-Event Network Simulator
API
wimax-helper.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007,2008, 2009 INRIA, UDCAST
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18  * Amine Ismail <amine.ismail@sophia.inria.fr>
19  */
20 
21 #ifndef WIMAX_HELPER_H
22 #define WIMAX_HELPER_H
23 
24 #include "ns3/bs-net-device.h"
25 #include "ns3/bs-scheduler-rtps.h"
26 #include "ns3/bs-scheduler-simple.h"
27 #include "ns3/bs-scheduler.h"
28 #include "ns3/bs-uplink-scheduler-mbqos.h"
29 #include "ns3/bs-uplink-scheduler-rtps.h"
30 #include "ns3/bs-uplink-scheduler-simple.h"
31 #include "ns3/bs-uplink-scheduler.h"
32 #include "ns3/net-device-container.h"
33 #include "ns3/node-container.h"
34 #include "ns3/object-factory.h"
35 #include "ns3/propagation-loss-model.h"
36 #include "ns3/service-flow.h"
37 #include "ns3/simple-ofdm-wimax-channel.h"
38 #include "ns3/ss-net-device.h"
39 #include "ns3/trace-helper.h"
40 
41 #include <string>
42 
43 namespace ns3
44 {
45 
46 class WimaxChannel;
47 class WimaxPhy;
48 class UplinkScheduler;
49 
59 {
60  public:
66  {
70  };
71 
76  enum PhyType
77  {
79  };
80 
86  {
91  };
92 
96  WimaxHelper();
97  ~WimaxHelper() override;
109  uint32_t nodeid,
110  uint32_t deviceid,
111  char* netdevice,
112  char* connection);
113 
121 
130 
139 
153  PhyType phyType,
154  SchedulerType schedulerType);
155 
169  NetDeviceType deviceType,
170  PhyType phyType,
172  SchedulerType schedulerType);
186  NetDeviceType deviceType,
187  PhyType phyType,
188  SchedulerType schedulerType,
189  double frameDuration);
190 
197 
205 
215  char* SNRTraceFilePath,
216  bool activateLoss);
217 
226  Ptr<WimaxPhy> CreatePhy(PhyType phyType, char* SNRTraceFilePath, bool activateLoss);
240  NetDeviceType deviceType,
241  PhyType phyType,
243  SchedulerType schedulerType);
244 
254  ServiceFlow::SchedulingType schedulinType,
255  IpcsClassifierRecord classifier);
256 
260  static void EnableLogComponents();
261 
270  int64_t AssignStreams(int64_t stream);
271 
283  int64_t AssignStreams(NetDeviceContainer c, int64_t stream);
284 
285  private:
293  static void AsciiRxEvent(Ptr<OutputStreamWrapper> stream,
294  std::string path,
295  Ptr<const Packet> packet,
296  const Mac48Address& source);
304  static void AsciiTxEvent(Ptr<OutputStreamWrapper> stream,
305  std::string path,
306  Ptr<const Packet> packet,
307  const Mac48Address& dest);
319  void EnablePcapInternal(std::string prefix,
320  Ptr<NetDevice> nd,
321  bool explicitFilename,
322  bool promiscuous) override;
323 
336  std::string prefix,
337  Ptr<NetDevice> nd,
338  bool explicitFilename) override;
339 
341 };
342 
343 } // namespace ns3
344 
345 #endif /* WIMAX_HELPER_H */
Base class providing common user-level ascii trace operations for helpers representing net devices.
Definition: trace-helper.h:729
IpcsClassifierRecord class.
an EUI-48 address
Definition: mac48-address.h:46
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Base class providing common user-level pcap operations for helpers representing net devices.
Definition: trace-helper.h:624
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:62
Direction
Direction enumeration.
Definition: service-flow.h:47
helps to manage and create WimaxNetDevice objects
Definition: wimax-helper.h:59
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
Definition: wimax-helper.h:86
@ SCHED_TYPE_RTPS
A simple scheduler - rtPS based scheduler.
Definition: wimax-helper.h:88
@ SCHED_TYPE_MBQOS
An migration-based uplink scheduler.
Definition: wimax-helper.h:89
@ SCHED_TYPE_SIMPLE
A simple priority-based FCFS scheduler.
Definition: wimax-helper.h:87
NetDeviceType
Net Device Type Distinguish a subscriber station(SS) device from base station(BS) device.
Definition: wimax-helper.h:66
@ DEVICE_TYPE_SUBSCRIBER_STATION
Subscriber station(SS) device.
Definition: wimax-helper.h:67
@ DEVICE_TYPE_BASE_STATION
Base station(BS) device.
Definition: wimax-helper.h:68
Ptr< WimaxChannel > m_channel
wifi channel
Definition: wimax-helper.h:340
Ptr< WimaxPhy > CreatePhyWithoutChannel(PhyType phyType)
Ptr< UplinkScheduler > CreateUplinkScheduler(SchedulerType schedulerType)
void SetPropagationLossModel(SimpleOfdmWimaxChannel::PropModel propagationModel)
Set the propagation and loss model of the channel.
PhyType
WiMAX Physical layer WiMAX Physical layers with different levels of detail.
Definition: wimax-helper.h:77
~WimaxHelper() override
Definition: wimax-helper.cc:49
Ptr< BSScheduler > CreateBSScheduler(SchedulerType schedulerType)
Ptr< WimaxPhy > CreatePhy(PhyType phyType)
Definition: wimax-helper.cc:80
WimaxHelper()
Create a Wimax helper in an empty state.
Definition: wimax-helper.cc:44
void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) override
Enable ascii trace output on the indicated net device.
static void AsciiTxEvent(Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &dest)
ASCII trace transmit event.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
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:54
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
static void EnableLogComponents()
Helper to enable all WimaxNetDevice log components with one statement.
static void AsciiRxEvent(Ptr< OutputStreamWrapper > stream, std::string path, Ptr< const Packet > packet, const Mac48Address &source)
ASCII trace receive event.
void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool explicitFilename, bool promiscuous) override
Enable pcap output on the indicated net device.
ServiceFlow CreateServiceFlow(ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulinType, IpcsClassifierRecord classifier)
Creates a transport service flow.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
channel
Definition: third.py:88