diff --git a/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h b/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h index f449db264..6a68949a6 100644 --- a/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h +++ b/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h @@ -34,6 +34,7 @@ public: virtual bool _initialize_ric_ind_hdr(); virtual bool _initialize_ric_ind_msg() = 0; virtual bool collect_data(const enb_metrics_t& enb_metrics) = 0; + virtual bool is_ric_ind_ready() = 0; virtual bool clear_collected_data() = 0; std::vector _get_present_labels(const meas_info_item_s& action_meas_info_item); @@ -67,6 +68,7 @@ public: virtual bool _initialize_ric_ind_msg(); virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool is_ric_ind_ready(); virtual bool clear_collected_data(); private: @@ -89,6 +91,7 @@ public: virtual bool _initialize_ric_ind_msg(); virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool is_ric_ind_ready(); virtual bool clear_collected_data(); private: @@ -108,6 +111,7 @@ public: virtual bool _initialize_ric_ind_msg(); virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool is_ric_ind_ready(); virtual bool clear_collected_data(); private: @@ -127,6 +131,7 @@ public: virtual bool _initialize_ric_ind_msg(); virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool is_ric_ind_ready(); virtual bool clear_collected_data(); private: @@ -146,6 +151,7 @@ public: virtual bool _initialize_ric_ind_msg(); virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool is_ric_ind_ready(); virtual bool clear_collected_data(); private: diff --git a/srsgnb/src/stack/ric/e2sm_kpm.cc b/srsgnb/src/stack/ric/e2sm_kpm.cc index c67759022..b8be3f4de 100644 --- a/srsgnb/src/stack/ric/e2sm_kpm.cc +++ b/srsgnb/src/stack/ric/e2sm_kpm.cc @@ -233,6 +233,11 @@ bool e2sm_kpm::generate_ric_indication_content(E2AP_RIC_action_t& action_entry, return false; } e2sm_kpm_report_service* report_service = registered_actions_data.at(action_id); + + if (not report_service->is_ric_ind_ready()) { + return false; + } + ric_indication.indication_type = ri_cind_type_opts::report; // header is the same for all RIC service styles, i.e., type 1 diff --git a/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc b/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc index d31d35d52..d019b8d67 100644 --- a/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc +++ b/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc @@ -328,6 +328,12 @@ bool e2sm_kpm_report_service_style1::collect_data(const enb_metrics_t& enb_metri return true; } +bool e2sm_kpm_report_service_style1::is_ric_ind_ready() +{ + // TODO: check if only NO_VALUES, if so then skip + return true; +} + bool e2sm_kpm_report_service_style1::clear_collected_data() { ric_ind_header.collet_start_time.from_number(std::time(0)); @@ -368,6 +374,12 @@ bool e2sm_kpm_report_service_style2::collect_data(const enb_metrics_t& enb_metri return false; } +bool e2sm_kpm_report_service_style2::is_ric_ind_ready() +{ + // TODO: check if only NO_VALUES, if so then skip + return false; +} + bool e2sm_kpm_report_service_style2::clear_collected_data() { // TODO: implement @@ -405,6 +417,12 @@ bool e2sm_kpm_report_service_style3::collect_data(const enb_metrics_t& enb_metri return false; } +bool e2sm_kpm_report_service_style3::is_ric_ind_ready() +{ + // TODO: check if only NO_VALUES, if so then skip + return false; +} + bool e2sm_kpm_report_service_style3::clear_collected_data() { // TODO: implement @@ -442,6 +460,12 @@ bool e2sm_kpm_report_service_style4::collect_data(const enb_metrics_t& enb_metri return false; } +bool e2sm_kpm_report_service_style4::is_ric_ind_ready() +{ + // TODO: check if only NO_VALUES, if so then skip + return false; +} + bool e2sm_kpm_report_service_style4::clear_collected_data() { // TODO: implement @@ -479,6 +503,12 @@ bool e2sm_kpm_report_service_style5::collect_data(const enb_metrics_t& enb_metri return false; } +bool e2sm_kpm_report_service_style5::is_ric_ind_ready() +{ + // TODO: check if only NO_VALUES, if so then skip + return false; +} + bool e2sm_kpm_report_service_style5::clear_collected_data() { // TODO: implement diff --git a/srsgnb/src/stack/ric/ric_subscription.cc b/srsgnb/src/stack/ric/ric_subscription.cc index 2a30071cb..5c8d5e430 100644 --- a/srsgnb/src/stack/ric/ric_subscription.cc +++ b/srsgnb/src/stack/ric/ric_subscription.cc @@ -211,10 +211,10 @@ void ric_client::ric_subscription::_send_ric_indication() ric_indication.ri_caction_id = action.ric_action_id; ric_indication.ri_indication_sn_present = true; ric_indication.ri_indication_sn = _generate_ric_indication_sn(); - sm_ptr->generate_ric_indication_content(action, ric_indication); - - e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication); - parent->queue_send_e2ap_pdu(send_pdu); + if (sm_ptr->generate_ric_indication_content(action, ric_indication)) { + e2_ap_pdu_c send_pdu = parent->e2ap_.generate_indication(ric_indication); + parent->queue_send_e2ap_pdu(send_pdu); + } } // reschedule sending RIC indication