mirror of https://github.com/pvnis/srsRAN_4G.git
created sched_ue_cell class that is indexed based on enb_cc_idx
parent
8b306c81e2
commit
d0a17b0a40
@ -0,0 +1,44 @@
|
||||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2020 Software Radio Systems Limited
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
* forth in the LICENSE file which can be found at the top level of
|
||||
* the distribution.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_SCHED_UE_CELL_H
|
||||
#define SRSLTE_SCHED_UE_CELL_H
|
||||
|
||||
#include "../sched_common.h"
|
||||
|
||||
namespace srsenb {
|
||||
|
||||
struct sched_ue_cell {
|
||||
using ue_cc_cfg = sched_interface::ue_cfg_t::cc_cfg_t;
|
||||
|
||||
sched_ue_cell(uint16_t rnti_, const sched_cell_params_t& cell_cfg_);
|
||||
void set_ue_cfg(const sched_interface::ue_cfg_t& ue_cfg_);
|
||||
|
||||
bool configured() const { return ue_cc_idx >= 0; }
|
||||
int get_ue_cc_idx() const { return ue_cc_idx; }
|
||||
const ue_cc_cfg* get_ue_cc_cfg() const { return configured() ? &ue_cfg->supported_cc_list[ue_cc_idx] : nullptr; }
|
||||
|
||||
/// Cell const configuration
|
||||
const sched_cell_params_t* cell_cfg = nullptr;
|
||||
|
||||
/// Allowed DCI locations per per CFI and per subframe
|
||||
const ue_cce_locations_table dci_locations;
|
||||
|
||||
private:
|
||||
uint16_t rnti = SRSLTE_INVALID_RNTI;
|
||||
const sched_interface::ue_cfg_t* ue_cfg = nullptr;
|
||||
int ue_cc_idx = -1;
|
||||
};
|
||||
|
||||
} // namespace srsenb
|
||||
|
||||
#endif // SRSLTE_SCHED_UE_CELL_H
|
@ -0,0 +1,32 @@
|
||||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2020 Software Radio Systems Limited
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
* forth in the LICENSE file which can be found at the top level of
|
||||
* the distribution.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "srsenb/hdr/stack/mac/sched_ue_ctrl/sched_ue_cell.h"
|
||||
#include "srsenb/hdr/stack/mac/sched_helpers.h"
|
||||
|
||||
namespace srsenb {
|
||||
|
||||
sched_ue_cell::sched_ue_cell(uint16_t rnti_, const sched_cell_params_t& cell_cfg_) :
|
||||
rnti(rnti_), cell_cfg(&cell_cfg_), dci_locations(generate_cce_location_table(rnti_, cell_cfg_))
|
||||
{}
|
||||
|
||||
void sched_ue_cell::set_ue_cfg(const sched_interface::ue_cfg_t& ue_cfg_)
|
||||
{
|
||||
ue_cfg = &ue_cfg_;
|
||||
for (size_t i = 0; i < ue_cfg_.supported_cc_list.size(); ++i) {
|
||||
if (ue_cfg_.supported_cc_list[i].enb_cc_idx == cell_cfg->enb_cc_idx) {
|
||||
ue_cc_idx = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace srsenb
|
Loading…
Reference in New Issue