sched,nr: add ue removal method to nr sched

master
Francisco Paisana 3 years ago
parent a7bf1ad26d
commit e146345df0

@ -40,6 +40,7 @@ public:
~sched_nr() override;
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;
int dl_rach_info(uint32_t cc, const dl_sched_rar_info_t& rar_info);

@ -118,6 +118,7 @@ public:
virtual ~sched_nr_interface() = default;
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 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;

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

Loading…
Cancel
Save