|
|
|
@ -359,13 +359,13 @@ void sched::tpc_dec(uint16_t rnti)
|
|
|
|
|
std::array<int, SRSLTE_MAX_CARRIERS> sched::get_enb_ue_cc_map(uint16_t rnti)
|
|
|
|
|
{
|
|
|
|
|
std::array<int, SRSLTE_MAX_CARRIERS> ret{};
|
|
|
|
|
ret.fill(-1); // -1 for inactive carriers
|
|
|
|
|
ret.fill(-1); // -1 for inactive & non-existent carriers
|
|
|
|
|
ue_db_access(rnti,
|
|
|
|
|
[this, &ret](sched_ue& ue) {
|
|
|
|
|
for (size_t enb_cc_idx = 0; enb_cc_idx < carrier_schedulers.size(); ++enb_cc_idx) {
|
|
|
|
|
auto p = ue.get_active_cell_index(enb_cc_idx);
|
|
|
|
|
if (p.second < SRSLTE_MAX_CARRIERS) {
|
|
|
|
|
ret[enb_cc_idx] = p.second;
|
|
|
|
|
const cc_sched_ue* cc_ue = ue.find_ue_carrier(enb_cc_idx);
|
|
|
|
|
if (cc_ue != nullptr) {
|
|
|
|
|
ret[enb_cc_idx] = cc_ue->get_ue_cc_idx();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -373,6 +373,20 @@ std::array<int, SRSLTE_MAX_CARRIERS> sched::get_enb_ue_cc_map(uint16_t rnti)
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::array<bool, SRSLTE_MAX_CARRIERS> sched::get_scell_activation_mask(uint16_t rnti)
|
|
|
|
|
{
|
|
|
|
|
std::array<int, SRSLTE_MAX_CARRIERS> enb_ue_cc_map = get_enb_ue_cc_map(rnti);
|
|
|
|
|
std::array<bool, SRSLTE_MAX_CARRIERS> scell_mask = {};
|
|
|
|
|
for (int ue_cc : enb_ue_cc_map) {
|
|
|
|
|
if (ue_cc <= 0) {
|
|
|
|
|
// inactive or PCell
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
scell_mask[ue_cc] = true;
|
|
|
|
|
}
|
|
|
|
|
return scell_mask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*******************************************************
|
|
|
|
|
*
|
|
|
|
|
* Main sched functions
|
|
|
|
|