|
|
|
@ -130,44 +130,24 @@ void ric_client::ric_subscription::delete_subscription()
|
|
|
|
|
|
|
|
|
|
void ric_client::ric_subscription::send_ric_indication()
|
|
|
|
|
{
|
|
|
|
|
printf("Sending RIC indication msg to RIC Requestor ID: %i\n", ric_requestor_id);
|
|
|
|
|
ric_indication_t ric_indication;
|
|
|
|
|
ric_indication.ric_requestor_id = ric_requestor_id;
|
|
|
|
|
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;
|
|
|
|
|
if (sm_ptr == nullptr) {
|
|
|
|
|
parent->logger.error("SM pointer not set in subscription: %i\n", ric_requestor_id);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ric_ind_message.meas_info_list.resize(1);
|
|
|
|
|
ric_ind_message.meas_info_list[0].meas_type.set_meas_name().from_string("RRU.PrbTotDl");
|
|
|
|
|
ric_ind_message.meas_info_list[0].label_info_list.resize(1);
|
|
|
|
|
ric_ind_message.meas_info_list[0].label_info_list[0].meas_label.no_label_present = true;
|
|
|
|
|
ric_ind_message.meas_info_list[0].label_info_list[0].meas_label.no_label =
|
|
|
|
|
asn1::e2sm_kpm::meas_label_s::no_label_opts::true_value;
|
|
|
|
|
|
|
|
|
|
// ric_ind_message.granul_period = 12345; // not implemented by flexric and crashes it
|
|
|
|
|
for (auto& action : admitted_actions) {
|
|
|
|
|
printf("Sending RIC indication msg to RIC Requestor ID: %i\n", ric_requestor_id);
|
|
|
|
|
ric_indication_t ric_indication;
|
|
|
|
|
ric_indication.ric_requestor_id = ric_requestor_id;
|
|
|
|
|
ric_indication.ric_instance_id = ric_instance_id;
|
|
|
|
|
ric_indication.ra_nfunction_id = ra_nfunction_id;
|
|
|
|
|
ric_indication.ri_caction_id = action.ric_action_id;
|
|
|
|
|
|
|
|
|
|
ric_indication.ri_cind_msg = srsran::make_byte_buffer();
|
|
|
|
|
sm_kpm_ptr->generate_indication_message(ric_ind_message, ric_indication.ri_cind_msg);
|
|
|
|
|
sm_ptr->execute_action_fill_ric_indication(action, ric_indication);
|
|
|
|
|
|
|
|
|
|
e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication);
|
|
|
|
|
parent->queue_send_e2ap_pdu(send_pdu);
|
|
|
|
|
e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication);
|
|
|
|
|
parent->queue_send_e2ap_pdu(send_pdu);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// reschedule sending RIC indication
|
|
|
|
|
reporting_timer.run();
|
|
|
|
|