- RETVALUE((*func)(pst, suId, status));
-}
-
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on common
- * channel for transmission
-*
-* @details
-*
-* Function : cmPkRguCDatReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguCDatReqInfo * datReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguCDatReq
-(
-Pst* pst,
-SpId spId,
-RguCDatReqInfo * datReq
-)
-#else
-PUBLIC S16 cmPkRguCDatReq(pst, spId, datReq)
-Pst* pst;
-SpId spId;
-RguCDatReqInfo * datReq;
-#endif
-{
- Buffer *mBuf = NULLP;
- TRC3(cmPkRguCDatReq)
-
- if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU016, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguCDatReqInfo));
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) datReq, mBuf);
- }
- else
- {
- if (cmPkRguCDatReqInfo(datReq, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU017, (ErrVal)0, "Packing failed");
-#endif
- SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo));
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU019, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- datReq = NULLP;
- }
-
- if (SPkS16(spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU018, (ErrVal)0, "Packing failed");
-#endif
-
- if (datReq != NULLP)
- {
- SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo));
- }
-
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- pst->event = (Event) EVTRGUCDATREQ;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on common
- * channel for transmission
-*
-* @details
-*
-* Function : cmUnpkRguCDatReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguCDatReqInfo * datReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguCDatReq
-(
-RguCDatReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguCDatReq(func, pst, mBuf)
-RguCDatReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SpId spId;
- RguCDatReqInfo *datReq;
-
- TRC3(cmUnpkRguCDatReq)
-
- if (SUnpkS16(&spId, mBuf) != ROK) {
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf);
- }
- else
- {
- if ((SGetSBuf(pst->region, pst->pool,
- (Data **)&datReq, sizeof(RguCDatReqInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU020, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- cmMemset((U8*)datReq, (U8)0, sizeof(RguCDatReqInfo));
- if (cmUnpkRguCDatReqInfo(datReq, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU021, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguCDatReqInfo));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, spId, datReq));
-}
-
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on
- * dedicated channel for transmission
-*
-* @details
-*
-* Function : cmPkRguDDatReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguDDatReqInfo * datReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmPkRguDDatReq
-(
-Pst* pst,
-SpId spId,
-RguDDatReqInfo * datReq
-)
-#else
-PUBLIC S16 cmPkRguDDatReq(pst, spId, datReq)
-Pst* pst;
-SpId spId;
-RguDDatReqInfo * datReq;
-#endif
-{
- Buffer *mBuf = NULLP;
- TRC3(cmPkRguDDatReq)
-
- 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");
-#endif
- SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguDDatReqInfo));
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKPK(cmPkPtr,(PTR) datReq, 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
- {
-#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);
- }
-
- 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);
- }
- datReq = NULLP;
- }
- if (SPkS16(spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU024, (ErrVal)0, "Packing failed");
-#endif
- if (datReq != NULLP);
- {
- SPutSBuf(pst->region, pst->pool,
- (Data *)datReq, sizeof(RguDDatReqInfo));
- }
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- pst->event = (Event) EVTRGUDDATREQ;
- RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on
- * dedicated channel for transmission
-*
-* @details
-*
-* Function : cmUnpkRguDDatReq
-*
-* @param[in] Pst* pst
-* @param[in] SpId spId
-* @param[in] RguDDatReqInfo * datReq
-* @return S16
-* -# ROK
-**/
-#ifdef ANSI
-PUBLIC S16 cmUnpkRguDDatReq
-(
-RguDDatReq func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-PUBLIC S16 cmUnpkRguDDatReq(func, pst, mBuf)
-RguDDatReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
- SpId spId;
- RguDDatReqInfo *datReq;
-
- TRC3(cmUnpkRguDDatReq)
-
- if (SUnpkS16(&spId, mBuf) != ROK) {
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
-
- if (pst->selector == RGU_SEL_LWLC)
- {
- CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf);
- }
- else
- {
- if ((SGetSBuf(pst->region, pst->pool,
- (Data **)&datReq, sizeof(RguDDatReqInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- RETVALUE(RFAILED);
- }
- cmMemset((U8*)datReq, (U8)0, sizeof(RguDDatReqInfo));
- /*rgu_c_001.main_5 - ADD - L2M Support */
-#ifdef LTE_L2_MEAS
- if (cmUnpkRguDDatReqInfo(pst,datReq, mBuf) != ROK)
-#else
- if (cmUnpkRguDDatReqInfo(datReq, mBuf) != ROK)
-#endif
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed");
-#endif
- SPutMsg(mBuf);
- SPutSBuf(pst->region, pst->pool, (Data *)datReq,
- sizeof(RguDDatReqInfo));
- RETVALUE(RFAILED);
- }
- }
- SPutMsg(mBuf);
- RETVALUE((*func)(pst, spId, datReq));
-}
-
-\f
-/**
-* @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));
-}
-
-\f
-/**
-* @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));
-}
-
-\f
-/**
-* @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));
-}
-
-\f
-/**
-* @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));
-}
-
-\f
-/**
-* @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));
-}
-
-\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);