lte: Communicate the IMSI to UE MAC and PHY

This commit is contained in:
ZorazeAli
2019-04-24 10:03:16 +02:00
parent f3d720b166
commit dac14cf60f
7 changed files with 64 additions and 1 deletions

View File

@@ -119,6 +119,12 @@ public:
*/
virtual void NotifyConnectionSuccessful () = 0;
/**
* \brief A method call by UE RRC to communicate the IMSI to the UE MAC
* \param imsi the IMSI of the UE
*/
virtual void SetImsi (uint64_t imsi) = 0;
};

View File

@@ -190,6 +190,12 @@ public:
*/
virtual void StartInSnycDetection () = 0;
/**
* \brief A method call by UE RRC to communicate the IMSI to the UE PHY
* \param imsi the IMSI of the UE
*/
virtual void SetImsi (uint64_t imsi) = 0;
};
@@ -321,6 +327,7 @@ public:
virtual void ResetPhyAfterRlf ();
virtual void ResetRlfParams ();
virtual void StartInSnycDetection ();
virtual void SetImsi (uint64_t imsi);
private:
MemberLteUeCphySapProvider ();
@@ -441,6 +448,12 @@ void MemberLteUeCphySapProvider<C>::StartInSnycDetection ()
m_owner->DoStartInSnycDetection ();
}
template <class C>
void MemberLteUeCphySapProvider<C>::SetImsi (uint64_t imsi)
{
m_owner->DoSetImsi (imsi);
}
/**

View File

@@ -68,6 +68,7 @@ public:
virtual void RemoveLc (uint8_t lcId);
virtual void Reset ();
virtual void NotifyConnectionSuccessful ();
virtual void SetImsi (uint64_t imsi);
private:
LteUeMac* m_mac; ///< the UE MAC
@@ -127,6 +128,12 @@ UeMemberLteUeCmacSapProvider::NotifyConnectionSuccessful ()
m_mac->DoNotifyConnectionSuccessful ();
}
void
UeMemberLteUeCmacSapProvider::SetImsi (uint64_t imsi)
{
m_mac->DoSetImsi (imsi);
}
/// UeMemberLteMacSapProvider class
class UeMemberLteMacSapProvider : public LteMacSapProvider
@@ -239,6 +246,7 @@ LteUeMac::LteUeMac ()
m_freshUlBsr (false),
m_harqProcessId (0),
m_rnti (0),
m_imsi (0),
m_rachConfigured (false),
m_waitingForRaResponse (false)
@@ -536,6 +544,13 @@ LteUeMac::DoSetRnti (uint16_t rnti)
m_rnti = rnti;
}
void
LteUeMac::DoSetImsi (uint64_t imsi)
{
NS_LOG_FUNCTION (this);
m_imsi = imsi;
}
void
LteUeMac::DoStartNonContentionBasedRandomAccessProcedure (uint16_t rnti, uint8_t preambleId, uint8_t prachMask)

View File

@@ -175,6 +175,12 @@ private:
* establishment.
*/
void DoNotifyConnectionSuccessful ();
/**
* Set IMSI
*
* \param imsi the IMSI of the UE
*/
void DoSetImsi (uint64_t imsi);
// forwarded from PHY SAP
/**
@@ -253,6 +259,7 @@ private:
std::vector < uint8_t > m_miUlHarqProcessesPacketTimer; ///< timer for packet life in the buffer
uint16_t m_rnti; ///< RNTI
uint16_t m_imsi; ///< IMSI
bool m_rachConfigured; ///< is RACH configured?
LteUeCmacSapProvider::RachConfig m_rachConfig; ///< RACH configuration

View File

@@ -163,7 +163,8 @@ LteUePhy::LteUePhy (Ptr<LteSpectrumPhy> dlPhy, Ptr<LteSpectrumPhy> ulPhy)
m_pssReceived (false),
m_ueMeasurementsFilterPeriod (MilliSeconds (200)),
m_ueMeasurementsFilterLast (MilliSeconds (0)),
m_rsrpSinrSampleCounter (0)
m_rsrpSinrSampleCounter (0),
m_imsi (0)
{
m_amc = CreateObject <LteAmc> ();
m_powerControl = CreateObject <LteUePowerControl> ();
@@ -1507,6 +1508,13 @@ LteUePhy::DoStartInSnycDetection ()
m_downlinkInSync = false;
}
void
LteUePhy::DoSetImsi (uint64_t imsi)
{
NS_LOG_FUNCTION (this);
m_imsi = imsi;
}
void
LteUePhy::InitializeRlfParams ()
{

View File

@@ -545,6 +545,12 @@ private:
*
*/
void InitializeRlfParams ();
/**
* Set IMSI
*
* \param imsi the IMSI of the UE
*/
void DoSetImsi (uint64_t imsi);
/**
* \brief Do set RSRP filter coefficient
*
@@ -758,6 +764,7 @@ private:
uint16_t m_numOfFrames; ///< count the number of frames for which the downlink radio link quality is estimated
double m_sinrDbFrame; ///< the average SINR per radio frame
SpectrumValue m_ctrlSinrForRlf; ///< the CTRL SINR used for RLF detection
uint64_t m_imsi;
}; // end of `class LteUePhy`

View File

@@ -434,6 +434,13 @@ LteUeRrc::SetImsi (uint64_t imsi)
{
NS_LOG_FUNCTION (this << imsi);
m_imsi = imsi;
//Communicate the IMSI to MACs and PHYs for all the component carriers
for (uint16_t i = 0; i < m_numberOfComponentCarriers; i++)
{
m_cmacSapProvider.at(i)->SetImsi (m_imsi);
m_cphySapProvider.at(i)->SetImsi (m_imsi);
}
}
void