|
|
@ -130,44 +130,24 @@ void ric_client::ric_subscription::delete_subscription()
|
|
|
|
|
|
|
|
|
|
|
|
void ric_client::ric_subscription::send_ric_indication()
|
|
|
|
void ric_client::ric_subscription::send_ric_indication()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
printf("Sending RIC indication msg to RIC Requestor ID: %i\n", ric_requestor_id);
|
|
|
|
if (sm_ptr == nullptr) {
|
|
|
|
ric_indication_t ric_indication;
|
|
|
|
parent->logger.error("SM pointer not set in subscription: %i\n", ric_requestor_id);
|
|
|
|
ric_indication.ric_requestor_id = ric_requestor_id;
|
|
|
|
return;
|
|
|
|
ric_indication.ric_instance_id = ric_instance_id;
|
|
|
|
|
|
|
|
ric_indication.ra_nfunction_id = ra_nfunction_id;
|
|
|
|
|
|
|
|
ric_indication.ri_caction_id = ri_caction_id;
|
|
|
|
|
|
|
|
ric_indication.indication_type = ri_cind_type_opts::report;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e2sm_kpm* sm_kpm_ptr = dynamic_cast<e2sm_kpm*>(sm_ptr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_header ric_ind_header;
|
|
|
|
|
|
|
|
ric_ind_header.collet_start_time = 0x12345;
|
|
|
|
|
|
|
|
ric_indication.ri_cind_hdr = srsran::make_byte_buffer();
|
|
|
|
|
|
|
|
sm_kpm_ptr->generate_indication_header(ric_ind_header, ric_indication.ri_cind_hdr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
E2SM_KPM_RIC_ind_message ric_ind_message;
|
|
|
|
|
|
|
|
ric_ind_message.ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ric_ind_message.meas_data.resize(1);
|
|
|
|
|
|
|
|
ric_ind_message.meas_data[0].meas_record.resize(5);
|
|
|
|
|
|
|
|
for (uint32_t i = 0; i < ric_ind_message.meas_data[0].meas_record.size(); i++) {
|
|
|
|
|
|
|
|
ric_ind_message.meas_data[0].meas_record[i].set_integer() = i * 1000;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ric_ind_message.meas_info_list.resize(1);
|
|
|
|
for (auto& action : admitted_actions) {
|
|
|
|
ric_ind_message.meas_info_list[0].meas_type.set_meas_name().from_string("RRU.PrbTotDl");
|
|
|
|
printf("Sending RIC indication msg to RIC Requestor ID: %i\n", ric_requestor_id);
|
|
|
|
ric_ind_message.meas_info_list[0].label_info_list.resize(1);
|
|
|
|
ric_indication_t ric_indication;
|
|
|
|
ric_ind_message.meas_info_list[0].label_info_list[0].meas_label.no_label_present = true;
|
|
|
|
ric_indication.ric_requestor_id = ric_requestor_id;
|
|
|
|
ric_ind_message.meas_info_list[0].label_info_list[0].meas_label.no_label =
|
|
|
|
ric_indication.ric_instance_id = ric_instance_id;
|
|
|
|
asn1::e2sm_kpm::meas_label_s::no_label_opts::true_value;
|
|
|
|
ric_indication.ra_nfunction_id = ra_nfunction_id;
|
|
|
|
|
|
|
|
ric_indication.ri_caction_id = action.ric_action_id;
|
|
|
|
// ric_ind_message.granul_period = 12345; // not implemented by flexric and crashes it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ric_indication.ri_cind_msg = srsran::make_byte_buffer();
|
|
|
|
sm_ptr->execute_action_fill_ric_indication(action, ric_indication);
|
|
|
|
sm_kpm_ptr->generate_indication_message(ric_ind_message, ric_indication.ri_cind_msg);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication);
|
|
|
|
e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication);
|
|
|
|
parent->queue_send_e2ap_pdu(send_pdu);
|
|
|
|
parent->queue_send_e2ap_pdu(send_pdu);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// reschedule sending RIC indication
|
|
|
|
// reschedule sending RIC indication
|
|
|
|
reporting_timer.run();
|
|
|
|
reporting_timer.run();
|
|
|
|