{
Buffer *mBuf = NULLP;
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)macCellCfg, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)macCellCfg, mBuf);
DU_LOG("\nDU-APP : MAC CELL config sent");
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
return ROK;
}
***************************************************************************/
uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf)
{
- U16 ret = ROK;
+ uint16_t ret = ROK;
MacCellCfg *macCellCfg;
if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&macCellCfg, mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&macCellCfg, mBuf);
ret = (*func)(pst, macCellCfg);
}
else
if(pst->selector == ODU_SELECTOR_LC)
{
Buffer *mBuf = NULLP;
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
return RFAILED;
}
/* pack the transaction ID in CNF structure */
- CMCHKPK(SPkU16, macCellCfgCfm->cellId, mBuf);
- CMCHKPK(SPkU8, macCellCfgCfm->rsp, mBuf);
+ CMCHKPK(oduUnpackUInt16, macCellCfgCfm->cellId, mBuf);
+ CMCHKPK(oduUnpackUInt8, macCellCfgCfm->rsp, mBuf);
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
else if(pst->selector == ODU_SELECTOR_LWLC)
{
if(pst->selector == ODU_SELECTOR_LC)
{
/* unpack the transaction ID in CNF structure */
- CMCHKUNPK(SUnpkU8, &(macCellCfgCfm.rsp), mBuf);
- CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.cellId), mBuf);
+ CMCHKUNPK(oduPackUInt8, &(macCellCfgCfm.rsp), mBuf);
+ CMCHKUNPK(oduPackUInt16, &(macCellCfgCfm.cellId), mBuf);
return (*func)(pst, &macCellCfgCfm);
}
else
else 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("\nDU APP : Memory allocation failed for cell start req pack");
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)cellStartInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cellStartInfo, mBuf);
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&cellStartInfo, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cellStartInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, cellStartInfo);
}
else
{
/* Nothing to do for loose coupling */
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return ROK;
}
}
{
Buffer *mBuf = NULLP;
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
DU_LOG("\nDU APP : Memory allocation failed for cell stop req pack");
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)cellStopInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cellStopInfo, mBuf);
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
return ROK;
}
if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&cellStopInfo, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cellStopInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, cellStopInfo);
}
else
{
/* Nothing to do for loose coupling */
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return ROK;
}
}
{
Buffer *mBuf = NULLP;
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nDU APP : Memory allocation failed for cell start req pack");
+ DU_LOG("\nDU APP : Memory allocation failed for packMacSlotInd");
return RFAILED;
}
if(pst->selector == ODU_SELECTOR_LC)
{
- CMCHKPK(SPkU16, slotInfo->cellId, mBuf);
- CMCHKPK(SPkU16, slotInfo->sfn, mBuf);
- CMCHKPK(SPkU16, slotInfo->slot, mBuf);
+ CMCHKPK(oduUnpackUInt16, slotInfo->cellId, mBuf);
+ CMCHKPK(oduUnpackUInt16, slotInfo->sfn, mBuf);
+ CMCHKPK(oduUnpackUInt16, slotInfo->slot, mBuf);
CM_FREE_SHRABL_BUF(pst->region, pst->pool, slotInfo, sizeof(SlotIndInfo));
slotInfo = NULL;
else if(pst->selector == ODU_SELECTOR_LWLC)
{
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)slotInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)slotInfo, mBuf);
}
else
{
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
SlotIndInfo *slotInfo;
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&slotInfo, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&slotInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, slotInfo);
}
else if(pst->selector == ODU_SELECTOR_LC)
{
SlotIndInfo slotInfo;
- CMCHKUNPK(SUnpkU16, &(slotInfo.slot), mBuf);
- CMCHKUNPK(SUnpkU16, &(slotInfo.sfn), mBuf);
- CMCHKUNPK(SUnpkU16, &(slotInfo.cellId), mBuf);
+ CMCHKUNPK(oduPackUInt16, &(slotInfo.slot), mBuf);
+ CMCHKUNPK(oduPackUInt16, &(slotInfo.sfn), mBuf);
+ CMCHKUNPK(oduPackUInt16, &(slotInfo.cellId), mBuf);
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, &slotInfo);
}
else
{
/* Nothing to do for loose coupling */
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return ROK;
}
return ROK;
{
Buffer *mBuf = NULLP;
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
DU_LOG("\nDU APP : Memory allocation failed for stop Ind pack");
return RFAILED;
{
/*pack the payload here*/
DU_LOG("\nDU APP : Packed CellId");
- CMCHKPK(SPkU16, cellStopId->cellId, mBuf);
+ CMCHKPK(oduUnpackUInt16, cellStopId->cellId, mBuf);
CM_FREE_SHRABL_BUF(pst->region, pst->pool, cellStopId, sizeof(MacCellStopInfo));
cellStopId = NULL;
}
else if(pst->selector == ODU_SELECTOR_LWLC)
{
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)cellStopId, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cellStopId, mBuf);
}
else
{
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
{
MacCellStopInfo *cellStopId;
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&cellStopId, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cellStopId, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, cellStopId);
}
else if(pst->selector == ODU_SELECTOR_LC)
{
MacCellStopInfo cellStopId;
- CMCHKUNPK(SUnpkU16, &(cellStopId.cellId), mBuf);
+ CMCHKUNPK(oduPackUInt16, &(cellStopId.cellId), mBuf);
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, &cellStopId);
}
else
{
/* Nothing to do for loose coupling */
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return ROK;
}
return ROK;
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("\nMAC : Memory allocation failed at packMacUlCcchInd");
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)ulCcchIndInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)ulCcchIndInfo, mBuf);
}
else
{
return RFAILED;
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
UlCcchIndInfo *ulCcchIndInfo;
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&ulCcchIndInfo, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ulCcchIndInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, ulCcchIndInfo);
}
else
{
/* Nothing to do for other selectors */
DU_LOG("\n Only LWLC supported for UL CCCH Ind ");
- 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("\nMAC : Memory allocation failed at packMacDlCcchInd");
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)dlCcchIndInfo, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)dlCcchIndInfo, mBuf);
}
else
{
return RFAILED;
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
DlCcchIndInfo *dlCcchIndInfo;
/* unpack the address of the structure */
- CMCHKUNPK(cmUnpkPtr, (PTR *)&dlCcchIndInfo, mBuf);
- SPutMsg(mBuf);
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&dlCcchIndInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
return (*func)(pst, dlCcchIndInfo);
}
else
{
/* Nothing to do for other selectors */
DU_LOG("\n Only LWLC supported for DL CCCH Ind ");
- 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("\nMAC : Memory allocation failed at packDuMacUeCreateReq");
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);
}
/*******************************************************************
MacUeCfg *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("\n Only LWLC supported for UE Create Request ");
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
}
return RFAILED;
*
* @details
*
- * Function : packDuMacUeCreateRsp
+ * Function : packDuMacUeCfgRsp
*
* Functionality:
* Pack and send UE config response from MAC to DU APP
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp)
+uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp)
{
Buffer *mBuf = NULLP;
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("\nMAC : Memory allocation failed at packDuMacUeCfgRsp");
return RFAILED;
}
/* pack the address of the structure */
- CMCHKPK(cmPkPtr,(PTR)cfgRsp, mBuf);
+ CMCHKPK(oduPackPointer,(PTR)cfgRsp, mBuf);
}
else
{
return RFAILED;
}
- return SPstTsk(pst,mBuf);
+ return ODU_POST_TASK(pst,mBuf);
}
/*******************************************************************
*
* @details
*
- * Function : unpackDuMacUeCreateRsp
+ * Function : unpackDuMacUeCfgRsp
*
* Functionality: Unpack UE Config Response from MAC to DU APP
*
* RFAILED - failure
*
* ****************************************************************/
-uint8_t unpackDuMacUeCreateRsp(DuMacUeCreateRspFunc func, Pst *pst, Buffer *mBuf)
+uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf)
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- MacUeCfgRsp *cfgRsp;
+ MacUeCfgRsp *cfgRsp = NULLP;
/* 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);
}
- SPutMsg(mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return RFAILED;
+}
+
+/*******************************************************************
+ *
+ * @brief Packs and Sends UE Reconig Request from DUAPP to MAC
+ *
+ * @details
+ *
+ * Function : packDuMacUeReconfigReq
+ *
+ * Functionality:
+ * Packs and Sends UE Reconfig Request from DUAPP to MAC
+ *
+ *
+ * @params[in] Post structure pointer
+ * MacUeCfg pointer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nMAC : Memory allocation failed at packDuMacUeReconfigReq");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nMAC: Only LWLC supported for packDuMacUeReconfigReq");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+/*******************************************************************
+ *
+ * @brief Unpacks UE Reconfig Request received from DU APP
+ *
+ * @details
+ *
+ * Function : unpackMacUeReconfigReq
+ *
+ * Functionality:
+ * Unpacks UE Reconfig Request received from DU APP
+ *
+ * @params[in] Pointer to Handler
+ * Post structure pointer
+ * Message Buffer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ MacUeCfg *ueCfg;
+
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, ueCfg);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\n Only LWLC supported for UE Create Request ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
return RFAILED;
}