Reverted position of SetChannel in LteHelper InstallDevice functions
authorBudiarto Herman <budiarto.herman@magister.fi>
Mon, 22 Jul 2013 11:19:31 +0300
changeset 10294 395d7341a29c
parent 10293 deeeb83bb5d1
child 10295 4d25257ec2e6
Reverted position of SetChannel in LteHelper InstallDevice functions
src/lte/helper/lte-helper.cc
--- a/src/lte/helper/lte-helper.cc	Fri Jul 19 14:34:25 2013 +0300
+++ b/src/lte/helper/lte-helper.cc	Mon Jul 22 11:19:31 2013 +0300
@@ -328,9 +328,6 @@
   Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> ();
   Ptr<LteSpectrumPhy> ulPhy = CreateObject<LteSpectrumPhy> ();
 
-  dlPhy->SetChannel (m_downlinkChannel);
-  ulPhy->SetChannel (m_uplinkChannel);
-
   Ptr<LteEnbPhy> phy = CreateObject<LteEnbPhy> (dlPhy, ulPhy);
 
   Ptr<LteHarqPhy> harq = Create<LteHarqPhy> ();
@@ -347,6 +344,9 @@
   Ptr<LteInterferencePowerChunkProcessor> pInterf = Create<LteInterferencePowerChunkProcessor> (phy);
   ulPhy->AddInterferenceDataChunkProcessor (pInterf); // for interference power tracing
 
+  dlPhy->SetChannel (m_downlinkChannel);
+  ulPhy->SetChannel (m_uplinkChannel);
+
   Ptr<MobilityModel> mm = n->GetObject<MobilityModel> ();
   NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()");
   dlPhy->SetMobility (mm);
@@ -472,9 +472,6 @@
   Ptr<LteSpectrumPhy> dlPhy = CreateObject<LteSpectrumPhy> ();
   Ptr<LteSpectrumPhy> ulPhy = CreateObject<LteSpectrumPhy> ();
 
-  dlPhy->SetChannel (m_downlinkChannel);
-  ulPhy->SetChannel (m_uplinkChannel);
-
   Ptr<LteUePhy> phy = CreateObject<LteUePhy> (dlPhy, ulPhy);
 
   Ptr<LteHarqPhy> harq = Create<LteHarqPhy> ();
@@ -494,6 +491,9 @@
   Ptr<LteDataSinrChunkProcessor> pData = Create<LteDataSinrChunkProcessor> (dlPhy);
   dlPhy->AddDataSinrChunkProcessor (pData);
 
+  dlPhy->SetChannel (m_downlinkChannel);
+  ulPhy->SetChannel (m_uplinkChannel);
+
   Ptr<MobilityModel> mm = n->GetObject<MobilityModel> ();
   NS_ASSERT_MSG (mm, "MobilityModel needs to be set on node before calling LteHelper::InstallUeDevice ()");
   dlPhy->SetMobility (mm);