sched_nr: add ue_exists() helper

master
Andre Puschmann 3 years ago
parent cf20b143c0
commit dbcf5c9503

@ -41,6 +41,7 @@ public:
int cell_cfg(srsran::const_span<cell_cfg_t> cell_list) override;
void ue_cfg(uint16_t rnti, const ue_cfg_t& cfg) override;
void ue_rem(uint16_t rnti) override;
bool ue_exists(uint16_t rnti) override;
int dl_rach_info(uint32_t cc, const dl_sched_rar_info_t& rar_info);

@ -119,6 +119,7 @@ public:
virtual int cell_cfg(srsran::const_span<sched_nr_interface::cell_cfg_t> ue_cfg) = 0;
virtual void ue_cfg(uint16_t rnti, const ue_cfg_t& ue_cfg) = 0;
virtual void ue_rem(uint16_t rnti) = 0;
virtual bool ue_exists(uint16_t rnti) = 0;
virtual int get_dl_sched(slot_point slot_rx, uint32_t cc, dl_sched_res_t& result) = 0;
virtual int get_ul_sched(slot_point slot_rx, uint32_t cc, ul_sched_t& result) = 0;

@ -100,6 +100,11 @@ void sched_nr::ue_rem(uint16_t rnti)
sched_workers->enqueue_event(rnti, [this, rnti]() { ue_db.erase(rnti); });
}
bool sched_nr::ue_exists(uint16_t rnti)
{
return ue_db.contains(rnti);
}
void sched_nr::ue_cfg_impl(uint16_t rnti, const ue_cfg_t& uecfg)
{
if (not ue_db.contains(rnti)) {

Loading…
Cancel
Save