Removed PLMN from LTE cell selection criteria
This commit is contained in:
@@ -676,7 +676,7 @@ LteHelper::AttachToClosestEnb (Ptr<NetDevice> ueDevice, NetDeviceContainer enbDe
|
||||
{
|
||||
minDistance = distance;
|
||||
closestEnbDevice = *i;
|
||||
}
|
||||
}
|
||||
}
|
||||
NS_ASSERT (closestEnbDevice != 0);
|
||||
Attach (ueDevice, closestEnbDevice);
|
||||
@@ -873,33 +873,6 @@ LteHelper::ActivateDataRadioBearer (NetDeviceContainer ueDevices, EpsBearer bear
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetEnbPlmnId (NetDeviceContainer enbDevices, uint32_t plmnId)
|
||||
{
|
||||
for (NetDeviceContainer::Iterator i = enbDevices.Begin ();
|
||||
i != enbDevices.End (); ++i)
|
||||
{
|
||||
SetEnbPlmnId (*i, plmnId);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetEnbPlmnId (Ptr<NetDevice> enbDevice, uint32_t plmnId)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << enbDevice << plmnId);
|
||||
|
||||
Ptr<LteEnbNetDevice> enbLteDevice = enbDevice->GetObject<LteEnbNetDevice> ();
|
||||
if (enbLteDevice == 0)
|
||||
{
|
||||
NS_FATAL_ERROR ("The passed NetDevice must be an LteEnbNetDevice");
|
||||
}
|
||||
|
||||
Ptr<LteEnbRrc> rrc = enbLteDevice->GetRrc ();
|
||||
LteRrcSap::SystemInformationBlockType1 sib1 = rrc->GetSystemInformationBlockType1 ();
|
||||
sib1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = plmnId;
|
||||
rrc->SetSystemInformationBlockType1 (sib1);
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetEnbCsgId (NetDeviceContainer enbDevices, uint32_t csgId,
|
||||
bool csgIndication)
|
||||
@@ -957,30 +930,6 @@ LteHelper::SetEnbQRxLevMin (Ptr<NetDevice> enbDevice, int8_t qRxLevMin)
|
||||
rrc->SetSystemInformationBlockType1 (sib1);
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetUePlmnId (NetDeviceContainer ueDevices, uint32_t plmnId)
|
||||
{
|
||||
for (NetDeviceContainer::Iterator i = ueDevices.Begin ();
|
||||
i != ueDevices.End (); ++i)
|
||||
{
|
||||
SetUePlmnId (*i, plmnId);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetUePlmnId (Ptr<NetDevice> ueDevice, uint32_t plmnId)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << ueDevice << plmnId);
|
||||
|
||||
Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> ();
|
||||
if (ueLteDevice == 0)
|
||||
{
|
||||
NS_FATAL_ERROR ("The passed NetDevice must be an LteUeNetDevice");
|
||||
}
|
||||
|
||||
ueLteDevice->GetNas ()->SetPlmnId (plmnId);
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetUeCsgId (NetDeviceContainer ueDevices, uint32_t csgId)
|
||||
{
|
||||
|
||||
@@ -339,44 +339,6 @@ public:
|
||||
*/
|
||||
void SetFadingModelAttribute (std::string n, const AttributeValue &v);
|
||||
|
||||
/**
|
||||
* \brief Associate the eNodeB devices with a particular network operator.
|
||||
* \param enbDevices the set of eNodeB devices to be updated
|
||||
* \param plmnId the intended Public Land Mobile Network identity
|
||||
*
|
||||
* PLMN identity is a number identifying a cellular network of one operator in
|
||||
* one country. eNodeB is associated with a single PLMN identity, which will
|
||||
* be used to limit access of UE to it, so that only UE with the same value of
|
||||
* PLMN identity is allowed.
|
||||
*
|
||||
* If not set, eNodeB devices bear a default PLMN identity of 0.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetUePlmnId(NetDeviceContainer, uint32_t)
|
||||
*/
|
||||
void SetEnbPlmnId (NetDeviceContainer enbDevices, uint32_t plmnId);
|
||||
|
||||
/**
|
||||
* \brief Associate the eNodeB device with a particular network operator.
|
||||
* \param enbDevice
|
||||
* \param plmnId the intended Public Land Mobile Network identity
|
||||
*
|
||||
* PLMN identity is a number identifying a cellular network of one operator in
|
||||
* one country. eNodeB is associated with a single PLMN identity, which will
|
||||
* be used to limit access of UE to it, so that only UE with the same value of
|
||||
* PLMN identity is allowed.
|
||||
*
|
||||
* If not set, eNodeB devices bear a default PLMN identity of 0.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetUePlmnId(Ptr<NetDevice>, uint32_t)
|
||||
*/
|
||||
void SetEnbPlmnId (Ptr<NetDevice> enbDevice, uint32_t plmnId);
|
||||
|
||||
/**
|
||||
* \brief Associate the eNodeB devices with a particular CSG information.
|
||||
* \param enbDevices the set of eNodeB devices to be updated
|
||||
@@ -469,40 +431,6 @@ public:
|
||||
*/
|
||||
void SetEnbQRxLevMin (Ptr<NetDevice> enbDevice, int8_t qRxLevMin);
|
||||
|
||||
/**
|
||||
* \brief Associate the UE devices with a particular network operator.
|
||||
* \param ueDevices the set of UE devices to be updated
|
||||
* \param plmnId the intended Public Land Mobile Network identity
|
||||
*
|
||||
* UE is associated with a single PLMN identity. UE can only gain access to
|
||||
* cells which bear the same PLMN identity.
|
||||
*
|
||||
* If not set, UE devices bear a default PLMN identity of 0.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetEnbPlmnId(NetDeviceContainer, uint32_t)
|
||||
*/
|
||||
void SetUePlmnId (NetDeviceContainer ueDevices, uint32_t plmnId);
|
||||
|
||||
/**
|
||||
* \brief Associate the UE device with a particular network operator.
|
||||
* \param ueDevice
|
||||
* \param plmnId the intended Public Land Mobile Network identity
|
||||
*
|
||||
* UE is associated with a single PLMN identity. UE can only gain access to
|
||||
* cells which bear the same PLMN identity.
|
||||
*
|
||||
* If not set, UE devices bear a default PLMN identity of 0.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetEnbPlmnId(Ptr<NetDevice>, uint32_t)
|
||||
*/
|
||||
void SetUePlmnId (Ptr<NetDevice> ueDevice, uint32_t plmnId);
|
||||
|
||||
/**
|
||||
* \brief Enlist the UE devices as members of a particular CSG.
|
||||
* \param ueDevices the set of UE devices to be updated
|
||||
|
||||
@@ -35,14 +35,14 @@ namespace ns3 {
|
||||
|
||||
|
||||
|
||||
const char* g_ueNasStateName[EpcUeNas::NUM_STATES] =
|
||||
{
|
||||
"OFF",
|
||||
"ATTACHING",
|
||||
"IDLE_REGISTERED",
|
||||
"CONNECTING_TO_EPC",
|
||||
"ACTIVE "
|
||||
};
|
||||
const char* g_ueNasStateName[EpcUeNas::NUM_STATES] =
|
||||
{
|
||||
"OFF",
|
||||
"ATTACHING",
|
||||
"IDLE_REGISTERED",
|
||||
"CONNECTING_TO_EPC",
|
||||
"ACTIVE"
|
||||
};
|
||||
|
||||
std::string ToString (EpcUeNas::State s)
|
||||
{
|
||||
@@ -56,7 +56,6 @@ NS_OBJECT_ENSURE_REGISTERED (EpcUeNas);
|
||||
|
||||
EpcUeNas::EpcUeNas ()
|
||||
: m_state (OFF),
|
||||
m_plmnId (0),
|
||||
m_csgId (0),
|
||||
m_asSapProvider (0),
|
||||
m_bidCounter (0)
|
||||
@@ -103,19 +102,6 @@ EpcUeNas::SetImsi (uint64_t imsi)
|
||||
m_imsi = imsi;
|
||||
}
|
||||
|
||||
void
|
||||
EpcUeNas::SetPlmnId (uint32_t plmnId)
|
||||
{
|
||||
m_plmnId = plmnId;
|
||||
m_asSapProvider->SetSelectedPlmn (plmnId);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
EpcUeNas::GetPlmnId () const
|
||||
{
|
||||
return m_plmnId;
|
||||
}
|
||||
|
||||
void
|
||||
EpcUeNas::SetCsgId (uint32_t csgId)
|
||||
{
|
||||
|
||||
@@ -64,18 +64,6 @@ public:
|
||||
*/
|
||||
void SetImsi (uint64_t imsi);
|
||||
|
||||
/**
|
||||
*
|
||||
* \param plmnId Public Land Mobile Network identity
|
||||
*/
|
||||
void SetPlmnId (uint32_t plmnId);
|
||||
|
||||
/**
|
||||
*
|
||||
* \return plmnId Public Land Mobile Network identity
|
||||
*/
|
||||
uint32_t GetPlmnId () const;
|
||||
|
||||
/**
|
||||
*
|
||||
* \param csgId Closed Subscriber Group identity
|
||||
@@ -162,14 +150,14 @@ public:
|
||||
*
|
||||
*/
|
||||
enum State
|
||||
{
|
||||
OFF = 0,
|
||||
ATTACHING,
|
||||
IDLE_REGISTERED,
|
||||
CONNECTING_TO_EPC,
|
||||
ACTIVE,
|
||||
NUM_STATES
|
||||
};
|
||||
{
|
||||
OFF = 0,
|
||||
ATTACHING,
|
||||
IDLE_REGISTERED,
|
||||
CONNECTING_TO_EPC,
|
||||
ACTIVE,
|
||||
NUM_STATES
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
@@ -192,7 +180,6 @@ private:
|
||||
|
||||
uint64_t m_imsi;
|
||||
|
||||
uint32_t m_plmnId;
|
||||
uint32_t m_csgId;
|
||||
|
||||
LteAsSapProvider* m_asSapProvider;
|
||||
|
||||
@@ -43,17 +43,9 @@ class LteAsSapProvider
|
||||
public:
|
||||
virtual ~LteAsSapProvider ();
|
||||
|
||||
/**
|
||||
* \brief Set the selected Public Land Mobile Network identity to be used for
|
||||
* cell selection.
|
||||
*
|
||||
* \param plmnId identity of the selected PLMN
|
||||
*/
|
||||
virtual void SetSelectedPlmn (uint32_t plmnId) = 0;
|
||||
|
||||
/**
|
||||
* \brief Set the selected Closed Subscriber Group subscription list to be
|
||||
* used for cell selection
|
||||
* used for cell selection.
|
||||
*
|
||||
* \param csgId identity of the subscribed CSG
|
||||
*/
|
||||
@@ -104,7 +96,7 @@ class LteAsSapUser
|
||||
{
|
||||
public:
|
||||
virtual ~LteAsSapUser ();
|
||||
|
||||
|
||||
/**
|
||||
* Notify the NAS that RRC Connection Establishment was successful
|
||||
*
|
||||
@@ -130,9 +122,9 @@ public:
|
||||
* \param packet the packet
|
||||
*/
|
||||
virtual void RecvData (Ptr<Packet> packet) = 0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -148,7 +140,6 @@ public:
|
||||
MemberLteAsSapProvider (C* owner);
|
||||
|
||||
// inherited from LteAsSapProvider
|
||||
virtual void SetSelectedPlmn (uint32_t plmnId);
|
||||
virtual void SetCsgWhiteList (uint32_t csgId);
|
||||
virtual void ForceCampedOnEnb (uint16_t cellId, uint16_t earfcn);
|
||||
virtual void Connect (void);
|
||||
@@ -171,13 +162,6 @@ MemberLteAsSapProvider<C>::MemberLteAsSapProvider ()
|
||||
{
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteAsSapProvider<C>::SetSelectedPlmn (uint32_t plmnId)
|
||||
{
|
||||
m_owner->DoSetSelectedPlmn (plmnId);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteAsSapProvider<C>::SetCsgWhiteList (uint32_t csgId)
|
||||
|
||||
@@ -1661,7 +1661,7 @@ LteEnbRrc::ConfigureCell (uint8_t ulBandwidth, uint8_t dlBandwidth,
|
||||
m_sib1.cellAccessRelatedInfo.cellIdentity = cellId;
|
||||
m_sib1.cellAccessRelatedInfo.csgIndication = false;
|
||||
m_sib1.cellAccessRelatedInfo.csgIdentity = 0;
|
||||
m_sib1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = 0;
|
||||
m_sib1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity = 0; // not used
|
||||
m_sib1.cellSelectionInfo.qQualMin = -34; // not used, set as minimum value
|
||||
m_sib1.cellSelectionInfo.qRxLevMin = -70; // set as minimum value
|
||||
m_cphySapProvider->SetSystemInformationBlockType1 (m_sib1);
|
||||
@@ -2288,7 +2288,7 @@ LteEnbRrc::SendSystemInformation ()
|
||||
si.haveSib2 = true;
|
||||
si.sib2.freqInfo.ulCarrierFreq = m_ulEarfcn;
|
||||
si.sib2.freqInfo.ulBandwidth = m_ulBandwidth;
|
||||
|
||||
|
||||
LteEnbCmacSapProvider::RachConfig rc = m_cmacSapProvider->GetRachConfig ();
|
||||
LteRrcSap::RachConfigCommon rachConfigCommon;
|
||||
rachConfigCommon.preambleInfo.numberOfRaPreambles = rc.numberOfRaPreambles;
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
virtual void SetTemporaryCellRnti (uint16_t rnti);
|
||||
virtual void NotifyRandomAccessSuccessful ();
|
||||
virtual void NotifyRandomAccessFailed ();
|
||||
|
||||
|
||||
private:
|
||||
LteUeRrc* m_rrc;
|
||||
};
|
||||
@@ -132,7 +132,6 @@ LteUeRrc::LteUeRrc ()
|
||||
m_hasReceivedMib (false),
|
||||
m_hasReceivedSib1 (false),
|
||||
m_hasReceivedSib2 (false),
|
||||
m_selectedPlmn (0),
|
||||
m_csgWhiteList (0)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
@@ -483,7 +482,7 @@ LteUeRrc::DoNotifyRandomAccessSuccessful ()
|
||||
m_rrcSapUser->SendRrcConnectionRequest (msg);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case CONNECTED_HANDOVER:
|
||||
{
|
||||
LteRrcSap::RrcConnectionReconfigurationCompleted msg;
|
||||
@@ -507,13 +506,6 @@ LteUeRrc::DoNotifyRandomAccessFailed ()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LteUeRrc::DoSetSelectedPlmn (uint32_t plmnId)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << plmnId);
|
||||
m_selectedPlmn = plmnId;
|
||||
}
|
||||
|
||||
void
|
||||
LteUeRrc::DoSetCsgWhiteList (uint32_t csgId)
|
||||
{
|
||||
@@ -890,17 +882,12 @@ LteUeRrc::EvaluateCellForSelection ()
|
||||
{
|
||||
isAcceptableCell = true;
|
||||
|
||||
uint32_t cellPlmnId = m_lastSib1.cellAccessRelatedInfo.plmnIdentityInfo.plmnIdentity;
|
||||
uint32_t cellCsgId = m_lastSib1.cellAccessRelatedInfo.csgIdentity;
|
||||
bool cellCsgIndication = m_lastSib1.cellAccessRelatedInfo.csgIndication;
|
||||
|
||||
bool isPlmnMatch = (cellPlmnId == m_selectedPlmn);
|
||||
bool isCsgMatch = (cellCsgIndication == false)
|
||||
|| (cellCsgId == m_csgWhiteList);
|
||||
isSuitableCell = (isPlmnMatch && isCsgMatch);
|
||||
isSuitableCell = (cellCsgIndication == false) || (cellCsgId == m_csgWhiteList);
|
||||
|
||||
NS_LOG_LOGIC (this << " plmn(ue/cell)=" << m_selectedPlmn << "/" << cellPlmnId
|
||||
<< " csg(ue/cell/indication)=" << m_csgWhiteList << "/"
|
||||
NS_LOG_LOGIC (this << " csg(ue/cell/indication)=" << m_csgWhiteList << "/"
|
||||
<< cellCsgId << "/" << cellCsgIndication);
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,6 @@ private:
|
||||
void DoNotifyRandomAccessFailed ();
|
||||
|
||||
// LTE AS SAP methods
|
||||
void DoSetSelectedPlmn (uint32_t plmnId);
|
||||
void DoSetCsgWhiteList (uint32_t csgId);
|
||||
void DoForceCampedOnEnb (uint16_t cellId, uint16_t earfcn);
|
||||
void DoConnect ();
|
||||
@@ -382,7 +381,6 @@ private:
|
||||
/// List of cell ID of acceptable cells for cell selection that have been detected.
|
||||
std::set<uint16_t> m_acceptableCell;
|
||||
|
||||
uint32_t m_selectedPlmn;
|
||||
uint32_t m_csgWhiteList;
|
||||
|
||||
/**
|
||||
|
||||
@@ -79,16 +79,15 @@ LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
|
||||
* / --> --> /
|
||||
* ue4 CELL1---ue5 CELL2---ue6
|
||||
*/
|
||||
x.clear (); // position x y z, plmn csg expectedCellId
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 0, 0, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 0, 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 0, 0, 2));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 0, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 0, 0, 1));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 0, 0, 2));
|
||||
x.clear (); // position x y z, csg expectedCellId
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 0, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 0, 2));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 0, 1));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 0, 2));
|
||||
AddTestCase (new LteCellSelectionTestCase ("[EPC] Open access",
|
||||
true, false, false, x,
|
||||
MilliSeconds (261)),
|
||||
true, false, x, MilliSeconds (261)),
|
||||
TestCase::QUICK);
|
||||
|
||||
/*
|
||||
@@ -100,16 +99,15 @@ LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
|
||||
* ue4 CELL1 ue5 CELL2---ue6
|
||||
* (0) (1) (0) (0) (0)
|
||||
*/
|
||||
x.clear (); // position x y z, plmn csg expectedCellId
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 0, 1, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 0, 1, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 0, 1, 2));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 0, 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 0, 0, 2));
|
||||
AddTestCase (new LteCellSelectionTestCase ("[EPC] Some CSG closed access 1",
|
||||
true, false, true, x,
|
||||
MilliSeconds (361)),
|
||||
x.clear (); // position x y z, csg expectedCellId
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 1, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 1, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 1, 2));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 0, 2));
|
||||
AddTestCase (new LteCellSelectionTestCase ("[EPC] Some CSG 1",
|
||||
true, true, x, MilliSeconds (361)),
|
||||
TestCase::QUICK);
|
||||
|
||||
/*
|
||||
@@ -122,16 +120,15 @@ LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
|
||||
* ue4 CELL1---ue5 CELL2---ue6
|
||||
* (1) (1) (1) (0) (1)
|
||||
*/
|
||||
x.clear (); // position x y z, plmn csg expectedCellId
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 0, 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 0, 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 0, 0, 2));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 0, 1, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 0, 1, 1));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 0, 1, 2));
|
||||
AddTestCase (new LteCellSelectionTestCase ("[EPC] Some CSG closed access 2",
|
||||
true, false, true, x,
|
||||
MilliSeconds (361)),
|
||||
x.clear (); // position x y z, csg expectedCellId
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 20, 0), 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 20, 0), 0, 4));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 20, 0), 0, 2));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (-80, 10, 0), 1, 3));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector ( 80, 10, 0), 1, 1));
|
||||
x.push_back (LteCellSelectionTestCase::UeSetup_t (Vector (240, 10, 0), 1, 2));
|
||||
AddTestCase (new LteCellSelectionTestCase ("[EPC] Some CSG 2",
|
||||
true, true, x, MilliSeconds (361)),
|
||||
TestCase::QUICK);
|
||||
|
||||
} // end of LteCellSelectionTestSuite::LteCellSelectionTestSuite ()
|
||||
@@ -147,22 +144,20 @@ static LteCellSelectionTestSuite g_lteCellSelectionTestSuite;
|
||||
|
||||
|
||||
LteCellSelectionTestCase::UeSetup_t::UeSetup_t (Vector position,
|
||||
uint32_t plmnIdentity,
|
||||
uint32_t csgIdentity,
|
||||
uint16_t expectedCellId)
|
||||
: position (position), plmnIdentity (plmnIdentity), csgIdentity (csgIdentity),
|
||||
: position (position), csgIdentity (csgIdentity),
|
||||
expectedCellId (expectedCellId)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LteCellSelectionTestCase::LteCellSelectionTestCase (
|
||||
std::string name, bool isEpcMode, bool hasPlmnDiversity, bool hasCsgDiversity,
|
||||
std::string name, bool isEpcMode, bool hasCsgDiversity,
|
||||
std::vector<UeSetup_t> ueSetupList, Time duration)
|
||||
: TestCase (name), m_isEpcMode (isEpcMode),
|
||||
m_hasPlmnDiversity (hasPlmnDiversity), m_hasCsgDiversity (hasCsgDiversity),
|
||||
m_ueSetupList (ueSetupList), m_duration (duration),
|
||||
m_lastState (LteUeRrc::NUM_STATES)
|
||||
m_hasCsgDiversity (hasCsgDiversity), m_ueSetupList (ueSetupList),
|
||||
m_duration (duration), m_lastState (LteUeRrc::NUM_STATES)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << GetName ());
|
||||
}
|
||||
@@ -243,40 +238,22 @@ LteCellSelectionTestCase::DoRun ()
|
||||
enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (2)));
|
||||
enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (3)));
|
||||
|
||||
/*
|
||||
* Diversity of PLMN and CSG within cells (if enabled)
|
||||
*
|
||||
* Cell PLMN ID CSG ID CSG indication
|
||||
* ==== ======= ====== ==============
|
||||
* 1 0 1 true
|
||||
* 2 0 0 false
|
||||
* 3 1 1 true
|
||||
* 4 1 0 false
|
||||
*/
|
||||
|
||||
if (m_hasPlmnDiversity)
|
||||
{
|
||||
lteHelper->SetEnbPlmnId (enbDevs.Get (2), 1);
|
||||
lteHelper->SetEnbPlmnId (enbDevs.Get (3), 1);
|
||||
}
|
||||
NetDeviceContainer ueDevs;
|
||||
ueDevs = lteHelper->InstallUeDevice (ueNodes);
|
||||
|
||||
// Set the PLMN and CSG ID
|
||||
if (m_hasCsgDiversity)
|
||||
{
|
||||
lteHelper->SetEnbCsgId (enbDevs.Get (0), 1, true);
|
||||
lteHelper->SetEnbCsgId (enbDevs.Get (2), 1, true);
|
||||
}
|
||||
|
||||
NetDeviceContainer ueDevs;
|
||||
ueDevs = lteHelper->InstallUeDevice (ueNodes);
|
||||
|
||||
// Set the PLMN and CSG ID
|
||||
NS_ASSERT (m_ueSetupList.size () == ueDevs.GetN ());
|
||||
NetDeviceContainer::Iterator itDev;
|
||||
for (itSetup = m_ueSetupList.begin (), itDev = ueDevs.Begin ();
|
||||
itSetup != m_ueSetupList.end () || itDev != ueDevs.End ();
|
||||
itSetup++, itDev++)
|
||||
{
|
||||
lteHelper->SetUePlmnId (*itDev, itSetup->plmnIdentity);
|
||||
lteHelper->SetUeCsgId (*itDev, itSetup->csgIdentity);
|
||||
}
|
||||
|
||||
@@ -364,7 +341,7 @@ LteCellSelectionTestCase::DoRun ()
|
||||
uint16_t expectedCellId = itSetup->expectedCellId;
|
||||
NS_TEST_ASSERT_MSG_EQ (actualCellId, expectedCellId,
|
||||
"IMSI " << ueDev->GetImsi ()
|
||||
<< " has attached to an unexpected cell");
|
||||
<< " has attached to an unexpected cell");
|
||||
}
|
||||
|
||||
NS_TEST_ASSERT_MSG_EQ (m_lastState, 5, "UE is not at CONNECTED_NORMALLY state");
|
||||
|
||||
@@ -59,11 +59,9 @@ public:
|
||||
struct UeSetup_t
|
||||
{
|
||||
Vector position; ///< The position where the UE will be spawned in the simulation.
|
||||
uint32_t plmnIdentity; ///< Public Land Mobile Network identity of the UE.
|
||||
uint32_t csgIdentity; ///< Closed Subscriber Group identity of the UE.
|
||||
uint16_t expectedCellId; ///< The cell ID that the UE is expected to attach to (0 means that the UE should not attach to any cell).
|
||||
UeSetup_t (Vector position, uint32_t plmnIdentity, uint32_t csgIdentity,
|
||||
uint16_t expectedCellId);
|
||||
UeSetup_t (Vector position, uint32_t csgIdentity, uint16_t expectedCellId);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -73,8 +71,7 @@ public:
|
||||
* \param ueSetupList an array of UE setup parameters
|
||||
* \param duration length of simulation
|
||||
*/
|
||||
LteCellSelectionTestCase (std::string name, bool isEpcMode,
|
||||
bool hasPlmnDiversity, bool hasCsgDiversity,
|
||||
LteCellSelectionTestCase (std::string name, bool isEpcMode, bool hasCsgDiversity,
|
||||
std::vector<UeSetup_t> ueSetupList, Time duration);
|
||||
|
||||
virtual ~LteCellSelectionTestCase ();
|
||||
@@ -105,11 +102,6 @@ private:
|
||||
*/
|
||||
bool m_isEpcMode;
|
||||
|
||||
/**
|
||||
* \brief If true, then the north and south cells will be on their own PLMN.
|
||||
*/
|
||||
bool m_hasPlmnDiversity;
|
||||
|
||||
/**
|
||||
* \brief If true, then the west cells in the simulation will be CSG cell,
|
||||
* while the east cells will be non-CSG cells.
|
||||
|
||||
Reference in New Issue
Block a user