lte: Add LteEnbRrc::CellToComponentCarrierId

This commit is contained in:
Alexander Krotov
2017-06-08 18:30:23 +03:00
parent 1cf7c74ee0
commit b9842ebe43
2 changed files with 23 additions and 0 deletions

View File

@@ -2099,6 +2099,20 @@ LteEnbRrc::SetCellId (uint16_t cellId, uint8_t ccIndex)
m_cphySapProvider[ccIndex]->SetSystemInformationBlockType1 (m_sib1);
}
uint8_t
LteEnbRrc::CellToComponentCarrierId (uint16_t cellId)
{
NS_LOG_FUNCTION (this << cellId);
for (auto &it: m_componentCarrierPhyConf)
{
if (it.second->GetCellId () == cellId)
{
return it.first;
}
}
NS_FATAL_ERROR ("Cell " << cellId << " not found in CC map");
}
bool
LteEnbRrc::SendData (Ptr<Packet> packet)
{

View File

@@ -873,6 +873,15 @@ public:
*/
void SetCellId (uint16_t m_cellId, uint8_t ccIndex);
/**
* convert the cell id to component carrier id
*
* \param cellId Cell ID
*
* \return corresponding component carrier id
*/
uint8_t CellToComponentCarrierId (uint16_t cellId);
/**
* Enqueue an IP data packet on the proper bearer for downlink
* transmission. Normally expected to be called by the NetDevice