*******************************************************************************/
#include "common_def.h"
-#include "du_log.h"
#include "du_app_rlc_inf.h"
/*******************************************************************
if(pst->selector == ODU_SELECTOR_LWLC)
{
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
DU_LOG("\nRLC : Memory allocation failed at packDuRlcUeCreateReq");
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)ueCfg, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
}
else
{
return RFAILED;
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
{
RlcUeCfg *ueCfg;
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&ueCfg, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, ueCfg);
}
else
{
/* Nothing to do for other selectors */
DU_LOG("\nRLC: Only LWLC supported for UE Create Request ");
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
}
return RFAILED;
if(pst->selector == ODU_SELECTOR_LWLC)
{
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
DU_LOG("\nRLC : Memory allocation failed at packRlcUlDuUeCreateRsp");
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)ueCfg, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
}
else
{
return RFAILED;
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
{
RlcUeCfgRsp *cfgRsp;
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&cfgRsp, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, cfgRsp);
}
else
{
/* Nothing to do for other selectors */
DU_LOG("\nRLC: Only LWLC supported for UE Create Response ");
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
}
return RFAILED;
}
+
+/*******************************************************************
+ *
+ * @brief Pack and send UL RRC message transfer from RLC to DU APP
+ *
+ * @details
+ *
+ * Function : packRlcUlRrcMsgToDu
+ *
+ * Functionality:
+ * Pack and send UL RRC message transfer from RLC to DU APP
+ *
+ * @params[in] Post structure
+ * UL RRC Msg transfer info
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packRlcUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
+{
+ 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 packRlcUlRrcMsgToDu");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ulRrcMsgInfo, mBuf);
+ return ODU_POST_TASK(pst,mBuf);
+ }
+ else
+ {
+ DU_LOG("\nRLC: Only LWLC supported for packRlcUlRrcMsgToDu");
+ }
+ return RFAILED;
+}
+
+/*******************************************************************
+ *
+ * @brief Unpack UL RRC Msg Transfer received at DU APP from RLC
+ *
+ * @details
+ *
+ * Function : unpackRlcUlRrcMsgToDu
+ *
+ * Functionality:
+ * Unpack UL RRC Msg Transfer received at DU APP from RLC
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t unpackRlcUlRrcMsgToDu(RlcUlRrcMsgToDuFunc func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUlRrcMsgInfo *ulRrcMsgInfo;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ulRrcMsgInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, ulRrcMsgInfo);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nRLC: Only LWLC supported for UL RRC Message transfer ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
+ return RFAILED;
+}
+
+/*******************************************************************
+ *
+ * @brief Pack and post DL RRC Message from DU APP to RLC
+ *
+ * @details
+ *
+ * Function : packDlRrcMsgToRlc
+ *
+ * Functionality: Pack and post DL RRC Message from DU APP to RLC
+ *
+ * @params[in] Post structure
+ * DL RRC Message info
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packDlRrcMsgToRlc(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo)
+{
+ 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 packRlcUlRrcMsgToDu");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)dlRrcMsgInfo, mBuf);
+ return ODU_POST_TASK(pst,mBuf);
+ }
+ else
+ {
+ DU_LOG("\nRLC: Only LWLC supported for packDlRrcMsgToRlc");
+ }
+ return RFAILED;
+}
+
+/*******************************************************************
+ *
+ * @brief Unpacks DL RRC Message info received at RLC from DU APP
+ *
+ * @details
+ *
+ * Function : unpackDlRrcMsgToRlc
+ *
+ * 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 unpackDlRrcMsgToRlc(DuDlRrcMsgToRlcFunc func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcDlRrcMsgInfo *dlRrcMsgInfo;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&dlRrcMsgInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, dlRrcMsgInfo);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nRLC: Only LWLC supported for UL RRC Message transfer ");
+ ODU_PUT_MSG_BUF(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
-**********************************************************************/
+***********************************************************************/