-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));
-}
-
-\f
-/**
-* @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);
-}
-
-
-\f
-/***********************************************************
-*
-* 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; loop<param->numLcId; 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));
-}
-
-\f
-/**
-* @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
-
-
-
-\f
-/**
-* @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);
-}
-
-\f
-/**
-* @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);
-}
-
-\f
-/**
-* @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));
-}
-
-\f
-/**
-* @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
-\f
-/**
-* @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));
-}
-\f
-
-/**
-* @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);
- }
- for(idx = hqStaInd->numTbs; idx > 0; idx--)
- {
- CMCHKUNPK(SUnpkU16, &hqStaInd->status[idx - 1], mBuf);
- }
-#ifndef XEON_SPECIFIC_CHANGES
- }
-#endif
- SPutMsg(mBuf);
- (*func)(pst, suId, hqStaInd);
-#ifdef XEON_SPECIFIC_CHANGES
- SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
-#else
- SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
-#endif
- RETVALUE(ROK);
-}
-#endif /* LTE_L2_MEAS */
-
-\f
-/**
-* @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));
-}
-
-\f
-/**
-* @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
-(
-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(cmPkLteLcId, param->lcId, mBuf);
-
- RETVALUE(ROK);
-}
-
-#ifdef ANSI
-PUBLIC S16 cmPkRguUeFlowCntrlInfo
-(
-RguUeFlowCntrlInfo *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
-RguUeFlowCntrlInfo *param;
-Buffer *mBuf;
-#endif
-{
- U32 idx;
-
- TRC3(cmPkRguUeFlowCntrlInfo);
-
- for(idx=(param->numLcs - 1); idx >= 0; idx--)
- {
- cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
- }
- CMCHKPK(SPkU32, param->numLcs, mBuf);
- CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
- RETVALUE(ROK);
-}
-
-#ifdef ANSI
-PUBLIC S16 cmPkRguFlowCntrlInfo
-(
-RguFlowCntrlInd *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
-RguFlowCntrlInd *param;
-Buffer *mBuf;
-#endif
-{
- U32 idx;
-
- TRC3(cmPkRguFlowCntrlInfo);
-
- for (idx=(param->numUes - 1); idx >= 0; idx--)
- {
- cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
- }
- CMCHKPK(SPkU32, param->numUes, mBuf);
- CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
- RETVALUE(ROK);
-}
-\f
-/**
-* @brief Flow Cntrl Indication from MAC to RLC
- * Informs RLC of the LCs on which flow control
- * to be performed.
-*
-* @details
-*
-* Function : cmPkRguFlowCntrlInd
-*
-* @param[in] Pst* pst
-* @param[in] SuId suId
-* @param[in] RguFlowCntrlInd *staInd
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC 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);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) flowCntrlInd, mBuf);
- }
- else
- {
- if (cmPkRguFlowCntrlInfo(flowCntrlInd, 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
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- }
- 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
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUFLOWCNTRLIND;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-#ifdef ANSI
-PUBLIC 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);
-
- RETVALUE(ROK);
-}
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguUeFlowCntrlInfo
-(
-RguUeFlowCntrlInfo *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
-RguUeFlowCntrlInfo *param;
-Buffer *mBuf;
-#endif
-{
- U32 idx;
- TRC3(cmUnpkRguUeFlowCntrlInfo);
- CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
- CMCHKUNPK(SUnpkU32, ¶m->numLcs, mBuf);
- for(idx=0; idx < param->numLcs; idx++)
- {
- cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
- }
- RETVALUE(ROK);
-}
-
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguFlowCntrlInfo
-(
-RguFlowCntrlInd *param,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
-RguFlowCntrlInd *param;
-Buffer *mBuf;
-#endif
-{
- U32 idx;
-
- TRC3(cmUnpkRguFlowCntrlInfo);
-
- CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
- CMCHKUNPK(SUnpkU32, ¶m->numUes, mBuf);
- for (idx=0; idx < param->numUes; idx++)
- {
- cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
- }
- RETVALUE(ROK);
-}
-
-/**
-* @brief Flow control indication from MAC to RLC
-* Informs RLC of the LCs on which flow control to
-* be started
-*
-* @details
-*
-* Function : cmUnpkRguFlowCntrlInd
-*
-* @param[in] RguFlowCntrlInd func
-* @param[in] Pst *pst
-* @param[in] Buffer *mBuf
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC 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)
- 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 *) &flowCntrlInd, mBuf);
- }
- else
- {
- if ((SGetSBuf(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);
- }
- if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, 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 *)flowCntrlInd, sizeof(RguFlowCntrlInd));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, suId, flowCntrlInd));
-}
-
-/***********************************************************
-*
-* Func : cmPkRguPduInfo
-*
-*
-* Desc : RguPduInfo
- * PDU information given on a logical channel
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-#ifdef ANSI
-PUBLIC 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);
- if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
- RETVALUE(RFAILED);
- SPutMsg(param->mBuf[i]);
- CMCHKPK(cmPkMsgLen, msgLen, mBuf);
- }
- CMCHKPK(SPkU8, param->numPdu, mBuf);
- RETVALUE(ROK);
-}
-
-
-\f
-/***********************************************************
-*
-* Func : cmUnpkRguPduInfo
-*
-*
-* Desc : RguPduInfo
- * PDU information given on a logical channel
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-#ifdef ANSI
-PUBLIC 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);
- for (i=0; i<param->numPdu; i++) {
- MsgLen msgLen, totalMsgLen;
- CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
- if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
- RETVALUE(RFAILED);
- if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
- RETVALUE(RFAILED);
- }
- RETVALUE(ROK);
-}
-
-
-\f
-/***********************************************************
-*
-* 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);
-}
-
-
-\f
-/***********************************************************
-*
-* 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);
-}
-
-\f
-/***********************************************************
-*
-* 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,