-#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