diff --git a/srsenb/hdr/stack/mac/mac_nr.h b/srsenb/hdr/stack/mac/mac_nr.h index 1e26415ea..6c54cd4f0 100644 --- a/srsenb/hdr/stack/mac/mac_nr.h +++ b/srsenb/hdr/stack/mac/mac_nr.h @@ -99,7 +99,8 @@ private: // Map of active UEs pthread_rwlock_t rwlock = {}; static const uint16_t FIRST_RNTI = 0x4601; - rnti_map_t > ue_db; + srsran::static_circular_map, SRSENB_MAX_UES> ue_db; + std::atomic ue_counter; // BCH buffers diff --git a/srsenb/src/stack/mac/nr/mac_nr.cc b/srsenb/src/stack/mac/nr/mac_nr.cc index 5668ea225..9a7d275cb 100644 --- a/srsenb/src/stack/mac/nr/mac_nr.cc +++ b/srsenb/src/stack/mac/nr/mac_nr.cc @@ -173,7 +173,7 @@ uint16_t mac_nr::add_ue(uint32_t enb_cc_idx) // Allocate and initialize UE object // TODO: add sched interface - unique_rnti_ptr ue_ptr = make_rnti_obj(rnti, rnti, enb_cc_idx, nullptr, rrc, rlc, phy, logger); + std::unique_ptr ue_ptr = std::unique_ptr(new ue_nr(rnti, enb_cc_idx, nullptr, rrc, rlc, phy, logger)); // Add UE to rnti map srsran::rwlock_write_guard rw_lock(rwlock);