24 #include <ns3/nstime.h>
25 #include <ns3/callback.h>
26 #include <ns3/config.h>
27 #include <ns3/boolean.h>
28 #include <ns3/simulator.h>
30 #include <ns3/node-container.h>
31 #include <ns3/net-device-container.h>
32 #include <ns3/ipv4-interface-container.h>
34 #include <ns3/lte-helper.h>
35 #include <ns3/epc-helper.h>
36 #include <ns3/internet-stack-helper.h>
37 #include <ns3/point-to-point-helper.h>
38 #include <ns3/ipv4-address-helper.h>
39 #include <ns3/ipv4-static-routing-helper.h>
40 #include <ns3/mobility-helper.h>
42 #include <ns3/data-rate.h>
43 #include <ns3/ipv4-static-routing.h>
44 #include <ns3/position-allocator.h>
60 Time delayThreshold,
Time simulationDuration)
61 :
TestCase (
"Verifying that the time needed for handover is under a specified threshold"),
71 virtual void DoRun (
void);
74 uint16_t cellid, uint16_t rnti, uint16_t targetCellId);
76 uint16_t cellid, uint16_t rnti);
78 uint16_t cellid, uint16_t rnti, uint16_t targetCellId);
80 uint16_t cellid, uint16_t rnti);
100 lteHelper->SetEpcHelper (epcHelper);
108 inetStackHelper.
Install (remoteHosts);
119 remoteHosts.
Get (0));
122 addrHelper.
SetBase (
"10.1.1.0",
"255.255.255.0");
124 inetIfs = addrHelper.
Assign (inetDevs);
151 posAlloc->Add (
Vector (0, 0, 0));
152 posAlloc->Add (
Vector (1000, 0, 0));
153 posAlloc->Add (
Vector (500, 0, 0));
158 mobilityHelper.
Install (enbNodes);
159 mobilityHelper.
Install (ueNodes);
165 enbDevs = lteHelper->InstallEnbDevice (enbNodes);
166 ueDevs = lteHelper->InstallUeDevice (ueNodes);
170 inetStackHelper.
Install(ueNodes);
172 ueIfs = epcHelper->AssignUeIpv4Address (ueDevs);
178 ueStaticRouting->
SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (),
195 lteHelper->AddX2Interface (enbNodes);
196 lteHelper->Attach (ueDevs.
Get(0), enbDevs.
Get(0));
211 uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
219 uint64_t imsi, uint16_t cellid, uint16_t rnti)
226 "UE handover delay is higher than the allowed threshold "
234 uint64_t imsi, uint16_t cellid, uint16_t rnti, uint16_t targetCellId)
242 uint64_t imsi, uint16_t cellid, uint16_t rnti)
249 "eNodeB handover delay is higher than the allowed threshold "
273 handoverTime +=
Seconds (0.001))
283 for (
Time handoverTime = Seconds (0.100); handoverTime <
Seconds (0.110);
284 handoverTime +=
Seconds (0.001))