lte: Pass all cell configuration to LteEnbRrc::ConfigureCell

This commit is contained in:
Alexander Krotov
2017-05-24 15:13:43 +03:00
parent 238fe2cccf
commit af31e71732
3 changed files with 20 additions and 15 deletions

View File

@@ -390,7 +390,8 @@ LteEnbNetDevice::UpdateConfig (void)
{
NS_LOG_LOGIC (this << " Configure cell " << m_cellId);
// we have to make sure that this function is called only once
m_rrc->ConfigureCell (m_cellId);
NS_ASSERT (!m_ccMap.empty ());
m_rrc->ConfigureCell (m_ccMap);
m_isConfigured = true;
}

View File

@@ -2002,25 +2002,27 @@ LteEnbRrc::AddUeMeasReportConfig (LteRrcSap::ReportConfigEutra config)
}
void
LteEnbRrc::ConfigureCell (uint16_t cellId)
LteEnbRrc::ConfigureCell (std::map<uint8_t, Ptr<ComponentCarrierEnb>> ccPhyConf)
{
auto it = m_componentCarrierPhyConf.begin ();
auto it = ccPhyConf.begin ();
NS_ASSERT (it != ccPhyConf.end ());
uint8_t ulBandwidth = it->second->GetUlBandwidth ();
uint8_t dlBandwidth = it->second->GetDlBandwidth ();
uint32_t ulEarfcn = it->second->GetUlEarfcn ();
uint32_t dlEarfcn = it->second->GetDlEarfcn ();
uint16_t cellId = it->second->GetCellId ();
NS_LOG_FUNCTION (this << (uint16_t) ulBandwidth << (uint16_t) dlBandwidth
<< ulEarfcn << dlEarfcn << cellId);
<< ulEarfcn << dlEarfcn);
NS_ASSERT (!m_configured);
for (it = m_componentCarrierPhyConf.begin (); it != m_componentCarrierPhyConf.end (); ++it)
for (const auto &it: ccPhyConf)
{
m_cphySapProvider[it->first]->SetBandwidth (it->second->GetUlBandwidth (), it->second->GetDlBandwidth ());
m_cphySapProvider[it->first]->SetEarfcn (it->second->GetUlEarfcn (), it->second->GetDlEarfcn ());
m_cphySapProvider[it->first]->SetCellId (cellId);
m_cmacSapProvider[it->first]->ConfigureMac (it->second->GetUlBandwidth (), it->second->GetDlBandwidth ());
m_ffrRrcSapProvider[it->first]->SetCellId (cellId);
m_ffrRrcSapProvider[it->first]->SetBandwidth (it->second->GetUlBandwidth (), it->second->GetDlBandwidth ());
m_cphySapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
m_cphySapProvider.at (it.first)->SetEarfcn (it.second->GetUlEarfcn (), it.second->GetDlEarfcn ());
m_cphySapProvider.at (it.first)->SetCellId (it.second->GetCellId ());
m_cmacSapProvider.at (it.first)->ConfigureMac (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
m_ffrRrcSapProvider.at (it.first)->SetCellId (it.second->GetCellId ());
m_ffrRrcSapProvider.at (it.first)->SetBandwidth (it.second->GetUlBandwidth (), it.second->GetDlBandwidth ());
}
m_dlEarfcn = dlEarfcn;
@@ -2064,10 +2066,10 @@ LteEnbRrc::ConfigureCell (uint16_t cellId)
m_sib1.cellSelectionInfo.qQualMin = -34; // not used, set as minimum value
m_sib1.cellSelectionInfo.qRxLevMin = m_qRxLevMin; // set as minimum value
for (it = m_componentCarrierPhyConf.begin (); it != m_componentCarrierPhyConf.end (); ++it)
for (const auto &it: ccPhyConf)
{
m_cphySapProvider.at (it->first)->SetMasterInformationBlock (mib);
m_cphySapProvider.at (it->first)->SetSystemInformationBlockType1 (m_sib1);
m_cphySapProvider.at (it.first)->SetMasterInformationBlock (mib);
m_cphySapProvider.at (it.first)->SetSystemInformationBlockType1 (m_sib1);
}
/*
* Enabling transmission of other SIB. The first time System Information is

View File

@@ -843,8 +843,10 @@ public:
* `LteHelper::InstallEnbDevice` (i.e. before the simulation starts).
*
* \warning Raises an error when executed more than once.
*
* \param ccPhyConf the component carrier configuration
*/
void ConfigureCell (uint16_t cellId);
void ConfigureCell (std::map<uint8_t, Ptr<ComponentCarrierEnb>> ccPhyConf);
/**
* \brief Configure carriers.