diff --git a/src/lte/model/lte-enb-net-device.cc b/src/lte/model/lte-enb-net-device.cc index 8b4c5d284..0b54d8e56 100644 --- a/src/lte/model/lte-enb-net-device.cc +++ b/src/lte/model/lte-enb-net-device.cc @@ -225,6 +225,19 @@ LteEnbNetDevice::GetCellId () const return m_cellId; } +bool +LteEnbNetDevice::HasCellId (uint16_t cellId) const +{ + for (auto &it: m_ccMap) + { + if (it.second->GetCellId () == cellId) + { + return true; + } + } + return false; +} + uint8_t LteEnbNetDevice::GetUlBandwidth () const { diff --git a/src/lte/model/lte-enb-net-device.h b/src/lte/model/lte-enb-net-device.h index 30d768c52..a90e624a7 100644 --- a/src/lte/model/lte-enb-net-device.h +++ b/src/lte/model/lte-enb-net-device.h @@ -107,6 +107,12 @@ public: */ uint16_t GetCellId () const; + /** + * \param cellId cell ID + * \return true if cellId is served by this eNB + */ + bool HasCellId (uint16_t cellId) const; + /** * \return the uplink bandwidth in RBs */