Set eutra nr band info based config value

master
David Rupprecht 4 years ago committed by David Rupprecht
parent cdf72248f3
commit 506adca930

@ -40,7 +40,8 @@ struct core_less_args_t {
struct rrc_nr_args_t {
core_less_args_t coreless;
std::vector<uint32_t> supported_bands;
std::vector<uint32_t> supported_bands_nr;
std::vector<uint32_t> supported_bands_eutra;
std::string log_level;
uint32_t log_hex_limit;
};

@ -201,17 +201,19 @@ void rrc_nr::get_eutra_nr_capabilities(srsran::byte_buffer_t* eutra_nr_caps_pdu)
band_combination_s band_combination;
for (const auto& band : args.supported_bands_eutra) {
struct band_params_c band_param_eutra;
band_param_eutra.set_eutra();
band_param_eutra.eutra().ca_bw_class_dl_eutra_present = true;
band_param_eutra.eutra().ca_bw_class_ul_eutra_present = true;
band_param_eutra.eutra().band_eutra = 1; // TODO: this also needs to be set here?
band_param_eutra.eutra().band_eutra = band;
band_param_eutra.eutra().ca_bw_class_dl_eutra = asn1::rrc_nr::ca_bw_class_eutra_opts::options::a;
band_param_eutra.eutra().ca_bw_class_ul_eutra = asn1::rrc_nr::ca_bw_class_eutra_opts::options::a;
band_combination.band_list.push_back(band_param_eutra);
}
// TODO check if band is requested
for (const auto& band : args.supported_bands) {
for (const auto& band : args.supported_bands_nr) {
struct band_params_c band_param_nr;
band_param_nr.set_nr();
band_param_nr.nr().ca_bw_class_dl_nr_present = true;
@ -228,14 +230,16 @@ void rrc_nr::get_eutra_nr_capabilities(srsran::byte_buffer_t* eutra_nr_caps_pdu)
mrdc_cap.rf_params_mrdc.ext = true;
// RF Params MRDC applied_freq_band_list_filt
for (const auto& band : args.supported_bands_eutra) {
freq_band_info_c band_info_eutra;
band_info_eutra.set_band_info_eutra();
band_info_eutra.band_info_eutra().ca_bw_class_dl_eutra_present = false;
band_info_eutra.band_info_eutra().ca_bw_class_ul_eutra_present = false;
band_info_eutra.band_info_eutra().band_eutra = 1;
band_info_eutra.band_info_eutra().band_eutra = band;
mrdc_cap.rf_params_mrdc.applied_freq_band_list_filt.push_back(band_info_eutra);
}
for (const auto& band : args.supported_bands) {
for (const auto& band : args.supported_bands_nr) {
freq_band_info_c band_info_nr;
band_info_nr.set_band_info_nr();
band_info_nr.band_info_nr().band_nr = band;
@ -285,7 +289,7 @@ void rrc_nr::get_eutra_nr_capabilities(srsran::byte_buffer_t* eutra_nr_caps_pdu)
feature_sets_per_band.push_back(feature_set_eutra);
feature_set_combination.push_back(feature_sets_per_band);
for (const auto& band : args.supported_bands) {
for (const auto& band : args.supported_bands_nr) {
feature_sets_per_band.resize(0);
feature_set_c feature_set_nr;
feature_set_nr.set_nr();
@ -404,7 +408,7 @@ void rrc_nr::get_nr_capabilities(srsran::byte_buffer_t* nr_caps_pdu)
// PDCP
nr_cap.pdcp_params.max_num_rohc_context_sessions = pdcp_params_s::max_num_rohc_context_sessions_opts::cs2;
for (const auto& band : args.supported_bands) {
for (const auto& band : args.supported_bands_nr) {
band_nr_s band_nr;
band_nr.band_nr = band;
band_nr.ue_pwr_class_present = true;

@ -228,6 +228,12 @@ int ue::parse_args(const all_args_t& args_)
args.stack.rrc.supported_bands.end()) {
args.stack.rrc.supported_bands[args.stack.rrc.nof_supported_bands++] = band;
}
// RRC NR needs also information about supported eutra bands
if (std::find(args.stack.rrc_nr.supported_bands_eutra.begin(),
args.stack.rrc_nr.supported_bands_eutra.end(),
band) == args.stack.rrc_nr.supported_bands_eutra.end()) {
args.stack.rrc_nr.supported_bands_eutra.push_back(band);
}
}
} else {
logger.error("Error: dl_earfcn list is empty");
@ -260,9 +266,10 @@ int ue::parse_args(const all_args_t& args_)
std::vector<uint32_t> bands = bands_helper.get_bands_nr(arfcn);
for (const auto& band : bands) {
// make sure we don't add duplicates
if (std::find(args.stack.rrc_nr.supported_bands.begin(), args.stack.rrc_nr.supported_bands.end(), band) ==
args.stack.rrc_nr.supported_bands.end()) {
args.stack.rrc_nr.supported_bands.push_back(band);
if (std::find(args.stack.rrc_nr.supported_bands_nr.begin(),
args.stack.rrc_nr.supported_bands_nr.end(),
band) == args.stack.rrc_nr.supported_bands_nr.end()) {
args.stack.rrc_nr.supported_bands_nr.push_back(band);
}
}
}

Loading…
Cancel
Save