Skip to content

Commit

Permalink
lte: update tests after removing ALL_UL_CQI filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ZorazeAli committed Sep 6, 2018
1 parent 9a9f34a commit 9d5d5ec
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 12 deletions.
2 changes: 2 additions & 0 deletions src/lte/test/lte-test-carrier-aggregation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <iostream>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include "ns3/ff-mac-scheduler.h"
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -310,6 +311,7 @@ CarrierAggregationTestCase::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
3 changes: 3 additions & 0 deletions src/lte/test/lte-test-cqa-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -334,6 +335,7 @@ LenaCqaFfMacSchedulerTestCase1::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::CqaFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down Expand Up @@ -572,6 +574,7 @@ LenaCqaFfMacSchedulerTestCase2::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::CqaFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
24 changes: 23 additions & 1 deletion src/lte/test/lte-test-cqi-generation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#include "lte-ffr-simple.h"
#include "ns3/lte-rrc-sap.h"
#include <ns3/lte-ue-net-device.h>
#include <ns3/lte-ue-mac.h>

#include "lte-test-cqi-generation.h"

Expand Down Expand Up @@ -325,10 +327,30 @@ LteCqiGenerationDlPowerControlTestCase::DoRun (void)
NetDeviceContainer ueDevs1;
NetDeviceContainer ueDevs2;
lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
//In this scenario, eNB2 with 2 UEs will assign 12 RBs to UE2.
//On the other hand eNB1 will assign 25 RBs to UE1. As per the new uplink power
//spectral density computation, UE with less RBs to Tx will have more power
//per RB. Therefore UE2 will harm UE1 more, thus, both the UEs will have
//different Uplink CQI, which will cause the test to fail.
//In this case, we can use SRS based CQIs, since, they are not dependent on
//the transmission bandwidth.
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs1 = lteHelper->InstallUeDevice (ueNodes1);
ueDevs2 = lteHelper->InstallUeDevice (ueNodes2);
//We need to fix the stream to have control over
//random preamble generation by the UEs.
Ptr<LteUeNetDevice> lteUeDev;
Ptr<LteUeMac> lteUeMac;
lteUeDev = DynamicCast<LteUeNetDevice> (ueDevs1.Get(0));
lteUeMac = lteUeDev->GetMac();
lteUeMac->AssignStreams(1);
lteUeDev = DynamicCast<LteUeNetDevice> (ueDevs2.Get(0));
lteUeMac = lteUeDev->GetMac();
lteUeMac->AssignStreams(1);
lteUeDev = DynamicCast<LteUeNetDevice> (ueDevs2.Get(1));
lteUeMac = lteUeDev->GetMac();
lteUeMac->AssignStreams(2);

// Attach a UE to a eNB
lteHelper->Attach (ueDevs1, enbDevs.Get (0));
Expand Down
6 changes: 3 additions & 3 deletions src/lte/test/lte-test-fdbet-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -211,9 +212,6 @@ LenaFdBetFfMacSchedulerTestCase1::DoRun (void)

Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));

//Disable Uplink Power Control
Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));

/**
* Initialize Simulation Scenario: 1 eNB and m_nUser UEs
*/
Expand All @@ -239,6 +237,7 @@ LenaFdBetFfMacSchedulerTestCase1::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::FdBetFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down Expand Up @@ -403,6 +402,7 @@ LenaFdBetFfMacSchedulerTestCase2::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::FdBetFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
5 changes: 2 additions & 3 deletions src/lte/test/lte-test-fdmt-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include "lte-test-fdmt-ff-mac-scheduler.h"
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
Expand Down Expand Up @@ -192,9 +193,6 @@ LenaFdMtFfMacSchedulerTestCase::DoRun (void)

Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));

//Disable Uplink Power Control
Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));

/**
* Initialize Simulation Scenario: 1 eNB and m_nUser UEs
*/
Expand All @@ -219,6 +217,7 @@ LenaFdMtFfMacSchedulerTestCase::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::FdMtFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
7 changes: 5 additions & 2 deletions src/lte/test/lte-test-fdtbfq-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -330,6 +331,7 @@ LenaFdTbfqFfMacSchedulerTestCase1::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::FdTbfqFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down Expand Up @@ -412,9 +414,9 @@ LenaFdTbfqFfMacSchedulerTestCase1::DoRun (void)
}

serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.04));

double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
double statsStartTime = 0.04; // need to allow for RRC connection establishment + SRS
double statsDuration = 1;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
Expand Down Expand Up @@ -572,6 +574,7 @@ LenaFdTbfqFfMacSchedulerTestCase2::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::FdTbfqFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
3 changes: 3 additions & 0 deletions src/lte/test/lte-test-pf-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -255,6 +256,7 @@ LenaPfFfMacSchedulerTestCase1::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down Expand Up @@ -419,6 +421,7 @@ LenaPfFfMacSchedulerTestCase2::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
3 changes: 3 additions & 0 deletions src/lte/test/lte-test-pss-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -331,6 +332,7 @@ LenaPssFfMacSchedulerTestCase1::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::PssFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down Expand Up @@ -572,6 +574,7 @@ LenaPssFfMacSchedulerTestCase2::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::PssFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
2 changes: 2 additions & 0 deletions src/lte/test/lte-test-rr-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <iostream>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -218,6 +219,7 @@ LenaRrFfMacSchedulerTestCase::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::RrFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
3 changes: 3 additions & 0 deletions src/lte/test/lte-test-tdbet-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -239,6 +240,7 @@ LenaTdBetFfMacSchedulerTestCase1::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::TdBetFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down Expand Up @@ -405,6 +407,7 @@ LenaTdBetFfMacSchedulerTestCase2::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::TdBetFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
2 changes: 2 additions & 0 deletions src/lte/test/lte-test-tdmt-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include "lte-test-tdmt-ff-mac-scheduler.h"
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
Expand Down Expand Up @@ -218,6 +219,7 @@ LenaTdMtFfMacSchedulerTestCase::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::TdMtFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down
8 changes: 5 additions & 3 deletions src/lte/test/lte-test-tdtbfq-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
#include <ns3/mobility-helper.h>
Expand Down Expand Up @@ -330,6 +331,7 @@ LenaTdTbfqFfMacSchedulerTestCase1::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::TdTbfqFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down Expand Up @@ -411,7 +413,7 @@ LenaTdTbfqFfMacSchedulerTestCase1::DoRun (void)
}

serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.040));

double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
double statsDuration = 1;
Expand Down Expand Up @@ -660,9 +662,9 @@ LenaTdTbfqFfMacSchedulerTestCase2::DoRun (void)
}

serverApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.001));
clientApps.Start (Seconds (0.040));

double statsStartTime = 0.001; // need to allow for RRC connection establishment + SRS
double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
double statsDuration = 1.0;
double tolerance = 0.1;
Simulator::Stop (Seconds (statsStartTime + statsDuration - 0.0001));
Expand Down
2 changes: 2 additions & 0 deletions src/lte/test/lte-test-tta-ff-mac-scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <ns3/ptr.h>
#include "ns3/radio-bearer-stats-calculator.h"
#include <ns3/constant-position-mobility-model.h>
#include <ns3/ff-mac-scheduler.h>
#include "lte-test-tta-ff-mac-scheduler.h"
#include <ns3/eps-bearer.h>
#include <ns3/node-container.h>
Expand Down Expand Up @@ -221,6 +222,7 @@ LenaTtaFfMacSchedulerTestCase::DoRun (void)
NetDeviceContainer enbDevs;
NetDeviceContainer ueDevs;
lteHelper->SetSchedulerType ("ns3::TtaFfMacScheduler");
lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::SRS_UL_CQI));
enbDevs = lteHelper->InstallEnbDevice (enbNodes);
ueDevs = lteHelper->InstallUeDevice (ueNodes);

Expand Down

0 comments on commit 9d5d5ec

Please sign in to comment.