X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Frgu.c;h=5a2653bf0494211effccf69c4aa6b213bce30c3d;hb=a6fdf00681f781fbccf7aa4bf95582f20e3039bb;hp=ee3ef41c6e9afde934d5cb863ded9616758d68ca;hpb=829bbd114f1c3dc00c1da47bca0a8207c049df3f;p=o-du%2Fl2.git diff --git a/src/cm/rgu.c b/src/cm/rgu.c index ee3ef41c6..5a2653bf0 100755 --- a/src/cm/rgu.c +++ b/src/cm/rgu.c @@ -35,25 +35,10 @@ */ /* 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 "common_def.h" #include "rgu.h" /* RGU Interface defines */ /* 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 "rgu.x" /* RGU Interface includes */ #ifdef SS_RBUF @@ -77,22 +62,14 @@ * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguBndReq +S16 cmPkRguBndReq ( Pst* pst, SuId suId, SpId spId ) -#else -PUBLIC S16 cmPkRguBndReq(pst, suId, spId) -Pst* pst; -SuId suId; -SpId spId; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguBndReq) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -100,7 +77,7 @@ SpId spId; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU001, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -109,7 +86,7 @@ SpId spId; (ErrVal)ERGU002, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -118,10 +95,10 @@ SpId spId; (ErrVal)ERGU003, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTRGUBNDREQ; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } @@ -138,24 +115,15 @@ SpId spId; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguBndReq +S16 cmUnpkRguBndReq ( RguBndReq func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguBndReq(func, pst, mBuf) -RguBndReq func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; SpId spId; - - TRC3(cmUnpkRguBndReq) if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -164,7 +132,7 @@ Buffer *mBuf; (ErrVal)ERGU004, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SUnpkS16(&spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -173,10 +141,10 @@ Buffer *mBuf; (ErrVal)ERGU005, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, spId)); + return ((*func)(pst, suId, spId)); } @@ -193,22 +161,14 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguUbndReq +S16 cmPkRguUbndReq ( Pst* pst, SpId spId, Reason reason ) -#else -PUBLIC S16 cmPkRguUbndReq(pst, spId, reason) -Pst* pst; -SpId spId; -Reason reason; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguUbndReq) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -216,7 +176,7 @@ Reason reason; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU006, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(reason, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -225,7 +185,7 @@ Reason reason; (ErrVal)ERGU007, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -234,10 +194,10 @@ Reason reason; (ErrVal)ERGU008, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTRGUUBNDREQ; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } @@ -254,24 +214,16 @@ Reason reason; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguUbndReq +S16 cmUnpkRguUbndReq ( RguUbndReq func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguUbndReq(func, pst, mBuf) -RguUbndReq func; -Pst *pst; -Buffer *mBuf; -#endif { SpId spId; Reason reason; - TRC3(cmUnpkRguUbndReq) if (SUnpkS16(&spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -280,7 +232,7 @@ Buffer *mBuf; (ErrVal)ERGU009, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SUnpkS16(&reason, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -289,10 +241,10 @@ Buffer *mBuf; (ErrVal)ERGU010, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, reason)); + return ((*func)(pst, spId, reason)); } @@ -306,26 +258,18 @@ Buffer *mBuf; * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguBndCfm +S16 cmPkRguBndCfm ( Pst* pst, SuId suId, -U8 status +uint8_t status ) -#else -PUBLIC S16 cmPkRguBndCfm(pst, suId, status) -Pst* pst; -SuId suId; -U8 status; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguBndCfm) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -333,16 +277,16 @@ U8 status; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU011, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } - if (SPkU8(status, mBuf) != ROK) { + if (oduUnpackUInt8(status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU012, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -351,10 +295,10 @@ U8 status; (ErrVal)ERGU013, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTRGUBNDCFM; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } @@ -368,28 +312,19 @@ U8 status; * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] U8 status +* @param[in] uint8_t status * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguBndCfm +S16 cmUnpkRguBndCfm ( RguBndCfm func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguBndCfm(func, pst, mBuf) -RguBndCfm func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; - U8 status; - - TRC3(cmUnpkRguBndCfm) + uint8_t status; if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -398,1754 +333,433 @@ Buffer *mBuf; (ErrVal)ERGU014, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } - if (SUnpkU8(&status, mBuf) != ROK) { + if (oduPackUInt8(&status, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU015, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, status)); + return ((*func)(pst, suId, status)); +} + +/*rgu_c_001.main_5 - ADD - L2M & R9 Support */ +#ifdef LTE_L2_MEAS + +/*********************************************************** +* +* Func :cmPkRguL2MUlThrpMeasReqInfo +* +* +* Status Response from RLC to MAC on UL dedicated logical channel for Uplink +* Scheduled throughput measurement +* +* +* Ret : S16 +* +* Notes: +* +* File : +* +**********************************************************/ +S16 cmPkRguL2MUlThrpMeasReqInfo +( +RguL2MUlThrpMeasReqInfo* param, +Buffer *mBuf +) +{ + S32 loop; + + CMCHKPK(oduUnpackUInt8, param->enbMeas, mBuf); + for (loop=param->numLcId-1; loop >= 0; loop--) + { + CMCHKPK(oduUnpackUInt8, param->lcId[loop], mBuf); + } + CMCHKPK(cmPkLteLcId, param->numLcId, mBuf); + CMCHKPK(cmPkLteRnti, param->rnti, mBuf); + CMCHKPK(cmPkLteCellId, param->cellId, mBuf); + return ROK; } + +/*********************************************************** +* +* Func :cmUnpkRguL2MUlThrpMeasReqInfo +* +* +* Status Response from RLC to MAC on UL dedicated logical channel for Uplink +* Scheduled throughput measurement +* +* +* Ret : S16 +* +* Notes: +* +* File : +* +**********************************************************/ +S16 cmUnpkRguL2MUlThrpMeasReqInfo +( +RguL2MUlThrpMeasReqInfo *param, +Buffer *mBuf +) +{ + uint8_t loop; + + CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); + CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); + CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf); + for (loop=0; loopnumLcId; loop++) + { + CMCHKUNPK(oduPackUInt8, ¶m->lcId[loop], mBuf); + } + CMCHKUNPK(oduPackUInt8, ¶m->enbMeas, mBuf); + return ROK; +} + /** -* @brief Request from RLC to MAC for forwarding SDUs on common - * channel for transmission +* @brief Primitive invoked from RLC to MAC to +* inform the On/Off status for Scheduled UL throughput +* measurment for dedicated channels * * @details * -* Function : cmPkRguCDatReq +* Function :cmPkRguL2MUlThrpMeasReq * * @param[in] Pst* pst * @param[in] SpId spId -* @param[in] RguCDatReqInfo * datReq +* @param[in] RguL2MUlThrpMeasReqInfo* measReq * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguCDatReq +S16 cmPkRguL2MUlThrpMeasReq ( Pst* pst, SpId spId, -RguCDatReqInfo * datReq +RguL2MUlThrpMeasReqInfo* measReq ) -#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"); + (ErrVal)ERGU049, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguCDatReqInfo)); - RETVALUE(RFAILED); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)); + return RFAILED; } - if (pst->selector == RGU_SEL_LWLC) + if (pst->selector == ODU_SELECTOR_LWLC) { - CMCHKPK(cmPkPtr,(PTR) datReq, mBuf); + CMCHKPK(oduPackPointer,(PTR) measReq, mBuf); } else { - if (cmPkRguCDatReqInfo(datReq, mBuf) != ROK) { + if (cmPkRguL2MUlThrpMeasReqInfo(measReq, 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"); + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU050, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, + sizeof(RguL2MUlThrpMeasReqInfo)); SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } - if (SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)) != ROK) { + if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,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)ERGU019, (ErrVal)0, "Packing failed"); + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU052, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } - datReq = NULLP; + 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)ERGU018, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU051, (ErrVal)0, "Packing failed"); #endif - - if (datReq != NULLP) + if (measReq != NULLP) { - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, + sizeof(RguL2MUlThrpMeasReqInfo)); } - SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } - pst->event = (Event) EVTRGUCDATREQ; - RETVALUE(SPstTsk(pst,mBuf)); + pst->event = (Event) EVTRGUL2MULTHRPMEASREQ; + return (SPstTsk(pst,mBuf)); } /** -* @brief Request from RLC to MAC for forwarding SDUs on common - * channel for transmission +* @brief Primitive invoked from RLC to MAC to +* inform the On/Off status for Scheduled UL throughput +* measurment for dedicated channels * * @details * -* Function : cmUnpkRguCDatReq +* Function :cmUnpkRguL2MUlThrpMeasReq * * @param[in] Pst* pst * @param[in] SpId spId -* @param[in] RguCDatReqInfo * datReq +* @param[in] RguL2MUlThrpMeasReqInfo * measReq * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCDatReq +S16 cmUnpkRguL2MUlThrpMeasReq ( -RguCDatReq func, +RguL2MUlThrpMeasReq func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguCDatReq(func, pst, mBuf) -RguCDatReq func; -Pst *pst; -Buffer *mBuf; -#endif { SpId spId; - RguCDatReqInfo *datReq; + RguL2MUlThrpMeasReqInfo* measReq; - TRC3(cmUnpkRguCDatReq) 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); + return RFAILED; } - if (pst->selector == RGU_SEL_LWLC) + if (pst->selector == ODU_SELECTOR_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf); + CMCHKUNPK(oduUnpackPointer,(PTR *) &measReq, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, - (Data **)&datReq, sizeof(RguCDatReqInfo))) != ROK) { + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,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)ERGU020, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); - } - cmMemset((U8*)datReq, (U8)0, sizeof(RguCDatReqInfo)); - if (cmUnpkRguCDatReqInfo(datReq, mBuf) != ROK) { + return 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)ERGU021, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); - RETVALUE(RFAILED); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReq, + sizeof(RguL2MUlThrpMeasReqInfo)); + return RFAILED; } } SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, datReq)); + return ((*func)(pst, spId, measReq)); } +#endif + + + /*rgu_c_001.main_5 - ADD - L2M Support */ +#ifdef LTE_L2_MEAS /** -* @brief Request from RLC to MAC for forwarding SDUs on - * dedicated channel for transmission +* @brief Harq Status Indication from MAC to RLC * * @details * -* Function : cmPkRguDDatReq +* Function : cmPkRguHqStaInd * * @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguDDatReqInfo * datReq +* @param[in] SuId suId +* @param[in] RguHarqStatusInd *harqStatusInd * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguDDatReq +S16 cmPkRguHqStaInd ( Pst* pst, -SpId spId, -RguDDatReqInfo * datReq +SuId suId, +RguHarqStatusInd *harqStatusInd ) -#else -PUBLIC S16 cmPkRguDDatReq(pst, spId, datReq) -Pst* pst; -SpId spId; -RguDDatReqInfo * datReq; -#endif { - Buffer *mBuf = NULLP; - TRC3(cmPkRguDDatReq) + + Buffer *mBuf; + uint8_t idx; + RguHarqStatusInd *harqStaInd = NULL; + +#ifdef XEON_SPECIFIC_CHANGES + if (SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK) +#else + if ((SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, + (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK) +#endif + { +#if (ERRCLASS & ERRCLS_ADD_RES) + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU070, (ErrVal)0, "Packing failed"); +#endif + return RFAILED; + } + + memcpy(harqStaInd, harqStatusInd, sizeof(RguHarqStatusInd)); 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)ERGU022, (ErrVal)0, "Packing failed"); + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU070, (ErrVal)0, "Packing failed"); +#endif +#ifdef XEON_SPECIFIC_CHANGES + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd)); +#else + SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); #endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguDDatReqInfo)); - RETVALUE(RFAILED); + return RFAILED; } - if (pst->selector == RGU_SEL_LWLC) + if (pst->selector == ODU_SELECTOR_LWLC) { - CMCHKPK(cmPkPtr,(PTR) datReq, mBuf); + CMCHKPK(oduPackPointer,(PTR) harqStaInd, mBuf); } else { - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - if (cmPkRguDDatReqInfo(pst, datReq, mBuf) != ROK) -#else - if (cmPkRguDDatReqInfo(datReq, mBuf) != ROK) -#endif + for(idx = 0; idx < harqStaInd->numTbs; idx++) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU023, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, - sizeof(RguDDatReqInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); + CMCHKPK(oduUnpackUInt16, harqStaInd->status[idx], mBuf); } - - if (SPutSBuf(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)ERGU025, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); + for(idx = 0; idx < harqStaInd->numTbs; idx++) + { + CMCHKPK(oduUnpackUInt32, harqStaInd->tbId[idx], mBuf); } - datReq = NULLP; + CMCHKPK(oduUnpackUInt8, harqStaInd->numTbs, mBuf); + CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf); + CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf); } - 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)ERGU024, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU071, (ErrVal)0, "Packing failed"); +#endif +#ifdef XEON_SPECIFIC_CHANGES + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, + sizeof(RguHarqStatusInd)); +#else + SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); #endif - if (datReq != NULLP); + SPutMsg(mBuf); + return RFAILED; + } +#ifdef XEON_SPECIFIC_CHANGES + if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, + sizeof(RguHarqStatusInd)) != ROK) { +#else + if (pst->selector != ODU_SELECTOR_LWLC) + { + if(SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)harqStaInd, + sizeof(RguHarqStatusInd), 0) != ROK) { - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguDDatReqInfo)); +#endif +#if (ERRCLASS & ERRCLS_ADD_RES) + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU072, (ErrVal)0, "Packing failed"); +#endif + SPutMsg(mBuf); + return RFAILED; } - SPutMsg(mBuf); - RETVALUE(RFAILED); +#ifndef XEON_SPECIFIC_CHANGES } - pst->event = (Event) EVTRGUDDATREQ; - RETVALUE(SPstTsk(pst,mBuf)); -} +#endif + pst->event = (Event) EVTRGUHQSTAIND; + return (SPstTsk(pst,mBuf)); +} + /** -* @brief Request from RLC to MAC for forwarding SDUs on - * dedicated channel for transmission +* @brief Harq Status Indication from MAC to RLC * * @details * -* Function : cmUnpkRguDDatReq +* Function : cmUnpkRguHqStaInd * -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguDDatReqInfo * datReq +* @param[in] RguHqStaInd func +* @param[in] Pst *pst +* @param[in] Buffer *mBuf * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatReq +S16 cmUnpkRguHqStaInd ( -RguDDatReq func, +RguHqStaInd 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) + RguHarqStatusInd *hqStaInd; + SuId suId; + uint8_t idx; - 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)ERGU073, (ErrVal)0, "UnPacking failed"); +#endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf); - } - else +#ifdef XEON_SPECIFIC_CHANGES + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&hqStaInd, + sizeof(RguHarqStatusInd))) != ROK) { +#else + if (pst->selector == ODU_SELECTOR_LWLC) { - if ((SGetSBuf(pst->region, pst->pool, - (Data **)&datReq, sizeof(RguDDatReqInfo))) != ROK) { + CMCHKUNPK(oduUnpackPointer,(PTR *) &hqStaInd, mBuf); + } + else + { + if ((SGetStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, + (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK) + { +#endif #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed"); + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return 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 + CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf); + CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf); + CMCHKUNPK(oduPackUInt8, &hqStaInd->numTbs, mBuf); + for(idx = hqStaInd->numTbs; idx > 0; idx--) { -#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); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUDDATIND; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for dedicated channels -* -* @details -* -* Function : cmUnpkRguDDatInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguDDatIndInfo * datInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatInd -( -RguDDatInd func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDDatInd(func, pst, mBuf) -RguDDatInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - RguDDatIndInfo *datInd; - - TRC3(cmUnpkRguDDatInd) - - 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 - 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(RguDDatIndInfo),0)) != 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguDDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutStaticBuffer(pst->region, pst->pool, - (Data *)datInd, sizeof(RguDDatIndInfo),0); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, datInd)); -} - - -/** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for common channels -* -* @details -* -* Function : cmPkRguCStaRsp -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCStaRspInfo * staRsp -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaRsp -( -Pst* pst, -SpId spId, -RguCStaRspInfo * staRsp -) -#else -PUBLIC S16 cmPkRguCStaRsp(pst, spId, staRsp) -Pst* pst; -SpId spId; -RguCStaRspInfo * staRsp; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCStaRsp) - - 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"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguCStaRspInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) staRsp, mBuf); - } - else - { - if (cmPkRguCStaRspInfo(staRsp, 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)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)) != 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - staRsp = 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)ERGU044, (ErrVal)0, "Packing failed"); -#endif - if (staRsp != NULLP) - { - SPutSBuf(pst->region, pst->pool, - (Data *)staRsp, sizeof(RguCStaRspInfo)); - } - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUCSTARSP; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for common channels -* -* @details -* -* Function : cmUnpkRguCStaRsp -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCStaRspInfo * staRsp -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaRsp -( -RguCStaRsp func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCStaRsp(func, pst, mBuf) -RguCStaRsp func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - RguCStaRspInfo *staRsp; - - TRC3(cmUnpkRguCStaRsp) - - if (SUnpkS16(&spId, 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp, - sizeof(RguCStaRspInfo))) != 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguCStaRspInfo(staRsp, 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"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, staRsp)); -} - -/*rgu_c_001.main_5 - ADD - L2M & R9 Support */ -#ifdef LTE_L2_MEAS - -/*********************************************************** -* -* Func :cmPkRguL2MUlThrpMeasReqInfo -* -* -* Status Response from RLC to MAC on UL dedicated logical channel for Uplink -* Scheduled throughput measurement -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo -( -RguL2MUlThrpMeasReqInfo* param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf) -RguL2MUlThrpMeasReqInfo* param; -Buffer *mBuf; -#endif -{ - S32 loop; - TRC3(cmPkRguL2MUlThrpMeasReqInfo); - - CMCHKPK(SPkU8, param->enbMeas, mBuf); - for (loop=param->numLcId-1; loop >= 0; loop--) - { - CMCHKPK(SPkU8, param->lcId[loop], mBuf); - } - CMCHKPK(cmPkLteLcId, param->numLcId, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func :cmUnpkRguL2MUlThrpMeasReqInfo -* -* -* Status Response from RLC to MAC on UL dedicated logical channel for Uplink -* Scheduled throughput measurement -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo -( -RguL2MUlThrpMeasReqInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf) -RguL2MUlThrpMeasReqInfo *param; -Buffer *mBuf; -#endif -{ - U8 loop; - TRC3(cmUnpkRguL2MUlThrpMeasReqInfo); - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf); - for (loop=0; loopnumLcId; loop++) - { - CMCHKUNPK(SUnpkU8, ¶m->lcId[loop], mBuf); - } - CMCHKUNPK(SUnpkU8, ¶m->enbMeas, mBuf); - RETVALUE(ROK); -} - -/** -* @brief Primitive invoked from RLC to MAC to -* inform the On/Off status for Scheduled UL throughput -* measurment for dedicated channels -* -* @details -* -* Function :cmPkRguL2MUlThrpMeasReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguL2MUlThrpMeasReqInfo* measReq -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguL2MUlThrpMeasReq -( -Pst* pst, -SpId spId, -RguL2MUlThrpMeasReqInfo* measReq -) -#else -PUBLIC S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq) -Pst* pst; -SpId spId; -RguL2MUlThrpMeasReqInfo* measReq; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguL2MUlThrpMeasReq) - - 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)ERGU049, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) measReq, mBuf); - } - else - { - if (cmPkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU050, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)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 (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU057, (ErrVal)0, "Packing failed"); -#endif - 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)ERGU058, (ErrVal)0, "Packing failed"); -#endif - if (staRspInfo != NULLP) - { - SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo)); - } - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUDSTARSP; - RETVALUE(SPstTsk(pst,mBuf)); - SPutMsg(mBuf); -} - - -/** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for dedicated channels -* -* @details -* -* Function : cmUnpkRguDStaRsp -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguDStaRspInfo * staRsp -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDStaRsp -( -RguDStaRsp func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDStaRsp(func, pst, mBuf) -RguDStaRsp func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - RguDStaRspInfo *staRsp; - - TRC3(cmUnpkRguDStaRsp) - - 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp, - sizeof(RguDStaRspInfo))) != 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguDStaRspInfo(staRsp, 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"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - (*func)(pst, spId, staRsp); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo)); - RETVALUE(ROK); -} - - -/** -* @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. -* -* @details -* -* Function : cmPkRguCStaInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCStaIndInfo * staInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaInd -( -Pst* pst, -SuId suId, -RguCStaIndInfo * staInd -) -#else -PUBLIC S16 cmPkRguCStaInd(pst, suId, staInd) -Pst* pst; -SuId suId; -RguCStaIndInfo * staInd; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCStaInd) - - 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"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) staInd, 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 (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU066, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - staInd = 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)ERGU065, (ErrVal)0, "Packing failed"); -#endif - if (staInd != NULLP) - { - SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguCStaIndInfo)); - } - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - pst->event = (Event) EVTRGUCSTAIND; - RETVALUE(SPstTsk(pst,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. -* -* @details -* -* Function : cmUnpkRguCStaInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCStaIndInfo * staInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaInd -( -RguCStaInd 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) - - if (SUnpkS16(&suId, 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguCStaIndInfo))) != 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"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguCStaIndInfo(staInd, 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"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, staInd)); -} - - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS -#if 0 - -/** -* @brief Packing function for RguLchMapInfo -* -* @details -* -* Function : cmPkRguLchMapInfo -* @param[in] RguLchMapInfo *param -* @param[out] Buffer *mBuf -* @return Void -**/ -#ifdef ANSI -PRIVATE S16 cmPkRguLchMapInfo -( -RguLchMapInfo *param, -Buffer *mBuf -) -#else -PRIVATE S16 cmPkRguLchMapInfo(param, mBuf) -RguLchMapInfo *param; -Buffer *mBuf; -#endif -{ - U8 idx; - - TRC3(cmPkRguLchMapInfo); - - for(idx = 0; idx < RGU_MAX_LC; idx++) - { - CMCHKPK(SPkU16, param->snList[idx], mBuf); - } - CMCHKPK(cmPkLteLcId, param->lChId, mBuf); - - RETVALUE(ROK); -} - -/** -* @brief Unpacking function for RguLchMapInfo -* -* @details -* -* Function : cmUnpkRguLchMapInfo -* -* @param[out] RguLchMapInfo *param -* @param[in] Buffer *mBuf -* @return Void -**/ -#ifdef ANSI -PRIVATE S16 cmUnpkRguLchMapInfo -( -RguLchMapInfo *param, -Buffer *mBuf -) -#else -PRIVATE S16 cmUnpkRguLchMapInfo(param, mBuf) -RguLchMapInfo *param; -Buffer *mBuf; -#endif -{ - U8 idx; - - TRC3(cmUnpkRguLchMapInfo) - - CMCHKUNPK(cmUnpkLteLcId, ¶m->lChId, mBuf); - for(idx = RGU_MAX_LC; idx > 0; idx--) - { - CMCHKUNPK(SUnpkU16, ¶m->snList[idx - 1], mBuf); - } - - RETVALUE(ROK); -} -#endif - -/** -* @brief Harq Status Indication from MAC to RLC -* -* @details -* -* Function : cmPkRguHqStaInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguHarqStatusInd *harqStatusInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguHqStaInd -( -Pst* pst, -SuId suId, -RguHarqStatusInd *harqStatusInd -) -#else -PUBLIC S16 cmPkRguHqStaInd(pst, suId, harqStatusInd) -Pst* pst; -SuId suId; -RguHarqStatusInd *harqStatusInd; -#endif -{ - - Buffer *mBuf; - U8 idx; - RguHarqStatusInd *harqStaInd = NULL; - - TRC3(cmPkRguHqStaInd) -#ifdef XEON_SPECIFIC_CHANGES - if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK) -#else - if ((SGetStaticBuffer(pst->region, pst->pool, - (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK) -#endif - { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU070, (ErrVal)0, "Packing failed"); -#endif - RETVALUE(RFAILED); - } - - cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd)); - - 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)ERGU070, (ErrVal)0, "Packing failed"); -#endif -#ifdef XEON_SPECIFIC_CHANGES - SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd)); -#else - SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); -#endif - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) harqStaInd, mBuf); - } - else - { - for(idx = 0; idx < harqStaInd->numTbs; idx++) - { - CMCHKPK(SPkU16, harqStaInd->status[idx], mBuf); - } - for(idx = 0; idx < harqStaInd->numTbs; idx++) - { - CMCHKPK(SPkU32, harqStaInd->tbId[idx], mBuf); - } - CMCHKPK(SPkU8, harqStaInd->numTbs, mBuf); - CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf); - CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf); - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU071, (ErrVal)0, "Packing failed"); -#endif -#ifdef XEON_SPECIFIC_CHANGES - SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, - sizeof(RguHarqStatusInd)); -#else - SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } -#ifdef XEON_SPECIFIC_CHANGES - if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, - sizeof(RguHarqStatusInd)) != ROK) { -#else - if (pst->selector != RGU_SEL_LWLC) - { - if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, - sizeof(RguHarqStatusInd), 0) != ROK) - { -#endif -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU072, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } -#ifndef XEON_SPECIFIC_CHANGES - } -#endif - - pst->event = (Event) EVTRGUHQSTAIND; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -#if 0 -/** -* @brief Unpacking function for RguSnMapInfo -* -* @details -* -* Function : cmUnpkRguSnMapInfo -* -* @param[out] RguSnMapInfo *param -* @param[in] Buffer *mBuf -* @return Void -**/ -#ifdef ANSI -PRIVATE S16 cmUnpkRguSnMapInfo -( -RguSnMapInfo *param, -Buffer *mBuf -) -#else -PRIVATE S16 cmUnpkRguSnMapInfo(param, mBuf) -RguSnMapInfo *param; -Buffer *mBuf; -#endif -{ - U8 idx; - - TRC3(cmUnpkRguSnMapInfo) - - CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->numLch, mBuf); - for(idx = param->numLch; idx > 0; idx--) - { - CMCHKUNPK(cmUnpkRguLchMapInfo, ¶m->lchMap[idx - 1], mBuf); - } - RETVALUE(ROK); -} -#endif - -/** -* @brief Harq Status Indication from MAC to RLC -* -* @details -* -* Function : cmUnpkRguHqStaInd -* -* @param[in] RguHqStaInd func -* @param[in] Pst *pst -* @param[in] Buffer *mBuf -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguHqStaInd -( -RguHqStaInd func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguHqStaInd(func, pst, mBuf) -RguHqStaInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - RguHarqStatusInd *hqStaInd; - SuId suId; - U8 idx; - - TRC3(cmUnpkRguHqStaInd) - - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } -#ifdef XEON_SPECIFIC_CHANGES - if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd, - sizeof(RguHarqStatusInd))) != ROK) { -#else - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &hqStaInd, mBuf); - } - else - { - if ((SGetStaticBuffer(pst->region, pst->pool, - (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK) - { -#endif -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf); - CMCHKUNPK(SUnpkU8, &hqStaInd->numTbs, mBuf); - for(idx = hqStaInd->numTbs; idx > 0; idx--) - { - CMCHKUNPK(SUnpkU32, &hqStaInd->tbId[idx - 1], mBuf); + CMCHKUNPK(oduPackUInt32, &hqStaInd->tbId[idx - 1], mBuf); } for(idx = hqStaInd->numTbs; idx > 0; idx--) { - CMCHKUNPK(SUnpkU16, &hqStaInd->status[idx - 1], mBuf); + CMCHKUNPK(oduPackUInt16, &hqStaInd->status[idx - 1], mBuf); } #ifndef XEON_SPECIFIC_CHANGES } @@ -2153,247 +767,60 @@ Buffer *mBuf; SPutMsg(mBuf); (*func)(pst, suId, hqStaInd); #ifdef XEON_SPECIFIC_CHANGES - SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd)); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd)); #else - SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0); + SPutStaticBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0); #endif - RETVALUE(ROK); + return ROK; } #endif /* LTE_L2_MEAS */ - -/** -* @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 dedicated channels. -* -* @details -* -* Function : cmPkRguDStaInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguDStaIndInfo * staInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguDStaInd -( -Pst* pst, -SuId suId, -RguDStaIndInfo * staInd -) -#else -PUBLIC S16 cmPkRguDStaInd(pst, suId, staInd) -Pst* pst; -SuId suId; -RguDStaIndInfo * staInd; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguDStaInd) - - 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)ERGU076, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) staInd, mBuf); - } - else - { - if (cmPkRguDStaIndInfo(staInd, 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)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguDStaIndInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU079, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - staInd = 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)ERGU078, (ErrVal)0, "Packing failed"); -#endif - if (staInd != NULLP) - { - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); - } - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUDSTAIND; - RETVALUE(SPstTsk(pst,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 dedicated channels. -* -* @details -* -* Function : cmUnpkRguDStaInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguDStaIndInfo * staInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDStaInd -( -RguDStaInd func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDStaInd(func, pst, mBuf) -RguDStaInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - RguDStaIndInfo *staInd; - - TRC3(cmUnpkRguDStaInd) - - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguDStaIndInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguDStaIndInfo(staInd, 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)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, staInd)); -} - -#ifdef ANSI -PUBLIC S16 cmPkRguLcFlowCntrlInfo +S16 cmPkRguLcFlowCntrlInfo ( RguLcFlowCntrlInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguLcFlowCntrlInfo (param,mBuf) -RguLcFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguLcFlowCntrlInfo); - CMCHKPK(SPkU32, param->maxBo4FlowCtrl, mBuf); - CMCHKPK(SPkU32, param->pktAdmitCnt, mBuf); + CMCHKPK(oduUnpackUInt32, param->maxBo4FlowCtrl, mBuf); + CMCHKPK(oduUnpackUInt32, param->pktAdmitCnt, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - RETVALUE(ROK); + return ROK; } -#ifdef ANSI -PUBLIC S16 cmPkRguUeFlowCntrlInfo +S16 cmPkRguUeFlowCntrlInfo ( RguUeFlowCntrlInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguUeFlowCntrlInfo (param,mBuf) -RguUeFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - U32 idx; + uint32_t idx; - TRC3(cmPkRguUeFlowCntrlInfo); for(idx=(param->numLcs - 1); idx >= 0; idx--) { cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf); } - CMCHKPK(SPkU32, param->numLcs, mBuf); + CMCHKPK(oduUnpackUInt32, param->numLcs, mBuf); CMCHKPK(cmPkLteRnti, param->ueId, mBuf); - RETVALUE(ROK); + return ROK; } -#ifdef ANSI -PUBLIC S16 cmPkRguFlowCntrlInfo +S16 cmPkRguFlowCntrlInfo ( RguFlowCntrlInd *param, Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) -RguFlowCntrlInd *param; -Buffer *mBuf; -#endif +) { - U32 idx; - - TRC3(cmPkRguFlowCntrlInfo); + uint32_t idx; for (idx=(param->numUes - 1); idx >= 0; idx--) { cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf); } - CMCHKPK(SPkU32, param->numUes, mBuf); + CMCHKPK(oduUnpackUInt32, param->numUes, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); + return ROK; } /** @@ -2411,34 +838,26 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmPkRguFlowCntrlInd +S16 cmPkRguFlowCntrlInd ( Pst* pst, SuId suId, RguFlowCntrlInd *flowCntrlInd ) -#else -PUBLIC S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd) -Pst* pst; -SuId suId; -RguFlowCntrlInd *flowCntrlInd; -#endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguFlowCntrlInd); 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)ERGU076, (ErrVal)0, "Packing failed"); #endif - RETVALUE(RFAILED); + return RFAILED; } - if (pst->selector == RGU_SEL_LWLC) + if (pst->selector == ODU_SELECTOR_LWLC) { - CMCHKPK(cmPkPtr,(PTR) flowCntrlInd, mBuf); + CMCHKPK(oduPackPointer,(PTR) flowCntrlInd, mBuf); } else { @@ -2449,7 +868,7 @@ RguFlowCntrlInd *flowCntrlInd; (ErrVal)ERGU077, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } } if (SPkS16(suId, mBuf) != ROK) { @@ -2459,79 +878,58 @@ RguFlowCntrlInd *flowCntrlInd; (ErrVal)ERGU078, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } pst->event = (Event) EVTRGUFLOWCNTRLIND; - RETVALUE(SPstTsk(pst,mBuf)); + return (SPstTsk(pst,mBuf)); } -#ifdef ANSI -PUBLIC S16 cmUnpkRguLcFlowCntrlInfo +S16 cmUnpkRguLcFlowCntrlInfo ( RguLcFlowCntrlInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf) -RguLcFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguLcFlowCntrlInfo); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->pktAdmitCnt, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->maxBo4FlowCtrl, mBuf); + CMCHKUNPK(oduPackUInt32, ¶m->pktAdmitCnt, mBuf); + CMCHKUNPK(oduPackUInt32, ¶m->maxBo4FlowCtrl, mBuf); - RETVALUE(ROK); + return ROK; } -#ifdef ANSI -PUBLIC S16 cmUnpkRguUeFlowCntrlInfo +S16 cmUnpkRguUeFlowCntrlInfo ( RguUeFlowCntrlInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf) -RguUeFlowCntrlInfo *param; -Buffer *mBuf; -#endif { - U32 idx; - TRC3(cmUnpkRguUeFlowCntrlInfo); + uint32_t idx; CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->numLcs, mBuf); + CMCHKUNPK(oduPackUInt32, ¶m->numLcs, mBuf); for(idx=0; idx < param->numLcs; idx++) { cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf); } - RETVALUE(ROK); + return ROK; } -#ifdef ANSI -PUBLIC S16 cmUnpkRguFlowCntrlInfo +S16 cmUnpkRguFlowCntrlInfo ( RguFlowCntrlInd *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf) -RguFlowCntrlInd *param; -Buffer *mBuf; -#endif { - U32 idx; + uint32_t idx; - TRC3(cmUnpkRguFlowCntrlInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->numUes, mBuf); + CMCHKUNPK(oduPackUInt32, ¶m->numUes, mBuf); for (idx=0; idx < param->numUes; idx++) { cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf); } - RETVALUE(ROK); + return ROK; } /** @@ -2549,24 +947,15 @@ Buffer *mBuf; * @return S16 * -# ROK **/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguFlowCntrlInd +S16 cmUnpkRguFlowCntrlInd ( RguFlowCntrlIndInfo func, Pst *pst, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf) -RguFlowCntrlIndInfo func; -Pst *pst; -Buffer *mBuf; -#endif { SuId suId; RguFlowCntrlInd *flowCntrlInd; - - TRC3(cmUnpkRguFlowCntrlInd) if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2575,22 +964,22 @@ Buffer *mBuf; (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } - if (pst->selector == RGU_SEL_LWLC) + if (pst->selector == ODU_SELECTOR_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &flowCntrlInd, mBuf); + CMCHKUNPK(oduUnpackPointer,(PTR *) &flowCntrlInd, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) { + if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - RETVALUE(RFAILED); + return RFAILED; } if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2599,12 +988,12 @@ Buffer *mBuf; (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd)); - RETVALUE(RFAILED); + SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd)); + return RFAILED; } } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, flowCntrlInd)); + return ((*func)(pst, suId, flowCntrlInd)); } /*********************************************************** @@ -2623,34 +1012,26 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguPduInfo +S16 cmPkRguPduInfo ( RguPduInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguPduInfo(param, mBuf) -RguPduInfo *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmPkRguPduInfo); - for (i=param->numPdu-1; i >= 0; i--) { /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */ MsgLen msgLen = 0; if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK) - RETVALUE(RFAILED); + return RFAILED; if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK) - RETVALUE(RFAILED); + return RFAILED; SPutMsg(param->mBuf[i]); CMCHKPK(cmPkMsgLen, msgLen, mBuf); } - CMCHKPK(SPkU8, param->numPdu, mBuf); - RETVALUE(ROK); + CMCHKPK(oduUnpackUInt8, param->numPdu, mBuf); + return ROK; } @@ -2671,32 +1052,25 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguPduInfo +S16 cmUnpkRguPduInfo ( RguPduInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguPduInfo(param, mBuf) -RguPduInfo *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmUnpkRguPduInfo); - CMCHKUNPK(SUnpkU8, ¶m->numPdu, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->numPdu, mBuf); for (i=0; inumPdu; i++) { MsgLen msgLen, totalMsgLen; CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) - RETVALUE(RFAILED); + return RFAILED; if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK) - RETVALUE(RFAILED); + return RFAILED; } - RETVALUE(ROK); + return ROK; } @@ -2706,308 +1080,9 @@ Buffer *mBuf; * Func : cmPkRguDBoReport * * -* Desc : RguDBoReport - * Buffer Occupancy Report for dedicated logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguDBoReport -( -RguDBoReport *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguDBoReport(param, mBuf) -RguDBoReport *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkRguDBoReport); - - CMCHKPK(SPkU32, param->oldestSduArrTime, mBuf); - CMCHKPK(SPkU32, param->staPduBo, mBuf); -#ifdef CCPU_OPT - CMCHKPK(SPkU8, param->staPduPrsnt, mBuf); - CMCHKPK(SPkU16, param->estRlcHdrSz, mBuf); -#endif - CMCHKPK(SPkS32, param->bo, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkRguDBoReport -* -* -* Desc : RguDBoReport - * Buffer Occupancy Report for dedicated logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDBoReport -( -RguDBoReport *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDBoReport(param, mBuf) -RguDBoReport *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkRguDBoReport); - - CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); -#ifdef CCPU_OPT - CMCHKUNPK(SUnpkU16, ¶m->estRlcHdrSz, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->staPduPrsnt, mBuf); -#endif - - CMCHKUNPK(SUnpkU32, ¶m->staPduBo, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->oldestSduArrTime, mBuf); - RETVALUE(ROK); -} - - -/*********************************************************** -* -* Func : cmPkRguCDatReqInfo -* -* -* Desc : RguCDatReqInfo - * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH) -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguCDatReqInfo -( -RguCDatReqInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguCDatReqInfo(param, mBuf) -RguCDatReqInfo *param; -Buffer *mBuf; -#endif -{ - MsgLen msgLen; - - TRC3(cmPkRguCDatReqInfo); - - if (param->pdu != NULLP) - { - if (SFndLenMsg(param->pdu, &msgLen) != ROK) - RETVALUE(RFAILED); - if (SCatMsg(mBuf, param->pdu, M1M2) != ROK) - RETVALUE(RFAILED); - SPutMsg(param->pdu); - CMCHKPK(cmPkMsgLen, msgLen, mBuf); - } - switch(param->lcType) { - case CM_LTE_LCH_CCCH: - CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf); - break; - case CM_LTE_LCH_BCCH: - case CM_LTE_LCH_PCCH: - CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf); -#ifdef EMTC_ENABLE - CMCHKPK(SPkU8,param->pnb,mBuf); -#endif - break; - default : - RETVALUE(RFAILED); - } - CMCHKPK(SPkU32, param->transId, mBuf); - CMCHKPK(cmPkLteLcType, param->lcType, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkRguCDatReqInfo -* -* -* Desc : RguCDatReqInfo - * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH) -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCDatReqInfo -( -RguCDatReqInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCDatReqInfo(param, mBuf) -RguCDatReqInfo *param; -Buffer *mBuf; -#endif -{ - MsgLen msgLen, totalMsgLen; - - TRC3(cmUnpkRguCDatReqInfo); - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf); - switch(param->lcType) { - case CM_LTE_LCH_BCCH: - case CM_LTE_LCH_PCCH: -#ifdef EMTC_ENABLE - CMCHKUNPK(SUnpkU8,¶m->pnb, mBuf); -#endif - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf); - break; - case CM_LTE_LCH_CCCH: - CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf); - break; - default : - RETVALUE(RFAILED); - } - SFndLenMsg(mBuf, &msgLen); - if (msgLen > 0) - { - CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); - if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) - RETVALUE(RFAILED); - if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK) - RETVALUE(RFAILED); - } - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkRguLchDatReq -* -* -* Desc : RguLchDatReq - * DatReq Information of a logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguLchDatReq -( -RguLchDatReq *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguLchDatReq(param, mBuf) -RguLchDatReq *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkRguLchDatReq); - -#ifdef L2_OPTMZ - CMCHKPK(SPkU8, param->freeBuff, mBuf); -#endif - CMCHKPK(SPkU8, param->setMaxUlPrio, mBuf); - CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf); - CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkRguLchDatReq -* -* -* Desc : RguLchDatReq - * DatReq Information of a logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguLchDatReq -( -RguLchDatReq *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguLchDatReq(param, mBuf) -RguLchDatReq *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkRguLchDatReq); - - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf); - CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->setMaxUlPrio, mBuf); -#ifdef L2_OPTMZ - CMCHKUNPK(SUnpkU8, ¶m->freeBuff, mBuf); -#endif - RETVALUE(ROK); -} - - -/*********************************************************** -* -* Func : cmPkRguDatReqTb -* -* -* Desc : RguDatReqTb -* DatReq from RLC to MAC for dedicated channels of a UE -* +* Desc : RguDBoReport + * Buffer Occupancy Report for dedicated logical channel +* * * Ret : S16 * @@ -3016,41 +1091,32 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguDatReqTb +S16 cmPkRguDBoReport ( -RguDatReqTb *param, +RguDBoReport *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguDatReqTb(param, mBuf) -RguDatReqTb *param; -Buffer *mBuf; -#endif { - S32 i; - TRC3(cmPkRguDatReqTb); - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - CMCHKPK(SPkU32, param->tbId, mBuf); + CMCHKPK(oduUnpackUInt32, param->oldestSduArrTime, mBuf); + CMCHKPK(oduUnpackUInt32, param->staPduBo, mBuf); +#ifdef CCPU_OPT + CMCHKPK(oduUnpackUInt8, param->staPduPrsnt, mBuf); + CMCHKPK(oduUnpackUInt16, param->estRlcHdrSz, mBuf); #endif - for (i=param->nmbLch-1; i >= 0; i--) { - CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf); - } - CMCHKPK(SPkU8, param->nmbLch, mBuf); - RETVALUE(ROK); + CMCHKPK(SPkS32, param->bo, mBuf); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguDatReqTb +* Func : cmUnpkRguDBoReport * * -* Desc : RguDatReqTb - * DatReq from RLC to MAC for dedicated channels of a UE +* Desc : RguDBoReport + * Buffer Occupancy Report for dedicated logical channel * * * Ret : S16 @@ -3060,57 +1126,33 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef LTE_L2_MEAS -#ifdef ANSI -PUBLIC S16 cmUnpkRguDatReqTb -( -Pst *pst, -RguDatReqTb *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDatReqTb(pst, param, mBuf) -Pst *pst; -RguDatReqTb *param; -Buffer *mBuf; -#endif -#else -#ifdef ANSI -PUBLIC S16 cmUnpkRguDatReqTb +S16 cmUnpkRguDBoReport ( -RguDatReqTb *param, +RguDBoReport *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguDatReqTb(param, mBuf) -RguDatReqTb *param; -Buffer *mBuf; -#endif -#endif { - S32 i; - TRC3(cmUnpkRguDatReqTb); - CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf); - for (i=0; inmbLch; i++) { - CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf); - } - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf); + CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); +#ifdef CCPU_OPT + CMCHKUNPK(oduPackUInt16, ¶m->estRlcHdrSz, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->staPduPrsnt, mBuf); #endif - RETVALUE(ROK); + + CMCHKUNPK(oduPackUInt32, ¶m->staPduBo, mBuf); + CMCHKUNPK(oduPackUInt32, ¶m->oldestSduArrTime, mBuf); + return ROK; } /*********************************************************** * -* Func : cmPkRguDDatReqInfo +* Func : cmPkRguCDatReqInfo * * -* Desc : RguDDatReqInfo - * DatReq from RLC to MAC for dedicated channels of a UE +* Desc : RguCDatReqInfo + * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH) * * * Ret : S16 @@ -3120,65 +1162,53 @@ Buffer *mBuf; * File : * **********************************************************/ - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS -#ifdef ANSI -PUBLIC S16 cmPkRguDDatReqInfo -( -Pst *pst, -RguDDatReqInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguDDatReqInfo(pst, param, mBuf) -Pst *pst; -RguDDatReqInfo *param; -Buffer *mBuf; -#endif -#else -#ifdef ANSI -PUBLIC S16 cmPkRguDDatReqInfo +S16 cmPkRguCDatReqInfo ( -RguDDatReqInfo *param, +RguCDatReqInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguDDatReqInfo(param, mBuf) -RguDDatReqInfo *param; -Buffer *mBuf; -#endif -#endif { - S32 i; - S32 idx; - - TRC3(cmPkRguDDatReqInfo); + MsgLen msgLen; - for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--) + if (param->pdu != NULLP) { - RguDDatReqPerUe *datReq = ¶m->datReq[idx]; - for (i=RGU_MAX_TB-1; i >= 0; i--) - { - CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf); - } - CMCHKPK(SPkU8, datReq->nmbOfTbs, mBuf); - CMCHKPK(SPkU32, datReq->transId, mBuf); - CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf); + if (SFndLenMsg(param->pdu, &msgLen) != ROK) + return RFAILED; + if (SCatMsg(mBuf, param->pdu, M1M2) != ROK) + return RFAILED; + SPutMsg(param->pdu); + CMCHKPK(cmPkMsgLen, msgLen, mBuf); + } + switch(param->lcType) { + case CM_LTE_LCH_CCCH: + CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf); + break; + case CM_LTE_LCH_BCCH: + case CM_LTE_LCH_PCCH: + CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf); +#ifdef EMTC_ENABLE + CMCHKPK(oduUnpackUInt8,param->pnb,mBuf); +#endif + break; + default : + return RFAILED; } - CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf); + CMCHKPK(oduUnpackUInt32, param->transId, mBuf); + CMCHKPK(cmPkLteLcType, param->lcType, mBuf); + CMCHKPK(cmPkLteLcId, param->lcId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguDDatReqInfo +* Func : cmUnpkRguCDatReqInfo * * -* Desc : RguDDatReqInfo - * DatReq from RLC to MAC for dedicated channels of a UE +* Desc : RguCDatReqInfo + * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH) * * * Ret : S16 @@ -3188,85 +1218,54 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef LTE_L2_MEAS -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatReqInfo -( -Pst *pst, -RguDDatReqInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDDatReqInfo(pst, param, mBuf) -Pst *pst; -RguDDatReqInfo *param; -Buffer *mBuf; -#endif -#else -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatReqInfo +S16 cmUnpkRguCDatReqInfo ( -RguDDatReqInfo *param, +RguCDatReqInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguDDatReqInfo(param, mBuf) -RguDDatReqInfo *param; -Buffer *mBuf; -#endif -#endif { - S32 i; - /* After Merging from 2.1 to 2.2 */ - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - S16 retVal; -#endif - S32 idx; + MsgLen msgLen, totalMsgLen; - TRC3(cmUnpkRguDDatReqInfo); - /* After Merging from 2.1 to 2.2 */ - /*rgu_c_001.main_5 - ADD - L2M Support */ -#ifdef LTE_L2_MEAS - retVal = ROK; -#endif CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf); - for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++) - { - RguDDatReqPerUe *datReq = ¶m->datReq[idx]; - CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf); - CMCHKUNPK(SUnpkU32, &datReq->transId, mBuf); - CMCHKUNPK(SUnpkU8, &datReq->nmbOfTbs, mBuf); - /* rgu_c_001.main_4 - Changes for MIMO feature addition */ - for (i=0; idatReqTb[i], mBuf); - if(retVal != ROK) - { - RETVALUE(RFAILED); - } -#else - CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf); + CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); + CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf); + CMCHKUNPK(oduPackUInt32, ¶m->transId, mBuf); + switch(param->lcType) { + case CM_LTE_LCH_BCCH: + case CM_LTE_LCH_PCCH: +#ifdef EMTC_ENABLE + CMCHKUNPK(oduPackUInt8,¶m->pnb, mBuf); #endif - } + CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf); + break; + case CM_LTE_LCH_CCCH: + CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf); + break; + default : + return RFAILED; + } + SFndLenMsg(mBuf, &msgLen); + if (msgLen > 0) + { + CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); + if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) + return RFAILED; + if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK) + return RFAILED; } - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmPkRguCDatIndInfo +* Func : cmPkRguLchDatReq * * -* Desc : RguCDatIndInfo - * DatInd from MAC to RLC on CCCH +* Desc : RguLchDatReq + * DatReq Information of a logical channel * * * Ret : S16 @@ -3276,43 +1275,32 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguCDatIndInfo +S16 cmPkRguLchDatReq ( -RguCDatIndInfo *param, +RguLchDatReq *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguCDatIndInfo(param, mBuf) -RguCDatIndInfo *param; -Buffer *mBuf; -#endif { - MsgLen msgLen; - - TRC3(cmPkRguCDatIndInfo); - if (SFndLenMsg(param->pdu, &msgLen) != ROK) - RETVALUE(RFAILED); - if (SCatMsg(mBuf, param->pdu, M1M2) != ROK) - RETVALUE(RFAILED); - SPutMsg(param->pdu); - CMCHKPK(cmPkMsgLen, msgLen, mBuf); +#ifdef L2_OPTMZ + CMCHKPK(oduUnpackUInt8, param->freeBuff, mBuf); +#endif + CMCHKPK(oduUnpackUInt8, param->setMaxUlPrio, mBuf); + CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf); + CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguCDatIndInfo +* Func : cmUnpkRguLchDatReq * * -* Desc : RguCDatIndInfo - * DatInd from MAC to RLC on CCCH +* Desc : RguLchDatReq + * DatReq Information of a logical channel * * * Ret : S16 @@ -3322,42 +1310,31 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCDatIndInfo +S16 cmUnpkRguLchDatReq ( -RguCDatIndInfo *param, +RguLchDatReq *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguCDatIndInfo(param, mBuf) -RguCDatIndInfo *param; -Buffer *mBuf; -#endif { - MsgLen msgLen, totalMsgLen; - - TRC3(cmUnpkRguCDatIndInfo); - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); - if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) - RETVALUE(RFAILED); - if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK) - RETVALUE(RFAILED); - RETVALUE(ROK); + CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf); + CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->setMaxUlPrio, mBuf); +#ifdef L2_OPTMZ + CMCHKUNPK(oduPackUInt8, ¶m->freeBuff, mBuf); +#endif + return ROK; } - /*********************************************************** * -* Func : cmPkRguLchDatInd +* Func : cmPkRguDatReqTb * * -* Desc : RguLchDatInd - * DatInd Information for a logical channel +* Desc : RguDatReqTb +* DatReq from RLC to MAC for dedicated channels of a UE * * * Ret : S16 @@ -3367,34 +1344,34 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguLchDatInd +S16 cmPkRguDatReqTb ( -RguLchDatInd *param, +RguDatReqTb *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguLchDatInd(param, mBuf) -RguLchDatInd *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguLchDatInd); + S32 i; - CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - RETVALUE(ROK); + /*rgu_c_001.main_5 - ADD - L2M Support */ +#ifdef LTE_L2_MEAS + CMCHKPK(oduUnpackUInt32, param->tbId, mBuf); +#endif + for (i=param->nmbLch-1; i >= 0; i--) { + CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf); + } + CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguLchDatInd +* Func : cmUnpkRguDatReqTb * * -* Desc : RguLchDatInd - * DatInd Information for a logical channel +* Desc : RguDatReqTb + * DatReq from RLC to MAC for dedicated channels of a UE * * * Ret : S16 @@ -3404,34 +1381,43 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguLchDatInd +#ifdef LTE_L2_MEAS +S16 cmUnpkRguDatReqTb ( -RguLchDatInd *param, +Pst *pst, +RguDatReqTb *param, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguLchDatInd(param, mBuf) -RguLchDatInd *param; -Buffer *mBuf; +S16 cmUnpkRguDatReqTb +( +RguDatReqTb *param, +Buffer *mBuf +) #endif { - TRC3(cmUnpkRguLchDatInd); + S32 i; - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf); - RETVALUE(ROK); -} + CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf); + for (i=0; inmbLch; i++) { + CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf); + } + /*rgu_c_001.main_5 - ADD - L2M Support */ +#ifdef LTE_L2_MEAS + CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf); +#endif + return ROK; +} /*********************************************************** * -* Func : cmPkRguDDatIndInfo +* Func : cmPkRguDDatReqInfo * * -* Desc : RguDDatIndInfo - * Data Indication from MAC to RLC for dedicated channels of a UE +* Desc : RguDDatReqInfo + * DatReq from RLC to MAC for dedicated channels of a UE * * * Ret : S16 @@ -3441,44 +1427,51 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguDDatIndInfo + /*rgu_c_001.main_5 - ADD - L2M Support */ +#ifdef LTE_L2_MEAS +S16 cmPkRguDDatReqInfo ( -RguDDatIndInfo *param, +Pst *pst, +RguDDatReqInfo *param, Buffer *mBuf ) #else -PUBLIC S16 cmPkRguDDatIndInfo(param, mBuf) -RguDDatIndInfo *param; -Buffer *mBuf; +S16 cmPkRguDDatReqInfo +( +RguDDatReqInfo *param, +Buffer *mBuf +) #endif { S32 i; + S32 idx; - TRC3(cmPkRguDDatIndInfo); -#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(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--) + { + RguDDatReqPerUe *datReq = ¶m->datReq[idx]; + for (i=RGU_MAX_TB-1; i >= 0; i--) + { + CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf); + } + CMCHKPK(oduUnpackUInt8, datReq->nmbOfTbs, mBuf); + CMCHKPK(oduUnpackUInt32, datReq->transId, mBuf); + CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf); } - CMCHKPK(SPkU8, param->numLch, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); + CMCHKPK(oduUnpackUInt8, param->nmbOfUeGrantPerTti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguDDatIndInfo +* Func : cmUnpkRguDDatReqInfo * * -* Desc : RguDDatIndInfo - * Data Indication from MAC to RLC for dedicated channels of a UE +* Desc : RguDDatReqInfo + * DatReq from RLC to MAC for dedicated channels of a UE * * * Ret : S16 @@ -3488,43 +1481,71 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatIndInfo +#ifdef LTE_L2_MEAS +S16 cmUnpkRguDDatReqInfo ( -RguDDatIndInfo *param, +Pst *pst, +RguDDatReqInfo *param, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDDatIndInfo(param, mBuf) -RguDDatIndInfo *param; -Buffer *mBuf; +S16 cmUnpkRguDDatReqInfo +( +RguDDatReqInfo *param, +Buffer *mBuf +) #endif { S32 i; + /* After Merging from 2.1 to 2.2 */ + /*rgu_c_001.main_5 - ADD - L2M Support */ +#ifdef LTE_L2_MEAS + S16 retVal; +#endif + S32 idx; - TRC3(cmUnpkRguDDatIndInfo); + /* After Merging from 2.1 to 2.2 */ + /*rgu_c_001.main_5 - ADD - L2M Support */ +#ifdef LTE_L2_MEAS + retVal = ROK; +#endif 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(oduPackUInt8, ¶m->nmbOfUeGrantPerTti, mBuf); + for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++) + { + RguDDatReqPerUe *datReq = ¶m->datReq[idx]; + CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf); + CMCHKUNPK(oduPackUInt32, &datReq->transId, mBuf); + CMCHKUNPK(oduPackUInt8, &datReq->nmbOfTbs, mBuf); + /* rgu_c_001.main_4 - Changes for MIMO feature addition */ + for (i=0; ittiCnt, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->burstInd, mBuf); + /* After Merging from 2.1 to 2.2 */ + retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf); + if(retVal != ROK) + { + return RFAILED; + } +#else + CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf); #endif - RETVALUE(ROK); + } + } + return ROK; } + /*********************************************************** * -* Func : cmPkRguCStaRspInfo +* Func : cmPkRguCDatIndInfo * * -* Desc : RguCStaRspInfo - * Status Response from RLC to MAC for common logical channel +* Desc : RguCDatIndInfo + * DatInd from MAC to RLC on CCCH * * * Ret : S16 @@ -3534,52 +1555,35 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaRspInfo +S16 cmPkRguCDatIndInfo ( -RguCStaRspInfo *param, +RguCDatIndInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguCStaRspInfo(param, mBuf) -RguCStaRspInfo *param; -Buffer *mBuf; -#endif { + MsgLen msgLen; - TRC3(cmPkRguCStaRspInfo); - - switch(param->lcType) { - case CM_LTE_LCH_CCCH: - CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf); - break; - case CM_LTE_LCH_BCCH: - case CM_LTE_LCH_PCCH: - CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf); -#ifdef EMTC_ENABLE - CMCHKPK(SPkU8,param->pnb,mBuf); - CMCHKPK(SPkU8,param->emtcDiReason,mBuf); -#endif - break; - default : - RETVALUE(RFAILED); - } - CMCHKPK(SPkS32, param->bo, mBuf); - CMCHKPK(cmPkLteLcType, param->lcType, mBuf); + if (SFndLenMsg(param->pdu, &msgLen) != ROK) + return RFAILED; + if (SCatMsg(mBuf, param->pdu, M1M2) != ROK) + return RFAILED; + SPutMsg(param->pdu); + CMCHKPK(cmPkMsgLen, msgLen, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); + CMCHKPK(cmPkLteRnti, param->rnti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguCStaRspInfo +* Func : cmUnpkRguCDatIndInfo * * -* Desc : RguCStaRspInfo - * Status Response from RLC to MAC for common logical channel +* Desc : RguCDatIndInfo + * DatInd from MAC to RLC on CCCH * * * Ret : S16 @@ -3589,52 +1593,35 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaRspInfo +S16 cmUnpkRguCDatIndInfo ( -RguCStaRspInfo *param, +RguCDatIndInfo *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguCStaRspInfo(param, mBuf) -RguCStaRspInfo *param; -Buffer *mBuf; -#endif { + MsgLen msgLen, totalMsgLen; - TRC3(cmUnpkRguCStaRspInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); + CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf); - CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); - switch(param->lcType) { - case CM_LTE_LCH_BCCH: - case CM_LTE_LCH_PCCH: -#ifdef EMTC_ENABLE - CMCHKUNPK(SUnpkU8,¶m->emtcDiReason , mBuf); - CMCHKUNPK(SUnpkU8,¶m->pnb , mBuf); -#endif - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf); - break; - case CM_LTE_LCH_CCCH: - CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf); - break; - default : - RETVALUE(RFAILED); - } - RETVALUE(ROK); + CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf); + if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) + return RFAILED; + if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK) + return RFAILED; + return ROK; } /*********************************************************** * -* Func : cmPkRguDStaRspInfo +* Func : cmPkRguLchDatInd * * -* Desc : RguDStaRspInfo - * Status Response from RLC to MAC for dedicated logical channel +* Desc : RguLchDatInd + * DatInd Information for a logical channel * * * Ret : S16 @@ -3644,37 +1631,27 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguDStaRspInfo +S16 cmPkRguLchDatInd ( -RguDStaRspInfo *param, +RguLchDatInd *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguDStaRspInfo(param, mBuf) -RguDStaRspInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguDStaRspInfo); - - CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf); + CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguDStaRspInfo +* Func : cmUnpkRguLchDatInd * * -* Desc : RguDStaRspInfo - * Status Response from RLC to MAC for dedicated logical channel +* Desc : RguLchDatInd + * DatInd Information for a logical channel * * * Ret : S16 @@ -3684,37 +1661,26 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDStaRspInfo +S16 cmUnpkRguLchDatInd ( -RguDStaRspInfo *param, +RguLchDatInd *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguDStaRspInfo(param, mBuf) -RguDStaRspInfo *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguDStaRspInfo); - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf); - RETVALUE(ROK); + CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf); + return ROK; } - /*********************************************************** * -* Func : cmPkRguCStaIndInfo +* Func : cmPkRguCStaRspInfo * * -* Desc : RguCStaIndInfo - * Status Indication from MAC to RLC for common logical channel +* Desc : RguCStaRspInfo + * Status Response from RLC to MAC for common logical channel * * * Ret : S16 @@ -3724,40 +1690,45 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaIndInfo +S16 cmPkRguCStaRspInfo ( -RguCStaIndInfo *param, +RguCStaRspInfo *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); + + switch(param->lcType) { + case CM_LTE_LCH_CCCH: + CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf); + break; + case CM_LTE_LCH_BCCH: + case CM_LTE_LCH_PCCH: + CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf); +#ifdef EMTC_ENABLE + CMCHKPK(oduUnpackUInt8,param->pnb,mBuf); + CMCHKPK(oduUnpackUInt8,param->emtcDiReason,mBuf); #endif - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(SPkU32, param->transId, mBuf); + break; + default : + return RFAILED; + } + CMCHKPK(SPkS32, param->bo, mBuf); + CMCHKPK(cmPkLteLcType, param->lcType, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); + return ROK; } /*********************************************************** * -* Func : cmUnpkRguCStaIndInfo +* Func : cmUnpkRguCStaRspInfo * * -* Desc : RguCStaIndInfo - * Status Indication from MAC to RLC for common logical channel +* Desc : RguCStaRspInfo + * Status Response from RLC to MAC for common logical channel * * * Ret : S16 @@ -3767,33 +1738,36 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaIndInfo +S16 cmUnpkRguCStaRspInfo ( -RguCStaIndInfo *param, +RguCStaRspInfo *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); + CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf); + CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); + switch(param->lcType) { + case CM_LTE_LCH_BCCH: + case CM_LTE_LCH_PCCH: +#ifdef EMTC_ENABLE + CMCHKUNPK(oduPackUInt8,¶m->emtcDiReason , mBuf); + CMCHKUNPK(oduPackUInt8,¶m->pnb , mBuf); #endif - RETVALUE(ROK); + CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf); + break; + case CM_LTE_LCH_CCCH: + CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf); + break; + default : + return RFAILED; + } + return ROK; } - /*********************************************************** * @@ -3811,24 +1785,17 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguLchStaInd +S16 cmPkRguLchStaInd ( RguLchStaInd *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguLchStaInd(param, mBuf) -RguLchStaInd *param; -Buffer *mBuf; -#endif { - TRC3(cmPkRguLchStaInd); CMCHKPK(SPkS16, param->totBufSize, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - RETVALUE(ROK); + return ROK; } @@ -3849,24 +1816,16 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguLchStaInd +S16 cmUnpkRguLchStaInd ( RguLchStaInd *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguLchStaInd(param, mBuf) -RguLchStaInd *param; -Buffer *mBuf; -#endif { - TRC3(cmUnpkRguLchStaInd); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf); - RETVALUE(ROK); + return ROK; } @@ -3886,31 +1845,24 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguStaIndTb +S16 cmPkRguStaIndTb ( RguStaIndTb *param, Buffer *mBuf ) -#else -PUBLIC S16 cmPkRguStaIndTb(param, mBuf) -RguStaIndTb *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmPkRguStaIndTb); #ifdef LTE_L2_MEAS - CMCHKPK(SPkU16, param->status, mBuf); - CMCHKPK(SPkU32, param->tbId, mBuf); + CMCHKPK(oduUnpackUInt16, param->status, mBuf); + CMCHKPK(oduUnpackUInt32, param->tbId, mBuf); #endif for (i=param->nmbLch-1; i >= 0; i--) { CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf); } - CMCHKPK(SPkU8, param->nmbLch, mBuf); - RETVALUE(ROK); + CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf); + return ROK; } @@ -3931,133 +1883,23 @@ Buffer *mBuf; * File : * **********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguStaIndTb +S16 cmUnpkRguStaIndTb ( RguStaIndTb *param, Buffer *mBuf ) -#else -PUBLIC S16 cmUnpkRguStaIndTb(param, mBuf) -RguStaIndTb *param; -Buffer *mBuf; -#endif { S32 i; - TRC3(cmUnpkRguStaIndTb); - - CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf); + CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf); for (i=0; inmbLch; i++) { CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf); } #ifdef LTE_L2_MEAS - CMCHKUNPK(SUnpkU32, ¶m->tbId, mBuf); - CMCHKUNPK(SUnpkU16, ¶m->status, mBuf); + CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf); + CMCHKUNPK(oduPackUInt16, ¶m->status, mBuf); #endif - RETVALUE(ROK); -} - - -/*********************************************************** -* -* Func : cmPkRguDStaIndInfo -* -* -* Desc : RguDStaIndInfo - * StaInd from MAC to RLC for dedicated logical channels of a UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguDStaIndInfo -( -RguDStaIndInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguDStaIndInfo(param, mBuf) -RguDStaIndInfo *param; -Buffer *mBuf; -#endif -{ - S32 i; - S32 idx; - - TRC3(cmPkRguDStaIndInfo); - - for(idx = (param->nmbOfUeGrantPerTti - 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(SPkU8, param->nmbOfUeGrantPerTti, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkRguDStaIndInfo -* -* -* Desc : RguDStaIndInfo - * StaInd from MAC to RLC for dedicated logical channels of a UE -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDStaIndInfo -( -RguDStaIndInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDStaIndInfo(param, mBuf) -RguDStaIndInfo *param; -Buffer *mBuf; -#endif -{ - S32 i; - S32 idx; - - TRC3(cmUnpkRguDStaIndInfo); - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf); - for(idx = 0; idx < param->nmbOfUeGrantPerTti; 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); - } - RETVALUE(ROK); + return ROK; } #endif