################################################################################
*******************************************************************************/
-#include "envopt.h" /* Environment options */
-#include "envdep.h" /* Environment dependent */
-#include "envind.h" /* Environment independent */
-#include "gen.h" /* General */
-#include "ssi.h" /* System services */
+#include "common_def.h"
#include "ss_queue.h"
#include "ss_task.h"
#include "ss_msg.h"
-
-#include "gen.x" /* general */
-#include "ssi.x" /* system services */
-#include "cm_tkns.x" /* Common Token Definitions */
-#include "cm_llist.x" /* Common Link List Definitions */
-#include "cm_lib.x" /* Common Library Definitions */
-#include "cm_hash.x" /* Common Hash List Definitions */
-#include "cm_lte.x" /* Common LTE Defines */
-
#include "du_cfg.h"
#include "du_app_mac_inf.h"
-#include "cm.h"
/**************************************************************************
* @brief Function to pack Loose Coupled
***************************************************************************/
int packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg)
{
- if(pst->selector == DU_SELECTOR_LC)
+ if(pst->selector == ODU_SELECTOR_LC)
{
/* we are now implemented only light wieght lossely coupled interface */
return RFAILED;
}
- else if(pst->selector == DU_SELECTOR_LWLC)
+ else if(pst->selector == ODU_SELECTOR_LWLC)
{
Buffer *mBuf = NULLP;
U16 ret = ROK;
MacCellCfg *macCellCfg;
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
CMCHKUNPK(cmUnpkPtr, (PTR *)&macCellCfg, mBuf);
***************************************************************************/
int packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
{
- if(pst->selector == DU_SELECTOR_LC)
+ if(pst->selector == ODU_SELECTOR_LC)
{
Buffer *mBuf = NULLP;
if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
return SPstTsk(pst,mBuf);
}
- else if(pst->selector == DU_SELECTOR_LWLC)
+ else if(pst->selector == ODU_SELECTOR_LWLC)
{
/* only LC is supported */
return RFAILED;
{
MacCellCfgCfm macCellCfgCfm;
- if(pst->selector == DU_SELECTOR_LC)
+ if(pst->selector == ODU_SELECTOR_LC)
{
/* unpack the transaction ID in CNF structure */
CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf);
{
Buffer *mBuf = NULLP;
- if(pst->selector == DU_SELECTOR_LC)
+ if(pst->selector == ODU_SELECTOR_LC)
{
/* Loose coupling not supported */
return RFAILED;
}
- else if(pst->selector == DU_SELECTOR_LWLC)
+ else if(pst->selector == ODU_SELECTOR_LWLC)
{
if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
{
MacCellStartInfo *cellStartInfo;
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
CMCHKUNPK(cmUnpkPtr, (PTR *)&cellStartInfo, mBuf);
* ****************************************************************/
uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo)
{
- if(pst->selector == DU_SELECTOR_LC)
+ if(pst->selector == ODU_SELECTOR_LC)
{
/* Loose coupling not supported */
return RFAILED;
}
- else if(pst->selector == DU_SELECTOR_LWLC)
+ else if(pst->selector == ODU_SELECTOR_LWLC)
{
Buffer *mBuf = NULLP;
{
MacCellStopInfo *cellStopInfo;
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
/* unpack the address of the structure */
CMCHKUNPK(cmUnpkPtr, (PTR *)&cellStopInfo, mBuf);
return RFAILED;
}
- if(pst->selector == DU_SELECTOR_LC)
+ if(pst->selector == ODU_SELECTOR_LC)
{
CMCHKPK(SPkU16, slotInfo->cellId, mBuf);
CMCHKPK(SPkU16, slotInfo->sfn, mBuf);
CM_FREE_SHRABL_BUF(pst->region, pst->pool, slotInfo, sizeof(SlotInfo));
slotInfo = NULL;
}
- else if(pst->selector == DU_SELECTOR_LWLC)
+ else if(pst->selector == ODU_SELECTOR_LWLC)
{
/* pack the address of the structure */
CMCHKPK(cmPkPtr,(PTR)slotInfo, mBuf);
* ****************************************************************/
uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf)
{
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
SlotInfo *slotInfo;
SPutMsg(mBuf);
return (*func)(pst, slotInfo);
}
- else if(pst->selector == DU_SELECTOR_LC)
+ else if(pst->selector == ODU_SELECTOR_LC)
{
SlotInfo slotInfo;
return RFAILED;
}
- if(pst->selector == DU_SELECTOR_LC)
+ if(pst->selector == ODU_SELECTOR_LC)
{
/*pack the payload here*/
DU_LOG("\nDU APP : Packed CellId");
CM_FREE_SHRABL_BUF(pst->region, pst->pool, cellStopId, sizeof(MacCellStopInfo));
cellStopId = NULL;
}
- else if(pst->selector == DU_SELECTOR_LWLC)
+ else if(pst->selector == ODU_SELECTOR_LWLC)
{
/* pack the address of the structure */
CMCHKPK(cmPkPtr,(PTR)cellStopId, mBuf);
* ****************************************************************/
uint16_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf)
{
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
MacCellStopInfo *cellStopId;
/* unpack the address of the structure */
SPutMsg(mBuf);
return (*func)(pst, cellStopId);
}
- else if(pst->selector == DU_SELECTOR_LC)
+ else if(pst->selector == ODU_SELECTOR_LC)
{
MacCellStopInfo cellStopId;
CMCHKUNPK(SUnpkU16, &(cellStopId.cellId), mBuf);
{
Buffer *mBuf = NULLP;
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
{
* ****************************************************************/
uint16_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf)
{
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
UlCcchIndInfo *ulCcchIndInfo;
{
Buffer *mBuf = NULLP;
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
{
* ****************************************************************/
uint16_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf)
{
- if(pst->selector == DU_SELECTOR_LWLC)
+ if(pst->selector == ODU_SELECTOR_LWLC)
{
DlCcchIndInfo *dlCcchIndInfo;
return RFAILED;
}
+/*******************************************************************
+ *
+ * @brief Packs and Sends UE create Request from DUAPP to MAC
+ *
+ * @details
+ *
+ * Function : packDuMacUeCreateReq
+ *
+ * Functionality:
+ * Packs and Sends UE Create Request from DUAPP to MAC
+ *
+ *
+ * @params[in] Post structure pointer
+ * MacUeCfg pointer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (SGetMsg(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);
+ }
+ else
+ {
+ DU_LOG("\nMAC: Only LWLC supported for packDuMacUeCreateReq");
+ return RFAILED;
+ }
+ return SPstTsk(pst,mBuf);
+}
+/*******************************************************************
+ *
+ * @brief Unpacks UE Create Request received from DU APP
+ *
+ * @details
+ *
+ * Function : unpackMacUeCreateReq
+ *
+ * Functionality:
+ * Unpacks UE Create Request received from DU APP
+ *
+ * @params[in] Pointer to Handler
+ * Post structure pointer
+ * Message Buffer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ MacUeCfg *ueCfg;
+
+ /* unpack the address of the structure */
+ CMCHKUNPK(cmUnpkPtr, (PTR *)&ueCfg, mBuf);
+ SPutMsg(mBuf);
+ return (*func)(pst, ueCfg);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\n Only LWLC supported for UE Create Request ");
+ SPutMsg(mBuf);
+ }
+
+ return RFAILED;
+}
/**********************************************************************
End of file
**********************************************************************/