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/udp-client-server-helper.h"
34 #include "ns3/simulator.h"
35 #include "ns3/wimax-helper.h"
36 #include "ns3/mobility-helper.h"
38 #include "ns3/global-route-manager.h"
49 virtual void DoRun (
void);
55 :
TestCase (
"Test the 2 different schedulers")
72 ssDevs = wimax.
Install (ssNodes,
73 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
74 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
76 bsDevs = wimax.
Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler);
85 address.
SetBase (
"10.1.1.0",
"255.255.255.0");
97 serverApps = udpServer.
Install (ssNodes.
Get (0));
98 serverApps.
Start (Seconds (1));
99 serverApps.
Stop (Seconds (2));
105 clientApps = udpClient.
Install (ssNodes.
Get (1));
106 clientApps.
Start (Seconds (1));
107 clientApps.
Stop (Seconds (2));
109 Simulator::Stop (Seconds (2 + 0.1));
122 ServiceFlow::SF_TYPE_RTPS,
135 ServiceFlow::SF_TYPE_RTPS,
141 Simulator::Destroy ();
149 if (
DoRunOnce (WimaxHelper::SCHED_TYPE_SIMPLE) ==
true)
153 if (
DoRunOnce (WimaxHelper::SCHED_TYPE_RTPS) ==
true)
168 virtual void DoRun (
void);
174 :
TestCase (
"Test the service flow scheduling types")
191 ssDevs = wimax.
Install (ssNodes,
192 WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
193 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
194 WimaxHelper::SCHED_TYPE_SIMPLE);
195 bsDevs = wimax.
Install (bsNodes,
196 WimaxHelper::DEVICE_TYPE_BASE_STATION,
197 WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
198 WimaxHelper::SCHED_TYPE_SIMPLE);
207 address.
SetBase (
"10.1.1.0",
"255.255.255.0");
219 serverApps = udpServer.
Install (ssNodes.
Get (0));
220 serverApps.
Start (Seconds (1));
221 serverApps.
Stop (Seconds (2));
227 clientApps = udpClient.
Install (ssNodes.
Get (1));
228 clientApps.
Start (Seconds (1));
229 clientApps.
Stop (Seconds (2));
231 Simulator::Stop (Seconds (2 + 0.1));
259 Simulator::Destroy ();
267 if (
DoRunOnce (ServiceFlow::SF_TYPE_UGS) ==
true)
271 if (
DoRunOnce (ServiceFlow::SF_TYPE_RTPS) ==
true)
275 if (
DoRunOnce (ServiceFlow::SF_TYPE_BE) ==
true)