diff --git a/srsgnb/hdr/stack/ric/e2ap.h b/srsgnb/hdr/stack/ric/e2ap.h index 6c7e707ef..afb10ada8 100644 --- a/srsgnb/hdr/stack/ric/e2ap.h +++ b/srsgnb/hdr/stack/ric/e2ap.h @@ -60,8 +60,11 @@ public: e2_ap_pdu_c generate_setup_request(); int process_setup_response(e2setup_resp_s setup_response); int process_setup_failure(); - int process_subscription_request(ricsubscription_request_s subscription_request); - int process_ric_subscription_delete_request(ricsubscription_delete_request_s ricsubscription_delete_request); + int process_subscription_request(ricsubscription_request_s ric_subscription_request); + int process_subscription_delete_request(ricsubscription_delete_request_s ricsubscription_delete_request); + int process_subscription_modification_request(uint32_t ric_subscription_modification_request); + int process_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm); + int process_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse); e2_ap_pdu_c generate_subscription_response(ric_subscription_reponse_t ric_subscription_reponse); e2_ap_pdu_c generate_subscription_failure(ric_subscription_reponse_t ric_subscription_reponse); e2_ap_pdu_c generate_subscription_delete_response(ric_subscription_reponse_t ric_subscription_reponse); diff --git a/srsgnb/hdr/stack/ric/e2ap_ric_subscription.h b/srsgnb/hdr/stack/ric/e2ap_ric_subscription.h index 180f08dae..4c192effc 100644 --- a/srsgnb/hdr/stack/ric/e2ap_ric_subscription.h +++ b/srsgnb/hdr/stack/ric/e2ap_ric_subscription.h @@ -34,9 +34,9 @@ public: void start_subscription(); void delete_subscription(); - bool handle_subscription_modification_request(uint32_t ric_subscription_modification_request); - bool handle_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm); - bool handle_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse); + bool process_subscription_modification_request(uint32_t ric_subscription_modification_request); + bool process_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm); + bool process_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse); private: void _send_subscription_response(); diff --git a/srsgnb/hdr/stack/ric/ric_client.h b/srsgnb/hdr/stack/ric/ric_client.h index 28c998d66..ef754985d 100644 --- a/srsgnb/hdr/stack/ric/ric_client.h +++ b/srsgnb/hdr/stack/ric/ric_client.h @@ -67,6 +67,10 @@ public: bool handle_e2_setup_response(e2setup_resp_s setup_response); bool handle_ric_subscription_request(ricsubscription_request_s ric_subscription_request); bool handle_ric_subscription_delete_request(ricsubscription_delete_request_s ricsubscription_delete_request); + bool handle_subscription_modification_request(uint32_t ric_subscription_modification_request); + bool handle_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm); + bool handle_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse); + bool handle_reset_response(reset_resp_s& reset_response); bool handle_reset_request(reset_request_s& reset_request); diff --git a/srsgnb/src/stack/ric/e2ap.cc b/srsgnb/src/stack/ric/e2ap.cc index 8efd7d593..53d2a59c2 100644 --- a/srsgnb/src/stack/ric/e2ap.cc +++ b/srsgnb/src/stack/ric/e2ap.cc @@ -260,7 +260,7 @@ int e2ap::process_subscription_request(ricsubscription_request_s ric_subscriptio return SRSRAN_SUCCESS; } -int e2ap::process_ric_subscription_delete_request(ricsubscription_delete_request_s ricsubscription_delete_request) +int e2ap::process_subscription_delete_request(ricsubscription_delete_request_s ricsubscription_delete_request) { bool ric_subs_found = false; for (auto it = active_subscriptions.begin(); it != active_subscriptions.end(); it++) { @@ -280,6 +280,24 @@ int e2ap::process_ric_subscription_delete_request(ricsubscription_delete_request return SRSRAN_SUCCESS; } +int e2ap::process_subscription_modification_request(uint32_t ric_subscription_modification_request) +{ + // TODO: implement, here only placeholder + return SRSRAN_SUCCESS; +} + +int e2ap::process_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm) +{ + // TODO: implement, here only placeholder + return SRSRAN_SUCCESS; +} + +int e2ap::process_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse) +{ + // TODO: implement, here only placeholder + return SRSRAN_SUCCESS; +} + e2_ap_pdu_c e2ap::generate_indication(ric_indication_t& ric_indication) { using namespace asn1::e2ap; diff --git a/srsgnb/src/stack/ric/e2ap_ric_subscription.cc b/srsgnb/src/stack/ric/e2ap_ric_subscription.cc index 79e54cc1b..3ee8f5a22 100644 --- a/srsgnb/src/stack/ric/e2ap_ric_subscription.cc +++ b/srsgnb/src/stack/ric/e2ap_ric_subscription.cc @@ -161,21 +161,21 @@ void e2ap::ric_subscription::delete_subscription() parent->queue_send_e2ap_pdu(send_pdu); } -bool e2ap::ric_subscription::handle_subscription_modification_request(uint32_t ric_subscription_modification_request) +bool e2ap::ric_subscription::process_subscription_modification_request(uint32_t ric_subscription_modification_request) { - // TODO: available in e2ap-v3 + // TODO: implement, currently not supported in ans1 return false; } -bool e2ap::ric_subscription::handle_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm) +bool e2ap::ric_subscription::process_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm) { - // TODO: available in e2ap-v3 + // TODO: implement, currently not supported in ans1 return false; } -bool e2ap::ric_subscription::handle_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse) +bool e2ap::ric_subscription::process_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse) { - // TODO: available in e2ap-v3 + // TODO: implement, currently not supported in ans1 return false; } diff --git a/srsgnb/src/stack/ric/ric_client.cc b/srsgnb/src/stack/ric/ric_client.cc index 6d6257c1f..f56d177d7 100644 --- a/srsgnb/src/stack/ric/ric_client.cc +++ b/srsgnb/src/stack/ric/ric_client.cc @@ -316,7 +316,7 @@ bool ric_client::handle_ric_subscription_delete_request(ricsubscription_delete_r ricsubscription_delete_request->ri_crequest_id->ric_instance_id, ricsubscription_delete_request->ra_nfunction_id->value); - if (e2ap_.process_ric_subscription_delete_request(ricsubscription_delete_request)) { + if (e2ap_.process_subscription_delete_request(ricsubscription_delete_request)) { logger.error("Failed to process RIC subscription delete request \n"); return false; } @@ -324,6 +324,31 @@ bool ric_client::handle_ric_subscription_delete_request(ricsubscription_delete_r return true; } +bool ric_client::handle_subscription_modification_request(uint32_t ric_subscription_modification_request) +{ + if (e2ap_.process_subscription_modification_request(ric_subscription_modification_request)) { + logger.error("Failed to process RIC subscription delete request \n"); + return false; + } + return true; +} +bool ric_client::handle_subscription_modification_confirm(uint32_t ric_subscription_modification_confirm) +{ + if (e2ap_.process_subscription_modification_confirm(ric_subscription_modification_confirm)) { + logger.error("Failed to process RIC subscription delete request \n"); + return false; + } + return true; +} +bool ric_client::handle_subscription_modification_refuse(uint32_t ric_subscription_modification_refuse) +{ + if (e2ap_.process_subscription_modification_refuse(ric_subscription_modification_refuse)) { + logger.error("Failed to process RIC subscription delete request \n"); + return false; + } + return true; +} + bool ric_client::handle_reset_request(reset_request_s& reset_request) { printf("Received E2AP E2 Reset Request \n");