+/******************************************************************************
+* @brief Check Paging Record for a Particular Paging Frame
+*
+* @details
+*
+* Function : checkPagingRecord
+*
+* Functionality:
+* Check Paging Record for a Particular Paging Frame
+*
+* @params[in] DuCellCb *cellCb
+*
+* @return ROK/RFAILURE (uint8_t return)
+*
+*
+******************************************************************************/
+uint8_t checkPagingRecord(DuCellCb *cellCb)
+{
+ uint16_t pf = 0;
+ DuPagInfoList *pagInfoLLFromPF = NULLP;
+ DuPagUeList *pagInfo = NULLP;
+
+ /*DUAPP may send PagingReq to MAC for future SFN so that Schedular can
+ * schedule Paging on the exact occurence of the Slot.*/
+ pf = (cellCb->currSlotInfo.sfn + PAGING_SCHED_DELTA) % MAX_SFN;
+
+ pagInfoLLFromPF = findPagingInfoFromMap(pf, &(cellCb->pagingInfoMap));
+ if(pagInfoLLFromPF == NULLP)
+ {
+ /*No Page is present for pf thus exiting*/
+ return ROK;
+ }
+
+ do
+ {
+ pagInfo = handlePageInfoLL(pf, NULLD, &(pagInfoLLFromPF->pagInfoList), TRAVERSE_ALL);
+ if(pagInfo != NULLP)
+ {
+ if(BuildAndSendDlPcchIndToMac(cellCb->cellId, pf, pagInfo->i_s, &(pagInfo->pagUeList)) != ROK)
+ {
+ DU_LOG("\nERROR --> DU APP: Issue in Building Page RRC PDU i_s:%d",pagInfo->i_s);
+ return RFAILED;
+ }
+ handlePageInfoLL(pf, pagInfo->i_s, &(pagInfoLLFromPF->pagInfoList), DELETE);
+ }
+ if(pagInfoLLFromPF->pagInfoList.first == NULLP)
+ {
+ break;
+ }
+ }while(pagInfo != NULLP);
+
+ cmHashListDelete(&(cellCb->pagingInfoMap), (PTR)pagInfoLLFromPF);
+ DU_FREE(pagInfoLLFromPF, sizeof(DuPagInfoList));
+ return ROK;
+}
+
+/******************************************************************
+ *
+ * @brief Send pcch indication to MAC
+ *
+ * @details
+ *
+ * Function : sendDlPcchIndToMac
+ *
+ * Functionality: Send pcch indication to MAC
+ *
+ * @Params[in] DlPcchInd *pcchInd
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t sendDlPcchIndToMac(DlPcchInd *pcchInd)
+{
+ uint8_t ret = ROK;
+ Pst pst;
+
+ if(pcchInd)
+ {
+ /* Fill Pst */
+ FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_DL_PCCH_IND);
+
+ ret = (*packMacDlPcchIndOpts[pst.selector])(&pst, pcchInd);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU APP : sendDlPcchIndToMac(): Failed to DL PCCH indication to MAC");
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU APP: sendDlPcchIndToMac(): Received pcchInd is NULLP");
+ ret = RFAILED;
+ }
+ return ret;
+}
+
+