diff --git a/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h b/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h index e746190ea..f449db264 100644 --- a/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h +++ b/srsgnb/hdr/stack/ric/e2sm_kpm_report_service.h @@ -61,6 +61,7 @@ public: e2sm_kpm_report_service_style1(e2sm_kpm* e2sm_kpm, uint16_t action_id, e2_sm_kpm_action_definition_s action_definition); + virtual ~e2sm_kpm_report_service_style1() = default; static bool process_ric_action_definition(e2sm_kpm* e2sm_kpm, e2_sm_kpm_action_definition_s& action_definition); @@ -76,4 +77,80 @@ private: e2_sm_kpm_ind_msg_format1_s& ric_ind_message; }; +class e2sm_kpm_report_service_style2 : public e2sm_kpm_report_service +{ +public: + e2sm_kpm_report_service_style2(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition); + virtual ~e2sm_kpm_report_service_style2() = default; + + static bool process_ric_action_definition(e2sm_kpm* e2sm_kpm, e2_sm_kpm_action_definition_s& action_definition); + + virtual bool _initialize_ric_ind_msg(); + virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool clear_collected_data(); + +private: + e2_sm_kpm_action_definition_format2_s& action_def; + e2_sm_kpm_ind_msg_format1_s& ric_ind_message; +}; + +class e2sm_kpm_report_service_style3 : public e2sm_kpm_report_service +{ +public: + e2sm_kpm_report_service_style3(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition); + virtual ~e2sm_kpm_report_service_style3() = default; + + static bool process_ric_action_definition(e2sm_kpm* e2sm_kpm, e2_sm_kpm_action_definition_s& action_definition); + + virtual bool _initialize_ric_ind_msg(); + virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool clear_collected_data(); + +private: + e2_sm_kpm_action_definition_format3_s& action_def; + e2_sm_kpm_ind_msg_format2_s& ric_ind_message; +}; + +class e2sm_kpm_report_service_style4 : public e2sm_kpm_report_service +{ +public: + e2sm_kpm_report_service_style4(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition); + virtual ~e2sm_kpm_report_service_style4() = default; + + static bool process_ric_action_definition(e2sm_kpm* e2sm_kpm, e2_sm_kpm_action_definition_s& action_definition); + + virtual bool _initialize_ric_ind_msg(); + virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool clear_collected_data(); + +private: + e2_sm_kpm_action_definition_format4_s& action_def; + e2_sm_kpm_ind_msg_format3_s& ric_ind_message; +}; + +class e2sm_kpm_report_service_style5 : public e2sm_kpm_report_service +{ +public: + e2sm_kpm_report_service_style5(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition); + virtual ~e2sm_kpm_report_service_style5() = default; + + static bool process_ric_action_definition(e2sm_kpm* e2sm_kpm, e2_sm_kpm_action_definition_s& action_definition); + + virtual bool _initialize_ric_ind_msg(); + virtual bool collect_data(const enb_metrics_t& enb_metrics); + virtual bool clear_collected_data(); + +private: + e2_sm_kpm_action_definition_format5_s& action_def; + e2_sm_kpm_ind_msg_format3_s& ric_ind_message; +}; + #endif // SRSRAN_E2SM_KPM_ACTION_DATA_H diff --git a/srsgnb/src/stack/ric/e2sm_kpm.cc b/srsgnb/src/stack/ric/e2sm_kpm.cc index 5fea232ef..c67759022 100644 --- a/srsgnb/src/stack/ric/e2sm_kpm.cc +++ b/srsgnb/src/stack/ric/e2sm_kpm.cc @@ -165,16 +165,32 @@ bool e2sm_kpm::process_ric_action_definition(ri_caction_to_be_setup_item_s ric_a } break; case 2: - admit_action = false; + admit_action = e2sm_kpm_report_service_style2::process_ric_action_definition(this, e2sm_kpm_action_def); + if (admit_action) { + report_service = + new e2sm_kpm_report_service_style2(this, action_entry.sm_local_ric_action_id, e2sm_kpm_action_def); + } break; case 3: - admit_action = false; + admit_action = e2sm_kpm_report_service_style3::process_ric_action_definition(this, e2sm_kpm_action_def); + if (admit_action) { + report_service = + new e2sm_kpm_report_service_style3(this, action_entry.sm_local_ric_action_id, e2sm_kpm_action_def); + } break; case 4: - admit_action = false; + admit_action = e2sm_kpm_report_service_style4::process_ric_action_definition(this, e2sm_kpm_action_def); + if (admit_action) { + report_service = + new e2sm_kpm_report_service_style4(this, action_entry.sm_local_ric_action_id, e2sm_kpm_action_def); + } break; case 5: - admit_action = false; + admit_action = e2sm_kpm_report_service_style5::process_ric_action_definition(this, e2sm_kpm_action_def); + if (admit_action) { + report_service = + new e2sm_kpm_report_service_style5(this, action_entry.sm_local_ric_action_id, e2sm_kpm_action_def); + } break; default: logger.info("Unknown RIC style type %i -> do not admit action %i (type %i)", diff --git a/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc b/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc index 35d8f0e99..d31d35d52 100644 --- a/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc +++ b/srsgnb/src/stack/ric/e2sm_kpm_report_service.cc @@ -335,4 +335,152 @@ bool e2sm_kpm_report_service_style1::clear_collected_data() ric_ind_message.meas_data[i].meas_record.clear(); } return true; +} + +e2sm_kpm_report_service_style2::e2sm_kpm_report_service_style2(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition) : + e2sm_kpm_report_service(e2sm_kpm, action_id, action_definition), + action_def(action_def_generic.action_definition_formats.action_definition_format2()), + ric_ind_message(ric_ind_message_generic.ind_msg_formats.set_ind_msg_format1()) +{ + ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1; + this->_initialize_ric_ind_hdr(); + this->_initialize_ric_ind_msg(); +} + +bool e2sm_kpm_report_service_style2::_initialize_ric_ind_msg() +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style2::process_ric_action_definition(e2sm_kpm* e2sm_kpm, + e2_sm_kpm_action_definition_s& action_def_generic) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style2::collect_data(const enb_metrics_t& enb_metrics) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style2::clear_collected_data() +{ + // TODO: implement + return false; +} + +e2sm_kpm_report_service_style3::e2sm_kpm_report_service_style3(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition) : + e2sm_kpm_report_service(e2sm_kpm, action_id, action_definition), + action_def(action_def_generic.action_definition_formats.action_definition_format3()), + ric_ind_message(ric_ind_message_generic.ind_msg_formats.set_ind_msg_format2()) +{ + ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1; + this->_initialize_ric_ind_hdr(); + this->_initialize_ric_ind_msg(); +} + +bool e2sm_kpm_report_service_style3::_initialize_ric_ind_msg() +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style3::process_ric_action_definition(e2sm_kpm* e2sm_kpm, + e2_sm_kpm_action_definition_s& action_def_generic) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style3::collect_data(const enb_metrics_t& enb_metrics) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style3::clear_collected_data() +{ + // TODO: implement + return false; +} + +e2sm_kpm_report_service_style4::e2sm_kpm_report_service_style4(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition) : + e2sm_kpm_report_service(e2sm_kpm, action_id, action_definition), + action_def(action_def_generic.action_definition_formats.action_definition_format4()), + ric_ind_message(ric_ind_message_generic.ind_msg_formats.set_ind_msg_format3()) +{ + ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1; + this->_initialize_ric_ind_hdr(); + this->_initialize_ric_ind_msg(); +} + +bool e2sm_kpm_report_service_style4::_initialize_ric_ind_msg() +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style4::process_ric_action_definition(e2sm_kpm* e2sm_kpm, + e2_sm_kpm_action_definition_s& action_def_generic) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style4::collect_data(const enb_metrics_t& enb_metrics) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style4::clear_collected_data() +{ + // TODO: implement + return false; +} + +e2sm_kpm_report_service_style5::e2sm_kpm_report_service_style5(e2sm_kpm* e2sm_kpm, + uint16_t action_id, + e2_sm_kpm_action_definition_s action_definition) : + e2sm_kpm_report_service(e2sm_kpm, action_id, action_definition), + action_def(action_def_generic.action_definition_formats.action_definition_format5()), + ric_ind_message(ric_ind_message_generic.ind_msg_formats.set_ind_msg_format3()) +{ + ind_msg_format = e2_sm_kpm_ind_msg_s::ind_msg_formats_c_::types_opts::ind_msg_format1; + this->_initialize_ric_ind_hdr(); + this->_initialize_ric_ind_msg(); +} + +bool e2sm_kpm_report_service_style5::_initialize_ric_ind_msg() +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style5::process_ric_action_definition(e2sm_kpm* e2sm_kpm, + e2_sm_kpm_action_definition_s& action_def_generic) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style5::collect_data(const enb_metrics_t& enb_metrics) +{ + // TODO: implement + return false; +} + +bool e2sm_kpm_report_service_style5::clear_collected_data() +{ + // TODO: implement + return false; } \ No newline at end of file