23 #include "ns3/simulator.h" 24 #include "ns3/node-container.h" 25 #include "ns3/wimax-helper.h" 26 #include "ns3/net-device-container.h" 27 #include "ns3/internet-stack-helper.h" 28 #include "ns3/ipv4-address-helper.h" 29 #include "ns3/ipv4-interface-container.h" 30 #include "ns3/ipv4-address.h" 31 #include "ns3/service-flow.h" 32 #include "ns3/ipcs-classifier-record.h" 49 virtual void DoRun (
void);
60 :
TestCase (
"Test the 2 different schedulers")
77 ssDevs = wimax.
Install (ssNodes,
78 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
79 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
81 bsDevs = wimax.
Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler);
86 stack.Install (bsNodes);
87 stack.Install (ssNodes);
90 address.SetBase (
"10.1.1.0",
"255.255.255.0");
114 Simulator::Stop (
Seconds (2 + 0.1));
127 ServiceFlow::SF_TYPE_RTPS,
140 ServiceFlow::SF_TYPE_RTPS,
146 Simulator::Destroy ();
154 if (
DoRunOnce (WimaxHelper::SCHED_TYPE_SIMPLE) ==
true)
158 if (
DoRunOnce (WimaxHelper::SCHED_TYPE_RTPS) ==
true)
178 virtual void DoRun (
void);
189 :
TestCase (
"Test the service flow scheduling types")
206 ssDevs = wimax.
Install (ssNodes,
207 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
208 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
209 WimaxHelper::SCHED_TYPE_SIMPLE);
210 bsDevs = wimax.
Install (bsNodes,
211 WimaxHelper::DEVICE_TYPE_BASE_STATION,
212 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
213 WimaxHelper::SCHED_TYPE_SIMPLE);
218 stack.Install (bsNodes);
219 stack.Install (ssNodes);
222 address.SetBase (
"10.1.1.0",
"255.255.255.0");
246 Simulator::Stop (
Seconds (2 + 0.1));
274 Simulator::Destroy ();
282 if (
DoRunOnce (ServiceFlow::SF_TYPE_UGS) ==
true)
286 if (
DoRunOnce (ServiceFlow::SF_TYPE_RTPS) ==
true)
290 if (
DoRunOnce (ServiceFlow::SF_TYPE_BE) ==
true)
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
a class to represent an Ipv4 address mask
Ns3 Wimax SF Type Test Case.
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
aggregate IP/TCP/UDP functionality to existing Nodes.
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
IpcsClassifierRecord class.
virtual ~Ns3WimaxSchedulingTestCase()
virtual void DoRun(void)
Implementation to actually run this TestCase.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
holds a vector of ns3::NetDevice pointers
static Ns3WimaxQoSTestSuite ns3WimaxQoSTestSuite
the test suite
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
bool DoRunOnce(ServiceFlow::SchedulingType schedulingType)
Run once function.
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class implements service flows as described by the IEEE-802.16 standard.
virtual ~Ns3WimaxSFTypeTestCase()
bool DoRunOnce(WimaxHelper::SchedulerType scheduler)
Run once function.
Ipv4 addresses are stored in host order in this class.
Time Seconds(double value)
Construct a Time in the indicated unit.
ServiceFlow CreateServiceFlow(ServiceFlow::Direction direction, ServiceFlow::SchedulingType schedulinType, IpcsClassifierRecord classifier)
Creates a transport service flow.
helps to manage and create WimaxNetDevice objects
SubscriberStationNetDevice subclass of WimaxNetDevice.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ns3 Wimax Scheduling Test Case.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ns3WimaxSchedulingTestCase()
Ns3 Wimax QoS Test Suite.