Logger::config().info(" SMF_INSTANCE_ID %d (%s:%s, version %s) is selected: %s",smf_pool[i].id,smf_pool[i].ipv4.c_str(),smf_pool[i].port.c_str(),smf_pool[i].version.c_str(),selected.c_str());
//verify PLMN Identity and TAC with configuration and store supportedTAList in gNB context, if verified; else response NG SETUP FAILURE with cause "Unknown PLMN"(9.3.1.2, ts38413)
//create ngap-ue context and store in gNB context to store UE information in gNB, for example, here RAN UE NGAP ID and location information and RRC Establishment Cause
//send NAS-PDU to NAS layer
/*get INITIAL_UE_MESSAGE IEs*/
//check the gNB context on which this UE is attached with assoc_id
// check the gNB context on which this UE is attached with assoc_id
Logger::amf_n2().error("The requested UE(amf_ue_ngap_id:0x%x) is not valid, existed UE which's amf_ue_ngap_id(0x%x)",amf_ue_ngap_id,unc.get()->amf_ue_ngap_id);
}
if(unc.get()->ng_ue_state!=NGAP_UE_CONNECTED)
{
Logger::amf_n2().error("Received NGAP UPLINK_NAS_TRANSPORT while UE in state != NGAP_UE_CONNECTED");
Logger::amf_n2().error("no ue ngap context with ran_ue_ngap_id(%d)",ran_ue_ngap_id);
return;
}
unc=ran_ue_id_2_ue_ngap_context(ran_ue_ngap_id);
if(unc.get()->amf_ue_ngap_id!=amf_ue_ngap_id){
Logger::amf_n2().error("The requested UE(amf_ue_ngap_id:0x%x) is not "
"valid, existed UE which's amf_ue_ngap_id(0x%x)",
amf_ue_ngap_id,unc.get()->amf_ue_ngap_id);
if(unc.get()->amf_ue_ngap_id!=amf_ue_ngap_id)
{
Logger::amf_n2().error("The requested UE(amf_ue_ngap_id:0x%x) is not valid, existed UE which's amf_ue_ngap_id(0x%x)",amf_ue_ngap_id,unc.get()->amf_ue_ngap_id);