-/* rgr_c_001.main_4-ADD-Added for SI Enhancement. */
-#ifdef RGR_SI_SCH
-/***********************************************************
-*
-* Func : cmPkRgrSiCfgReq
-*
-*
-* Desc : SI Configuration Request from RRM to MAC for
-* configuring SI
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmPkRgrSiCfgReq
-(
-Pst* pst,
-SpId spId,
-RgrCfgTransId transId,
-RgrSiCfgReqInfo * cfgReqInfo
-)
-{
- Buffer *mBuf = NULLP;
-
-
- 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)ERGR045, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo,
- sizeof(RgrSiCfgReqInfo));
- return RFAILED;
- }
- if (cmPkRgrSiCfgReqInfo(cfgReqInfo, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR046, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo,
- sizeof(RgrSiCfgReqInfo));
- SPutMsg(mBuf);
- return RFAILED;
- }
- if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR047, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo,
- sizeof(RgrSiCfgReqInfo));
- SPutMsg(mBuf);
- return 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)ERGR048, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo,
- sizeof(RgrSiCfgReqInfo));
- SPutMsg(mBuf);
- return RFAILED;
- }
- if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo,
- sizeof(RgrSiCfgReqInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR049, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- pst->event = (Event) EVTRGRSICFGREQ;
- return (SPstTsk(pst,mBuf));
-}
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrSiCfgReq
-*
-*
-* Desc : SI Configuration Request from RRM to MAC for
-* configuring SI
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmUnpkRgrSiCfgReq
-(
-RgrSiCfgReq func,
-Pst *pst,
-Buffer *mBuf
-)
-{
- SpId spId;
- RgrCfgTransId transId;
- RgrSiCfgReqInfo *cfgReqInfo;
-
-
- if (SUnpkS16(&spId, mBuf) != ROK) {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR050, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
- if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR051, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
- if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&cfgReqInfo,
- sizeof(RgrSiCfgReqInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR052, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
- memset(cfgReqInfo, 0, sizeof(RgrSiCfgReqInfo));
- if (pst->selector == ODU_SELECTOR_LC)
- if (cmUnpkRgrSiCfgReqInfo(cfgReqInfo, mBuf) != ROK) {
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)cfgReqInfo,
- sizeof(RgrSiCfgReqInfo));
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR053, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
- SPutMsg(mBuf);
-
- return ((*func)(pst, spId, transId, cfgReqInfo));
-}
-
-/***********************************************************
-*
-* Func : cmPkRgrSiCfgReqInfo
-*
-*
-* Desc : Basic SI configuration/reconfiguration info at RRM
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmPkRgrSiCfgReqInfo
-(
-RgrSiCfgReqInfo *param,
-Buffer *mBuf
-)
-{
- /* ccpu00111328: S16 is renamed as MsgLen */
- MsgLen msgLen;
-
-
- CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
- CMCHKPK(SPkS32, param->cfgType, mBuf);
- CMCHKPK(oduUnpackUInt8, param->siId, mBuf);
-
- if(NULLP != param->pdu)
- {
- if (SFndLenMsg(param->pdu, &msgLen) != ROK)
- return RFAILED;
- if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
- return RFAILED;
- SPutMsg(param->pdu);
- CMCHKPK(cmPkMsgLen, msgLen, mBuf);
- }
- /*ccpu00140789*/
- else
- {
- CMCHKPK(cmPkMsgLen, 0, mBuf);
- }
-
- return ROK;
-}
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrSiCfgReqInfo
-*
-*
-* Desc : Basic SI configuration/reconfiguration info at RRM
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmUnpkRgrSiCfgReqInfo
-(
-RgrSiCfgReqInfo *param,
-Buffer *mBuf
-)
-{
- MsgLen msgLen, totalMsgLen;
- /*Merge from Mohit Changes*/
- S32 cfgType;
-
-
- SFndLenMsg(mBuf, &msgLen);
- if(msgLen > 0)
- {
- CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
- /*ccpu00140789*/
- if(msgLen > 0)
- {
- if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
- return RFAILED;
- if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
- return RFAILED;
- }
- else
- {
- param->pdu = NULLP;
- }
- }
-
- CMCHKUNPK(oduPackUInt8, ¶m->siId, mBuf);
- /*CMCHKUNPK(SUnpkS32, (S32 *)¶m->cfgType, mBuf);*/
- /*Merge from Mohit Changes*/
- CMCHKUNPK(SUnpkS32,(S32 *)&cfgType, mBuf);
- param->cfgType = (RgrSiCfgType) cfgType;
- CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
-
- return ROK;
-}
-
-
-\f
-/***********************************************************
-*
-* Func : cmPkRgrWarningSiCfgReq
-*
-*
-* Desc : SI Configuration Request from RRM to MAC for
-* configuring warning SI
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmPkRgrWarningSiCfgReq
-(
-Pst* pst,
-SpId spId,
-RgrCfgTransId transId,
-RgrWarningSiCfgReqInfo * warningSiCfgReqInfo
-)
-{
- Buffer *mBuf = NULLP;
-
-
- 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)ERGR061, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
- sizeof(RgrWarningSiCfgReqInfo));
- return RFAILED;
- }
-
- if (cmPkRgrWarningSiCfgReqInfo(pst, warningSiCfgReqInfo, mBuf) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR062, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
- sizeof(RgrWarningSiCfgReqInfo));
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- if (cmPkRgrCfgTransId(&transId, mBuf) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR063, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
- sizeof(RgrWarningSiCfgReqInfo));
- SPutMsg(mBuf);
- return 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)ERGR064, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
- sizeof(RgrWarningSiCfgReqInfo));
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- /* if the application wants to retain this structure, the below
- * code should be removed */
- if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
- sizeof(RgrWarningSiCfgReqInfo)) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR065, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- pst->event = (Event) EVTRGRWARNINGSICFGREQ;
- return (SPstTsk(pst,mBuf));
-}/*cmPkRgrWarningSiCfgReq*/
-
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrWarningSiCfgReq
-*
-*
-* Desc : SI Configuration Request from RRM to MAC for
-* configuring warning SI
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmUnpkRgrWarningSiCfgReq
-(
-RgrWarningSiCfgReq func,
-Pst *pst,
-Buffer *mBuf
-)
-{
- SpId spId;
- RgrCfgTransId transId;
- RgrWarningSiCfgReqInfo *warningSiCfgReqInfo;
-
-
- if (SUnpkS16(&spId, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR066, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR067, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&warningSiCfgReqInfo,
- sizeof(RgrWarningSiCfgReqInfo))) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR068, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
-
- if (pst->selector == ODU_SELECTOR_LC)
- {
- if (cmUnpkRgrWarningSiCfgReqInfo(pst, warningSiCfgReqInfo, mBuf) != ROK)
- {
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
- sizeof(RgrWarningSiCfgReqInfo));
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR069, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
- }
- SPutMsg(mBuf);
-
- return ((*func)(pst, spId, transId, warningSiCfgReqInfo));
-} /* cmUnpkRgrWarningSiCfgReq */
-
-\f
-/***********************************************************
-*
-* Func : cmPkRgrWarningSiCfgReqInfo
-*
-*
-* Desc : Basic warning SI configuration/reconfiguration
-* info at RRM
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmPkRgrWarningSiCfgReqInfo
-(
-Pst *pst,
-RgrWarningSiCfgReqInfo *param,
-Buffer *mBuf
-)
-{
- MsgLen msgLen;
- uint32_t count;
- CmLList *node, *prevNode;
- RgrSegmentInfo *pdu;
-
-
- CMCHKPK(oduUnpackUInt8, param->emtcEnable, mBuf);
-
- CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
- CMCHKPK(oduUnpackUInt8, param->siId, mBuf);
-
- count = param->siPduLst.count;
- node = param->siPduLst.last;
- while (node)
- {
- pdu = (RgrSegmentInfo *)node->node;
- prevNode= node->prev;
- if(NULLP != pdu)
- {
- if (SFndLenMsg(pdu->pdu, &msgLen) != ROK)
- return RFAILED;
- if (SCatMsg(mBuf, pdu->pdu, M1M2) != ROK)
- return RFAILED;
- /* The PDU is not Released. This has to be done by
- * the caller of the packing function */
- CMCHKPK(cmPkMsgLen, msgLen, mBuf);
- SPutMsg(pdu->pdu);
- }
- cmLListDelFrm(¶m->siPduLst, node);
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)node, sizeof(RgrSegmentInfo));
- node= prevNode;
- }
- CMCHKPK(oduUnpackUInt32, count, mBuf);
- return ROK;
-}
-
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrWarningSiCfgReqInfo
-*
-*
-* Desc : Unpack warning SI configuration info at SCH
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmUnpkRgrWarningSiCfgReqInfo
-(
-Pst *pst,
-RgrWarningSiCfgReqInfo *param,
-Buffer *mBuf
-)
-{
- MsgLen msgLen, totalMsgLen;
- uint32_t count, loopCnt;
- Buffer *pdu;
- CmLList *node;
-
-
- cmLListInit(¶m->siPduLst);
- CMCHKUNPK(oduPackUInt32, &count, mBuf);
- for (loopCnt=0; loopCnt<count; loopCnt++)
- {
- if(SFndLenMsg(mBuf, &msgLen) != ROK)
- {
- return RFAILED;
- }
-
- if(msgLen > 0)
- {
- CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
- if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
- {
- return RFAILED;
- }
- if (SSegMsg(mBuf, totalMsgLen-msgLen, &pdu) != ROK)
- {
- return RFAILED;
- }
- }
- else
- {
- return RFAILED;
- }
- if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&node,
- sizeof(CmLList))) != ROK)
- return RFAILED;
- node->node = (PTR)pdu;
- cmLListAdd2Tail(¶m->siPduLst, node);
- }
-
- CMCHKUNPK(oduPackUInt8, ¶m->siId, mBuf);
- CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
- CMCHKPK(oduPackUInt8, ¶m->emtcEnable, mBuf);
-
- return ROK;
-}
-
-\f
-/***********************************************************
-*
-* Func : cmPkRgrWarningSiStopReq
-*
-* Desc : To stop the broadcast for SIB10, SIB11 and SIB12.
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-**********************************************************/
-S16 cmPkRgrWarningSiStopReq
-(
-Pst *pst,
-SpId spId,
-RgrCfgTransId transId,
-uint8_t siId
-)
-{
- Buffer *mBuf = NULLP;
-
-
- 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)ERGR070, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- CMCHKPK(oduUnpackUInt8, siId, mBuf);
-
-
- if (cmPkRgrCfgTransId(&transId, mBuf) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR082, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return 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)ERGR071, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- pst->event = (Event) EVTRGRWARNINGSISTOPREQ;
- return (SPstTsk(pst,mBuf));
-}/*cmPkRgrWarningSiStopReq */
-
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrWarningSiStopReq
-*
-* Desc : To stop the broadcast for SIB10, SIB11 and SIB12.
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-**********************************************************/
-S16 cmUnpkRgrWarningSiStopReq
-(
-RgrWarningSiStopReq func,
-Pst *pst,
-Buffer *mBuf
-)
-{
- SpId spId;
- uint8_t siId;
- RgrCfgTransId transId;
-
-
- if (SUnpkS16(&spId, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR072, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR083, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- CMCHKUNPK(oduPackUInt8, &siId, mBuf);
-
- SPutMsg(mBuf);
-
- return ((*func)(pst, spId, transId, siId));
-} /*cmUnpkRgrWarningSiStopReq */
-
-\f
-/***********************************************************
-*
-* Func : cmPkRgrWarningSiCfgCfm
-*
-*
-* Desc : Warning SI Configuration Confirm from MAC to RRM
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmPkRgrWarningSiCfgCfm
-(
-Pst* pst,
-SuId suId,
-RgrCfgTransId transId,
-uint8_t siId,
-uint8_t status
-)
-{
- Buffer *mBuf = NULLP;
-
-
- 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)ERGR073, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if (oduUnpackUInt8(status, mBuf) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR074, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- if (oduUnpackUInt8(siId, mBuf) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR075, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- if (cmPkRgrCfgTransId(&transId, mBuf) != ROK)
- {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR076, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return 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)ERGR077, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- pst->event = (Event) EVTRGRWARNINGSICFGCFM;
- return (SPstTsk(pst,mBuf));
-} /* cmPkRgrWarningSiCfgCfm */
-
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrwarningSiCfgCfm
-*
-*
-* Desc : Warning SI Configuration Confirm from MAC to RRM
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmUnpkRgrWarningSiCfgCfm
-(
-RgrWarningSiCfgCfm func,
-Pst *pst,
-Buffer *mBuf
-)
-{
- SuId suId;
- uint8_t siId;
- RgrCfgTransId transId;
- uint8_t status;
-
-
- if (SUnpkS16(&suId, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR078, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR079, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if (oduPackUInt8(&siId, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR080, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if (oduPackUInt8(&status, mBuf) != ROK)
- {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR081, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
- SPutMsg(mBuf);
- return ((*func)(pst, suId, transId, siId, status));
-}/* cmUnpkRgrwarningSiCfgCfm */
-#endif/*RGR_SI_SCH*/
-
-/* LTE_ADV_FLAG_REMOVED_START */
-/***********************************************************
-*
-* Func : cmPkRgrLoadInfReq
-*
-*
-* Desc : LOAD INF Configuration Request from RRM to MAC for
-* configuring RNTP, ABS etc
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmPkRgrLoadInfReq
-(
-Pst* pst,
-SpId spId,
-RgrCfgTransId transId,
-RgrLoadInfReqInfo * loadInfReq
-)
-{
- Buffer *mBuf = NULLP;
-
-
- 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)ERGR045, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq,
- sizeof(RgrLoadInfReqInfo));
- return RFAILED;
- }
- if (cmPkRgrLoadInfReqInfo(loadInfReq, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR046, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq,
- sizeof(RgrLoadInfReqInfo));
- SPutMsg(mBuf);
- return RFAILED;
- }
- if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR047, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq,
- sizeof(RgrLoadInfReqInfo));
- SPutMsg(mBuf);
- return 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)ERGR048, (ErrVal)0, "Packing failed");
-#endif
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq,
- sizeof(RgrLoadInfReqInfo));
- SPutMsg(mBuf);
- return RFAILED;
- }
- if (SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq,
- sizeof(RgrLoadInfReqInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR049, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- pst->event = (Event) EVTRGRLOADINFREQ;
- return (SPstTsk(pst,mBuf));
-}
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrLoadInfReq
-*
-*
-* Desc : LOAD INF Configuration Request from RRM to MAC for
-* configuring RNTP, ABS etc
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmUnpkRgrLoadInfReq
-(
-RgrLoadInfReq func,
-Pst *pst,
-Buffer *mBuf
-)
-{
- SpId spId;
- RgrCfgTransId transId;
- RgrLoadInfReqInfo *loadInfReq;
-
-
- if (SUnpkS16(&spId, mBuf) != ROK) {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR050, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if (cmUnpkRgrCfgTransId(&transId, mBuf) != ROK) {
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR051, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
-
- if ((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&loadInfReq,
- sizeof(RgrLoadInfReqInfo))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR052, (ErrVal)0, "Packing failed");
-#endif
- SPutMsg(mBuf);
- return RFAILED;
- }
-
- memset(loadInfReq, 0, sizeof(RgrLoadInfReqInfo));
-
- if (pst->selector == ODU_SELECTOR_LC)
- if (cmUnpkRgrLoadInfReqInfo(loadInfReq, mBuf) != ROK) {
- SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)loadInfReq,
- sizeof(RgrLoadInfReqInfo));
- SPutMsg(mBuf);
-#if (ERRCLASS & ERRCLS_ADD_RES)
- SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
- __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
- (ErrVal)ERGR053, (ErrVal)0, "Packing failed");
-#endif
- return RFAILED;
- }
- SPutMsg(mBuf);
-
- return ((*func)(pst, spId, transId, loadInfReq));
-}
-
-/***********************************************************
-*
-* Func : cmPkRgrLoadInfReqInfo
-*
-*
-* Desc : Basic LOAD INF configuration/reconfiguration info at RRM
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmPkRgrLoadInfReqInfo
-(
-RgrLoadInfReqInfo *param,
-Buffer *mBuf
-)
-{
-
- CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
- CMCHKPK(oduUnpackUInt8, param->rgrCcPHighStartRb, mBuf);
- CMCHKPK(oduUnpackUInt8, param->rgrCcPHighEndRb, mBuf);
-
- return ROK;
-}
-\f
-/***********************************************************
-*
-* Func : cmUnpkRgrLoadInfReqInfo
-*
-*
-* Desc : Basic LOAD INF configuration/reconfiguration info at RRM
-*
-*
-* Ret : S16
-*
-* Notes:
-*
-* File :
-*
-**********************************************************/
-S16 cmUnpkRgrLoadInfReqInfo
-(
-RgrLoadInfReqInfo *param,
-Buffer *mBuf
-)
-{
-
- CMCHKUNPK(oduPackUInt8, ¶m->rgrCcPHighEndRb, mBuf);
- CMCHKUNPK(oduPackUInt8, ¶m->rgrCcPHighStartRb, mBuf);
- CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
-
- return ROK;
-}
-/* LTE_ADV_FLAG_REMOVED_END */