@@ -21,7 +21,8 @@ namespace srsran {
2121class ran_slice_instance
2222{
2323public:
24- constexpr static int skip_slice_prio = std::numeric_limits<int >::min();
24+ constexpr static int skip_slice_prio = std::numeric_limits<int >::min();
25+ constexpr static int default_slice_prio = 0 ;
2526
2627 ran_slice_instance (ran_slice_id_t id_, const cell_configuration& cell_cfg_, const slice_rrm_policy_config& cfg_);
2728
@@ -34,15 +35,15 @@ class ran_slice_instance
3435 if (not active () or pdsch_stopped or cfg.max_prb <= pdsch_rb_count) {
3536 return skip_slice_prio;
3637 }
37- return cfg.min_prb > pdsch_rb_count ? cfg.min_prb - pdsch_rb_count : 0 ;
38+ return cfg.min_prb > pdsch_rb_count ? cfg.min_prb - pdsch_rb_count : default_slice_prio ;
3839 }
3940
4041 int get_ul_prio ()
4142 {
4243 if (not active () or pusch_stopped or cfg.max_prb <= pusch_rb_count) {
4344 return skip_slice_prio;
4445 }
45- return cfg.min_prb > pusch_rb_count ? cfg.min_prb - pusch_rb_count : 0 ;
46+ return cfg.min_prb > pusch_rb_count ? cfg.min_prb - pusch_rb_count : default_slice_prio ;
4647 }
4748
4849 // / Save PDSCH grant.
@@ -57,17 +58,19 @@ class ran_slice_instance
5758 // / Mark the allocation of PUSCH for this slice and the current slot as complete.
5859 void pusch_completed () { pusch_stopped = true ; }
5960
60- // / Determine if a UE is a candidate for this slice.
61- bool is_candidate (du_ue_index_t ue_idx) const { return bearers.contains (ue_idx); }
61+ // / Determine if at least one bearer of the given UE is currently managed by this slice.
62+ bool contains (du_ue_index_t ue_idx) const { return bearers.contains (ue_idx); }
6263
63- // / Determine if a (UE, LCID) is a candidate for this slice.
64- bool is_candidate (du_ue_index_t ue_idx, lcid_t lcid) const
65- {
66- return is_candidate (ue_idx) and bearers[ue_idx].test (lcid);
67- }
64+ // / Determine if a (UE, LCID) tuple are managed by this slice.
65+ bool contains (du_ue_index_t ue_idx, lcid_t lcid) const { return contains (ue_idx) and bearers[ue_idx].test (lcid); }
6866
69- void set_logical_channel (du_ue_index_t ue_idx, lcid_t lcid);
67+ // / Add a new (UE, LCID) to the list of bearers managed by this slice.
68+ void add_logical_channel (du_ue_index_t ue_idx, lcid_t lcid);
69+
70+ // / Remove a (UE, LCID) from the list of bearers managed by this slice.
7071 void rem_logical_channel (du_ue_index_t ue_idx, lcid_t lcid);
72+
73+ // / Remove a UE and all associated LCIDs from the list of bearers managed by this slice.
7174 void rem_ue (du_ue_index_t ue_idx);
7275
7376 ran_slice_id_t id;
@@ -88,4 +91,4 @@ class ran_slice_instance
8891 bool pusch_stopped = false ;
8992};
9093
91- } // namespace srsran
94+ } // namespace srsran
0 commit comments