X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Frgu.c;h=809f60eb055993e64bbaf864642d8dccdba7da08;hb=197f4abee4ee0909e4509d6a2fbba78c500be7fe;hp=7a42dbf4beb077d08743ba959ffc09b7cc3a295d;hpb=3235ecfc7414aa0b72d0ad50db63ae8b5626045b;p=o-du%2Fl2.git diff --git a/src/cm/rgu.c b/src/cm/rgu.c index 7a42dbf4b..809f60eb0 100755 --- a/src/cm/rgu.c +++ b/src/cm/rgu.c @@ -414,176 +414,13 @@ Buffer *mBuf; } -/** -* @brief Request from RLC to MAC for forwarding SDUs on common - * channel for transmission -* -* @details -* -* Function : cmPkRguCDatReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCDatReqInfo * datReq -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCDatReq -( -Pst* pst, -SpId spId, -RguCDatReqInfo * datReq -) -#else -PUBLIC S16 cmPkRguCDatReq(pst, spId, datReq) -Pst* pst; -SpId spId; -RguCDatReqInfo * datReq; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCDatReq) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU016, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguCDatReqInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) datReq, mBuf); - } - else - { - if (cmPkRguCDatReqInfo(datReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU017, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU019, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - datReq = NULLP; - } - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU018, (ErrVal)0, "Packing failed"); -#endif - - if (datReq != NULLP) - { - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); - } - - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUCDATREQ; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Request from RLC to MAC for forwarding SDUs on common - * channel for transmission -* -* @details -* -* Function : cmUnpkRguCDatReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCDatReqInfo * datReq -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCDatReq -( -RguCDatReq func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCDatReq(func, pst, mBuf) -RguCDatReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - RguCDatReqInfo *datReq; - - TRC3(cmUnpkRguCDatReq) - - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, - (Data **)&datReq, sizeof(RguCDatReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU020, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - cmMemset((U8*)datReq, (U8)0, sizeof(RguCDatReqInfo)); - if (cmUnpkRguCDatReqInfo(datReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU021, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, datReq)); -} - - /** * @brief Request from RLC to MAC for forwarding SDUs on * dedicated channel for transmission * * @details * -* Function : cmPkRguDDatReq +* Function : packDlData * * @param[in] Pst* pst * @param[in] SpId spId @@ -591,22 +428,15 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguDDatReq +PUBLIC uint16_t packDlData ( Pst* pst, SpId spId, -RguDDatReqInfo * datReq +RlcMacData *dlData ) -#else -PUBLIC S16 cmPkRguDDatReq(pst, spId, datReq) -Pst* pst; -SpId spId; -RguDDatReqInfo * datReq; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguDDatReq) + TRC3(packDlData) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -614,21 +444,21 @@ RguDDatReqInfo * datReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU022, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguDDatReqInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)dlData, sizeof(RlcMacData)); RETVALUE(RFAILED); } if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) datReq, mBuf); + CMCHKPK(cmPkPtr,(PTR) dlData, mBuf); } else { /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS - if (cmPkRguDDatReqInfo(pst, datReq, mBuf) != ROK) + if (packRlcMacDataInfo(pst, dlData, mBuf) != ROK) #else - if (cmPkRguDDatReqInfo(datReq, mBuf) != ROK) + if (packRlcMacDataInfo(dlData, mBuf) != ROK) #endif { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -636,14 +466,14 @@ RguDDatReqInfo * datReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU023, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, - sizeof(RguDDatReqInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)dlData, + sizeof(RlcMacData)); SPutMsg(mBuf); RETVALUE(RFAILED); } if (SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguDDatReqInfo)) != ROK) { + (Data *)dlData, sizeof(RlcMacData)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -652,7 +482,7 @@ RguDDatReqInfo * datReq; SPutMsg(mBuf); RETVALUE(RFAILED); } - datReq = NULLP; + dlData = NULLP; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -660,584 +490,249 @@ RguDDatReqInfo * datReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU024, (ErrVal)0, "Packing failed"); #endif - if (datReq != NULLP); - { - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguDDatReqInfo)); - } - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - pst->event = (Event) EVTRGUDDATREQ; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Request from RLC to MAC for forwarding SDUs on - * dedicated channel for transmission -* -* @details -* -* Function : cmUnpkRguDDatReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguDDatReqInfo * datReq -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatReq -( -RguDDatReq func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDDatReq(func, pst, mBuf) -RguDDatReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - RguDDatReqInfo *datReq; - - TRC3(cmUnpkRguDDatReq) - - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, - (Data **)&datReq, sizeof(RguDDatReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - cmMemset((U8*)datReq, (U8)0, sizeof(RguDDatReqInfo)); - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - if (cmUnpkRguDDatReqInfo(pst,datReq, mBuf) != ROK) -#else - if (cmUnpkRguDDatReqInfo(datReq, mBuf) != ROK) -#endif - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)datReq, - sizeof(RguDDatReqInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, datReq)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for common channels -* -* @details -* -* Function : cmPkRguCDatInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCDatIndInfo * datInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCDatInd -( -Pst* pst, -SuId suId, -RguCDatIndInfo * datInd -) -#else -PUBLIC S16 cmPkRguCDatInd(pst, suId, datInd) -Pst* pst; -SuId suId; -RguCDatIndInfo * datInd; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCDatInd) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU028, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguCDatIndInfo),0); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) datInd, mBuf); - } - else - { - if (cmPkRguCDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU029, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, - sizeof(RguCDatIndInfo),0); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, - sizeof(RguCDatIndInfo),0) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU031, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - datInd = NULLP; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU030, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguCDatIndInfo),0); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUCDATIND; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for common channels -* -* @details -* -* Function : cmUnpkRguCDatInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCDatIndInfo * datInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCDatInd -( -RguCDatInd func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCDatInd(func, pst, mBuf) -RguCDatInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - RguCDatIndInfo *datInd; - - TRC3(cmUnpkRguCDatInd) - - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU032, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf); - } - else - { - if ((SGetStaticBuffer(pst->region, pst->pool, - (Data **)&datInd, sizeof(RguCDatIndInfo),0)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU033, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguCDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU034, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, - sizeof(RguCDatIndInfo),0); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, datInd)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for dedicated channels -* -* @details -* -* Function : cmPkRguDDatInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguDDatIndInfo * datInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguDDatInd -( -Pst* pst, -SuId suId, -RguDDatIndInfo * datInd -) -#else -PUBLIC S16 cmPkRguDDatInd(pst, suId, datInd) -Pst* pst; -SuId suId; -RguDDatIndInfo * datInd; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguDDatInd) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU035, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) datInd, mBuf); - } - else - { - if (cmPkRguDDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU036, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (SPutStaticBuffer(pst->region, pst->pool, - (Data *)datInd, sizeof(RguDDatIndInfo),0) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU038, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - datInd = NULLP; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU037, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0); + if (dlData != NULLP); + { + SPutSBuf(pst->region, pst->pool, + (Data *)dlData, sizeof(RlcMacData)); + } SPutMsg(mBuf); RETVALUE(RFAILED); } - - pst->event = (Event) EVTRGUDDATIND; + pst->event = (Event) EVTRLCDLDAT; RETVALUE(SPstTsk(pst,mBuf)); } /** -* @brief Data Indication from MAC to RLC to - * forward the data received for dedicated channels +* @brief Request from RLC to MAC for forwarding SDUs on + * dedicated channel for transmission * * @details * -* Function : cmUnpkRguDDatInd +* Function : unpackDlData * * @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguDDatIndInfo * datInd +* @param[in] SpId spId +* @param[in] RguDDatReqInfo * datReq * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatInd +PUBLIC S16 unpackDlData ( -RguDDatInd func, +RlcMacDlData func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguDDatInd(func, pst, mBuf) -RguDDatInd func; -Pst *pst; -Buffer *mBuf; -#endif { - SuId suId; - RguDDatIndInfo *datInd; + SpId spId; + RlcMacData *dlData; - TRC3(cmUnpkRguDDatInd) + TRC3(unpackDlData) - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed"); -#endif + if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); RETVALUE(RFAILED); } if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &dlData, mBuf); } else { - if ((SGetStaticBuffer(pst->region, pst->pool, - (Data **)&datInd, sizeof(RguDDatIndInfo),0)) != ROK) { + if ((SGetSBuf(pst->region, pst->pool, + (Data **)&dlData, sizeof(RlcMacData))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguDDatIndInfo(datInd, mBuf) != ROK) { + cmMemset((U8*)dlData, (U8)0, sizeof(RlcMacData)); + /*rgu_c_001.main_5 - ADD - L2M Support */ +#ifdef LTE_L2_MEAS + if (unpackRlcMacDataInfo(pst,dlData, mBuf) != ROK) +#else + if (unpackRlcMacDataInfo(dlData, mBuf) != ROK) +#endif + { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutStaticBuffer(pst->region, pst->pool, - (Data *)datInd, sizeof(RguDDatIndInfo),0); + SPutSBuf(pst->region, pst->pool, (Data *)dlData, + sizeof(RlcMacData)); RETVALUE(RFAILED); } } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, datInd)); + + /* TODO : change function call to send RlcMacData as below: */ + RETVALUE((*func)(pst, spId, dlData)); + + //RETVALUE((*func)(pst, spId, datReq)); } /** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for common channels +* @brief Data Indication from MAC to RLC to + * forward the data received for dedicated channels * * @details * -* Function : cmPkRguCStaRsp +* Function : packRcvdUlData * * @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCStaRspInfo * staRsp +* @param[in] SuId suId +* @param[in] RlcMacData *ulData * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmPkRguCStaRsp +PUBLIC S16 packRcvdUlData ( Pst* pst, -SpId spId, -RguCStaRspInfo * staRsp +SuId suId, +RlcMacData *ulData ) #else -PUBLIC S16 cmPkRguCStaRsp(pst, spId, staRsp) +PUBLIC S16 packRcvdUlData(pst, suId, ulData) Pst* pst; -SpId spId; -RguCStaRspInfo * staRsp; +SuId suId; +RlcMacData *ulData; #endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguCStaRsp) + TRC3(packRcvdUlData) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU042, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU035, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguCStaRspInfo)); + SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); RETVALUE(RFAILED); } + if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) staRsp, mBuf); + CMCHKPK(cmPkPtr,(PTR)ulData, mBuf); } else { - if (cmPkRguCStaRspInfo(staRsp, mBuf) != ROK) { + if (packRlcMacDataInfo(ulData, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU043, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)); + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU036, (ErrVal)0, "Packing failed"); +#endif + SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); SPutMsg(mBuf); RETVALUE(RFAILED); } - if (SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)) != ROK) { + if (SPutStaticBuffer(pst->region, pst->pool, + (Data *)ulData, sizeof(RlcMacData),0) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU045, (ErrVal)0, "Packing failed"); + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU038, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - staRsp = NULLP; + ulData = NULLP; } - if (SPkS16(spId, mBuf) != ROK) { + if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU044, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU037, (ErrVal)0, "Packing failed"); #endif - if (staRsp != NULLP) - { - SPutSBuf(pst->region, pst->pool, - (Data *)staRsp, sizeof(RguCStaRspInfo)); - } + SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUCSTARSP; + pst->event = (Event) EVTRLCULDAT; RETVALUE(SPstTsk(pst,mBuf)); } /** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for common channels +* @brief Data Indication from MAC to RLC to + * forward the data received for dedicated channels * * @details * -* Function : cmUnpkRguCStaRsp +* Function : unpackRcvdUlData * * @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCStaRspInfo * staRsp +* @param[in] SuId suId +* @param[in] RlcMacData *ulData * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaRsp +PUBLIC S16 unpackRcvdUlData ( -RguCStaRsp func, +RlcMacUlData func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguCStaRsp(func, pst, mBuf) -RguCStaRsp func; -Pst *pst; -Buffer *mBuf; -#endif { - SpId spId; - RguCStaRspInfo *staRsp; + SuId suId; + RlcMacData *ulData; - TRC3(cmUnpkRguCStaRsp) + TRC3(unpackRcvdUlData) - if (SUnpkS16(&spId, mBuf) != ROK) { + if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU046, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } + if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &ulData, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp, - sizeof(RguCStaRspInfo))) != ROK) { + if ((SGetStaticBuffer(pst->region, pst->pool, + (Data **)&ulData, sizeof(RlcMacData),0)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU047, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguCStaRspInfo(staRsp, mBuf) != ROK) { + if (unpackRlcMacDataInfo(ulData, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU048, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)); + SPutStaticBuffer(pst->region, pst->pool, + (Data *)ulData, sizeof(RlcMacData),0); RETVALUE(RFAILED); } } SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, staRsp)); + RETVALUE((*func)(pst, suId, ulData)); } + /*rgu_c_001.main_5 - ADD - L2M & R9 Support */ #ifdef LTE_L2_MEAS @@ -1384,421 +879,238 @@ RguL2MUlThrpMeasReqInfo* measReq; sizeof(RguL2MUlThrpMeasReqInfo)); SPutMsg(mBuf); RETVALUE(RFAILED); - } - if (SPutSBuf(pst->region, pst->pool, (Data *)measReq, - sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU052, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - measReq = NULLP; - } - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU051, (ErrVal)0, "Packing failed"); -#endif - if (measReq != NULLP) - { - SPutSBuf(pst->region, pst->pool, (Data *)measReq, - sizeof(RguL2MUlThrpMeasReqInfo)); - } - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUL2MULTHRPMEASREQ; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Primitive invoked from RLC to MAC to -* inform the On/Off status for Scheduled UL throughput -* measurment for dedicated channels -* -* @details -* -* Function :cmUnpkRguL2MUlThrpMeasReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguL2MUlThrpMeasReqInfo * measReq -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq -( -RguL2MUlThrpMeasReq func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf) -RguL2MUlThrpMeasReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - RguL2MUlThrpMeasReqInfo* measReq; - - TRC3(cmUnpkRguL2MUlThrpMeasReq) - - if (SUnpkS16(&spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &measReq, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq, - sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)measReq, - sizeof(RguL2MUlThrpMeasReqInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, measReq)); -} - -#endif - - - - -/** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for dedicated channels -* -* @details -* -* Function : cmPkRguDStaRsp -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguDStaRspInfo * staRsp -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguDStaRsp -( -Pst* pst, -SpId spId, -RguDStaRspInfo *staRsp -) -#else -PUBLIC S16 cmPkRguDStaRsp(pst, spId, staRsp) -Pst* pst; -SpId spId; -RguDStaRspInfo *staRsp; -#endif -{ - - RguDStaRspInfo *staRspInfo = NULL; - Buffer *mBuf = NULLP; - - if(SGetSBuf(pst->region, pst->pool, (Data **)&staRspInfo, sizeof(RguDStaRspInfo)) != ROK) - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU056, (ErrVal)0, "Packing failed"); -#endif - RETVALUE(RFAILED); - } -#ifdef ERRCLS_KW - /* staRspInfo cant be NULL here */ - if (staRspInfo == NULLP) - { - RETVALUE(RFAILED); - } -#endif - cmMemcpy((U8 *)staRspInfo, (U8 *)staRsp, sizeof(RguDStaRspInfo)); - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU056, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo)); - - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) staRspInfo, mBuf); - } - else - { - if (cmPkRguDStaRspInfo(staRsp, mBuf) != ROK) { + } + if (SPutSBuf(pst->region, pst->pool, (Data *)measReq, + sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU057, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU052, (ErrVal)0, "Packing failed"); #endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } + SPutMsg(mBuf); + RETVALUE(RFAILED); + } + measReq = NULLP; } + if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU058, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU051, (ErrVal)0, "Packing failed"); #endif - if (staRspInfo != NULLP) + if (measReq != NULLP) { - SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)measReq, + sizeof(RguL2MUlThrpMeasReqInfo)); } SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUDSTARSP; + pst->event = (Event) EVTRGUL2MULTHRPMEASREQ; RETVALUE(SPstTsk(pst,mBuf)); - SPutMsg(mBuf); } /** * @brief Primitive invoked from RLC to MAC to - * inform the BO report for dedicated channels +* inform the On/Off status for Scheduled UL throughput +* measurment for dedicated channels * * @details * -* Function : cmUnpkRguDStaRsp +* Function :cmUnpkRguL2MUlThrpMeasReq * * @param[in] Pst* pst * @param[in] SpId spId -* @param[in] RguDStaRspInfo * staRsp +* @param[in] RguL2MUlThrpMeasReqInfo * measReq * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDStaRsp +PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq ( -RguDStaRsp func, +RguL2MUlThrpMeasReq func, Pst *pst, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDStaRsp(func, pst, mBuf) -RguDStaRsp func; +PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf) +RguL2MUlThrpMeasReq func; Pst *pst; Buffer *mBuf; #endif { SpId spId; - RguDStaRspInfo *staRsp; + RguL2MUlThrpMeasReqInfo* measReq; - TRC3(cmUnpkRguDStaRsp) + TRC3(cmUnpkRguL2MUlThrpMeasReq) if (SUnpkS16(&spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &measReq, mBuf); } - else + else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp, - sizeof(RguDStaRspInfo))) != ROK) { + if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq, + sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguDStaRspInfo(staRsp, mBuf) != ROK) { + if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)measReq, + sizeof(RguL2MUlThrpMeasReqInfo)); RETVALUE(RFAILED); } } SPutMsg(mBuf); - (*func)(pst, spId, staRsp); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo)); - RETVALUE(ROK); + RETVALUE((*func)(pst, spId, measReq)); } +#endif + + + /** -* @brief Status Indication from MAC to RLC - * as a response to the staRsp primitive from RLC. - * Informs RLC of the totalBufferSize and Timing Info - * for the transmission on common channels. +* @brief Primitive invoked from RLC to MAC to + * inform the BO report for dedicated channels * * @details * -* Function : cmPkRguCStaInd +* Function : packBOStatus, * * @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCStaIndInfo * staInd +* @param[in] SpId spId +* @param[in] RlcMacBOStatus * staRsp * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaInd +PUBLIC uint16_t packBOStatus ( Pst* pst, -SuId suId, -RguCStaIndInfo * staInd +SpId spId, +RlcMacBOStatus *boStatus ) -#else -PUBLIC S16 cmPkRguCStaInd(pst, suId, staInd) -Pst* pst; -SuId suId; -RguCStaIndInfo * staInd; -#endif { + RlcMacBOStatus *boStaInfo = NULL; Buffer *mBuf = NULLP; - TRC3(cmPkRguCStaInd) + if(SGetSBuf(pst->region, pst->pool, (Data **)&boStaInfo, sizeof(RlcMacBOStatus)) != ROK) + { +#if (ERRCLASS & ERRCLS_ADD_RES) + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU056, (ErrVal)0, "Packing failed"); +#endif + RETVALUE(RFAILED); + } +#ifdef ERRCLS_KW + /* boStaInfo cant be NULL here */ + if (boStaInfo == NULLP) + { + RETVALUE(RFAILED); + } +#endif + cmMemcpy((U8 *)boStaInfo, (U8 *)boStatus, sizeof(RlcMacBOStatus)); if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU063, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU056, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus)); + RETVALUE(RFAILED); } - if (pst->selector == RGU_SEL_LWLC) + if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) staInd, mBuf); + CMCHKPK(cmPkPtr,(PTR) boStaInfo, mBuf); } else { - if (cmPkRguCStaIndInfo(staInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU064, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutSBuf(pst->region, pst->pool, - (Data *)staInd, sizeof(RguCStaIndInfo)) != ROK) { + if (packBOStatusInfo(boStatus, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU066, (ErrVal)0, "Packing failed"); + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU057, (ErrVal)0, "Packing failed"); #endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - staInd = NULLP; - } - if (SPkS16(suId,mBuf) != ROK) { + SPutMsg(mBuf); + RETVALUE(RFAILED); + } + } + if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU065, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU058, (ErrVal)0, "Packing failed"); #endif - if (staInd != NULLP) + if (boStaInfo != NULLP) { - SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguCStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus)); } SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUCSTAIND; + + pst->event = (Event)EVTRLCBOSTA; RETVALUE(SPstTsk(pst,mBuf)); + SPutMsg(mBuf); } /** -* @brief Status Indication from MAC to RLC - * as a response to the staRsp primitive from RLC. - * Informs RLC of the totalBufferSize and Timing Info - * for the transmission on common channels. +* @brief Primitive invoked from RLC to MAC to +* inform the BO report for dedicated channels * * @details * -* Function : cmUnpkRguCStaInd +* Function : unpackBOStatus * * @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCStaIndInfo * staInd +* @param[in] SpId spId +* @param[in] RlcMacBOStatus * staRsp * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaInd +PUBLIC uint16_t unpackBOStatus ( -RguCStaInd func, +RlcMacBoStatus func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguCStaInd(func, pst, mBuf) -RguCStaInd func; -Pst *pst; -Buffer *mBuf; -#endif { - SuId suId; - RguCStaIndInfo *staInd; - - TRC3(cmUnpkRguCStaInd) + SpId spId; + RlcMacBOStatus *boSta; - if (SUnpkS16(&suId, mBuf) != ROK) { + TRC3(unpackBOStatus) + + if (SUnpkS16(&spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU067, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); @@ -1806,34 +1118,38 @@ Buffer *mBuf; if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &boSta, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguCStaIndInfo))) != ROK) { + if ((SGetSBuf(pst->region, pst->pool, (Data **)&boSta, + sizeof(RlcMacBOStatus))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU068, (ErrVal)0, "UnPacking failed"); + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguCStaIndInfo(staInd, mBuf) != ROK) { + if (unpackBOStatusInfo(boSta, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU069, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus)); RETVALUE(RFAILED); } } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, staInd)); + // (*func)(pst, spId, boSta); + SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus)); + RETVALUE(ROK); } + /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS @@ -2059,30 +1375,23 @@ Buffer *mBuf; * * @details * -* Function : cmPkRguDStaInd +* Function : packSchedRep * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] RguDStaIndInfo * staInd +* @param[in] RlcMacSchedRep* schRep * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguDStaInd +PUBLIC S16 packSchedRep ( Pst* pst, SuId suId, -RguDStaIndInfo * staInd +RlcMacSchedRepInfo * schRep ) -#else -PUBLIC S16 cmPkRguDStaInd(pst, suId, staInd) -Pst* pst; -SuId suId; -RguDStaIndInfo * staInd; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguDStaInd) + TRC3(packSchedRep) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2090,28 +1399,28 @@ RguDStaIndInfo * staInd; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU076, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo)); RETVALUE(RFAILED); } if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) staInd, mBuf); + CMCHKPK(cmPkPtr,(PTR) schRep, mBuf); } else { - if (cmPkRguDStaIndInfo(staInd, mBuf) != ROK) { + if (packSchedRepInfo(schRep, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU077, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, + sizeof(RlcMacSchedRepInfo)); SPutMsg(mBuf); RETVALUE(RFAILED); } - if (SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguDStaIndInfo)) != ROK) { + if (SPutSBuf(pst->region, pst->pool, (Data *)schRep, + sizeof(RlcMacSchedRepInfo)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -2120,7 +1429,7 @@ RguDStaIndInfo * staInd; SPutMsg(mBuf); RETVALUE(RFAILED); } - staInd = NULLP; + schRep= NULLP; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2128,15 +1437,15 @@ RguDStaIndInfo * staInd; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU078, (ErrVal)0, "Packing failed"); #endif - if (staInd != NULLP) + if (schRep != NULLP) { - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo)); } SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUDSTAIND; + pst->event = (Event) EVTSCHREP; RETVALUE(SPstTsk(pst,mBuf)); } @@ -2149,7 +1458,7 @@ RguDStaIndInfo * staInd; * * @details * -* Function : cmUnpkRguDStaInd +* Function : unpackSchedRep * * @param[in] Pst* pst * @param[in] SuId suId @@ -2157,24 +1466,17 @@ RguDStaIndInfo * staInd; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDStaInd +PUBLIC S16 unpackSchedRep ( -RguDStaInd func, +RlcMacSchedRep func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguDStaInd(func, pst, mBuf) -RguDStaInd func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; - RguDStaIndInfo *staInd; + RlcMacSchedRepInfo *schRep; - TRC3(cmUnpkRguDStaInd) + TRC3(unpackSchedRep) if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2187,11 +1489,11 @@ Buffer *mBuf; } if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &schRep, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguDStaIndInfo))) != ROK) { + if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRepInfo))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -2200,19 +1502,19 @@ Buffer *mBuf; SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguDStaIndInfo(staInd, mBuf) != ROK) { + if (unpackSchedRepInfo(schRep, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo)); RETVALUE(RFAILED); } } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, staInd)); + RETVALUE((*func)(pst, suId, schRep)); } #ifdef ANSI @@ -3316,10 +2618,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmPkRguDDatIndInfo +* Func : packRlcMacDataInfo * * -* Desc : RguDDatIndInfo +* Desc : RlcMacData * Data Indication from MAC to RLC for dedicated channels of a UE * * @@ -3331,31 +2633,37 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmPkRguDDatIndInfo +PUBLIC S16 packRlcMacDataInfo ( -RguDDatIndInfo *param, +RlcMacData *param, Buffer *mBuf ) #else -PUBLIC S16 cmPkRguDDatIndInfo(param, mBuf) -RguDDatIndInfo *param; +PUBLIC S16 packRlcMacDataInfo(param, mBuf) +RlcMacData *param; Buffer *mBuf; #endif { S32 i; + MsgLen msgLen; - TRC3(cmPkRguDDatIndInfo); + TRC3(packRlcMacDataInfo); -#ifdef LTE_L2_MEAS - CMCHKPK(SPkU8, param->burstInd, mBuf); - CMCHKPK(SPkU32, param->ttiCnt, mBuf); -#endif - for (i=param->numLch-1; i >= 0; i--) { - CMCHKPK(cmPkRguLchDatInd, ¶m->lchData[i], mBuf); + for (i=param->nmbPdu-1; i >= 0; i--) + { + msgLen = 0; + if (SFndLenMsg(param->pduInfo[i].pduBuf, &msgLen) != ROK) + RETVALUE(RFAILED); + if (SCatMsg(mBuf, param->pduInfo[i].pduBuf, M1M2) != ROK) + RETVALUE(RFAILED); + CMCHKPK(cmPkMsgLen, msgLen, mBuf); + CMCHKPK(cmPkLteLcId, param->pduInfo[i].lcId, mBuf); + CMCHKPK(cmPkBool, param->pduInfo[i].commCh, mBuf); } - CMCHKPK(SPkU8, param->numLch, mBuf); + CMCHKPK(SPkU8, param->nmbPdu, mBuf); CMCHKPK(cmPkLteRnti, param->rnti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); + CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf); RETVALUE(ROK); } @@ -3363,10 +2671,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmUnpkRguDDatIndInfo +* Func : unpackRlcMacDataInfo * * -* Desc : RguDDatIndInfo +* Desc : RlcMacData * Data Indication from MAC to RLC for dedicated channels of a UE * * @@ -3378,31 +2686,37 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDDatIndInfo +PUBLIC S16 unpackRlcMacDataInfo ( -RguDDatIndInfo *param, +RlcMacData *param, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDDatIndInfo(param, mBuf) -RguDDatIndInfo *param; +PUBLIC S16 unpackRlcMacDataInfo(param, mBuf) +RlcMacData *param; Buffer *mBuf; #endif { S32 i; - TRC3(cmUnpkRguDDatIndInfo); - + TRC3(unpackRlcMacDataInfo); + + CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->numLch, mBuf); - for (i=0; inumLch; i++) { - CMCHKUNPK(cmUnpkRguLchDatInd, ¶m->lchData[i], mBuf); + CMCHKUNPK(SUnpkU8, ¶m->nmbPdu, mBuf); + for (i=0; inmbPdu; i++) + { + MsgLen totalMsgLen; + + CMCHKUNPK(cmUnpkBool, ¶m->pduInfo[i].commCh, mBuf); + CMCHKUNPK(cmUnpkLteLcId, ¶m->pduInfo[i].lcId, mBuf); + CMCHKUNPK(cmUnpkMsgLen, ¶m->pduInfo[i].pduLen, mBuf); + if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) + RETVALUE(RFAILED); + if (SSegMsg(mBuf, totalMsgLen-param->pduInfo[i].pduLen, ¶m->pduInfo[i].pduBuf) != ROK) + RETVALUE(RFAILED); } -#ifdef LTE_L2_MEAS - CMCHKUNPK(SUnpkU32, ¶m->ttiCnt, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->burstInd, mBuf); -#endif RETVALUE(ROK); } @@ -3519,10 +2833,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmPkRguDStaRspInfo +* Func : packBOStatusInfo * * -* Desc : RguDStaRspInfo +* Desc : RlcMacBOStatus * Status Response from RLC to MAC for dedicated logical channel * * @@ -3534,35 +2848,36 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmPkRguDStaRspInfo +PUBLIC S16 packBOStatusInfo ( -RguDStaRspInfo *param, +RlcMacBOStatus *param, Buffer *mBuf ) #else -PUBLIC S16 cmPkRguDStaRspInfo(param, mBuf) -RguDStaRspInfo *param; +PUBLIC S16 packBOStatusInfo(param, mBuf) +RlcMacBOStatus *param; Buffer *mBuf; #endif { - TRC3(cmPkRguDStaRspInfo); + TRC3(packBOStatusInfo); - CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf); + CMCHKPK(SPkS32, param->bo, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); + CMCHKPK(cmPkBool, param->commCh, mBuf); CMCHKPK(cmPkLteRnti, param->rnti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); RETVALUE(ROK); -} +} /* End of packBOStatusInfo */ /*********************************************************** * -* Func : cmUnpkRguDStaRspInfo +* Func : unpackBOStatusInfo * * -* Desc : RguDStaRspInfo +* Desc : RlcMacBOStatus * Status Response from RLC to MAC for dedicated logical channel * * @@ -3574,114 +2889,27 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDStaRspInfo +PUBLIC S16 unpackBOStatusInfo ( -RguDStaRspInfo *param, +RlcMacBOStatus *param, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDStaRspInfo(param, mBuf) -RguDStaRspInfo *param; +PUBLIC S16 unpackBOStatusInfo(param, mBuf) +RlcMacBOStatus *param; Buffer *mBuf; #endif { - TRC3(cmUnpkRguDStaRspInfo); + TRC3(unpackBOStatusInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); + CMCHKUNPK(cmUnpkBool, ¶m->commCh, mBuf); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkRguCStaIndInfo -* -* -* Desc : RguCStaIndInfo - * Status Indication from MAC to RLC for common logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaIndInfo -( -RguCStaIndInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguCStaIndInfo(param, mBuf) -RguCStaIndInfo *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkRguCStaIndInfo); -#ifdef EMTC_ENBALE - CMCHKPK(cmPkLteTimingInfo, ¶m->pagingTimingInfo, mBuf); - CMCHKPK(SPkU8, param->isEmtcPaging, mBuf); -#endif - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(SPkU32, param->transId, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkRguCStaIndInfo -* -* -* Desc : RguCStaIndInfo - * Status Indication from MAC to RLC for common logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaIndInfo -( -RguCStaIndInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCStaIndInfo(param, mBuf) -RguCStaIndInfo *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkRguCStaIndInfo); - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf); - /*TODO:Mukesh: Need to check why rnti unpacking is missing*/ -#ifdef EMTC_ENBALE - CMCHKUNPK(SUnpkU8, ¶m->isEmtcPaging, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->pagingTimingInfo, mBuf); -#endif + CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); RETVALUE(ROK); -} - +} /* End of unpackBOStatusInfo */ /*********************************************************** @@ -3850,10 +3078,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmPkRguDStaIndInfo +* Func : packSchedRepInfo * * -* Desc : RguDStaIndInfo +* Desc : RlcMacSchedRep * StaInd from MAC to RLC for dedicated logical channels of a UE * * @@ -3864,47 +3092,37 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguDStaIndInfo +PUBLIC S16 packSchedRepInfo ( -RguDStaIndInfo *param, +RlcMacSchedRepInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguDStaIndInfo(param, mBuf) -RguDStaIndInfo *param; -Buffer *mBuf; -#endif { - S32 i; S32 idx; - TRC3(cmPkRguDStaIndInfo); + TRC3(packSchedRepInfo); - for(idx = (param->nmbOfUeGrantPerTti - 1); idx >= 0 ; idx--) + for(idx = (param->nmbLch-1); idx >= 0; idx--) { - RguDStaIndPerUe *staInd = ¶m->staInd[idx]; - CMCHKPK(SPkU8, staInd->fillCtrlPdu, mBuf); - for (i=staInd->nmbOfTbs-1; i >= 0; i--) { - CMCHKPK(cmPkRguStaIndTb, &staInd->staIndTb[i], mBuf); - } - CMCHKPK(SPkU8, staInd->nmbOfTbs, mBuf); - CMCHKPK(SPkU32,staInd->transId, mBuf); - CMCHKPK(cmPkLteRnti, staInd->rnti, mBuf); + CMCHKPK(cmPkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf); + CMCHKPK(cmPkBool, param->lchSta[idx].commCh, mBuf); } - CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf); + CMCHKPK(SPkU8, param->nmbLch, mBuf); + CMCHKPK(cmPkLteRnti, param->rnti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); + CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf); + RETVALUE(ROK); -} +} /* End of packSchedRepInfo */ /*********************************************************** * -* Func : cmUnpkRguDStaIndInfo +* Func : unpackSchedRepInfo * * -* Desc : RguDStaIndInfo +* Desc : RlcMacSchedRep * StaInd from MAC to RLC for dedicated logical channels of a UE * * @@ -3915,39 +3133,28 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDStaIndInfo +PUBLIC S16 unpackSchedRepInfo ( -RguDStaIndInfo *param, +RlcMacSchedRepInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguDStaIndInfo(param, mBuf) -RguDStaIndInfo *param; -Buffer *mBuf; -#endif { - S32 i; S32 idx; - TRC3(cmUnpkRguDStaIndInfo); + TRC3(unpackSchedRepInfo); + CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf); - for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++) + CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); + CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf); + for(idx = 0; idx < param->nmbLch; idx++) { - RguDStaIndPerUe *staInd = ¶m->staInd[idx]; - CMCHKUNPK(cmUnpkLteRnti, &staInd->rnti, mBuf); - CMCHKUNPK(SUnpkU32, &staInd->transId, mBuf); - CMCHKUNPK(SUnpkU8, &staInd->nmbOfTbs, mBuf); - for (i=0; inmbOfTbs; i++) - { - CMCHKUNPK(cmUnpkRguStaIndTb, &staInd->staIndTb[i], mBuf); - } - CMCHKUNPK(SUnpkU8, &staInd->fillCtrlPdu, mBuf); + CMCHKUNPK(cmUnpkBool, ¶m->lchSta[idx].commCh, mBuf); + CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf); } + RETVALUE(ROK); -} +} /* End of unpackSchedRepInfo */ #endif