41#include "ns3/applications-module.h"
42#include "ns3/core-module.h"
43#include "ns3/global-route-manager.h"
44#include "ns3/internet-module.h"
45#include "ns3/mobility-module.h"
46#include "ns3/network-module.h"
47#include "ns3/wimax-module.h"
56main(
int argc,
char* argv[])
68 cmd.AddValue(
"nbSS",
"number of subscriber station to create", nbSS);
69 cmd.AddValue(
"scheduler",
"type of scheduler to use with the network devices", schedType);
70 cmd.AddValue(
"duration",
"duration of the simulation in seconds", duration);
71 cmd.AddValue(
"verbose",
"turn on all WimaxNetDevice log components",
verbose);
72 cmd.Parse(argc, argv);
100 ssDevs = wimax.
Install(ssNodes,
104 bsDevs = wimax.
Install(bsNodes,
111 for (
int i = 0; i < nbSS; i++)
125 stack.Install(bsNodes);
126 stack.Install(ssNodes);
129 address.SetBase(
"10.1.1.0",
"255.255.255.0");
143 for (
int i = 0; i < nbSS / 2; i++)
152 udpClient[i].SetAttribute(
"MaxPackets",
UintegerValue(1200));
156 clientApps[i] = udpClient[i].Install(ssNodes.
Get(i + (nbSS / 2)));
165 for (
int i = 0; i < nbSS / 2; i++)
180 ss[i]->AddServiceFlow(DlServiceFlowBe);
194 ss[i + (nbSS / 2)]->AddServiceFlow(ulServiceFlowBe);
204 for (
int i = 0; i < nbSS; i++)
holds a vector of ns3::Application pointers.
Parse command-line arguments.
aggregate IP/TCP/UDP functionality to existing Nodes.
IpcsClassifierRecord class.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ipv4 addresses are stored in host order in this class.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
a class to represent an Ipv4 address mask
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
Smart pointer class similar to boost::intrusive_ptr.
This class implements service flows as described by the IEEE-802.16 standard.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
SubscriberStationNetDevice subclass of WimaxNetDevice.
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set the most efficient modulation and coding scheme (MCS) supported by the device.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
Create a server application which waits for input UDP packets and uses the information carried into t...
Hold an unsigned integer type.
helps to manage and create WimaxNetDevice objects
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
@ SCHED_TYPE_RTPS
A simple scheduler - rtPS based scheduler.
@ SCHED_TYPE_MBQOS
An migration-based uplink scheduler.
@ SCHED_TYPE_SIMPLE
A simple priority-based FCFS scheduler.
@ DEVICE_TYPE_SUBSCRIBER_STATION
Subscriber station(SS) device.
@ DEVICE_TYPE_BASE_STATION
Base station(BS) device.
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
static void EnableLogComponents()
Helper to enable all WimaxNetDevice log components with one statement.
ServiceFlow CreateServiceFlow(ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulingType, IpcsClassifierRecord classifier)
Creates a transport service flow.
@ MODULATION_TYPE_QAM16_12
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void LogComponentEnable(const std::string &name, LogLevel level)
Enable the logging output associated with that log component.
@ LOG_LEVEL_INFO
LOG_INFO and above.