Fixed minor NGAP issues

master
David Rupprecht 3 years ago committed by David Rupprecht
parent c670383ae9
commit 0385980347

@ -44,22 +44,22 @@ public:
void ue_ctxt_setup_complete();
void notify_rrc_reconf_complete(const bool reconf_complete_outcome);
srsran::proc_t<ngap_ue_initial_context_setup_proc> initial_context_setup_proc;
srsran::proc_t<ngap_ue_ue_context_release_proc> ue_context_release_proc;
ngap_ue_ctxt_t ctxt = {};
uint16_t stream_id = 1;
private:
// args
ngap* ngap_ptr;
rrc_interface_ngap_nr* rrc_ptr;
ngap* ngap_ptr = nullptr;
// state
bool release_requested = false;
// logger
srslog::basic_logger& logger;
// procedures
srsran::proc_t<ngap_ue_initial_context_setup_proc> initial_context_setup_proc;
srsran::proc_t<ngap_ue_ue_context_release_proc> ue_context_release_proc;
};
} // namespace srsenb

@ -37,7 +37,7 @@ public:
rrc_interface_ngap_nr* rrc_,
ngap_ue_ctxt_t* ue_ctxt);
srsran::proc_outcome_t init(const asn1::ngap_nr::init_context_setup_request_s& msg);
srsran::proc_outcome_t react(const bool security_mode_command_outcome);
srsran::proc_outcome_t react(const bool rrc_reconf_outcome);
srsran::proc_outcome_t step();
static const char* name() { return "Initial Context Setup"; }

@ -26,9 +26,8 @@ namespace srsenb {
ngap::ue::ue(ngap* ngap_ptr_, rrc_interface_ngap_nr* rrc_ptr_, srslog::basic_logger& logger_) :
logger(logger_),
ngap_ptr(ngap_ptr_),
rrc_ptr(rrc_ptr_),
initial_context_setup_proc(this, rrc_ptr, &ctxt),
ue_context_release_proc(this, rrc_ptr, &ctxt)
initial_context_setup_proc(this, rrc_ptr_, &ctxt),
ue_context_release_proc(this, rrc_ptr_, &ctxt)
{
ctxt.ran_ue_ngap_id = ngap_ptr->next_gnb_ue_ngap_id++;
gettimeofday(&ctxt.init_timestamp, nullptr);
@ -82,6 +81,10 @@ bool ngap::ue::send_initial_ue_message(asn1::ngap_nr::rrcestablishment_cause_e c
container.user_location_info.value.user_location_info_nr().tai.plmn_id = ngap_ptr->tai.plmn_id;
container.user_location_info.value.user_location_info_nr().tai.tac = ngap_ptr->tai.tac;
// UE context request for setup in the NAS registration request
container.ue_context_request_present = true;
container.ue_context_request.value = asn1::ngap_nr::ue_context_request_opts::options::requested;
return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "InitialUEMessage");
}
@ -138,7 +141,7 @@ bool ngap::ue::send_initial_ctxt_setup_response()
}
ngap_pdu_c tx_pdu;
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_INIT_CONTEXT_SETUP);
tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_NR_ID_INIT_CONTEXT_SETUP);
init_context_setup_resp_s& container = tx_pdu.successful_outcome().value.init_context_setup_resp();
// AMF UE NGAP ID
@ -147,13 +150,7 @@ bool ngap::ue::send_initial_ctxt_setup_response()
// RAN UE NGAP ID
container.protocol_ies.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id;
/* // TODO: PDU Session Resource Setup Response List - Integrate PDU Session and Bearer management into NGAP
container.protocol_ies.pdu_session_res_setup_list_cxt_res_present = true;
// Case PDU Session Resource Failed to Setup List
container.protocol_ies.pdu_session_res_failed_to_setup_list_cxt_res_present = true; */
return true;
return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "InitialContextSetupResponse");
}
bool ngap::ue::send_initial_ctxt_setup_failure(cause_c cause)

@ -52,13 +52,13 @@ proc_outcome_t ngap_ue_initial_context_setup_proc::init(const asn1::ngap_nr::ini
return proc_outcome_t::yield;
};
proc_outcome_t ngap_ue_initial_context_setup_proc::react(bool security_mode_command_outcome)
proc_outcome_t ngap_ue_initial_context_setup_proc::react(bool rrc_reconf_outcome)
{
if(security_mode_command_outcome == true) {
if (rrc_reconf_outcome == true) {
parent->send_initial_ctxt_setup_response();
return proc_outcome_t::success;
}
// TODO: error handling if security mode command fails
return proc_outcome_t::error;
}

Loading…
Cancel
Save