Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
This commit is contained in:
@@ -611,13 +611,13 @@ LteHelper::Attach (Ptr<NetDevice> ueDevice)
|
||||
NS_FATAL_ERROR ("The passed NetDevice must be an LteUeNetDevice");
|
||||
}
|
||||
|
||||
// execute cell search
|
||||
Ptr<LteUePhy> uePhy = ueLteDevice->GetPhy ();
|
||||
uePhy->CellSearch ();
|
||||
|
||||
// instruct UE to immediately enter CONNECTED mode after camping
|
||||
// initiate cell selection
|
||||
Ptr<EpcUeNas> ueNas = ueLteDevice->GetNas ();
|
||||
NS_ASSERT (ueNas != 0);
|
||||
uint16_t dlEarfcn = ueLteDevice->GetDlEarfcn ();
|
||||
ueNas->StartCellSelection (dlEarfcn);
|
||||
|
||||
// instruct UE to immediately enter CONNECTED mode after camping
|
||||
ueNas->Connect ();
|
||||
|
||||
// activate default EPS bearer
|
||||
@@ -1195,7 +1195,7 @@ FindImsiForUe (std::string path, uint16_t rnti)
|
||||
|
||||
void
|
||||
DlPhyTransmissionCallback (Ptr<PhyTxStatsCalculator> phyTxStats,
|
||||
std::string path, PhyTransmissionStatParameters params)
|
||||
std::string path, PhyTransmissionStatParameters params)
|
||||
{
|
||||
NS_LOG_FUNCTION (phyTxStats << path);
|
||||
uint64_t imsi = 0;
|
||||
@@ -1217,7 +1217,7 @@ DlPhyTransmissionCallback (Ptr<PhyTxStatsCalculator> phyTxStats,
|
||||
|
||||
void
|
||||
UlPhyTransmissionCallback (Ptr<PhyTxStatsCalculator> phyTxStats,
|
||||
std::string path, PhyTransmissionStatParameters params)
|
||||
std::string path, PhyTransmissionStatParameters params)
|
||||
{
|
||||
NS_LOG_FUNCTION (phyTxStats << path);
|
||||
uint64_t imsi = 0;
|
||||
@@ -1240,7 +1240,7 @@ UlPhyTransmissionCallback (Ptr<PhyTxStatsCalculator> phyTxStats,
|
||||
|
||||
void
|
||||
DlPhyReceptionCallback (Ptr<PhyRxStatsCalculator> phyRxStats,
|
||||
std::string path, PhyReceptionStatParameters params)
|
||||
std::string path, PhyReceptionStatParameters params)
|
||||
{
|
||||
NS_LOG_FUNCTION (phyRxStats << path);
|
||||
uint64_t imsi = 0;
|
||||
@@ -1262,7 +1262,7 @@ DlPhyReceptionCallback (Ptr<PhyRxStatsCalculator> phyRxStats,
|
||||
|
||||
void
|
||||
UlPhyReceptionCallback (Ptr<PhyRxStatsCalculator> phyRxStats,
|
||||
std::string path, PhyReceptionStatParameters params)
|
||||
std::string path, PhyReceptionStatParameters params)
|
||||
{
|
||||
NS_LOG_FUNCTION (phyRxStats << path);
|
||||
uint64_t imsi = 0;
|
||||
@@ -1418,8 +1418,8 @@ LteHelper::EnableUlMacTraces (void)
|
||||
|
||||
void
|
||||
ReportCurrentCellRsrpSinrCallback (Ptr<PhyStatsCalculator> phyStats,
|
||||
std::string path, uint16_t cellId, uint16_t rnti,
|
||||
double rsrp, double sinr)
|
||||
std::string path, uint16_t cellId, uint16_t rnti,
|
||||
double rsrp, double sinr)
|
||||
{
|
||||
NS_LOG_FUNCTION (phyStats << path);
|
||||
uint64_t imsi = 0;
|
||||
|
||||
@@ -133,6 +133,13 @@ EpcUeNas::SetForwardUpCallback (Callback <void, Ptr<Packet> > cb)
|
||||
m_forwardUpCallback = cb;
|
||||
}
|
||||
|
||||
void
|
||||
EpcUeNas::StartCellSelection (uint16_t dlEarfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_asSapProvider->StartCellSelection (dlEarfcn);
|
||||
}
|
||||
|
||||
void
|
||||
EpcUeNas::Connect ()
|
||||
{
|
||||
@@ -143,13 +150,12 @@ EpcUeNas::Connect ()
|
||||
}
|
||||
|
||||
void
|
||||
EpcUeNas::Connect (uint16_t cellId, uint16_t earfcn)
|
||||
EpcUeNas::Connect (uint16_t cellId, uint16_t dlEarfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
|
||||
// since RRC Idle Mode cell selection is not supported yet, we
|
||||
// force the UE RRC to be camped on a specific eNB
|
||||
m_asSapProvider->ForceCampedOnEnb (cellId, earfcn);
|
||||
m_asSapProvider->ForceCampedOnEnb (cellId, dlEarfcn);
|
||||
|
||||
// tell RRC to go into connected mode
|
||||
m_asSapProvider->Connect ();
|
||||
|
||||
@@ -98,26 +98,30 @@ public:
|
||||
void SetForwardUpCallback (Callback <void, Ptr<Packet> > cb);
|
||||
|
||||
/**
|
||||
* \brief Instruct the NAS to go to ACTIVE state
|
||||
* \brief Causes NAS to tell AS to find a suitable cell and camp to it.
|
||||
*
|
||||
* \param dlEarfcn the DL frequency of the eNB
|
||||
*/
|
||||
void StartCellSelection (uint16_t dlEarfcn);
|
||||
|
||||
/**
|
||||
* \brief Causes NAS to tell AS to go to ACTIVE state.
|
||||
*
|
||||
* The end result is equivalent with EMM Registered + ECM Connected states.
|
||||
* If this function is called when the UE is in a situation where connecting
|
||||
* is not possible (e.g. before the simulation begin), then the UE will
|
||||
* attempt to connect at the earliest possible time (e.g. after it camps to a
|
||||
* suitable cell).
|
||||
*/
|
||||
void Connect ();
|
||||
|
||||
/**
|
||||
* \brief Instruct the NAS to camp to a specific cell and go to ACTIVE state.
|
||||
* \brief Causes NAS to tell AS to camp to a specific cell and go to ACTIVE
|
||||
* state.
|
||||
* \param cellId the id of the eNB to camp on
|
||||
* \param earfcn the DL frequency of the eNB
|
||||
* \param dlEarfcn the DL frequency of the eNB
|
||||
*
|
||||
* The end result is equivalent with EMM Registered + ECM Connected states.
|
||||
* Since RRC Idle Mode cell selection is not supported yet, we force the UE
|
||||
* RRC to be camped on a specific eNB.
|
||||
*/
|
||||
void Connect (uint16_t cellId, uint16_t earfcn);
|
||||
void Connect (uint16_t cellId, uint16_t dlEarfcn);
|
||||
|
||||
/**
|
||||
* instruct the NAS to disconnect
|
||||
|
||||
@@ -51,24 +51,34 @@ public:
|
||||
*/
|
||||
virtual void SetCsgWhiteList (uint32_t csgId) = 0;
|
||||
|
||||
/**
|
||||
* Force the RRC to stay camped on a certain eNB
|
||||
*
|
||||
* \param enbDevice the eNB device (wild hack, might go away in
|
||||
* future versions)
|
||||
* \param cellId the Cell ID identifying the eNB
|
||||
/**
|
||||
* \brief Initiate Idle mode cell selection procedure.
|
||||
*
|
||||
* \param dlEarfcn the downlink carrier frequency (EARFCN)
|
||||
*/
|
||||
virtual void ForceCampedOnEnb (uint16_t cellId, uint16_t earfcn) = 0;
|
||||
virtual void StartCellSelection (uint16_t dlEarfcn) = 0;
|
||||
|
||||
/**
|
||||
* Tell the RRC to go into Connected Mode
|
||||
*
|
||||
* \brief Force the RRC entity to stay camped on a certain eNodeB.
|
||||
*
|
||||
* \param cellId the cell ID identifying the eNodeB
|
||||
* \param dlEarfcn the downlink carrier frequency (EARFCN)
|
||||
*/
|
||||
virtual void ForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn) = 0;
|
||||
|
||||
/**
|
||||
* \brief Tell the RRC entity to enter Connected mode.
|
||||
*
|
||||
* If this function is called when the UE is in a situation where connecting
|
||||
* is not possible (e.g. before the simulation begin), then the UE will
|
||||
* attempt to connect at the earliest possible time (e.g. after it camps to a
|
||||
* suitable cell).
|
||||
*/
|
||||
virtual void Connect (void) = 0;
|
||||
|
||||
/**
|
||||
* Send a data packet
|
||||
*
|
||||
* \brief Send a data packet.
|
||||
*
|
||||
* \param packet the packet
|
||||
* \param bid the EPS bearer ID
|
||||
*/
|
||||
@@ -76,8 +86,8 @@ public:
|
||||
|
||||
|
||||
/**
|
||||
* Tell the RRC to release the connection
|
||||
*
|
||||
* \brief Tell the RRC entity to release the connection.
|
||||
*
|
||||
*/
|
||||
virtual void Disconnect () = 0;
|
||||
|
||||
@@ -98,13 +108,13 @@ public:
|
||||
virtual ~LteAsSapUser ();
|
||||
|
||||
/**
|
||||
* Notify the NAS that RRC Connection Establishment was successful
|
||||
* \brief Notify the NAS that RRC Connection Establishment was successful.
|
||||
*
|
||||
*/
|
||||
virtual void NotifyConnectionSuccessful () = 0;
|
||||
|
||||
/**
|
||||
* Notify the NAS that RRC Connection Establishment failed
|
||||
* \brief Notify the NAS that RRC Connection Establishment failed.
|
||||
*
|
||||
*/
|
||||
virtual void NotifyConnectionFailed () = 0;
|
||||
@@ -141,7 +151,8 @@ public:
|
||||
|
||||
// inherited from LteAsSapProvider
|
||||
virtual void SetCsgWhiteList (uint32_t csgId);
|
||||
virtual void ForceCampedOnEnb (uint16_t cellId, uint16_t earfcn);
|
||||
virtual void StartCellSelection (uint16_t dlEarfcn);
|
||||
virtual void ForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn);
|
||||
virtual void Connect (void);
|
||||
virtual void SendData (Ptr<Packet> packet, uint8_t bid);
|
||||
virtual void Disconnect ();
|
||||
@@ -171,9 +182,16 @@ MemberLteAsSapProvider<C>::SetCsgWhiteList (uint32_t csgId)
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteAsSapProvider<C>::ForceCampedOnEnb (uint16_t cellId, uint16_t earfcn)
|
||||
MemberLteAsSapProvider<C>::StartCellSelection (uint16_t dlEarfcn)
|
||||
{
|
||||
m_owner->DoForceCampedOnEnb (cellId, earfcn);
|
||||
m_owner->DoStartCellSelection (dlEarfcn);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteAsSapProvider<C>::ForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn)
|
||||
{
|
||||
m_owner->DoForceCampedOnEnb (cellId, dlEarfcn);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
|
||||
@@ -54,27 +54,63 @@ public:
|
||||
virtual void Reset () = 0;
|
||||
|
||||
/**
|
||||
* \brief Tell the PHY to synchronize with a given eNB for communication
|
||||
* purposes. Initially, the PHY will be configured to listen to 6 RBs
|
||||
* of BCH.
|
||||
* \brief Tell the PHY entity to listen to PSS from surrounding cells and
|
||||
* measure the RSRP.
|
||||
*
|
||||
* SetDlBandwidth can be called afterwards to change the bandwidth.
|
||||
*
|
||||
* \param cellId the ID of the eNB
|
||||
* \param dlEarfcn the carrier frequency (EARFCN) in downlink
|
||||
* This function will instruct this PHY instance to listen to the DL channel
|
||||
* over the bandwidth of 6 RB.
|
||||
*
|
||||
* After this, it will start receiving Primary Synchronization Signal (PSS)
|
||||
* and periodically returning measurement reports to RRC via
|
||||
* LteUeCphySapUser::ReportUeMeasurements function.
|
||||
*/
|
||||
virtual void SyncronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn) = 0;
|
||||
virtual void StartCellSearch (uint16_t dlEarfcn) = 0;
|
||||
|
||||
/**
|
||||
* \param dlBandwidth the DL bandwidth in PRBs
|
||||
* \brief Tell the PHY entity to synchronize with a given eNodeB over the
|
||||
* currently active EARFCN for communication purposes.
|
||||
* \param cellId the ID of the eNodeB
|
||||
*
|
||||
* By synchronizing, the PHY will start receiving various information
|
||||
* transmitted by the eNodeB. For instance, when receiving system information,
|
||||
* the message will be relayed to RRC via
|
||||
* LteUeCphySapUser::RecvMasterInformationBlock and
|
||||
* LteUeCphySapUser::RecvSystemInformationBlockType1 functions.
|
||||
*
|
||||
* Initially, the PHY will be configured to listen to 6 RBs of BCH.
|
||||
* LteUeCphySapProvider::SetDlBandwidth can be called afterwards to increase
|
||||
* the bandwidth.
|
||||
*/
|
||||
virtual void SynchronizeWithEnb (uint16_t cellId) = 0;
|
||||
|
||||
/**
|
||||
* \brief Tell the PHY entity to align to the given EARFCN and synchronize
|
||||
* with a given eNodeB for communication purposes.
|
||||
* \param cellId the ID of the eNodeB
|
||||
* \param dlEarfcn the downlink carrier frequency (EARFCN)
|
||||
*
|
||||
* By synchronizing, the PHY will start receiving various information
|
||||
* transmitted by the eNodeB. For instance, when receiving system information,
|
||||
* the message will be relayed to RRC via
|
||||
* LteUeCphySapUser::RecvMasterInformationBlock and
|
||||
* LteUeCphySapUser::RecvSystemInformationBlockType1 functions.
|
||||
*
|
||||
* Initially, the PHY will be configured to listen to 6 RBs of BCH.
|
||||
* LteUeCphySapProvider::SetDlBandwidth can be called afterwards to increase
|
||||
* the bandwidth.
|
||||
*/
|
||||
virtual void SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn) = 0;
|
||||
|
||||
/**
|
||||
* \param dlBandwidth the DL bandwidth in number of PRBs
|
||||
*/
|
||||
virtual void SetDlBandwidth (uint8_t dlBandwidth) = 0;
|
||||
|
||||
/**
|
||||
* Configure uplink (normally done after reception of SIB2)
|
||||
* \brief Configure uplink (normally done after reception of SIB2)
|
||||
*
|
||||
* \param ulEarfcn the carrier frequency (EARFCN) in uplink
|
||||
* \param ulBandwidth the UL bandwidth in PRBs
|
||||
* \param ulEarfcn the uplink carrier frequency (EARFCN)
|
||||
* \param ulBandwidth the UL bandwidth in number of PRBs
|
||||
*/
|
||||
virtual void ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth) = 0;
|
||||
|
||||
@@ -118,15 +154,16 @@ public:
|
||||
* See section 5.1.1 and 5.1.3 of TS 36.214
|
||||
*/
|
||||
struct UeMeasurementsElement
|
||||
{
|
||||
uint16_t m_cellId;
|
||||
double m_rsrp; // [dBm]
|
||||
double m_rsrq; // [dB]
|
||||
};
|
||||
{
|
||||
uint16_t m_cellId;
|
||||
double m_rsrp; // [dBm]
|
||||
double m_rsrq; // [dB]
|
||||
};
|
||||
|
||||
struct UeMeasurementsParameters
|
||||
{
|
||||
std::vector <struct UeMeasurementsElement> m_ueMeasurementsList;
|
||||
};
|
||||
{
|
||||
std::vector <struct UeMeasurementsElement> m_ueMeasurementsList;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -166,8 +203,10 @@ public:
|
||||
|
||||
// inherited from LteUeCphySapProvider
|
||||
virtual void Reset ();
|
||||
virtual void SyncronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn);
|
||||
virtual void SetDlBandwidth (uint8_t ulBandwidth);
|
||||
virtual void StartCellSearch (uint16_t dlEarfcn);
|
||||
virtual void SynchronizeWithEnb (uint16_t cellId);
|
||||
virtual void SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn);
|
||||
virtual void SetDlBandwidth (uint8_t dlBandwidth);
|
||||
virtual void ConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth);
|
||||
virtual void SetRnti (uint16_t rnti);
|
||||
virtual void SetTransmissionMode (uint8_t txMode);
|
||||
@@ -198,13 +237,27 @@ MemberLteUeCphySapProvider<C>::Reset ()
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeCphySapProvider<C>::SyncronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn)
|
||||
MemberLteUeCphySapProvider<C>::StartCellSearch (uint16_t dlEarfcn)
|
||||
{
|
||||
m_owner->DoSyncronizeWithEnb (cellId, dlEarfcn);
|
||||
m_owner->DoStartCellSearch (dlEarfcn);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
void
|
||||
MemberLteUeCphySapProvider<C>::SynchronizeWithEnb (uint16_t cellId)
|
||||
{
|
||||
m_owner->DoSynchronizeWithEnb (cellId);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeCphySapProvider<C>::SynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn)
|
||||
{
|
||||
m_owner->DoSynchronizeWithEnb (cellId, dlEarfcn);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
void
|
||||
MemberLteUeCphySapProvider<C>::SetDlBandwidth (uint8_t dlBandwidth)
|
||||
{
|
||||
m_owner->DoSetDlBandwidth (dlBandwidth);
|
||||
|
||||
@@ -128,8 +128,6 @@ LteUeNetDevice::UpdateConfig (void)
|
||||
NS_LOG_FUNCTION (this);
|
||||
m_nas->SetImsi (m_imsi);
|
||||
m_rrc->SetImsi (m_imsi);
|
||||
m_rrc->SetDlEarfcn (m_dlEarfcn);
|
||||
m_phy->SetDlEarfcn (m_dlEarfcn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -418,12 +418,6 @@ LteUePhy::CreateTxPowerSpectralDensity ()
|
||||
return psd;
|
||||
}
|
||||
|
||||
void
|
||||
LteUePhy::SetDlEarfcn (uint16_t earfcn)
|
||||
{
|
||||
m_dlEarfcn = earfcn;
|
||||
}
|
||||
|
||||
void
|
||||
LteUePhy::GenerateCtrlCqiReport (const SpectrumValue& sinr)
|
||||
{
|
||||
@@ -665,14 +659,6 @@ LteUePhy::CreateDlCqiFeedbackMessage (const SpectrumValue& sinr)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LteUePhy::CellSearch ()
|
||||
{
|
||||
DoSetDlBandwidth (6); // configure DL for receiving PSS
|
||||
SwitchToState (CELL_SEARCH);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LteUePhy::ReportUeMeasurements ()
|
||||
{
|
||||
@@ -985,7 +971,7 @@ LteUePhy::SubframeIndication (uint32_t frameNo, uint32_t subframeNo)
|
||||
}
|
||||
else
|
||||
{
|
||||
// send only PUCCH (ideal: fake null bandwidth signal)
|
||||
// send only PUCCH (ideal: fake null bandwidth signal)
|
||||
if (ctrlMsg.size ()>0)
|
||||
{
|
||||
NS_LOG_LOGIC (this << " UE - start TX PUCCH (NO PUSCH)");
|
||||
@@ -1068,9 +1054,26 @@ LteUePhy::DoReset ()
|
||||
} // end of void LteUePhy::DoReset ()
|
||||
|
||||
void
|
||||
LteUePhy::DoSyncronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn)
|
||||
LteUePhy::DoStartCellSearch (uint16_t dlEarfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << dlEarfcn);
|
||||
m_dlEarfcn = dlEarfcn;
|
||||
DoSetDlBandwidth (6); // configure DL for receiving PSS
|
||||
SwitchToState (CELL_SEARCH);
|
||||
}
|
||||
|
||||
void
|
||||
LteUePhy::DoSynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << cellId << dlEarfcn);
|
||||
m_dlEarfcn = dlEarfcn;
|
||||
DoSynchronizeWithEnb (cellId);
|
||||
}
|
||||
|
||||
void
|
||||
LteUePhy::DoSynchronizeWithEnb (uint16_t cellId)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << cellId);
|
||||
|
||||
if (cellId == 0)
|
||||
{
|
||||
@@ -1078,7 +1081,6 @@ LteUePhy::DoSyncronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn)
|
||||
}
|
||||
|
||||
m_cellId = cellId;
|
||||
m_dlEarfcn = dlEarfcn;
|
||||
m_downlinkSpectrumPhy->SetCellId (cellId);
|
||||
m_uplinkSpectrumPhy->SetCellId (cellId);
|
||||
|
||||
|
||||
@@ -142,11 +142,6 @@ public:
|
||||
*/
|
||||
Ptr<LteSpectrumPhy> GetUlSpectrumPhy () const;
|
||||
|
||||
/**
|
||||
* \param bw the downlink carrier frequency (EARFCN)
|
||||
*/
|
||||
void SetDlEarfcn (uint16_t earfcn);
|
||||
|
||||
/**
|
||||
* \brief Create the PSD for the TX
|
||||
* \return the pointer to the PSD
|
||||
@@ -175,16 +170,6 @@ public:
|
||||
*/
|
||||
std::vector <int> GetSubChannelsForReception (void);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Listen to PSS from surrounding cells and measure the RSRP.
|
||||
*
|
||||
* This function will instruct this PHY instance to listen to the DL channel
|
||||
* over the bandwidth of 6 RB. After this, it will start to receive Primary
|
||||
* Synchronization Signal (PSS).
|
||||
*/
|
||||
void CellSearch ();
|
||||
|
||||
/**
|
||||
* \brief Create the DL CQI feedback from SINR values perceived at
|
||||
* the physical layer with the signal received from eNB
|
||||
@@ -244,7 +229,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
void SetTxMode1Gain (double gain);
|
||||
void SetTxMode2Gain (double gain);
|
||||
void SetTxMode3Gain (double gain);
|
||||
@@ -269,7 +254,9 @@ private:
|
||||
|
||||
// UE CPHY SAP methods
|
||||
void DoReset ();
|
||||
void DoSyncronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn);
|
||||
void DoStartCellSearch (uint16_t dlEarfcn);
|
||||
void DoSynchronizeWithEnb (uint16_t cellId);
|
||||
void DoSynchronizeWithEnb (uint16_t cellId, uint16_t dlEarfcn);
|
||||
void DoSetDlBandwidth (uint8_t ulBandwidth);
|
||||
void DoConfigureUplink (uint16_t ulEarfcn, uint8_t ulBandwidth);
|
||||
void DoSetRnti (uint16_t rnti);
|
||||
@@ -277,13 +264,13 @@ private:
|
||||
void DoSetSrsConfigurationIndex (uint16_t srcCi);
|
||||
|
||||
// UE PHY SAP methods
|
||||
virtual void DoSendMacPdu (Ptr<Packet> p);
|
||||
virtual void DoSendMacPdu (Ptr<Packet> p);
|
||||
virtual void DoSendLteControlMessage (Ptr<LteControlMessage> msg);
|
||||
virtual void DoSendRachPreamble (uint32_t prachId, uint32_t raRnti);
|
||||
|
||||
|
||||
std::vector <int> m_subChannelsForTransmission;
|
||||
std::vector <int> m_subChannelsForReception;
|
||||
|
||||
|
||||
std::vector< std::vector <int> > m_subChannelsForTransmissionQueue;
|
||||
|
||||
|
||||
|
||||
@@ -335,12 +335,6 @@ LteUeRrc::GetDlEarfcn () const
|
||||
return m_dlEarfcn;
|
||||
}
|
||||
|
||||
void
|
||||
LteUeRrc::SetDlEarfcn (uint16_t earfcn)
|
||||
{
|
||||
m_dlEarfcn = earfcn;
|
||||
}
|
||||
|
||||
uint16_t
|
||||
LteUeRrc::GetUlEarfcn () const
|
||||
{
|
||||
@@ -348,12 +342,6 @@ LteUeRrc::GetUlEarfcn () const
|
||||
return m_ulEarfcn;
|
||||
}
|
||||
|
||||
void
|
||||
LteUeRrc::SetUlEarfcn (uint16_t earfcn)
|
||||
{
|
||||
m_ulEarfcn = earfcn;
|
||||
}
|
||||
|
||||
LteUeRrc::State
|
||||
LteUeRrc::GetState (void)
|
||||
{
|
||||
@@ -417,9 +405,9 @@ LteUeRrc::DoSendData (Ptr<Packet> packet, uint8_t bid)
|
||||
params.pdcpSdu = packet;
|
||||
params.rnti = m_rnti;
|
||||
params.lcid = it->second->m_logicalChannelIdentity;
|
||||
|
||||
|
||||
NS_LOG_LOGIC (this << " RNTI=" << m_rnti << " sending " << packet << "on DRBID " << (uint32_t) drbid << " (LCID" << params.lcid << ")" << " (" << packet->GetSize () << " bytes)");
|
||||
it->second->m_pdcp->GetLtePdcpSapProvider ()->TransmitPdcpSdu (params);
|
||||
it->second->m_pdcp->GetLtePdcpSapProvider ()->TransmitPdcpSdu (params);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -517,17 +505,26 @@ LteUeRrc::DoSetCsgWhiteList (uint32_t csgId)
|
||||
}
|
||||
|
||||
void
|
||||
LteUeRrc::DoForceCampedOnEnb (uint16_t cellId, uint16_t earfcn)
|
||||
LteUeRrc::DoStartCellSelection (uint16_t dlEarfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << cellId << earfcn);
|
||||
NS_LOG_FUNCTION (this << dlEarfcn);
|
||||
|
||||
m_cellId = cellId;
|
||||
m_dlEarfcn = earfcn;
|
||||
m_cphySapProvider->SyncronizeWithEnb (m_cellId, m_dlEarfcn);
|
||||
SwitchToState (IDLE_WAIT_SYSTEM_INFO);
|
||||
m_dlEarfcn = dlEarfcn;
|
||||
m_cphySapProvider->StartCellSearch (dlEarfcn);
|
||||
}
|
||||
|
||||
void
|
||||
LteUeRrc::DoForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << cellId << dlEarfcn);
|
||||
|
||||
m_cellId = cellId;
|
||||
m_dlEarfcn = dlEarfcn;
|
||||
m_cphySapProvider->SynchronizeWithEnb (m_cellId, m_dlEarfcn);
|
||||
SwitchToState (IDLE_WAIT_SYSTEM_INFO);
|
||||
}
|
||||
|
||||
void
|
||||
LteUeRrc::DoConnect ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
@@ -720,7 +717,7 @@ LteUeRrc::DoRecvRrcConnectionReconfiguration (LteRrcSap::RrcConnectionReconfigur
|
||||
m_cellId = mci.targetPhysCellId;
|
||||
NS_ASSERT (mci.haveCarrierFreq);
|
||||
NS_ASSERT (mci.haveCarrierBandwidth);
|
||||
m_cphySapProvider->SyncronizeWithEnb (m_cellId, mci.carrierFreq.dlCarrierFreq);
|
||||
m_cphySapProvider->SynchronizeWithEnb (m_cellId, mci.carrierFreq.dlCarrierFreq);
|
||||
m_cphySapProvider->SetDlBandwidth ( mci.carrierBandwidth.dlBandwidth);
|
||||
m_cphySapProvider->ConfigureUplink (mci.carrierFreq.ulCarrierFreq, mci.carrierBandwidth.ulBandwidth);
|
||||
m_rnti = msg.mobilityControlInfo.newUeIdentity;
|
||||
@@ -856,7 +853,7 @@ LteUeRrc::SynchronizeToStrongestCell ()
|
||||
{
|
||||
NS_LOG_LOGIC (this << " cell " << maxRsrpCellId
|
||||
<< " is the strongest untried surrounding cell");
|
||||
m_cphySapProvider->SyncronizeWithEnb (maxRsrpCellId, m_dlEarfcn);
|
||||
m_cphySapProvider->SynchronizeWithEnb (maxRsrpCellId, m_dlEarfcn);
|
||||
}
|
||||
|
||||
} // end of void LteUeRrc::SynchronizeToStrongestCell ()
|
||||
@@ -900,7 +897,7 @@ LteUeRrc::EvaluateCellForSelection ()
|
||||
if (isSuitableCell)
|
||||
{
|
||||
m_cellId = cellId;
|
||||
m_cphySapProvider->SyncronizeWithEnb (cellId, m_dlEarfcn);
|
||||
m_cphySapProvider->SynchronizeWithEnb (cellId, m_dlEarfcn);
|
||||
m_cphySapProvider->SetDlBandwidth (m_dlBandwidth);
|
||||
m_initialCellSelectionEndOkTrace (m_imsi, cellId);
|
||||
|
||||
|
||||
@@ -226,21 +226,11 @@ public:
|
||||
*/
|
||||
uint16_t GetDlEarfcn () const;
|
||||
|
||||
/**
|
||||
* \param bw the downlink carrier frequency (EARFCN)
|
||||
*/
|
||||
void SetDlEarfcn (uint16_t earfcn);
|
||||
|
||||
/**
|
||||
* \return the uplink carrier frequency (EARFCN)
|
||||
*/
|
||||
uint16_t GetUlEarfcn () const;
|
||||
|
||||
/**
|
||||
* \param bw the uplink carrier frequency (EARFCN)
|
||||
*/
|
||||
void SetUlEarfcn (uint16_t earfcn);
|
||||
|
||||
/**
|
||||
*
|
||||
* \return the current state
|
||||
@@ -268,7 +258,8 @@ private:
|
||||
|
||||
// LTE AS SAP methods
|
||||
void DoSetCsgWhiteList (uint32_t csgId);
|
||||
void DoForceCampedOnEnb (uint16_t cellId, uint16_t earfcn);
|
||||
void DoForceCampedOnEnb (uint16_t cellId, uint16_t dlEarfcn);
|
||||
void DoStartCellSelection (uint16_t dlEarfcn);
|
||||
void DoConnect ();
|
||||
void DoSendData (Ptr<Packet> packet, uint8_t bid);
|
||||
void DoDisconnect ();
|
||||
|
||||
Reference in New Issue
Block a user