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) { ...@@ -1151,6 +1151,12 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
return false; 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) { if (itti_msg.handoverReq->getChoiceOfCause() != Ngap_Cause_PR_radioNetwork) {
Logger::amf_n2().error("CHOICE Cause Group is not supported"); Logger::amf_n2().error("CHOICE Cause Group is not supported");
return false; return false;
...@@ -1169,6 +1175,11 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) { ...@@ -1169,6 +1175,11 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
"Ngap_DirectForwardingPathAvailability_direct_path_available!"); "Ngap_DirectForwardingPathAvailability_direct_path_available!");
return false; return false;
} }
*/
Logger::amf_n2().debug(
"DirectForwardingPathAvailability %d",
itti_msg.handoverReq->getDirectForwardingPathAvailability());
unc.get()->gnb_assoc_id = itti_msg.assoc_id; unc.get()->gnb_assoc_id = itti_msg.assoc_id;
unc.get()->ncc++; unc.get()->ncc++;
...@@ -1194,7 +1205,8 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) { ...@@ -1194,7 +1205,8 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
PlmnId* plmnOfTAI = new PlmnId(); PlmnId* plmnOfTAI = new PlmnId();
TAC* tac = new TAC(); TAC* tac = new TAC();
tai->getTAI(plmnOfTAI, tac); tai->getTAI(plmnOfTAI, tac);
string mccOfselectTAI, mncOfselectTAI; string mccOfselectTAI = {};
string mncOfselectTAI = {};
plmn->getMcc(mccOfselectTAI); plmn->getMcc(mccOfselectTAI);
plmn->getMnc(mncOfselectTAI); plmn->getMnc(mncOfselectTAI);
Logger::amf_n2().debug( Logger::amf_n2().debug(
......
...@@ -68,7 +68,7 @@ bool GlobalgNBId::decodefromGlobalgNBId(Ngap_GlobalGNB_ID_t* globalgnbid) { ...@@ -68,7 +68,7 @@ bool GlobalgNBId::decodefromGlobalgNBId(Ngap_GlobalGNB_ID_t* globalgnbid) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void GlobalgNBId::getGlobalgNBId(PlmnId*& plmn, GNB_ID*& gnbid) { void GlobalgNBId::getGlobalgNBId(PlmnId*& plmn, GNB_ID*& gnbid) {
plmn = plmnId; if (plmnId) plmn = plmnId;
gnbid = gNB_ID; if (gNB_ID) gnbid = gNB_ID;
} }
} // namespace ngap } // namespace ngap
...@@ -68,7 +68,7 @@ bool TAI::decodefromTAI(Ngap_TAI_t* tai) { ...@@ -68,7 +68,7 @@ bool TAI::decodefromTAI(Ngap_TAI_t* tai) {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void TAI::getTAI(PlmnId*& m_plmnId, TAC*& m_tac) { void TAI::getTAI(PlmnId*& m_plmnId, TAC*& m_tac) {
m_plmnId = plmnId; if (plmnId) m_plmnId = plmnId;
m_tac = tac; if (tac) m_tac = tac;
} }
} // namespace ngap } // namespace ngap
...@@ -97,14 +97,25 @@ long HandoverRequiredMsg::getCauseValue() { ...@@ -97,14 +97,25 @@ long HandoverRequiredMsg::getCauseValue() {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void HandoverRequiredMsg::getGlobalRanNodeId(GlobalgNBId*& ptr) { void HandoverRequiredMsg::getGlobalRanNodeId(GlobalgNBId*& ptr) {
if (ptr) if (ptr && targetid) {
ptr->decodefromGlobalgNBId( if (targetid->present == Ngap_TargetID_PR_targeteNB_ID) {
targetid->choice.targetRANNodeID->globalRANNodeID.choice.globalGNB_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) { 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