22 #include "ns3/abort.h"
24 #include "ns3/config.h"
25 #include "ns3/string.h"
26 #include "ns3/uinteger.h"
27 #include "ns3/inet-socket-address.h"
28 #include "ns3/point-to-point-helper.h"
29 #include "ns3/internet-stack-helper.h"
30 #include "ns3/ipv4-address-helper.h"
31 #include "ns3/ipv4-header.h"
32 #include "ns3/packet-sink-helper.h"
33 #include "ns3/simulator.h"
34 #include "ns3/wimax-helper.h"
35 #include "ns3/mobility-helper.h"
37 #include "ns3/global-route-manager.h"
48 virtual void DoRun (
void);
54 :
TestCase (
"Test the 2 different schedulers")
71 ssDevs = wimax.
Install (ssNodes,
72 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
73 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
75 bsDevs = wimax.
Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler);
84 address.
SetBase (
"10.1.1.0",
"255.255.255.0");
108 Simulator::Stop (
Seconds (2 + 0.1));
121 ServiceFlow::SF_TYPE_RTPS,
134 ServiceFlow::SF_TYPE_RTPS,
140 Simulator::Destroy ();
148 if (
DoRunOnce (WimaxHelper::SCHED_TYPE_SIMPLE) ==
true)
152 if (
DoRunOnce (WimaxHelper::SCHED_TYPE_RTPS) ==
true)
167 virtual void DoRun (
void);
173 :
TestCase (
"Test the service flow scheduling types")
190 ssDevs = wimax.
Install (ssNodes,
191 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
192 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
193 WimaxHelper::SCHED_TYPE_SIMPLE);
194 bsDevs = wimax.
Install (bsNodes,
195 WimaxHelper::DEVICE_TYPE_BASE_STATION,
196 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
197 WimaxHelper::SCHED_TYPE_SIMPLE);
206 address.
SetBase (
"10.1.1.0",
"255.255.255.0");
230 Simulator::Stop (
Seconds (2 + 0.1));
258 Simulator::Destroy ();
266 if (
DoRunOnce (ServiceFlow::SF_TYPE_UGS) ==
true)
270 if (
DoRunOnce (ServiceFlow::SF_TYPE_RTPS) ==
true)
274 if (
DoRunOnce (ServiceFlow::SF_TYPE_BE) ==
true)
holds a vector of std::pair of Ptr and interface index.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
a class to represent an Ipv4 address mask
SchedulerType
Scheduler Type Different implementations of uplink/downlink scheduler.
aggregate IP/TCP/UDP functionality to existing Nodes.
bool DoRunOnce(ServiceFlow::SchedulingType)
NetDeviceContainer Install(NodeContainer c, NetDeviceType type, PhyType phyType, SchedulerType schedulerType)
virtual ~Ns3WimaxSchedulingTestCase()
virtual void DoRun(void)
Implementation to actually run this TestCase.
holds a vector of ns3::NetDevice pointers
static Ns3WimaxQoSTestSuite ns3WimaxQoSTestSuite
keep track of a set of node pointers.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
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()
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
bool DoRunOnce(WimaxHelper::SchedulerType scheduler)
Ipv4 addresses are stored in host order in this class.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
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
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ns3WimaxSchedulingTestCase()
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const