implement cell measurement bandwidth feature

master
Francisco 4 years ago committed by Francisco Paisana
parent 14d32db92f
commit 4838cd2f5e

@ -20,6 +20,30 @@ namespace srsran {
// Cell nof PRBs
const std::array<uint32_t, 6> lte_cell_nof_prbs = {6, 15, 25, 50, 75, 100};
inline uint32_t lte_cell_nof_prb_to_index(uint32_t nof_prb)
{
switch (nof_prb) {
case 6:
return 0;
case 15:
return 1;
case 25:
return 2;
case 50:
return 3;
case 75:
return 4;
case 100:
return 5;
default:
break;
}
return -1;
}
inline bool is_lte_cell_nof_prb(uint32_t nof_prb)
{
return lte_cell_nof_prb_to_index(nof_prb) < lte_cell_nof_prbs.size();
}
// Radio Bearers
enum class lte_srb { srb0, srb1, srb2, count };

@ -32,6 +32,7 @@ struct meas_cell_cfg_t {
uint16_t pci;
uint32_t eci;
float q_offset;
uint32_t allowed_meas_bw;
bool direct_forward_path_available;
};
@ -41,6 +42,7 @@ struct rrc_meas_cfg_t {
std::vector<asn1::rrc::report_cfg_eutra_s> meas_reports;
asn1::rrc::quant_cfg_eutra_s quant_cfg;
uint32_t meas_gap_period;
uint32_t allowed_meas_bw;
};
// Cell/Sector configuration

@ -61,7 +61,8 @@ cell_list =
dl_earfcn = 3350;
//ul_earfcn = 21400;
ho_active = false;
//meas_gap_period = 0;
//meas_gap_period = 0; // 0 (inactive), 40 or 80
//allowed_meas_bw = 6;
// CA cells
scell_list = (
@ -76,6 +77,7 @@ cell_list =
dl_earfcn = 2850;
pci = 2;
//direct_forward_path_available = false;
//allowed_meas_bw = 6;
}
);

@ -681,6 +681,8 @@ static int parse_meas_cell_list(rrc_meas_cfg_t* meas_cfg, Setting& root)
cell.eci = (unsigned int)root[i]["eci"];
cell.q_offset = 0; // LIBLTE_RRC_Q_OFFSET_RANGE_DB_0; // TODO
parse_default_field(cell.direct_forward_path_available, root[i], "direct_forward_path_available", false);
parse_default_field(cell.allowed_meas_bw, root[i], "allowed_meas_bw", 6u);
srsran_assert(srsran::is_lte_cell_nof_prb(cell.allowed_meas_bw), "Invalid measurement Bandwidth");
}
return 0;
}
@ -749,6 +751,8 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root)
parse_default_field(cell_cfg.meas_cfg.meas_gap_period, cellroot, "meas_gap_period", 0u);
HANDLEPARSERCODE(parse_default_field(cell_cfg.target_ul_sinr_db, cellroot, "target_ul_sinr", -1));
HANDLEPARSERCODE(parse_default_field(cell_cfg.enable_phr_handling, cellroot, "enable_phr_handling", false));
parse_default_field(cell_cfg.meas_cfg.allowed_meas_bw, cellroot, "allowed_meas_bw", 6u);
srsran_assert(srsran::is_lte_cell_nof_prb(cell_cfg.meas_cfg.allowed_meas_bw), "Invalid measurement Bandwidth");
if (cellroot.exists("ho_active") and cellroot["ho_active"]) {
HANDLEPARSERCODE(parse_meas_cell_list(&cell_cfg.meas_cfg, cellroot["meas_cell_list"]));

@ -59,7 +59,7 @@ std::pair<meas_obj_t*, cells_to_add_mod_s*> find_cell(meas_obj_to_add_mod_list_l
}
/// Add EARFCN to the MeasObjToAddModList
std::pair<bool, meas_obj_t*> add_meas_obj(meas_obj_list& list, uint32_t dl_earfcn)
std::pair<bool, meas_obj_t*> add_meas_obj(meas_obj_list& list, uint32_t dl_earfcn, uint32_t allowed_meas_bw)
{
meas_obj_t* obj = find_meas_obj(list, dl_earfcn);
if (obj != nullptr) {
@ -70,7 +70,7 @@ std::pair<bool, meas_obj_t*> add_meas_obj(meas_obj_list& list, uint32_t dl_earfc
new_obj.meas_obj_id = srsran::find_rrc_obj_id_gap(list);
asn1::rrc::meas_obj_eutra_s& eutra = new_obj.meas_obj.set_meas_obj_eutra();
eutra.carrier_freq = dl_earfcn;
eutra.allowed_meas_bw.value = asn1::rrc::allowed_meas_bw_e::mbw6; // TODO: What value to add here?
asn1::number_to_enum(eutra.allowed_meas_bw, allowed_meas_bw);
eutra.neigh_cell_cfg.from_number(1); // No MBSFN subframes present in neighbors
eutra.offset_freq_present = false; // no offset
obj = srsran::add_rrc_obj(list, new_obj);
@ -109,7 +109,7 @@ std::tuple<bool, meas_obj_t*, cells_to_add_mod_s*> add_cell_enb_cfg(meas_obj_lis
}
} else {
// no measobj has been found with same earfcn, create a new one
auto ret2 = add_meas_obj(meas_obj_list, cellcfg.earfcn);
auto ret2 = add_meas_obj(meas_obj_list, cellcfg.earfcn, cellcfg.allowed_meas_bw);
ret.first = ret2.second;
new_cell.cell_idx = 1;
@ -330,7 +330,8 @@ bool fill_meascfg_enb_cfg(meas_cfg_s& meascfg, const ue_cell_ded_list& ue_cell_l
return cc1->get_dl_earfcn() < cc2->get_dl_earfcn();
});
for (auto* cc : sorted_ue_cells) {
add_meas_obj(meascfg.meas_obj_to_add_mod_list, cc->get_dl_earfcn());
add_meas_obj(
meascfg.meas_obj_to_add_mod_list, cc->get_dl_earfcn(), cc->cell_common->cell_cfg.meas_cfg.allowed_meas_bw);
}
// Inserts all cells in meas_cell_list that are not PCell or SCells

Loading…
Cancel
Save