|
|
@ -251,32 +251,69 @@ bool e2sm_kpm::execute_action_fill_ric_indication(E2AP_RIC_action_t& action_entr
|
|
|
|
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_header_t ric_ind_header;
|
|
|
|
E2SM_KPM_RIC_ind_header_t ric_ind_header;
|
|
|
|
E2SM_KPM_RIC_ind_message_t ric_ind_message;
|
|
|
|
E2SM_KPM_RIC_ind_message_t ric_ind_message;
|
|
|
|
uint64_t granul_period;
|
|
|
|
|
|
|
|
meas_info_list_l action_meas_info_list;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ric_indication.indication_type = ri_cind_type_opts::report;
|
|
|
|
ric_indication.indication_type = ri_cind_type_opts::report;
|
|
|
|
e2_sm_kpm_action_definition_s action = registered_actions.at(action_entry.sm_local_ric_action_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (action.ric_style_type == 1) {
|
|
|
|
|
|
|
|
granul_period = action.action_definition_formats.action_definition_format1().granul_period;
|
|
|
|
|
|
|
|
action_meas_info_list = action.action_definition_formats.action_definition_format1().meas_info_list;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// header is the same for all RIC service styles, i.e., type 1
|
|
|
|
ric_ind_header.collet_start_time = std::time(0);
|
|
|
|
ric_ind_header.collet_start_time = std::time(0);
|
|
|
|
ric_indication.ri_cind_hdr = srsran::make_byte_buffer();
|
|
|
|
ric_indication.ri_cind_hdr = srsran::make_byte_buffer();
|
|
|
|
this->_generate_indication_header(ric_ind_header, ric_indication.ri_cind_hdr);
|
|
|
|
this->_generate_indication_header(ric_ind_header, ric_indication.ri_cind_hdr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e2_sm_kpm_action_definition_s action = registered_actions.at(action_entry.sm_local_ric_action_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (action.ric_style_type) {
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
ric_ind_message.ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1;
|
|
|
|
ric_ind_message.ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1;
|
|
|
|
// ric_ind_message.granul_period = granul_period; // not implemented by flexric and crashes it
|
|
|
|
_fill_ric_ind_msg_format1(action.action_definition_formats.action_definition_format1(), ric_ind_message);
|
|
|
|
ric_ind_message.granul_period = 0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
ric_ind_message.ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1;
|
|
|
|
|
|
|
|
_fill_ric_ind_msg_format1(action.action_definition_formats.action_definition_format2(), ric_ind_message);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
ric_ind_message.ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format2;
|
|
|
|
|
|
|
|
_fill_ric_ind_msg_format2(action.action_definition_formats.action_definition_format3(), ric_ind_message);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
ric_ind_message.ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format3;
|
|
|
|
|
|
|
|
_fill_ric_ind_msg_format3(action.action_definition_formats.action_definition_format4(), ric_ind_message);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
ric_ind_message.ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format3;
|
|
|
|
|
|
|
|
_fill_ric_ind_msg_format3(action.action_definition_formats.action_definition_format5(), ric_ind_message);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
logger.info("Unknown RIC style type %i -> do not admit action %i (type %i)", action.ric_style_type);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ric_indication.ri_cind_msg = srsran::make_byte_buffer();
|
|
|
|
|
|
|
|
this->_generate_indication_message(ric_ind_message, ric_indication.ri_cind_msg);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool e2sm_kpm::_fill_ric_ind_msg_format1(e2_sm_kpm_action_definition_format1_s& action,
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_message_t& ric_ind_msg)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cgi_c cell_global_id;
|
|
|
|
|
|
|
|
meas_info_list_l action_meas_info_list = action.meas_info_list;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (action.cell_global_id_present) {
|
|
|
|
|
|
|
|
cell_global_id = action.cell_global_id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ric_ind_message.granul_period = action.granul_period; // not implemented by flexric and crashes it
|
|
|
|
|
|
|
|
ric_ind_msg.granul_period = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ric_ind_msg.meas_info_list.resize(action_meas_info_list.size());
|
|
|
|
|
|
|
|
ric_ind_msg.meas_data.resize(action_meas_info_list.size());
|
|
|
|
|
|
|
|
|
|
|
|
ric_ind_message.meas_info_list.resize(action_meas_info_list.size());
|
|
|
|
|
|
|
|
ric_ind_message.meas_data.resize(action_meas_info_list.size());
|
|
|
|
|
|
|
|
for (uint32_t i = 0; i < action_meas_info_list.size(); i++) {
|
|
|
|
for (uint32_t i = 0; i < action_meas_info_list.size(); i++) {
|
|
|
|
// structs to fill
|
|
|
|
// structs to fill
|
|
|
|
meas_info_item_s& meas_info_item = ric_ind_message.meas_info_list[i];
|
|
|
|
meas_info_item_s& meas_info_item = ric_ind_msg.meas_info_list[i];
|
|
|
|
meas_data_item_s& meas_data = ric_ind_message.meas_data[i];
|
|
|
|
meas_data_item_s& meas_data = ric_ind_msg.meas_data[i];
|
|
|
|
|
|
|
|
|
|
|
|
// measure definition
|
|
|
|
// measurements definition
|
|
|
|
meas_info_item_s meas_def_item = action_meas_info_list[i];
|
|
|
|
meas_info_item_s meas_def_item = action_meas_info_list[i];
|
|
|
|
std::string meas_name = meas_def_item.meas_type.meas_name().to_string();
|
|
|
|
std::string meas_name = meas_def_item.meas_type.meas_name().to_string();
|
|
|
|
|
|
|
|
|
|
|
@ -311,13 +348,34 @@ bool e2sm_kpm::execute_action_fill_ric_indication(E2AP_RIC_action_t& action_entr
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ric_indication.ri_cind_msg = srsran::make_byte_buffer();
|
|
|
|
|
|
|
|
this->_generate_indication_message(ric_ind_message, ric_indication.ri_cind_msg);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool e2sm_kpm::_fill_ric_ind_msg_format1(e2_sm_kpm_action_definition_format2_s& action,
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_message_t& ric_ind_msg)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool e2sm_kpm::_fill_ric_ind_msg_format2(e2_sm_kpm_action_definition_format3_s& action,
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_message_t& ric_ind_msg)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool e2sm_kpm::_fill_ric_ind_msg_format3(e2_sm_kpm_action_definition_format4_s& action,
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_message_t& ric_ind_msg)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool e2sm_kpm::_fill_ric_ind_msg_format3(e2_sm_kpm_action_definition_format5_s& action,
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_message_t& ric_ind_msg)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void e2sm_kpm::_fill_measurement_records(std::string meas_name, std::string label, meas_record_l& meas_record_list)
|
|
|
|
void e2sm_kpm::_fill_measurement_records(std::string meas_name, std::string label, meas_record_l& meas_record_list)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32_t nof_records = srsran_random_uniform_int_dist(random_gen, 3, 10);
|
|
|
|
uint32_t nof_records = srsran_random_uniform_int_dist(random_gen, 3, 10);
|
|
|
|