X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fmac_sch_interface.c;h=c57f8ebe62cd67126e1e65ca63df5948f31b13f0;hb=0f742beeb500d9348e2657262d12ddea2ccac183;hp=d40204ab93ec7712b687a02368e526aaf86002fb;hpb=105199ef642ffe9736ea24a01d4546578fa25e60;p=o-du%2Fl2.git diff --git a/src/cm/mac_sch_interface.c b/src/cm/mac_sch_interface.c index d40204ab9..c57f8ebe6 100644 --- a/src/cm/mac_sch_interface.c +++ b/src/cm/mac_sch_interface.c @@ -1,12 +1,9 @@ /* header include files (.h) */ #include "common_def.h" -#include "tfu.h" /* RGU Interface defines */ #include "lrg.h" /* header/extern include files (.x) */ -#include "tfu.x" /* RGU Interface includes */ #include "lrg.x" -#include "du_app_mac_inf.h" #include "mac_sch_interface.h" /** @@ -23,21 +20,42 @@ * @return S16 * -# ROK **/ -int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) +uint8_t packMacSchSlotInd(Pst *pst, SlotTimingInfo *slotInd) { Buffer *mBuf = NULLP; - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) + if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - RETVALUE(RFAILED); + return RFAILED; } /* pack SFN and slot value */ - CMCHKPK(SPkU16,slotInd->sfn, mBuf); - CMCHKPK(SPkU16,slotInd->slot, mBuf); + CMCHKPK(oduUnpackUInt16,slotInd->sfn, mBuf); + CMCHKPK(oduUnpackUInt16,slotInd->slot, mBuf); - RETVALUE(SPstTsk(pst,mBuf)); + return ODU_POST_TASK(pst,mBuf); } +/** + * @brief function to unpack Slot ind message from MAC + * to scheduler with loose coupling + * + * @details + * + * Function : unpackMacSchSlotInd + * + * + * @param[in] Pst *pst, the post structure + * @param[in] Buffer *mBuf, the message buffer + * @return S16 + * -# ROK + **/ +uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer *mBuf) +{ + /* TODO */ + return ROK; +} + + /******************************************************************* * * @brief Pack and Send Rach Ind from MAC to SCH @@ -54,7 +72,7 @@ int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) * RFAILED - failure * * ****************************************************************/ -int packMacSchRachInd(Pst *pst, RachIndInfo *rachInd) +uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd) { if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) { @@ -83,7 +101,7 @@ int packMacSchRachInd(Pst *pst, RachIndInfo *rachInd) * RFAILED - failure * * ****************************************************************/ -int packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd) +uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd) { if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) { @@ -112,7 +130,7 @@ int packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd) * RFAILED - failure * * ****************************************************************/ -uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo) +uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) { if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) { @@ -139,9 +157,9 @@ uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo) * @return S16 * -# ROK **/ -int packSchMacDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo) +uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo) { - return ROK; + return ROK; } /** @@ -158,9 +176,9 @@ int packSchMacDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo) * @return S16 * -# ROK **/ -int packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo) +uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo) { - return ROK; + return ROK; } /** @@ -176,9 +194,9 @@ int packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo) * @return S16 * -# ROK **/ -int packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg) +uint8_t packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg) { - return ROK; + return ROK; } /** @@ -194,11 +212,251 @@ int packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg) * @return S16 * -# ROK **/ -int packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm) +uint8_t packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm) { - return ROK; + return ROK; } +/******************************************************************* + * + * @brief Pack and Send UE Config Request from MAC to SCH + * + * @details + * + * Function : packMacSchAddUeConfigReq + * + * Functionality: + * Pack and Send UE Create Request from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfg) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + + +/******************************************************************* + * + * @brief Packs and send UE create response + * + * @details + * + * Function : packSchUeCfgRsp + * + * Functionality: + * Packs and send UE create response + * + * @params[in] Post structure + * UE config response + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp) +{ + return ROK; +} +/******************************************************************* + * + * @brief Pack and Send BSR from MAC to SCH + * + * @details + * + * Function : packMacSchBsr + * + * Functionality: + * Pack and Send BSR from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + +/******************************************************************* + * + * @brief Pack and Send SR UCI Ind from MAC to SCH + * + * @details + * + * Function : packMacSrSchUciInd + * + * Functionality: + * Pack and Send SR UCI Ind from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + +/******************************************************************* + * + * @brief Pack and Send Modify UE Config Request from MAC to SCH + * + * @details + * + * Function : packMacSchModUeConfigReq + * + * Functionality: + * Pack and Send Modify UE Config Request from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfg) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + +/******************************************************************* +* +* @brief Pack and Send UE Delete Request from MAC to SCH +* +* @details +* +* Function : packMacSchUeDeleteReq +* +* Functionality: +* Pack and Send UE Delete Request from MAC to SCH +* +* @params[in] +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ +uint8_t packMacSchUeDeleteReq(Pst *pst, SchUeDelete *schUeDel) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + +/******************************************************************* +* +* @brief Packs and send UE delete response +* +* @details +* +* Function : packSchUeDeleteRsp +* +* Functionality: +* Packs and send UE delete response +* +* @params[in] Post structure +* UE delete response +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ + +uint8_t packSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *delRsp) +{ + return ROK; +} + +/******************************************************************* + * + * @brief Pack and Send Cell Delete Request from MAC to SCH + * + * @details + * + * Function : packMacSchCellDeleteReq + * + * Functionality: + * Pack and Send Cell Delete Request from MAC to SCH + * + * @params[in] Pst *pst, SchCellDelete *schCellDelete + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchCellDeleteReq(Pst *pst, SchCellDelete *schCellDelete) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + +/******************************************************************* + * + * @brief Packs and send CELL delete response + * + * @details + * + * Function : packSchCellDeleteRsp + * + * Functionality: + * * @params[in] Post structure, SchCellDeleteRsp schCellDeleteRsp + * + * @return ROK - success + * RFAILED - failure + * + * + * ****************************************************************/ + +uint8_t packSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDeleteRsp) +{ + return ROK; +} /********************************************************************** End of file