20 #include "ns3/internet-stack-helper.h"
21 #include "ns3/ipcs-classifier-record.h"
22 #include "ns3/ipv4-address-helper.h"
23 #include "ns3/ipv4-address.h"
24 #include "ns3/ipv4-interface-container.h"
26 #include "ns3/net-device-container.h"
27 #include "ns3/node-container.h"
28 #include "ns3/service-flow.h"
29 #include "ns3/simulator.h"
31 #include "ns3/wimax-helper.h"
48 void DoRun()
override;
58 :
TestCase(
"Test the 2 different schedulers")
77 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
78 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
81 WimaxHelper::DEVICE_TYPE_BASE_STATION,
82 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
85 WimaxPhy::MODULATION_TYPE_QAM16_12);
87 WimaxPhy::MODULATION_TYPE_QAM16_12);
90 stack.Install(bsNodes);
91 stack.Install(ssNodes);
94 address.SetBase(
"10.1.1.0",
"255.255.255.0");
118 Simulator::Stop(
Seconds(2 + 0.1));
131 ServiceFlow::SF_TYPE_RTPS,
144 ServiceFlow::SF_TYPE_RTPS,
150 Simulator::Destroy();
157 if (
DoRunOnce(WimaxHelper::SCHED_TYPE_SIMPLE))
161 if (
DoRunOnce(WimaxHelper::SCHED_TYPE_RTPS))
180 void DoRun()
override;
190 :
TestCase(
"Test the service flow scheduling types")
208 ssDevs = wimax.
Install(ssNodes,
209 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
210 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
211 WimaxHelper::SCHED_TYPE_SIMPLE);
212 bsDevs = wimax.
Install(bsNodes,
213 WimaxHelper::DEVICE_TYPE_BASE_STATION,
214 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
215 WimaxHelper::SCHED_TYPE_SIMPLE);
217 WimaxPhy::MODULATION_TYPE_QAM16_12);
219 WimaxPhy::MODULATION_TYPE_QAM16_12);
222 stack.Install(bsNodes);
223 stack.Install(ssNodes);
226 address.SetBase(
"10.1.1.0",
"255.255.255.0");
250 Simulator::Stop(
Seconds(2 + 0.1));
263 wimax.
CreateServiceFlow(ServiceFlow::SF_DIRECTION_DOWN, schedulingType, DlClassifier);
275 wimax.
CreateServiceFlow(ServiceFlow::SF_DIRECTION_UP, schedulingType, UlClassifier);
280 Simulator::Destroy();
291 if (
DoRunOnce(ServiceFlow::SF_TYPE_RTPS))
Ns3 Wimax QoS Test Suite.
Ns3 Wimax SF Type Test Case.
void DoRun() override
Implementation to actually run this TestCase.
~Ns3WimaxSFTypeTestCase() override
bool DoRunOnce(ServiceFlow::SchedulingType schedulingType)
Run once function.
Ns3 Wimax Scheduling Test Case.
~Ns3WimaxSchedulingTestCase() override
Ns3WimaxSchedulingTestCase()
bool DoRunOnce(WimaxHelper::SchedulerType scheduler)
Run once function.
void DoRun() override
Implementation to actually run this TestCase.
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.
This class implements service flows as described by the IEEE-802.16 standard.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
SubscriberStationNetDevice subclass of WimaxNetDevice.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
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.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static Ns3WimaxQoSTestSuite ns3WimaxQoSTestSuite
the test suite