lte: Add variable number of component carriers to LteSecondaryCellSelectionTestCase
This commit is contained in:
@@ -55,11 +55,13 @@ LteSecondaryCellSelectionTestSuite::LteSecondaryCellSelectionTestSuite ()
|
||||
{
|
||||
// REAL RRC PROTOCOL
|
||||
|
||||
AddTestCase (new LteSecondaryCellSelectionTestCase ("EPC, real RRC, RngRun=1", false, 1), TestCase::QUICK);
|
||||
AddTestCase (new LteSecondaryCellSelectionTestCase ("EPC, real RRC, RngRun=1", false, 1, 2), TestCase::QUICK);
|
||||
AddTestCase (new LteSecondaryCellSelectionTestCase ("EPC, real RRC, RngRun=1", false, 1, 4), TestCase::QUICK);
|
||||
|
||||
// IDEAL RRC PROTOCOL
|
||||
|
||||
AddTestCase (new LteSecondaryCellSelectionTestCase ("EPC, ideal RRC, RngRun=1", true, 1), TestCase::QUICK);
|
||||
AddTestCase (new LteSecondaryCellSelectionTestCase ("EPC, ideal RRC, RngRun=1", true, 1, 2), TestCase::QUICK);
|
||||
AddTestCase (new LteSecondaryCellSelectionTestCase ("EPC, ideal RRC, RngRun=1", true, 1, 4), TestCase::QUICK);
|
||||
|
||||
} // end of LteSecondaryCellSelectionTestSuite::LteSecondaryCellSelectionTestSuite ()
|
||||
|
||||
@@ -70,10 +72,11 @@ static LteSecondaryCellSelectionTestSuite g_lteSecondaryCellSelectionTestSuite;
|
||||
*/
|
||||
|
||||
LteSecondaryCellSelectionTestCase::LteSecondaryCellSelectionTestCase (
|
||||
std::string name, bool isIdealRrc, int64_t rngRun)
|
||||
std::string name, bool isIdealRrc, int64_t rngRun, uint8_t numberOfComponentCarriers)
|
||||
: TestCase (name),
|
||||
m_isIdealRrc (isIdealRrc),
|
||||
m_rngRun (rngRun)
|
||||
m_rngRun (rngRun),
|
||||
m_numberOfComponentCarriers (numberOfComponentCarriers)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << GetName ());
|
||||
}
|
||||
@@ -95,7 +98,7 @@ LteSecondaryCellSelectionTestCase::DoRun ()
|
||||
auto lteHelper = CreateObject<LteHelper> ();
|
||||
lteHelper->SetAttribute ("PathlossModel", TypeIdValue (ns3::FriisSpectrumPropagationLossModel::GetTypeId ()));
|
||||
lteHelper->SetAttribute ("UseIdealRrc", BooleanValue (m_isIdealRrc));
|
||||
lteHelper->SetAttribute ("NumberOfComponentCarriers", UintegerValue (2));
|
||||
lteHelper->SetAttribute ("NumberOfComponentCarriers", UintegerValue (m_numberOfComponentCarriers));
|
||||
|
||||
auto epcHelper = CreateObject<PointToPointEpcHelper> ();
|
||||
lteHelper->SetEpcHelper (epcHelper);
|
||||
@@ -105,7 +108,7 @@ LteSecondaryCellSelectionTestCase::DoRun ()
|
||||
cch->SetDlEarfcn (100);
|
||||
cch->SetUlBandwidth (25);
|
||||
cch->SetDlBandwidth (25);
|
||||
cch->SetNumberOfComponentCarriers (2);
|
||||
cch->SetNumberOfComponentCarriers (m_numberOfComponentCarriers);
|
||||
|
||||
const auto ccm = cch->EquallySpacedCcs ();
|
||||
lteHelper->SetCcPhyParams (ccm);
|
||||
@@ -113,7 +116,7 @@ LteSecondaryCellSelectionTestCase::DoRun ()
|
||||
// Create nodes.
|
||||
auto enbNode = CreateObject<Node> ();
|
||||
NodeContainer ueNodes;
|
||||
ueNodes.Create (2);
|
||||
ueNodes.Create (m_numberOfComponentCarriers);
|
||||
|
||||
MobilityHelper mobility;
|
||||
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
||||
|
||||
@@ -60,8 +60,9 @@ public:
|
||||
* \param isIdealRrc if true, simulation uses Ideal RRC protocol, otherwise
|
||||
* simulation uses Real RRC protocol
|
||||
* \param rngRun the number of run to be used by the random number generator
|
||||
* \param numberOfComponentCarriers number of component carriers
|
||||
*/
|
||||
LteSecondaryCellSelectionTestCase (std::string name, bool isIdealRrc, int64_t rngRun);
|
||||
LteSecondaryCellSelectionTestCase (std::string name, bool isIdealRrc, int64_t rngRun, uint8_t numberOfComponentCarriers);
|
||||
|
||||
virtual ~LteSecondaryCellSelectionTestCase ();
|
||||
|
||||
@@ -104,6 +105,7 @@ private:
|
||||
|
||||
bool m_isIdealRrc; ///< whether the LTE is configured to use ideal RRC
|
||||
int64_t m_rngRun; ///< rng run
|
||||
uint8_t m_numberOfComponentCarriers; ///< number of component carriers
|
||||
|
||||
/// The current UE RRC state.
|
||||
std::map<uint64_t, LteUeRrc::State> m_lastState;
|
||||
|
||||
Reference in New Issue
Block a user