X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fmac_sch_interface.c;h=30a2621c7d6eb0bc19da36726b0c56733c85bf69;hb=45d134510deb6902b870b4a0fb574b6075fba601;hp=a0a614772ac59014d093df19d4eedbfeff9fde54;hpb=5ea4c59cb4dd37164953218b0bd355284e11d22c;p=o-du%2Fl2.git diff --git a/src/cm/mac_sch_interface.c b/src/cm/mac_sch_interface.c index a0a614772..30a2621c7 100644 --- a/src/cm/mac_sch_interface.c +++ b/src/cm/mac_sch_interface.c @@ -1,31 +1,9 @@ /* header include files (.h) */ -#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 "cm_tkns.h" /* Common Token Defines */ -#include "cm_llist.h" /* Common Link List Defines */ -#include "cm_hash.h" /* Common Hash List Defines */ -#include "cm_lte.h" /* Common LTE Defines */ -#include "cm_mblk.h" /* Common LTE Defines */ -#include "tfu.h" /* RGU Interface defines */ +#include "common_def.h" #include "lrg.h" -//#include "fapi.h" /* header/extern include files (.x) */ -#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 "cm_mblk.x" /* Common LTE Defines */ -#include "tfu.x" /* RGU Interface includes */ #include "lrg.x" - -#include "du_app_mac_inf.h" #include "mac_sch_interface.h" /** @@ -42,19 +20,127 @@ * @return S16 * -# ROK **/ -int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) +uint8_t packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) { Buffer *mBuf = NULLP; if (SGetMsg(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); - RETVALUE(SPstTsk(pst,mBuf)); + return SPstTsk(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 + * + * @details + * + * Function : packMacSchRachInd + * + * Functionality: + * Pack and Send Rach Ind from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + +/******************************************************************* + * + * @brief Pack and Send Crc Ind from MAC to SCH + * + * @details + * + * Function : packMacSchCrcInd + * + * Functionality: + * Pack and Send Crc Ind from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; +} + +/******************************************************************* + * + * @brief Pack and Send DL RLC BO Info from MAC to SCH + * + * @details + * + * Function : packMacSchDlRlcBoInfo + * + * Functionality: + * Pack and Send L RLC BO Info from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo) +{ + if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC)) + { + /* TODO */ + } + else + { + return RFAILED; + } + return ROK; } /** @@ -63,17 +149,36 @@ int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) * * @details * - * Function : packSchMaccDlBrdcstAlloc + * Function : packSchMaccDlAlloc + * + * + * @param[in] Pst *pst, the post structure + * @param[in] DlSchedInfo *dlSchedInfo + * @return S16 + * -# ROK + **/ +uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo) +{ + return ROK; +} + +/** + * @brief function to pack UL Sch Info message + * from SCH to MAC + * + * @details + * + * Function : packSchMacUlSchInfo * * * @param[in] Pst *pst, the post structure - * @param[in] *dlBrdcstAlloc, dlBroadcastAlloc + * @param[in] UlSchedInfo *ulSchedInfo * @return S16 * -# ROK **/ -int packSchMacDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc *dlBrdcstAlloc) +uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo) { - return ROK; + return ROK; } /** @@ -89,9 +194,9 @@ int packSchMacDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc *dlBrdcstAlloc) * @return S16 * -# ROK **/ -int packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg) +uint8_t packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg) { - return ROK; + return ROK; } /** @@ -107,11 +212,62 @@ 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 Create Request from MAC to SCH + * + * @details + * + * Function : packMacSchUeCreateReq + * + * Functionality: + * Pack and Send UE Create Request from MAC to SCH + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packMacSchUeCreateReq(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; +} /********************************************************************** End of file