44#include "ns3/applications-module.h"
45#include "ns3/config-store-module.h"
46#include "ns3/core-module.h"
47#include "ns3/global-route-manager.h"
48#include "ns3/internet-module.h"
49#include "ns3/ipcs-classifier-record.h"
50#include "ns3/mobility-module.h"
51#include "ns3/network-module.h"
52#include "ns3/service-flow.h"
53#include "ns3/wimax-module.h"
62main(
int argc,
char* argv[])
71 cmd.AddValue(
"scheduler",
"type of scheduler to use with the network devices", schedType);
72 cmd.AddValue(
"duration",
"duration of the simulation in seconds", duration);
73 cmd.AddValue(
"verbose",
"turn on all WimaxNetDevice log components",
verbose);
74 cmd.Parse(argc, argv);
80 scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
83 scheduler = WimaxHelper::SCHED_TYPE_MBQOS;
86 scheduler = WimaxHelper::SCHED_TYPE_RTPS;
89 scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
103 ssDevs = wimax.
Install(ssNodes,
104 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
105 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
107 bsDevs = wimax.
Install(bsNodes,
108 WimaxHelper::DEVICE_TYPE_BASE_STATION,
109 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
117 for (
int i = 0; i < 2; i++)
120 ss[i]->SetModulationType(WimaxPhy::MODULATION_TYPE_QAM16_12);
128 stack.Install(bsNodes);
129 stack.Install(ssNodes);
132 address.SetBase(
"10.1.1.0",
"255.255.255.0");
139 WimaxHelper::EnableLogComponents();
162 Simulator::Stop(
Seconds(duration + 0.1));
179 ServiceFlow::SF_TYPE_RTPS,
193 ServiceFlow::SF_TYPE_RTPS,
195 ss[0]->AddServiceFlow(DlServiceFlowUgs);
196 ss[1]->AddServiceFlow(UlServiceFlowUgs);
205 Simulator::Destroy();
holds a vector of ns3::Application pointers.
void EnableAscii(std::string prefix, Ptr< NetDevice > nd, bool explicitFilename=false)
Enable ascii trace output on the indicated net device.
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
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.
void EnablePcap(std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
Enable pcap output the indicated net device.
Smart pointer class similar to boost::intrusive_ptr.
This class implements service flows as described by the IEEE-802.16 standard.
SubscriberStationNetDevice subclass of WimaxNetDevice.
AttributeValue implementation for Time.
Create a client application which sends UDP packets carrying a 32bit sequence number and a 64 bit tim...
void SetAttribute(std::string name, const AttributeValue &value)
Record an attribute to be set in each Application after it is is created.
ApplicationContainer Install(NodeContainer c)
Create a server application which waits for input UDP packets and uses the information carried into t...
ApplicationContainer Install(NodeContainer c)
Create one UDP server application on each of the Nodes in the NodeContainer.
Hold an unsigned integer type.
helps to manage and create WimaxNetDevice objects
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
ServiceFlow CreateServiceFlow(ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulinType, IpcsClassifierRecord classifier)
Creates a transport service flow.
#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.