-\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));
-}