X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_ue_mgr.c;fp=src%2Fdu_app%2Fdu_ue_mgr.c;h=f5011270e2963c81ea68c99496f56f766442e63e;hb=8144a551b3efaa006e48c00e6a2838ff662e2650;hp=e37ea0b453473b5bb97d4e3dc7f7a94403e74f99;hpb=d1f428c3527bfff3b3eae2715e91ae8449ad1784;p=o-du%2Fl2.git diff --git a/src/du_app/du_ue_mgr.c b/src/du_app/du_ue_mgr.c index e37ea0b45..f5011270e 100644 --- a/src/du_app/du_ue_mgr.c +++ b/src/du_app/du_ue_mgr.c @@ -4169,6 +4169,74 @@ uint8_t DuProcMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp) return ret; } +/******************************************************************* +* +* @brief Handle UE sync status indication from MAC +* +* @details +* +* Function : DuProcMacUeSyncStatusInd +* +* Functionality: Handle UE sync status indication from MAC +* +* @params[in] Pointer to MacUeSyncStatusInd and Pst +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ + +uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd) +{ + uint8_t ret =RFAILED; + uint16_t cellIdx=0, crnti = 0; + char *status; + + if(ueSyncStatusInd) + { + GET_CELL_IDX(ueSyncStatusInd->cellId, cellIdx); + if(duCb.actvCellLst[cellIdx]) + { + GET_CRNTI(crnti, ueSyncStatusInd->ueId); + if(duCb.actvCellLst[cellIdx]->ueCb[ueSyncStatusInd->ueId-1].crnti == crnti) + { + switch(ueSyncStatusInd->status) + { + case IN_SYNC: + status = "IN_SYNC"; + break; + + case OUT_OF_SYNC: + status = "OUT_OF_SYNC"; + break; + + case OUT_OF_SUNC_MAX_RETRIES: + status = "OUT_OF_SUNC_MAX_RETRIES"; + break; + + default: + status = "INVALID"; + break; + + } + DU_LOG("\nINFO --> DU APP : MAC UE sync status for received UeId %d is %s", ueSyncStatusInd->ueId,status); + } + else + { + DU_LOG("\nERROR --> DU APP : DuProcMacUeSyncStatusInd(): MAC UE sync status indication : Ue Id [%d] not found",ueSyncStatusInd->cellId); + } + } + else + { + DU_LOG("\nERROR --> DU APP : DuProcMacUeSyncStatusInd(): MAC UE sync status indication : Cell Id [%d] not found",ueSyncStatusInd->cellId); + } + DU_FREE_SHRABL_BUF(pst->region, pst->pool, ueSyncStatusInd, sizeof(MacUeSyncStatusInd)); + } + else + { + DU_LOG("\nERROR --> DU APP : DuProcMacUeSyncStatusInd(): MAC UE sync status indication is null"); + } + return ret; +} /********************************************************************** End of file ***********************************************************************/