No-op handover algorithm in manual handover test suite and example
authorBudiarto Herman <budiarto.herman@magister.fi>
Sun, 25 Aug 2013 15:27:21 +0300
changeset 10333 0083a28333f2
parent 10332 8bf4fd278338
child 10334 e6f604c8cb6c
No-op handover algorithm in manual handover test suite and example
src/lte/examples/lena-x2-handover.cc
src/lte/test/test-lte-x2-handover.cc
--- a/src/lte/examples/lena-x2-handover.cc	Sun Aug 25 11:26:00 2013 +0300
+++ b/src/lte/examples/lena-x2-handover.cc	Sun Aug 25 15:27:21 2013 +0300
@@ -37,7 +37,7 @@
                                uint16_t cellid,
                                uint16_t rnti)
 {
-  std::cout << context
+  std::cout << Simulator::Now ().GetSeconds () << " " << context
             << " UE IMSI " << imsi
             << ": connected to CellId " << cellid
             << " with RNTI " << rnti
@@ -51,7 +51,7 @@
                        uint16_t rnti,
                        uint16_t targetCellId)
 {
-  std::cout << context
+  std::cout << Simulator::Now ().GetSeconds () << " " << context
             << " UE IMSI " << imsi
             << ": previously connected to CellId " << cellid
             << " with RNTI " << rnti
@@ -65,7 +65,7 @@
                        uint16_t cellid,
                        uint16_t rnti)
 {
-  std::cout << context
+  std::cout << Simulator::Now ().GetSeconds () << " " << context
             << " UE IMSI " << imsi
             << ": successful handover to CellId " << cellid
             << " with RNTI " << rnti
@@ -78,7 +78,7 @@
                                 uint16_t cellid,
                                 uint16_t rnti)
 {
-  std::cout << context
+  std::cout << Simulator::Now ().GetSeconds () << " " << context
             << " eNB CellId " << cellid
             << ": successful connection of UE with IMSI " << imsi
             << " RNTI " << rnti
@@ -92,7 +92,7 @@
                         uint16_t rnti,
                         uint16_t targetCellId)
 {
-  std::cout << context
+  std::cout << Simulator::Now ().GetSeconds () << " " << context
             << " eNB CellId " << cellid
             << ": start handover of UE with IMSI " << imsi
             << " RNTI " << rnti
@@ -106,7 +106,7 @@
                         uint16_t cellid,
                         uint16_t rnti)
 {
-  std::cout << context
+  std::cout << Simulator::Now ().GetSeconds () << " " << context
             << " eNB CellId " << cellid
             << ": completed handover of UE with IMSI " << imsi
             << " RNTI " << rnti
@@ -160,6 +160,7 @@
   Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
   lteHelper->SetEpcHelper (epcHelper);
   lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler");
+  lteHelper->SetHandoverAlgorithmType ("ns3::NoOpHandoverAlgorithm"); // disable automatic handover
 
   Ptr<Node> pgw = epcHelper->GetPgwNode ();
 
--- a/src/lte/test/test-lte-x2-handover.cc	Sun Aug 25 11:26:00 2013 +0300
+++ b/src/lte/test/test-lte-x2-handover.cc	Sun Aug 25 15:27:21 2013 +0300
@@ -156,6 +156,7 @@
   m_lteHelper = CreateObject<LteHelper> ();
   m_lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
   m_lteHelper->SetSchedulerType (m_schedulerType);
+  m_lteHelper->SetHandoverAlgorithmType ("ns3::NoOpHandoverAlgorithm"); // disable automatic handover
   m_lteHelper->SetAttribute ("UseIdealRrc", BooleanValue (m_useIdealRrc));
   
 
@@ -579,39 +580,39 @@
 
   std::string hel1name ("1 fwd");
   std::list<HandoverEvent> hel1;
-  hel1.push_back (ue1fwd);  
+  hel1.push_back (ue1fwd);
 
   std::string hel2name ("1 fwd & bwd");
   std::list<HandoverEvent> hel2;
-  hel2.push_back (ue1fwd);     
-  hel2.push_back (ue1bwd);    
+  hel2.push_back (ue1fwd);
+  hel2.push_back (ue1bwd);
 
   std::string hel3name ("1 fwd & bwd & fwd");
   std::list<HandoverEvent> hel3;
-  hel3.push_back (ue1fwd);     
-  hel3.push_back (ue1bwd);     
-  hel3.push_back (ue1fwdagain);     
+  hel3.push_back (ue1fwd);
+  hel3.push_back (ue1bwd);
+  hel3.push_back (ue1fwdagain);
 
   std::string hel4name ("1+2 fwd");
   std::list<HandoverEvent> hel4;
-  hel4.push_back (ue1fwd);  
+  hel4.push_back (ue1fwd);
   hel4.push_back (ue2fwd);
 
   std::string hel5name ("1+2 fwd & bwd");
   std::list<HandoverEvent> hel5;
-  hel5.push_back (ue1fwd);     
-  hel5.push_back (ue1bwd);    
-  hel5.push_back (ue2fwd);     
-  hel5.push_back (ue2bwd);    
+  hel5.push_back (ue1fwd);
+  hel5.push_back (ue1bwd);
+  hel5.push_back (ue2fwd);
+  hel5.push_back (ue2bwd);
 
   std::string hel6name ("2 fwd");
   std::list<HandoverEvent> hel6;
-  hel6.push_back (ue2fwd);     
+  hel6.push_back (ue2fwd);
 
   std::string hel7name ("2 fwd & bwd");
   std::list<HandoverEvent> hel7;
-  hel7.push_back (ue2fwd);     
-  hel7.push_back (ue2bwd);    
+  hel7.push_back (ue2fwd);
+  hel7.push_back (ue2bwd);
 
   std::vector<std::string> schedulers;
   schedulers.push_back ("ns3::RrFfMacScheduler");
@@ -619,7 +620,7 @@
   for (std::vector<std::string>::iterator schedIt = schedulers.begin (); schedIt != schedulers.end (); ++schedIt)
     {
       for (int32_t useIdealRrc = 1; useIdealRrc >= 0; --useIdealRrc)
-        {          
+        {
           //                                     nUes, nDBearers, helist, name, useUdp, sched, admitHo, idealRrc
           AddTestCase (new LteX2HandoverTestCase (  1,    0,    hel0, hel0name, true, *schedIt, true,  useIdealRrc), TestCase::EXTENSIVE);
           AddTestCase (new LteX2HandoverTestCase (  2,    0,    hel0, hel0name, true, *schedIt, true,  useIdealRrc), TestCase::EXTENSIVE);