Commit 51e9d93e authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Process Handover Required

parent e975eb79
......@@ -1151,6 +1151,12 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
return false;
}
Logger::amf_n2().debug(
"Cause, Choice of Cause %d, Cause %ld",
(int) itti_msg.handoverReq->getChoiceOfCause(),
itti_msg.handoverReq->getCauseValue());
/*
if (itti_msg.handoverReq->getChoiceOfCause() != Ngap_Cause_PR_radioNetwork) {
Logger::amf_n2().error("CHOICE Cause Group is not supported");
return false;
......@@ -1169,6 +1175,11 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
"Ngap_DirectForwardingPathAvailability_direct_path_available!");
return false;
}
*/
Logger::amf_n2().debug(
"DirectForwardingPathAvailability %d",
itti_msg.handoverReq->getDirectForwardingPathAvailability());
unc.get()->gnb_assoc_id = itti_msg.assoc_id;
unc.get()->ncc++;
......@@ -1194,7 +1205,8 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
PlmnId* plmnOfTAI = new PlmnId();
TAC* tac = new TAC();
tai->getTAI(plmnOfTAI, tac);
string mccOfselectTAI, mncOfselectTAI;
string mccOfselectTAI = {};
string mncOfselectTAI = {};
plmn->getMcc(mccOfselectTAI);
plmn->getMnc(mncOfselectTAI);
Logger::amf_n2().debug(
......
......@@ -68,7 +68,7 @@ bool GlobalgNBId::decodefromGlobalgNBId(Ngap_GlobalGNB_ID_t* globalgnbid) {
//------------------------------------------------------------------------------
void GlobalgNBId::getGlobalgNBId(PlmnId*& plmn, GNB_ID*& gnbid) {
plmn = plmnId;
gnbid = gNB_ID;
if (plmnId) plmn = plmnId;
if (gNB_ID) gnbid = gNB_ID;
}
} // namespace ngap
......@@ -68,7 +68,7 @@ bool TAI::decodefromTAI(Ngap_TAI_t* tai) {
//------------------------------------------------------------------------------
void TAI::getTAI(PlmnId*& m_plmnId, TAC*& m_tac) {
m_plmnId = plmnId;
m_tac = tac;
if (plmnId) m_plmnId = plmnId;
if (tac) m_tac = tac;
}
} // namespace ngap
......@@ -97,14 +97,25 @@ long HandoverRequiredMsg::getCauseValue() {
//------------------------------------------------------------------------------
void HandoverRequiredMsg::getGlobalRanNodeId(GlobalgNBId*& ptr) {
if (ptr)
ptr->decodefromGlobalgNBId(
targetid->choice.targetRANNodeID->globalRANNodeID.choice.globalGNB_ID);
if (ptr && targetid) {
if (targetid->present == Ngap_TargetID_PR_targeteNB_ID) {
if (targetid->choice.targetRANNodeID->globalRANNodeID.present ==
Ngap_GlobalRANNodeID_PR_globalGNB_ID) {
ptr->decodefromGlobalgNBId(targetid->choice.targetRANNodeID
->globalRANNodeID.choice.globalGNB_ID);
return;
}
}
}
return;
}
//------------------------------------------------------------------------------
void HandoverRequiredMsg::getTAI(TAI*& ptr) {
if (ptr) ptr->decodefromTAI(&(targetid->choice.targetRANNodeID->selectedTAI));
if (ptr) {
if (targetid->present == Ngap_TargetID_PR_targetRANNodeID)
ptr->decodefromTAI(&(targetid->choice.targetRANNodeID->selectedTAI));
}
}
//------------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment