X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_msg_hdl.c;h=ca5c9e5f39191f8e02779e321ae41b09b111e39e;hb=904a5d446b480d71da1bf81f892bab86ab365ce6;hp=e29aa3b0dec6bdd419fc5c67e4b96ea78c8ca238;hpb=f73456bd55152c329601f8286ae67fe9875025bc;p=o-du%2Fl2.git diff --git a/src/du_app/du_msg_hdl.c b/src/du_app/du_msg_hdl.c index e29aa3b0d..ca5c9e5f3 100644 --- a/src/du_app/du_msg_hdl.c +++ b/src/du_app/du_msg_hdl.c @@ -2217,6 +2217,87 @@ uint8_t BuildAndSendStatsReq(ActionDefinition subscribedAction) return ROK; } +/******************************************************************* + * + * @brief Process statistics response from MAC + * + * @details + * + * Function : DuProcMacStatsRsp + * + * Functionality: Processes statistics configuration response + * from MAC. If configuration is succsessful, DUAPP starts + * reporting period timer for this subscription request + * from RIC + * + * @params[in] + * + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t DuProcMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp) +{ + if(statsRsp) + { + if(statsRsp->rsp == MAC_DU_APP_RSP_OK) + { + DU_LOG("\nINFO --> DU_APP : Statistics configured successfully"); + /* TODO : Start Reporting period timer for this subscription request + * To be handled in next gerrit */ + } + else + { + DU_LOG("\nERROR --> DU_APP : Statistics configuration failed with cause [%d]", statsRsp->cause); + } + DU_FREE_SHRABL_BUF(pst->region, pst->pool, statsRsp, sizeof(MacStatsRsp)); + return ROK; + } + + DU_LOG("\nINFO --> DU_APP : DuProcMacStatsRsp: Received NULL Pointer"); + return RFAILED; +} + +/******************************************************************* + * + * @brief Process statistics indication from MAC + * + * @details + * + * Function : DuProcMacStatsInd + * + * Functionality: Processes statistics indication from MAC. + * + * @params[in] + * + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t DuProcMacStatsInd(Pst *pst, MacStatsInd *statsInd) +{ + if(statsInd) + { +#ifdef DEBUG_PRINT + DU_LOG("\nDEBUG --> DU_APP : DuProcMacStatsInd: Received Statistics Indication"); + DU_LOG("\nMeasurement type [%d] Measurement Value [%lf]", statsInd->type, statsInd->value); +#endif + + /* TODO : When stats indication is received + * DU APP searches for the message type in E2AP RIC subscription database + * and stores in the value in the list of subscribed measurements + * + * This will be implemented in next gerrit. + */ + + DU_FREE_SHRABL_BUF(pst->region, pst->pool, statsInd, sizeof(MacStatsInd)); + return ROK; + } + + DU_LOG("\nINFO --> DU_APP : DuProcMacStatsInd: Received NULL Pointer"); + return RFAILED; +} + /********************************************************************** End of file **********************************************************************/