X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_rlc_inf.c;h=85a169947cab2373ab7d5390e6d87940fbea39df;hb=cfe7ea3ab6cb69d18ed91d79c1bf66b3bc8bdc98;hp=42a51dd92bdeda26d39ef7439df1fb1b666a2900;hpb=559b1bf564a661c9c3edfc9a953183b072bb2f13;p=o-du%2Fl2.git diff --git a/src/cm/du_app_rlc_inf.c b/src/cm/du_app_rlc_inf.c index 42a51dd92..85a169947 100644 --- a/src/cm/du_app_rlc_inf.c +++ b/src/cm/du_app_rlc_inf.c @@ -327,6 +327,84 @@ uint8_t unpackDlRrcMsgToRlc(DuDlRrcMsgToRlcFunc func, Pst *pst, Buffer *mBuf) return RFAILED; } +/******************************************************************* +* +* @brief packs RRC delivery report sending from RLC to DU APP +* +* @details +* +* Function : packRrcDeliveryReportToDu +* +* Functionality: +* Unpacks the DL RRC Message info received at RLC from DU APP +* +* @params[in] Pointer to handler function +* Post structure +* Messae buffer to be unpacked +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ +uint8_t packRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDeliveryReport) +{ + Buffer *mBuf = NULLP; + + if(pst->selector == ODU_SELECTOR_LWLC) + { + if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) + { + DU_LOG("\nRLC : Memory allocation failed at packRrcDeliveryReportToDu"); + return RFAILED; + } + /* pack the address of the structure */ + CMCHKPK(oduPackPointer,(PTR)rrcDeliveryReport, mBuf); + return ODU_POST_TASK(pst,mBuf); + } + else + { + DU_LOG("\nRLC: Only LWLC supported for packRrcDeliveryReportToDu"); + } + return RFAILED; + } + +/******************************************************************* +* +* @brief Unpacks RRC Delivery Report info received at DU APP from RIC +* +* @details +* +* Function : unpackRrcDeliveryReportToDu +* +* Functionality: +* Unpacks RRC Delivery Report info received at DU APP from RIC +* +* @params[in] Pointer to handler function +* Post structure +* Messae buffer to be unpacked +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ +uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func, Pst *pst, Buffer *mBuf) +{ + if(pst->selector == ODU_SELECTOR_LWLC) + { + RrcDeliveryReport *rrcDeliveryReport; + /* unpack the address of the structure */ + CMCHKUNPK(oduUnpackPointer, (PTR *)&rrcDeliveryReport, mBuf); + ODU_PUT_MSG_BUF(mBuf); + return (*func)(pst, rrcDeliveryReport); + } + else + { + /* Nothing to do for other selectors */ + DU_LOG("\nRLC: Only LWLC supported for RRC delivery Message transfer "); + ODU_PUT_MSG_BUF(mBuf); + } + + return RFAILED; +} + /********************************************************************** End of file ***********************************************************************/