Converted CSG ID and CSG indication as attributes to LTE devices
This commit is contained in:
@@ -1020,16 +1020,17 @@ Initial cell selection
|
||||
|
||||
The test suite `lte-cell-selection` is responsible for verifying the
|
||||
:ref:`sec-initial-cell-selection` procedure. The test is a simulation of a small
|
||||
etwork of 4 non-CSG cells and 2 non-CSG cells. Several static UEs are then
|
||||
placed at predefined locations and with initial cell selection procedure
|
||||
enabled. Thus the UEs enters the simulation without being attached to any cell.
|
||||
network of 2 non-CSG cells and 2 non-CSG cells. Several static UEs are then
|
||||
placed at predefined locations. The UEs enter the simulation without being
|
||||
attached to any cell. Initial cell selection is enabled for these UEs, so each
|
||||
UE will find the best cell and attach to it by themselves.
|
||||
|
||||
At predefined check point times during the simulation, the test verifies that
|
||||
At predefined check points time during the simulation, the test verifies that
|
||||
every UE is attached to the right cell. Moreover, the test also ensures that the
|
||||
UE is properly connected, i.e., its final state is `CONNECTED_NORMALLY`. Figure
|
||||
:ref:`fig-lte-cell-selection-scenario` depicts the network layout and the
|
||||
expected result. When a UE is depicted as having 2 successful cell selections,
|
||||
any of them is accepted by the test case.
|
||||
expected result. When a UE is depicted as having 2 successful cell selections
|
||||
(e.g., UE #3 and #4), any of them is accepted by the test case.
|
||||
|
||||
.. _fig-lte-cell-selection-scenario:
|
||||
|
||||
@@ -1039,13 +1040,15 @@ any of them is accepted by the test case.
|
||||
|
||||
Sample result of cell selection test
|
||||
|
||||
It shows that CSG members may attach to either CSG or non-CSG cells, and simply
|
||||
choose the stronger one. On the other hand, non-members can only attach to
|
||||
non-CSG cells, even when they are actually receiving stronger signal from a CSG
|
||||
cell.
|
||||
The figure shows that CSG members may attach to either CSG or non-CSG cells, and
|
||||
simply choose the stronger one. On the other hand, non-members can only attach
|
||||
to non-CSG cells, even when they are actually receiving stronger signal from a
|
||||
CSG cell.
|
||||
|
||||
For reference purpose, the error rate at each UE when receiving transmission of
|
||||
control messages are shown in Table :ref:`tab-cell-selection-error-rate` below.
|
||||
For reference purpose, Table :ref:`tab-cell-selection-error-rate` shows the
|
||||
error rate of each UE when receiving transmission from the control channel.
|
||||
Based on this information, the check point time for UE #3 is done at a later
|
||||
time than the others to compensate for its higher risk of failure.
|
||||
|
||||
.. _tab-cell-selection-error-rate:
|
||||
|
||||
@@ -1062,8 +1065,8 @@ control messages are shown in Table :ref:`tab-cell-selection-error-rate` below.
|
||||
6 0.00%
|
||||
==== ==========
|
||||
|
||||
The test uses the default Friis path loss model and without channel fading
|
||||
enabled.
|
||||
The test uses the default Friis path loss model and without any channel fading
|
||||
model.
|
||||
|
||||
|
||||
GTP-U protocol
|
||||
|
||||
@@ -997,23 +997,29 @@ only to some UEs which have been previously registered by the owner. The eNodeB
|
||||
and the registered UEs altogether form a CSG.
|
||||
|
||||
The access restriction can be simulated by "labeling" the CSG members with the
|
||||
same CSG ID. This function is available from ``LteHelper`` class::
|
||||
same CSG ID. This is done through the attributes in both eNodeB and UE, for
|
||||
example using the following ``LteHelper`` functions::
|
||||
|
||||
// label the following eNodeBs with CSG identity of 1 and CSG indication enabled
|
||||
lteHelper->SetEnbDeviceAttribute ("CsgId", UintegerValue (1));
|
||||
lteHelper->SetEnbDeviceAttribute ("CsgIndication", BooleanValue (true));
|
||||
|
||||
// label one or more eNodeBs with CSG identity of 1 and CSG indication enabled
|
||||
lteHelper->SetEnbCsgId (enbDevs, 1, true);
|
||||
|
||||
// label one or more UEs with CSG identity of 1
|
||||
lteHelper->SetUeCsgId (ueDevs, 1);
|
||||
lteHelper->SetUeDeviceAttribute ("CsgId", UintegerValue (1));
|
||||
|
||||
// install the eNodeBs and UEs
|
||||
NetDeviceContainer csgEnbDevs = lteHelper->InstallEnbDevice (csgEnbNodes);
|
||||
NetDeviceContainer csgUeDevs = lteHelper->InstallUeDevice (csgUeNodes);
|
||||
|
||||
Then enable the initial cell selection procedure on the UEs::
|
||||
|
||||
lteHelper->Attach (ueDevs);
|
||||
lteHelper->Attach (csgUeDevs);
|
||||
|
||||
This is necessary because the CSG restriction only works with automatic method
|
||||
of network attachment, but not in the manual method.
|
||||
|
||||
Note that setting the CSG indication of an eNodeB as false (the default value)
|
||||
will disable the restriction, i.e. any UEs can connect to this eNodeB.
|
||||
will disable the restriction, i.e., any UEs can connect to this eNodeB.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -526,6 +526,8 @@ main (int argc, char *argv[])
|
||||
lteHelper->SetEnbDeviceAttribute ("UlEarfcn", UintegerValue (homeEnbDlEarfcn + 18000));
|
||||
lteHelper->SetEnbDeviceAttribute ("DlBandwidth", UintegerValue (homeEnbBandwidth));
|
||||
lteHelper->SetEnbDeviceAttribute ("UlBandwidth", UintegerValue (homeEnbBandwidth));
|
||||
lteHelper->SetEnbDeviceAttribute ("CsgId", UintegerValue (1));
|
||||
lteHelper->SetEnbDeviceAttribute ("CsgIndication", BooleanValue (true));
|
||||
NetDeviceContainer homeEnbDevs = lteHelper->InstallEnbDevice (homeEnbs);
|
||||
|
||||
|
||||
@@ -547,7 +549,6 @@ main (int argc, char *argv[])
|
||||
mobility.SetPositionAllocator (positionAlloc);
|
||||
mobility.Install (macroUes);
|
||||
BuildingsHelper::Install (macroUes);
|
||||
|
||||
NetDeviceContainer macroUeDevs = lteHelper->InstallUeDevice (macroUes);
|
||||
|
||||
|
||||
@@ -556,12 +557,10 @@ main (int argc, char *argv[])
|
||||
mobility.SetPositionAllocator (positionAlloc);
|
||||
mobility.Install (homeUes);
|
||||
BuildingsHelper::Install (homeUes);
|
||||
// set the home UE as a CSG member of the home eNodeBs
|
||||
lteHelper->SetUeDeviceAttribute ("CsgId", UintegerValue (1));
|
||||
NetDeviceContainer homeUeDevs = lteHelper->InstallUeDevice (homeUes);
|
||||
|
||||
// configure CSG in home eNodeBs and UEs
|
||||
lteHelper->SetEnbCsgId (homeEnbDevs, 1, true);
|
||||
lteHelper->SetUeCsgId (homeUeDevs, 1);
|
||||
|
||||
Ipv4Address remoteHostAddr;
|
||||
NodeContainer ues;
|
||||
Ipv4StaticRoutingHelper ipv4RoutingHelper;
|
||||
|
||||
@@ -896,36 +896,6 @@ LteHelper::ActivateDataRadioBearer (NetDeviceContainer ueDevices, EpsBearer bear
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetEnbCsgId (NetDeviceContainer enbDevices, uint32_t csgId,
|
||||
bool csgIndication)
|
||||
{
|
||||
for (NetDeviceContainer::Iterator i = enbDevices.Begin ();
|
||||
i != enbDevices.End (); ++i)
|
||||
{
|
||||
SetEnbCsgId (*i, csgId, csgIndication);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetEnbCsgId (Ptr<NetDevice> enbDevice, uint32_t csgId,
|
||||
bool csgIndication)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << enbDevice << csgId << csgIndication);
|
||||
|
||||
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.csgIdentity = csgId;
|
||||
sib1.cellAccessRelatedInfo.csgIndication = csgIndication;
|
||||
rrc->SetSystemInformationBlockType1 (sib1);
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetEnbQRxLevMin (NetDeviceContainer enbDevices, int8_t qRxLevMin)
|
||||
{
|
||||
@@ -953,31 +923,6 @@ LteHelper::SetEnbQRxLevMin (Ptr<NetDevice> enbDevice, int8_t qRxLevMin)
|
||||
rrc->SetSystemInformationBlockType1 (sib1);
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetUeCsgId (NetDeviceContainer ueDevices, uint32_t csgId)
|
||||
{
|
||||
for (NetDeviceContainer::Iterator i = ueDevices.Begin ();
|
||||
i != ueDevices.End (); ++i)
|
||||
{
|
||||
SetUeCsgId (*i, csgId);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LteHelper::SetUeCsgId (Ptr<NetDevice> ueDevice, uint32_t csgId)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << ueDevice << csgId);
|
||||
|
||||
Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> ();
|
||||
if (ueLteDevice == 0)
|
||||
{
|
||||
NS_FATAL_ERROR ("The passed NetDevice must be an LteUeNetDevice");
|
||||
}
|
||||
|
||||
ueLteDevice->GetNas ()->SetCsgId (csgId);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LteHelper::EnableLogComponents (void)
|
||||
{
|
||||
|
||||
@@ -378,62 +378,6 @@ public:
|
||||
*/
|
||||
void SetFadingModelAttribute (std::string n, const AttributeValue &v);
|
||||
|
||||
/**
|
||||
* \brief Associate the eNodeB devices with a particular CSG information.
|
||||
* \param enbDevices the set of eNodeB devices to be updated
|
||||
* \param csgId the intended Closed Subscriber Group identity
|
||||
* \param csgIndication if TRUE, only CSG members are allowed to access the
|
||||
* cell
|
||||
*
|
||||
* CSG identity is a number identifying a Closed Subscriber Group which the
|
||||
* cell belongs to. eNodeB is associated with a single CSG identity.
|
||||
*
|
||||
* The same CSG identity can also be associated to several UEs, which is
|
||||
* equivalent as enlisting these UEs as the members of this particular CSG.
|
||||
* When the CSG indication field is set to TRUE, only UEs which are members of
|
||||
* the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
|
||||
* enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
|
||||
* cell and implements open access mode.
|
||||
*
|
||||
* If not set, eNodeB devices are non-CSG cells and bear a CSG identity of 0
|
||||
* by default.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetUeCsgId(NetDeviceContainer, uint32_t)
|
||||
*/
|
||||
void SetEnbCsgId (NetDeviceContainer enbDevices, uint32_t csgId,
|
||||
bool csgIndication);
|
||||
|
||||
/**
|
||||
* \brief Associate the eNodeB devices with a particular CSG information.
|
||||
* \param enbDevice
|
||||
* \param csgId the intended Closed Subscriber Group identity
|
||||
* \param csgIndication if TRUE, only CSG members are allowed to access the
|
||||
* cell
|
||||
*
|
||||
* CSG identity is a number identifying a Closed Subscriber Group which the
|
||||
* cell belongs to. eNodeB is associated with a single CSG identity.
|
||||
*
|
||||
* The same CSG identity can also be associated to several UEs, which is
|
||||
* equivalent as enlisting these UEs as the members of this particular CSG.
|
||||
* When the CSG indication field is set to TRUE, only UEs which are members of
|
||||
* the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
|
||||
* enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
|
||||
* cell and implements open access mode.
|
||||
*
|
||||
* If not set, eNodeB devices are non-CSG cells and bear a CSG identity of 0
|
||||
* by default.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetUeCsgId(Ptr<NetDevice>, uint32_t)
|
||||
*/
|
||||
void SetEnbCsgId (Ptr<NetDevice> enbDevice, uint32_t csgId,
|
||||
bool csgIndication);
|
||||
|
||||
/**
|
||||
* \brief Set the Q-RxLevMin parameter of the eNodeB devices to be used in
|
||||
* cell selection.
|
||||
@@ -470,42 +414,6 @@ public:
|
||||
*/
|
||||
void SetEnbQRxLevMin (Ptr<NetDevice> enbDevice, int8_t qRxLevMin);
|
||||
|
||||
/**
|
||||
* \brief Enlist the UE devices as members of a particular CSG.
|
||||
* \param ueDevices the set of UE devices to be updated
|
||||
* \param csgId the intended Closed Subscriber Group identity
|
||||
*
|
||||
* UE is associated with a single CSG identity, and thus becoming a member of
|
||||
* this particular CSG. As a result, the UE may gain access to cells which
|
||||
* belong to this CSG. This does not revoke the UE's access to non-CSG cells.
|
||||
*
|
||||
* If not set, UE devices bear a default CSG identity of 0.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetEnbCsgId(NetDeviceContainer, uint32_t, bool)
|
||||
*/
|
||||
void SetUeCsgId (NetDeviceContainer ueDevices, uint32_t csgId);
|
||||
|
||||
/**
|
||||
* \brief Enlist the UE device as a member of a particular CSG.
|
||||
* \param ueDevice
|
||||
* \param csgId the intended Closed Subscriber Group identity
|
||||
*
|
||||
* UE is associated with a single CSG identity, and thus becoming a member of
|
||||
* this particular CSG. As a result, the UE may gain access to cells which
|
||||
* belong to this CSG. This does not revoke the UE's access to non-CSG cells.
|
||||
*
|
||||
* If not set, UE devices bear a default CSG identity of 0.
|
||||
*
|
||||
* This restriction only applies to initial cell selection and EPC-enabled
|
||||
* simulation.
|
||||
*
|
||||
* \sa SetEnbCsgId(Ptr<NetDevice>, uint32_t, bool)
|
||||
*/
|
||||
void SetUeCsgId (Ptr<NetDevice> ueDevice, uint32_t csgId);
|
||||
|
||||
/**
|
||||
* Enables logging for all components of the LENA architecture
|
||||
*
|
||||
|
||||
@@ -116,12 +116,28 @@ TypeId LteEnbNetDevice::GetTypeId (void)
|
||||
UintegerValue (18100),
|
||||
MakeUintegerAccessor (&LteEnbNetDevice::m_ulEarfcn),
|
||||
MakeUintegerChecker<uint16_t> (18000, 24149))
|
||||
.AddAttribute ("CsgId",
|
||||
"The Closed Subscriber Group (CSG) identity that this eNodeB belongs to",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&LteEnbNetDevice::SetCsgId,
|
||||
&LteEnbNetDevice::GetCsgId),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
.AddAttribute ("CsgIndication",
|
||||
"If true, only UEs which are members of the CSG (i.e. same CSG ID) "
|
||||
"can gain access to the eNodeB, therefore enforcing closed access mode. "
|
||||
"Otherwise, the eNodeB operates as a non-CSG cell and implements open access mode.",
|
||||
BooleanValue (false),
|
||||
MakeBooleanAccessor (&LteEnbNetDevice::SetCsgIndication,
|
||||
&LteEnbNetDevice::GetCsgIndication),
|
||||
MakeBooleanChecker ())
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
LteEnbNetDevice::LteEnbNetDevice ()
|
||||
: m_anr (0)
|
||||
: m_isConstructed (false),
|
||||
m_isConfigured (false),
|
||||
m_anr (0)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
@@ -163,21 +179,17 @@ LteEnbNetDevice::DoDispose ()
|
||||
|
||||
|
||||
Ptr<LteEnbMac>
|
||||
LteEnbNetDevice::GetMac (void) const
|
||||
LteEnbNetDevice::GetMac () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_mac;
|
||||
}
|
||||
|
||||
|
||||
Ptr<LteEnbPhy>
|
||||
LteEnbNetDevice::GetPhy (void) const
|
||||
LteEnbNetDevice::GetPhy () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_phy;
|
||||
}
|
||||
|
||||
|
||||
Ptr<LteEnbRrc>
|
||||
LteEnbNetDevice::GetRrc () const
|
||||
{
|
||||
@@ -199,6 +211,7 @@ LteEnbNetDevice::GetUlBandwidth () const
|
||||
void
|
||||
LteEnbNetDevice::SetUlBandwidth (uint8_t bw)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << uint16_t (bw));
|
||||
switch (bw)
|
||||
{
|
||||
case 6:
|
||||
@@ -225,6 +238,7 @@ LteEnbNetDevice::GetDlBandwidth () const
|
||||
void
|
||||
LteEnbNetDevice::SetDlBandwidth (uint8_t bw)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << uint16_t (bw));
|
||||
switch (bw)
|
||||
{
|
||||
case 6:
|
||||
@@ -251,6 +265,7 @@ LteEnbNetDevice::GetDlEarfcn () const
|
||||
void
|
||||
LteEnbNetDevice::SetDlEarfcn (uint16_t earfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << earfcn);
|
||||
m_dlEarfcn = earfcn;
|
||||
}
|
||||
|
||||
@@ -263,14 +278,44 @@ LteEnbNetDevice::GetUlEarfcn () const
|
||||
void
|
||||
LteEnbNetDevice::SetUlEarfcn (uint16_t earfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << earfcn);
|
||||
m_ulEarfcn = earfcn;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
LteEnbNetDevice::GetCsgId () const
|
||||
{
|
||||
return m_csgId;
|
||||
}
|
||||
|
||||
void
|
||||
LteEnbNetDevice::SetCsgId (uint32_t csgId)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << csgId);
|
||||
m_csgId = csgId;
|
||||
UpdateConfig (); // propagate the change to RRC level
|
||||
}
|
||||
|
||||
bool
|
||||
LteEnbNetDevice::GetCsgIndication () const
|
||||
{
|
||||
return m_csgIndication;
|
||||
}
|
||||
|
||||
void
|
||||
LteEnbNetDevice::SetCsgIndication (bool csgIndication)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << csgIndication);
|
||||
m_csgIndication = csgIndication;
|
||||
UpdateConfig (); // propagate the change to RRC level
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LteEnbNetDevice::DoInitialize (void)
|
||||
{
|
||||
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_isConstructed = true;
|
||||
UpdateConfig ();
|
||||
m_phy->Initialize ();
|
||||
m_mac->Initialize ();
|
||||
@@ -284,7 +329,6 @@ LteEnbNetDevice::DoInitialize (void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool
|
||||
LteEnbNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
|
||||
{
|
||||
@@ -294,16 +338,36 @@ LteEnbNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protoco
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
LteEnbNetDevice::UpdateConfig (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
|
||||
m_rrc->ConfigureCell (m_ulBandwidth, m_dlBandwidth, m_ulEarfcn, m_dlEarfcn, m_cellId);
|
||||
m_rrc->SetCellId (m_cellId);
|
||||
if (m_isConstructed)
|
||||
{
|
||||
if (!m_isConfigured)
|
||||
{
|
||||
NS_LOG_LOGIC (this << " Configure cell " << m_cellId);
|
||||
// we have to make sure that this function is called only once
|
||||
m_rrc->ConfigureCell (m_ulBandwidth, m_dlBandwidth, m_ulEarfcn, m_dlEarfcn, m_cellId);
|
||||
m_isConfigured = true;
|
||||
}
|
||||
|
||||
NS_LOG_LOGIC (this << " Updating SIB1 of cell " << m_cellId
|
||||
<< " with CSG ID " << m_csgId
|
||||
<< " and CSG indication " << m_csgIndication);
|
||||
LteRrcSap::SystemInformationBlockType1 sib1 = m_rrc->GetSystemInformationBlockType1 ();
|
||||
sib1.cellAccessRelatedInfo.csgIdentity = m_csgId;
|
||||
sib1.cellAccessRelatedInfo.csgIndication = m_csgIndication;
|
||||
m_rrc->SetSystemInformationBlockType1 (sib1);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Lower layers are not ready yet, so do nothing now and expect
|
||||
* ``DoInitialize`` to re-invoke this function.
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -122,6 +122,50 @@ public:
|
||||
*/
|
||||
void SetUlEarfcn (uint16_t earfcn);
|
||||
|
||||
/**
|
||||
* \brief Returns the CSG ID of the eNodeB.
|
||||
* \return the Closed Subscriber Group identity
|
||||
* \sa LteEnbNetDevice::SetCsgId
|
||||
*/
|
||||
uint32_t GetCsgId () const;
|
||||
|
||||
/**
|
||||
* \brief Associate the eNodeB device with a particular CSG.
|
||||
* \param csgId the intended Closed Subscriber Group identity
|
||||
*
|
||||
* CSG identity is a number identifying a Closed Subscriber Group which the
|
||||
* cell belongs to. eNodeB is associated with a single CSG identity.
|
||||
*
|
||||
* The same CSG identity can also be associated to several UEs, which is
|
||||
* equivalent as enlisting these UEs as the members of this particular CSG.
|
||||
*
|
||||
* \sa LteEnbNetDevice::SetCsgIndication
|
||||
*/
|
||||
void SetCsgId (uint32_t csgId);
|
||||
|
||||
/**
|
||||
* \brief Returns the CSG indication flag of the eNodeB.
|
||||
* \return the CSG indication flag
|
||||
* \sa LteEnbNetDevice::SetCsgIndication
|
||||
*/
|
||||
bool GetCsgIndication () const;
|
||||
|
||||
/**
|
||||
* \brief Enable or disable the CSG indication flag.
|
||||
* \param csgIndication if TRUE, only CSG members are allowed to access this
|
||||
* cell
|
||||
*
|
||||
* When the CSG indication field is set to TRUE, only UEs which are members of
|
||||
* the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
|
||||
* enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
|
||||
* cell and implements open access mode.
|
||||
*
|
||||
* \note This restriction only applies to initial cell selection and
|
||||
* EPC-enabled simulation.
|
||||
*
|
||||
* \sa LteEnbNetDevice::SetCsgIndication
|
||||
*/
|
||||
void SetCsgIndication (bool csgIndication);
|
||||
|
||||
protected:
|
||||
// inherited from Object
|
||||
@@ -129,16 +173,20 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
bool m_isConstructed;
|
||||
bool m_isConfigured;
|
||||
|
||||
/**
|
||||
* Several attributes (e.g., the bandwidth) are exported as
|
||||
* attributes of the LteEnbNetDevice from a user perspective, but
|
||||
* are actually used also in other modules as well (the RRC, the
|
||||
* PHY, the scheduler...). This methods takes care of updating the
|
||||
* configuration of all modules so that their copy of the attribute
|
||||
* values is in sync with the one in the LteEnbNetDevice.
|
||||
* \brief Propagate attributes and configuration to sub-modules.
|
||||
*
|
||||
* Several attributes (e.g., the bandwidth) are exported as the attributes of
|
||||
* the LteEnbNetDevice from a user perspective, but are actually used also in
|
||||
* other sub-modules (the RRC, the PHY, the scheduler, etc.). This method
|
||||
* takes care of updating the configuration of all these sub-modules so that
|
||||
* their copy of attribute values are in sync with the one in
|
||||
* the LteEnbNetDevice.
|
||||
*/
|
||||
void UpdateConfig (void);
|
||||
void UpdateConfig ();
|
||||
|
||||
Ptr<LteEnbMac> m_mac;
|
||||
|
||||
@@ -160,7 +208,10 @@ private:
|
||||
uint16_t m_dlEarfcn; /**< downlink carrier frequency */
|
||||
uint16_t m_ulEarfcn; /**< uplink carrier frequency */
|
||||
|
||||
};
|
||||
uint16_t m_csgId;
|
||||
bool m_csgIndication;
|
||||
|
||||
}; // end of class LteEnbNetDevice
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
@@ -599,6 +599,8 @@ public:
|
||||
*
|
||||
* Typically runs when the eNodeB NetDevice is installed, for instance by
|
||||
* `LteHelper::InstallEnbDevice` (i.e. before the simulation starts).
|
||||
*
|
||||
* \warning Raises an error when executed more than once.
|
||||
*/
|
||||
void ConfigureCell (uint8_t ulBandwidth,
|
||||
uint8_t dlBandwidth,
|
||||
|
||||
@@ -90,6 +90,15 @@ TypeId LteUeNetDevice::GetTypeId (void)
|
||||
MakeUintegerAccessor (&LteUeNetDevice::SetDlEarfcn,
|
||||
&LteUeNetDevice::GetDlEarfcn),
|
||||
MakeUintegerChecker<uint16_t> (0, 6149))
|
||||
.AddAttribute ("CsgId",
|
||||
"The Closed Subscriber Group (CSG) identity that this UE is associated with, "
|
||||
"i.e., giving the UE access to cells which belong to this particular CSG. "
|
||||
"This restriction only applies to initial cell selection and EPC-enabled simulation. "
|
||||
"This does not revoke the UE's access to non-CSG cells. ",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&LteUeNetDevice::SetCsgId,
|
||||
&LteUeNetDevice::GetCsgId),
|
||||
MakeUintegerChecker<uint32_t> ())
|
||||
;
|
||||
|
||||
return tid;
|
||||
@@ -97,6 +106,7 @@ TypeId LteUeNetDevice::GetTypeId (void)
|
||||
|
||||
|
||||
LteUeNetDevice::LteUeNetDevice (void)
|
||||
: m_isConstructed (false)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
@@ -126,8 +136,22 @@ void
|
||||
LteUeNetDevice::UpdateConfig (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_nas->SetImsi (m_imsi);
|
||||
m_rrc->SetImsi (m_imsi);
|
||||
|
||||
if (m_isConstructed)
|
||||
{
|
||||
NS_LOG_LOGIC (this << " Updating configuration: IMSI " << m_imsi
|
||||
<< " CSG ID " << m_csgId);
|
||||
m_nas->SetImsi (m_imsi);
|
||||
m_rrc->SetImsi (m_imsi);
|
||||
m_nas->SetCsgId (m_csgId); // this also handles propagation to RRC
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* NAS and RRC instances are not be ready yet, so do nothing now and
|
||||
* expect ``DoInitialize`` to re-invoke this function.
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -183,6 +207,21 @@ LteUeNetDevice::SetDlEarfcn (uint16_t earfcn)
|
||||
m_dlEarfcn = earfcn;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
LteUeNetDevice::GetCsgId () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
return m_csgId;
|
||||
}
|
||||
|
||||
void
|
||||
LteUeNetDevice::SetCsgId (uint32_t csgId)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << csgId);
|
||||
m_csgId = csgId;
|
||||
UpdateConfig (); // propagate the change down to NAS and RRC
|
||||
}
|
||||
|
||||
void
|
||||
LteUeNetDevice::SetTargetEnb (Ptr<LteEnbNetDevice> enb)
|
||||
{
|
||||
@@ -202,6 +241,7 @@ void
|
||||
LteUeNetDevice::DoInitialize (void)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_isConstructed = true;
|
||||
UpdateConfig ();
|
||||
m_phy->Initialize ();
|
||||
m_mac->Initialize ();
|
||||
|
||||
@@ -89,6 +89,25 @@ public:
|
||||
*/
|
||||
void SetDlEarfcn (uint16_t earfcn);
|
||||
|
||||
/**
|
||||
* \brief Returns the CSG ID the UE is currently a member of.
|
||||
* \return the Closed Subscriber Group identity
|
||||
*/
|
||||
uint32_t GetCsgId () const;
|
||||
|
||||
/**
|
||||
* \brief Enlist the UE device as a member of a particular CSG.
|
||||
* \param csgId the intended Closed Subscriber Group identity
|
||||
*
|
||||
* UE is associated with a single CSG identity, and thus becoming a member of
|
||||
* this particular CSG. As a result, the UE may gain access to cells which
|
||||
* belong to this CSG. This does not revoke the UE's access to non-CSG cells.
|
||||
*
|
||||
* \note This restriction only applies to initial cell selection and
|
||||
* EPC-enabled simulation.
|
||||
*/
|
||||
void SetCsgId (uint32_t csgId);
|
||||
|
||||
/**
|
||||
* \brief Set the targer eNB where the UE is registered
|
||||
* \param enb
|
||||
@@ -108,16 +127,18 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
bool m_isConstructed;
|
||||
|
||||
/**
|
||||
* Some attributes are exported as
|
||||
* attributes of the LteUeNetDevice from a user perspective, but
|
||||
* are actually used also in other modules as well (the RRC, the
|
||||
* PHY...). This methods takes care of updating the
|
||||
* configuration of all modules so that their copy of the attribute
|
||||
* values is in sync with the one in the LteUeNetDevice.
|
||||
* \brief Propagate attributes and configuration to sub-modules.
|
||||
*
|
||||
* Several attributes (e.g., the IMSI) are exported as the attributes of the
|
||||
* LteUeNetDevice from a user perspective, but are actually used also in other
|
||||
* sub-modules (the RRC, the PHY, etc.). This method takes care of updating
|
||||
* the configuration of all these sub-modules so that their copy of attribute
|
||||
* values are in sync with the one in the LteUeNetDevice.
|
||||
*/
|
||||
void UpdateConfig (void);
|
||||
void UpdateConfig ();
|
||||
|
||||
Ptr<LteEnbNetDevice> m_targetEnb;
|
||||
|
||||
@@ -130,7 +151,9 @@ private:
|
||||
|
||||
uint16_t m_dlEarfcn; /**< downlink carrier frequency */
|
||||
|
||||
};
|
||||
uint32_t m_csgId;
|
||||
|
||||
}; // end of class LteUeNetDevice
|
||||
|
||||
} // namespace ns3
|
||||
|
||||
|
||||
@@ -427,18 +427,29 @@ private:
|
||||
* \param measId the measurement identity which report is to be submitted.
|
||||
*
|
||||
* Implements Section 5.5.5 "Measurement reporting" of 3GPP TS 36.331.
|
||||
* Producing a *measurement report* involves several tasks such as including
|
||||
* the latest *measurement results* (RSRP and RSRQ) of the serving cells and
|
||||
* some of the neighbouring cells, including the list of cells that triggered
|
||||
* the reporting, and finally sorting the lists.
|
||||
* Producing a *measurement report* involves several tasks such as:
|
||||
* - including the measurement results of the serving cell into the report;
|
||||
* - selecting some neighbour cells which triggered the reporting (i.e., those
|
||||
* in *cellsTriggeredList*) to be included in the report;
|
||||
* - sorting the order of neighbour cells in the report by their RSRP or RSRQ
|
||||
* measurement results (the highest comes first); and
|
||||
* - ensuring the number of neighbour cells in the report is under the
|
||||
* *maxReportCells* limit defined by the measurement identity's reporting
|
||||
* configuration.
|
||||
*
|
||||
* The RSRP and RSRQ measurement results included in the report are expressed
|
||||
* in 3GPP-specified range format. They are converted from dBm and dB units
|
||||
* using EutranMeasurementMapping::Dbm2RsrpRange and
|
||||
* EutranMeasurementMapping::Db2RsrqRange functions.
|
||||
*
|
||||
* Measurement report is submitted to the serving eNodeB through the *RRC
|
||||
* protocol*. The LteUeRrcSapUser::SendMeasurementReport method of the *UE RRC
|
||||
* SAP* facilitates this submission.
|
||||
*
|
||||
* After the submission, the function schedules the next execution of the same
|
||||
* function. The period is determined by the *report interval* specified by
|
||||
* the measurement identity's *reporting configuration*.
|
||||
* After the submission, the function will repeat itself after a certain
|
||||
* interval. The interval length may vary from 120 ms to 60 minutes and is
|
||||
* determined by the *report interval* parameter specified by the measurement
|
||||
* identity's reporting configuration.
|
||||
*/
|
||||
void SendMeasurementReport (uint8_t measId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user