added quant cfg parsing and addition to measCfg

master
Francisco Paisana 5 years ago committed by Francisco Paisana
parent b6b1dd1814
commit 35c9f02579

@ -57,6 +57,7 @@ struct report_cfg_eutra_s;
struct meas_obj_to_add_mod_s; struct meas_obj_to_add_mod_s;
struct report_cfg_to_add_mod_s; struct report_cfg_to_add_mod_s;
struct meas_id_to_add_mod_s; struct meas_id_to_add_mod_s;
struct quant_cfg_s;
} // namespace rrc } // namespace rrc
} // namespace asn1 } // namespace asn1
@ -123,6 +124,7 @@ bool operator==(const asn1::rrc::meas_obj_to_add_mod_s& lhs, const asn1::rrc::me
bool operator==(const asn1::rrc::report_cfg_eutra_s& lhs, const asn1::rrc::report_cfg_eutra_s& rhs); bool operator==(const asn1::rrc::report_cfg_eutra_s& lhs, const asn1::rrc::report_cfg_eutra_s& rhs);
bool operator==(const asn1::rrc::report_cfg_to_add_mod_s& lhs, const asn1::rrc::report_cfg_to_add_mod_s& rhs); bool operator==(const asn1::rrc::report_cfg_to_add_mod_s& lhs, const asn1::rrc::report_cfg_to_add_mod_s& rhs);
bool operator==(const asn1::rrc::meas_id_to_add_mod_s& lhs, const asn1::rrc::meas_id_to_add_mod_s& rhs); bool operator==(const asn1::rrc::meas_id_to_add_mod_s& lhs, const asn1::rrc::meas_id_to_add_mod_s& rhs);
bool operator==(const asn1::rrc::quant_cfg_s& lhs, const asn1::rrc::quant_cfg_s& rhs);
} // namespace rrc } // namespace rrc
} // namespace asn1 } // namespace asn1

@ -180,7 +180,6 @@ void to_asn1(asn1::rrc::rlc_cfg_c* asn1_type, const srslte::rlc_config_t& cfg)
// stays TM // stays TM
break; break;
} }
} }
/*************************** /***************************
@ -398,13 +397,13 @@ void set_phy_cfg_t_dedicated_cfg(phy_cfg_t* cfg, const asn1::rrc::phys_cfg_ded_s
if (asn1_type.srs_ul_cfg_ded_present) { if (asn1_type.srs_ul_cfg_ded_present) {
cfg->ul_cfg.srs.dedicated_enabled = asn1_type.srs_ul_cfg_ded.type() == asn1::rrc::setup_e::setup; cfg->ul_cfg.srs.dedicated_enabled = asn1_type.srs_ul_cfg_ded.type() == asn1::rrc::setup_e::setup;
if (cfg->ul_cfg.srs.dedicated_enabled) { if (cfg->ul_cfg.srs.dedicated_enabled) {
cfg->ul_cfg.srs.configured = cfg->ul_cfg.srs.dedicated_enabled and cfg->ul_cfg.srs.common_enabled; cfg->ul_cfg.srs.configured = cfg->ul_cfg.srs.dedicated_enabled and cfg->ul_cfg.srs.common_enabled;
cfg->ul_cfg.srs.I_srs = asn1_type.srs_ul_cfg_ded.setup().srs_cfg_idx; cfg->ul_cfg.srs.I_srs = asn1_type.srs_ul_cfg_ded.setup().srs_cfg_idx;
cfg->ul_cfg.srs.B = asn1_type.srs_ul_cfg_ded.setup().srs_bw; cfg->ul_cfg.srs.B = asn1_type.srs_ul_cfg_ded.setup().srs_bw;
cfg->ul_cfg.srs.b_hop = asn1_type.srs_ul_cfg_ded.setup().srs_hop_bw; cfg->ul_cfg.srs.b_hop = asn1_type.srs_ul_cfg_ded.setup().srs_hop_bw;
cfg->ul_cfg.srs.n_rrc = asn1_type.srs_ul_cfg_ded.setup().freq_domain_position; cfg->ul_cfg.srs.n_rrc = asn1_type.srs_ul_cfg_ded.setup().freq_domain_position;
cfg->ul_cfg.srs.k_tc = asn1_type.srs_ul_cfg_ded.setup().tx_comb; cfg->ul_cfg.srs.k_tc = asn1_type.srs_ul_cfg_ded.setup().tx_comb;
cfg->ul_cfg.srs.n_srs = asn1_type.srs_ul_cfg_ded.setup().cyclic_shift; cfg->ul_cfg.srs.n_srs = asn1_type.srs_ul_cfg_ded.setup().cyclic_shift;
} }
} }
@ -508,7 +507,7 @@ void set_phy_cfg_t_common_pucch(phy_cfg_t* cfg, const asn1::rrc::pucch_cfg_commo
void set_phy_cfg_t_common_srs(phy_cfg_t* cfg, const asn1::rrc::srs_ul_cfg_common_c& asn1_type) void set_phy_cfg_t_common_srs(phy_cfg_t* cfg, const asn1::rrc::srs_ul_cfg_common_c& asn1_type)
{ {
cfg->ul_cfg.srs.common_enabled = asn1_type.type() == asn1::rrc::setup_e::setup; cfg->ul_cfg.srs.common_enabled = asn1_type.type() == asn1::rrc::setup_e::setup;
if (cfg->ul_cfg.srs.common_enabled) { if (cfg->ul_cfg.srs.common_enabled) {
cfg->ul_cfg.srs.simul_ack = asn1_type.setup().ack_nack_srs_simul_tx; cfg->ul_cfg.srs.simul_ack = asn1_type.setup().ack_nack_srs_simul_tx;
cfg->ul_cfg.srs.bw_cfg = asn1_type.setup().srs_bw_cfg.to_number(); cfg->ul_cfg.srs.bw_cfg = asn1_type.setup().srs_bw_cfg.to_number();
@ -662,14 +661,14 @@ void set_phy_cfg_t_scell_config(phy_cfg_t* cfg, const asn1::rrc::scell_to_add_mo
if (ul_cfg_r10->srs_ul_cfg_ded_r10_present) { if (ul_cfg_r10->srs_ul_cfg_ded_r10_present) {
cfg->ul_cfg.srs.dedicated_enabled = ul_cfg_r10->srs_ul_cfg_ded_r10.type() == asn1::rrc::setup_e::setup; cfg->ul_cfg.srs.dedicated_enabled = ul_cfg_r10->srs_ul_cfg_ded_r10.type() == asn1::rrc::setup_e::setup;
if (cfg->ul_cfg.srs.dedicated_enabled) { if (cfg->ul_cfg.srs.dedicated_enabled) {
auto* srs_ul_cfg_ded_r10 = &ul_cfg_r10->srs_ul_cfg_ded_r10.setup(); auto* srs_ul_cfg_ded_r10 = &ul_cfg_r10->srs_ul_cfg_ded_r10.setup();
cfg->ul_cfg.srs.configured = cfg->ul_cfg.srs.dedicated_enabled and cfg->ul_cfg.srs.common_enabled; cfg->ul_cfg.srs.configured = cfg->ul_cfg.srs.dedicated_enabled and cfg->ul_cfg.srs.common_enabled;
cfg->ul_cfg.srs.I_srs = srs_ul_cfg_ded_r10->srs_cfg_idx; cfg->ul_cfg.srs.I_srs = srs_ul_cfg_ded_r10->srs_cfg_idx;
cfg->ul_cfg.srs.B = srs_ul_cfg_ded_r10->srs_bw; cfg->ul_cfg.srs.B = srs_ul_cfg_ded_r10->srs_bw;
cfg->ul_cfg.srs.b_hop = srs_ul_cfg_ded_r10->srs_hop_bw; cfg->ul_cfg.srs.b_hop = srs_ul_cfg_ded_r10->srs_hop_bw;
cfg->ul_cfg.srs.n_rrc = srs_ul_cfg_ded_r10->freq_domain_position; cfg->ul_cfg.srs.n_rrc = srs_ul_cfg_ded_r10->freq_domain_position;
cfg->ul_cfg.srs.k_tc = srs_ul_cfg_ded_r10->tx_comb; cfg->ul_cfg.srs.k_tc = srs_ul_cfg_ded_r10->tx_comb;
cfg->ul_cfg.srs.n_srs = srs_ul_cfg_ded_r10->cyclic_shift; cfg->ul_cfg.srs.n_srs = srs_ul_cfg_ded_r10->cyclic_shift;
} }
} }
} }
@ -874,5 +873,19 @@ bool operator==(const meas_id_to_add_mod_s& lhs, const meas_id_to_add_mod_s& rhs
return lhs.meas_id == rhs.meas_id and lhs.meas_obj_id == rhs.meas_obj_id and lhs.report_cfg_id == rhs.report_cfg_id; return lhs.meas_id == rhs.meas_id and lhs.meas_obj_id == rhs.meas_obj_id and lhs.report_cfg_id == rhs.report_cfg_id;
} }
bool operator==(const asn1::rrc::quant_cfg_s& lhs, const asn1::rrc::quant_cfg_s& rhs)
{
if (lhs.ext or lhs.quant_cfg_geran_present or lhs.quant_cfg_utra_present or lhs.quant_cfg_cdma2000_present or
rhs.ext or rhs.quant_cfg_geran_present or rhs.quant_cfg_utra_present or rhs.quant_cfg_cdma2000_present) {
printf("[%d] quantCfg properties not supported\n", __LINE__);
return false;
}
return lhs.quant_cfg_eutra_present == rhs.quant_cfg_eutra_present and
lhs.quant_cfg_eutra.filt_coef_rsrp_present == rhs.quant_cfg_eutra.filt_coef_rsrp_present and
lhs.quant_cfg_eutra.filt_coef_rsrp == rhs.quant_cfg_eutra.filt_coef_rsrp and
lhs.quant_cfg_eutra.filt_coef_rsrq_present == rhs.quant_cfg_eutra.filt_coef_rsrq_present and
lhs.quant_cfg_eutra.filt_coef_rsrq == rhs.quant_cfg_eutra.filt_coef_rsrq;
}
} // namespace rrc } // namespace rrc
} // namespace asn1 } // namespace asn1

@ -43,6 +43,7 @@ public:
std::tuple<bool, meas_obj_t*, meas_cell_t*> add_cell_cfg(const meas_cell_cfg_t& cellcfg); std::tuple<bool, meas_obj_t*, meas_cell_t*> add_cell_cfg(const meas_cell_cfg_t& cellcfg);
report_cfg_t* add_report_cfg(const asn1::rrc::report_cfg_eutra_s& reportcfg); report_cfg_t* add_report_cfg(const asn1::rrc::report_cfg_eutra_s& reportcfg);
meas_id_t* add_measid_cfg(uint8_t measobjid, uint8_t repid); meas_id_t* add_measid_cfg(uint8_t measobjid, uint8_t repid);
asn1::rrc::quant_cfg_s* add_quant_cfg(const asn1::rrc::quant_cfg_eutra_s& quantcfg);
bool compute_diff_meas_cfg(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const; bool compute_diff_meas_cfg(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const;
void compute_diff_meas_objs(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const; void compute_diff_meas_objs(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const;
@ -51,6 +52,7 @@ public:
asn1::rrc::meas_obj_to_add_mod_s* added_obj) const; asn1::rrc::meas_obj_to_add_mod_s* added_obj) const;
void compute_diff_report_cfgs(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const; void compute_diff_report_cfgs(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const;
void compute_diff_meas_ids(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const; void compute_diff_meas_ids(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const;
void compute_diff_quant_cfg(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg_msg) const;
// getters // getters
const asn1::rrc::meas_obj_to_add_mod_list_l& meas_objs() const { return var_meas.meas_obj_list; } const asn1::rrc::meas_obj_to_add_mod_list_l& meas_objs() const { return var_meas.meas_obj_list; }

@ -26,10 +26,12 @@
#include "srslte/srslte.h" #include "srslte/srslte.h"
#define HANDLEPARSERCODE(cond) \ #define HANDLEPARSERCODE(cond) \
if ((cond) != 0) { \ do { \
printf("[%d][%s()] Parser Error detected\n", __LINE__, __FUNCTION__); \ if ((cond) != 0) { \
return -1; \ printf("[%d][%s()] Parser Error detected\n", __LINE__, __FUNCTION__); \
} return -1; \
} \
} while (0)
using namespace asn1::rrc; using namespace asn1::rrc;
@ -148,17 +150,17 @@ int field_carrier_freqs_info_list::parse(libconfig::Setting& root)
int cell_resel_prio; int cell_resel_prio;
if (root[i].lookupValue("cell_resel_prio", cell_resel_prio)) { if (root[i].lookupValue("cell_resel_prio", cell_resel_prio)) {
data->carrier_freqs_info_list[i].common_info.cell_resel_prio_present = true; data->carrier_freqs_info_list[i].common_info.cell_resel_prio_present = true;
data->carrier_freqs_info_list[i].common_info.cell_resel_prio = cell_resel_prio; data->carrier_freqs_info_list[i].common_info.cell_resel_prio = cell_resel_prio;
} }
int p_max_geran; int p_max_geran;
if (root[i].lookupValue("p_max_geran", p_max_geran)) { if (root[i].lookupValue("p_max_geran", p_max_geran)) {
data->carrier_freqs_info_list[i].common_info.p_max_geran_present = true; data->carrier_freqs_info_list[i].common_info.p_max_geran_present = true;
data->carrier_freqs_info_list[i].common_info.p_max_geran = p_max_geran; data->carrier_freqs_info_list[i].common_info.p_max_geran = p_max_geran;
} }
field_asn1_bitstring_number<asn1::fixed_bitstring<8>, uint8_t> ncc_permitted("ncc_permitted", field_asn1_bitstring_number<asn1::fixed_bitstring<8>, uint8_t> ncc_permitted(
&data->carrier_freqs_info_list[i].common_info.ncc_permitted); "ncc_permitted", &data->carrier_freqs_info_list[i].common_info.ncc_permitted);
if (ncc_permitted.parse(root[i])) { if (ncc_permitted.parse(root[i])) {
ERROR("Error parsing `ncc_permitted` in carrier_freqs_info_lsit=%d\n", i); ERROR("Error parsing `ncc_permitted` in carrier_freqs_info_lsit=%d\n", i);
return -1; return -1;
@ -191,7 +193,7 @@ int field_carrier_freqs_info_list::parse(libconfig::Setting& root)
} }
field_asn1_enum_str<asn1::rrc::band_ind_geran_e> band_ind("band_ind", field_asn1_enum_str<asn1::rrc::band_ind_geran_e> band_ind("band_ind",
&data->carrier_freqs_info_list[i].carrier_freqs.band_ind); &data->carrier_freqs_info_list[i].carrier_freqs.band_ind);
if (band_ind.parse(root[i])) { if (band_ind.parse(root[i])) {
ERROR("Error parsing `band_ind` in carrier_freqs_info_list=%d\n", i); ERROR("Error parsing `band_ind` in carrier_freqs_info_list=%d\n", i);
return -1; return -1;
@ -199,14 +201,14 @@ int field_carrier_freqs_info_list::parse(libconfig::Setting& root)
data->carrier_freqs_info_list[i].carrier_freqs.following_arfcns.set_explicit_list_of_arfcns(); data->carrier_freqs_info_list[i].carrier_freqs.following_arfcns.set_explicit_list_of_arfcns();
explicit_list_of_arfcns_l &exp_l = explicit_list_of_arfcns_l& exp_l =
data->carrier_freqs_info_list[i].carrier_freqs.following_arfcns.explicit_list_of_arfcns(); data->carrier_freqs_info_list[i].carrier_freqs.following_arfcns.explicit_list_of_arfcns();
if (root[i].exists("explicit_list_of_arfcns")) { if (root[i].exists("explicit_list_of_arfcns")) {
exp_l.resize((uint32_t)root[i]["explicit_list_of_arfcns"].getLength()); exp_l.resize((uint32_t)root[i]["explicit_list_of_arfcns"].getLength());
if (exp_l.size() < 31) { /* SEQUENCE (SIZE (0..31)) OF ARFCN-ValueGERAN */ if (exp_l.size() < 31) { /* SEQUENCE (SIZE (0..31)) OF ARFCN-ValueGERAN */
for (uint32_t j = 0; j < exp_l.size(); j++) { for (uint32_t j = 0; j < exp_l.size(); j++) {
int arfcn = root[i]["explicit_list_of_arfcns"][j]; int arfcn = root[i]["explicit_list_of_arfcns"][j];
if (arfcn >= 0 && arfcn <= 1024) { if (arfcn >= 0 && arfcn <= 1024) {
exp_l[j] = (short unsigned int)arfcn; exp_l[j] = (short unsigned int)arfcn;
} else { } else {
fprintf(stderr, "Invalid ARFCN %d in for carrier_freqs_info_list=%d explicit_list_of_arfcns\n", i, j); fprintf(stderr, "Invalid ARFCN %d in for carrier_freqs_info_list=%d explicit_list_of_arfcns\n", i, j);
@ -220,12 +222,10 @@ int field_carrier_freqs_info_list::parse(libconfig::Setting& root)
} else { } else {
exp_l.resize(0); exp_l.resize(0);
} }
} }
return 0; return 0;
} }
int enb::parse_sib1(std::string filename, sib_type1_s* data) int enb::parse_sib1(std::string filename, sib_type1_s* data)
{ {
parser::section sib1("sib1"); parser::section sib1("sib1");
@ -288,8 +288,8 @@ int mbsfn_sf_cfg_list_parser::parse(Setting& root)
*enabled = true; *enabled = true;
mbsfn_list->resize(len); mbsfn_list->resize(len);
field_asn1_choice_number<mbsfn_sf_cfg_s::sf_alloc_c_> c("subframeAllocation", "subframeAllocationNumFrames", field_asn1_choice_number<mbsfn_sf_cfg_s::sf_alloc_c_> c(
&extract_sf_alloc, &(*mbsfn_list)[0].sf_alloc); "subframeAllocation", "subframeAllocationNumFrames", &extract_sf_alloc, &(*mbsfn_list)[0].sf_alloc);
c.parse(root["mbsfnSubframeConfigList"]); c.parse(root["mbsfnSubframeConfigList"]);
parser::field<uint8_t> f("radioframeAllocationOffset", &(*mbsfn_list)[0].radioframe_alloc_offset); parser::field<uint8_t> f("radioframeAllocationOffset", &(*mbsfn_list)[0].radioframe_alloc_offset);
@ -521,8 +521,8 @@ int enb::parse_sib3(std::string filename, sib_type3_s* data)
sib3.add_subsection(&resel_serving); sib3.add_subsection(&resel_serving);
sib_type3_s::cell_resel_serving_freq_info_s_* freqinfo = &data->cell_resel_serving_freq_info; sib_type3_s::cell_resel_serving_freq_info_s_* freqinfo = &data->cell_resel_serving_freq_info;
resel_serving.add_field(new parser::field<uint8>("s_non_intra_search", &freqinfo->s_non_intra_search, resel_serving.add_field(new parser::field<uint8>(
&freqinfo->s_non_intra_search_present)); "s_non_intra_search", &freqinfo->s_non_intra_search, &freqinfo->s_non_intra_search_present));
resel_serving.add_field(new parser::field<uint8>("thresh_serving_low", &freqinfo->thresh_serving_low)); resel_serving.add_field(new parser::field<uint8>("thresh_serving_low", &freqinfo->thresh_serving_low));
resel_serving.add_field(new parser::field<uint8>("cell_resel_prio", &freqinfo->cell_resel_prio)); resel_serving.add_field(new parser::field<uint8>("cell_resel_prio", &freqinfo->cell_resel_prio));
@ -535,8 +535,8 @@ int enb::parse_sib3(std::string filename, sib_type3_s* data)
intra_freq.add_field(new parser::field<int8>("p_max", &intrafreq->p_max, &intrafreq->p_max_present)); intra_freq.add_field(new parser::field<int8>("p_max", &intrafreq->p_max, &intrafreq->p_max_present));
intra_freq.add_field( intra_freq.add_field(
new parser::field<uint8>("s_intra_search", &intrafreq->s_intra_search, &intrafreq->s_intra_search_present)); new parser::field<uint8>("s_intra_search", &intrafreq->s_intra_search, &intrafreq->s_intra_search_present));
intra_freq.add_field(make_asn1_enum_number_parser("allowed_meas_bw", &intrafreq->allowed_meas_bw, intra_freq.add_field(make_asn1_enum_number_parser(
&intrafreq->allowed_meas_bw_present)); "allowed_meas_bw", &intrafreq->allowed_meas_bw, &intrafreq->allowed_meas_bw_present));
intra_freq.add_field(new parser::field<bool>("presence_ant_port_1", &intrafreq->presence_ant_port1)); intra_freq.add_field(new parser::field<bool>("presence_ant_port_1", &intrafreq->presence_ant_port1));
intra_freq.add_field(make_asn1_bitstring_number_parser("neigh_cell_cnfg", &intrafreq->neigh_cell_cfg)); intra_freq.add_field(make_asn1_bitstring_number_parser("neigh_cell_cnfg", &intrafreq->neigh_cell_cfg));
intra_freq.add_field(new parser::field<uint8>("t_resel_eutra", &intrafreq->t_resel_eutra)); intra_freq.add_field(new parser::field<uint8>("t_resel_eutra", &intrafreq->t_resel_eutra));
@ -853,11 +853,13 @@ int enb::parse_rr(all_args_t* args, rrc_cfg_t* rrc_cfg)
return SRSLTE_ERROR; return SRSLTE_ERROR;
} else if (args->enb.transmission_mode == 1 && args->enb.nof_ports > 1) { } else if (args->enb.transmission_mode == 1 && args->enb.nof_ports > 1) {
ERROR("Invalid number of ports (%d) for transmission mode (%d). Only one antenna port is allowed.\n", ERROR("Invalid number of ports (%d) for transmission mode (%d). Only one antenna port is allowed.\n",
args->enb.nof_ports, args->enb.transmission_mode); args->enb.nof_ports,
args->enb.transmission_mode);
return SRSLTE_ERROR; return SRSLTE_ERROR;
} else if (args->enb.transmission_mode > 1 && args->enb.nof_ports != 2) { } else if (args->enb.transmission_mode > 1 && args->enb.nof_ports != 2) {
ERROR("The selected number of ports (%d) are insufficient for the selected transmission mode (%d).\n", ERROR("The selected number of ports (%d) are insufficient for the selected transmission mode (%d).\n",
args->enb.nof_ports, args->enb.transmission_mode); args->enb.nof_ports,
args->enb.transmission_mode);
return SRSLTE_ERROR; return SRSLTE_ERROR;
} }
@ -908,8 +910,8 @@ int enb::parse_rr(all_args_t* args, rrc_cfg_t* rrc_cfg)
mac_cnfg.add_subsection(&ulsch_cnfg); mac_cnfg.add_subsection(&ulsch_cnfg);
rrc_cfg->mac_cnfg.ul_sch_cfg.tti_bundling = false; rrc_cfg->mac_cnfg.ul_sch_cfg.tti_bundling = false;
ulsch_cnfg.add_field(make_asn1_enum_number_parser("max_harq_tx", &rrc_cfg->mac_cnfg.ul_sch_cfg.max_harq_tx, ulsch_cnfg.add_field(make_asn1_enum_number_parser(
&rrc_cfg->mac_cnfg.ul_sch_cfg.max_harq_tx_present)); "max_harq_tx", &rrc_cfg->mac_cnfg.ul_sch_cfg.max_harq_tx, &rrc_cfg->mac_cnfg.ul_sch_cfg.max_harq_tx_present));
ulsch_cnfg.add_field(make_asn1_enum_number_parser("periodic_bsr_timer", ulsch_cnfg.add_field(make_asn1_enum_number_parser("periodic_bsr_timer",
&rrc_cfg->mac_cnfg.ul_sch_cfg.periodic_bsr_timer, &rrc_cfg->mac_cnfg.ul_sch_cfg.periodic_bsr_timer,
&rrc_cfg->mac_cnfg.ul_sch_cfg.periodic_bsr_timer_present)); &rrc_cfg->mac_cnfg.ul_sch_cfg.periodic_bsr_timer_present));

@ -341,6 +341,14 @@ meas_id_to_add_mod_s* var_meas_cfg_t::add_measid_cfg(uint8_t measobjid, uint8_t
return std::lower_bound(var_meas.meas_id_list.begin(), var_meas.meas_id_list.end(), new_measid.meas_id, cmp); return std::lower_bound(var_meas.meas_id_list.begin(), var_meas.meas_id_list.end(), new_measid.meas_id, cmp);
} }
asn1::rrc::quant_cfg_s* var_meas_cfg_t::add_quant_cfg(const asn1::rrc::quant_cfg_eutra_s& quantcfg)
{
var_meas.quant_cfg_present = true;
var_meas.quant_cfg.quant_cfg_eutra_present = true;
var_meas.quant_cfg.quant_cfg_eutra = quantcfg;
return &var_meas.quant_cfg;
}
bool var_meas_cfg_t::compute_diff_meas_cfg(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const bool var_meas_cfg_t::compute_diff_meas_cfg(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg) const
{ {
*meas_cfg = {}; *meas_cfg = {};
@ -349,7 +357,7 @@ bool var_meas_cfg_t::compute_diff_meas_cfg(const var_meas_cfg_t& target_cfg, asn
compute_diff_meas_objs(target_cfg, meas_cfg); compute_diff_meas_objs(target_cfg, meas_cfg);
compute_diff_report_cfgs(target_cfg, meas_cfg); compute_diff_report_cfgs(target_cfg, meas_cfg);
compute_diff_meas_ids(target_cfg, meas_cfg); compute_diff_meas_ids(target_cfg, meas_cfg);
// deltaconfig_meas_quantity_config(target_cfg, meas_cfg); compute_diff_quant_cfg(target_cfg, meas_cfg);
meas_cfg->meas_gap_cfg_present = false; // NOTE: we do not support inter-freq. HO meas_cfg->meas_gap_cfg_present = false; // NOTE: we do not support inter-freq. HO
meas_cfg->s_measure_present = false; // NOTE: We do not support SCells meas_cfg->s_measure_present = false; // NOTE: We do not support SCells
meas_cfg->pre_regist_info_hrpd_present = false; // NOTE: not supported meas_cfg->pre_regist_info_hrpd_present = false; // NOTE: not supported
@ -526,6 +534,15 @@ void var_meas_cfg_t::compute_diff_meas_ids(const var_meas_cfg_t& target_cfg, asn
} }
} }
void var_meas_cfg_t::compute_diff_quant_cfg(const var_meas_cfg_t& target_cfg, asn1::rrc::meas_cfg_s* meas_cfg_msg) const
{
if (target_cfg.var_meas.quant_cfg_present and
(not var_meas.quant_cfg_present or not(target_cfg.var_meas.quant_cfg == var_meas.quant_cfg))) {
meas_cfg_msg->quant_cfg_present = true;
meas_cfg_msg->quant_cfg = target_cfg.var_meas.quant_cfg;
}
}
/************************************************************************************************* /*************************************************************************************************
* mobility_cfg class * mobility_cfg class
************************************************************************************************/ ************************************************************************************************/
@ -552,6 +569,9 @@ rrc::mobility_cfg::mobility_cfg(const rrc_cfg_t* cfg_, srslte::log* log_) : cfg(
var_meas.add_measid_cfg(measobj.meas_obj_id, var_meas.rep_cfgs().begin()->report_cfg_id); var_meas.add_measid_cfg(measobj.meas_obj_id, var_meas.rep_cfgs().begin()->report_cfg_id);
} }
} }
// insert quantity config
var_meas.add_quant_cfg(cfg->meas_cfg.quant_cfg);
} }
current_meas_cfg = std::make_shared<var_meas_cfg_t>(var_meas); current_meas_cfg = std::make_shared<var_meas_cfg_t>(var_meas);

@ -303,7 +303,7 @@ int test_mobility_class()
srsenb::rrc rrc; srsenb::rrc rrc;
mac_dummy mac; mac_dummy mac;
rrc.init(&cfg, nullptr, &mac, nullptr, nullptr, nullptr, nullptr, &log_h); // rrc.init(&cfg, nullptr, &mac, nullptr, nullptr, nullptr, nullptr, &log_h);
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }

Loading…
Cancel
Save