1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /********************************************************************20**
21 Name: UDX RRC Control Interface
25 Desc: This file Contains the packing and unpacking functions for
30 *********************************************************************21*/
31 #include "common_def.h"
32 #include "rgu.h" /* RGU interface includes*/
33 #include "lkw.h" /* LKW defines */
34 #include "ckw.h" /* CKW defines */
36 /* extern (.x) include files */
38 #include "lkw.x" /* LKW */
39 #include "ckw.x" /* CKW */
42 #include "rlc_utils.h"
43 #include "rlc_dl_ul_inf.h" /* UDX defines */
51 * Desc: pack the primitive UdxBndReq
60 static S16 cmUnpkUdxStruct(Buffer *srcMBuf,uint32_t offset,uint8_t *dstBuf,uint32_t size)
64 return (SCpyMsgFix(srcMBuf,offset,size,dstBuf,&tmpLen));
66 } /*end of function cmPkUdxBndReq*/
72 * Desc: pack the primitive UdxBndReq
81 static S16 cmPkUdxStruct(uint8_t *srcBuf,MsgLen size,Buffer *dstMBuf)
84 return (SAddPstMsgMult(srcBuf,size,dstMBuf));
86 } /*end of function cmPkUdxBndReq*/
91 * Desc: pack the primitive UdxBndReq
100 S16 cmPkUdxBndReq(Pst *pst,SuId suId,SpId spId)
106 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
108 #if (ERRCLASS & ERRCLS_ADD_RES)
111 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
112 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
113 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
115 #endif /* ERRCLASS & ERRCLS_ADD_RES */
118 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
119 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
120 pst->event = (Event) UDX_EVT_BND_REQ;
122 return (SPstTsk(pst,mBuf));
123 } /*end of function cmPkUdxBndReq*/
127 * Fun: cmPkUdxUbndReq
129 * Desc: pack the primitive UdxUbndReq
138 S16 cmPkUdxUbndReq(Pst *pst,SpId spId,Reason reason)
144 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
146 #if (ERRCLASS & ERRCLS_ADD_RES)
149 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
150 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
151 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
153 #endif /* ERRCLASS & ERRCLS_ADD_RES */
156 CMCHKPKLOG(SPkS16, reason, mBuf, EUDXXXX, pst);
157 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
158 pst->event = (Event) UDX_EVT_UBND_REQ;
160 return (SPstTsk(pst,mBuf));
161 } /*end of function cmPkUdxUbndReq*/
167 * Desc: pack the primitive UdxBndCfm
176 S16 cmPkUdxBndCfm(Pst *pst,SuId suId,uint8_t status)
182 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
184 #if (ERRCLASS & ERRCLS_ADD_RES)
187 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
188 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
189 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
192 #endif /* ERRCLASS & ERRCLS_ADD_RES */
195 CMCHKPKLOG(oduPackUInt8, status, mBuf, EUDXXXX, pst);
196 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
197 pst->event = (Event) UDX_EVT_BND_CFM;
199 return (SPstTsk(pst,mBuf));
200 } /*end of function cmPkUdxBndCfm*/
207 * Desc: pack the primitive KwUiUdxCfgReq
216 S16 cmPkUdxCfgReq(Pst *pst,SpId spId,RlcCfgInfo *cfgInfo)
222 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
224 #if (ERRCLASS & ERRCLS_ADD_RES)
227 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
228 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
229 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
231 #endif /* ERRCLASS & ERRCLS_ADD_RES */
235 switch(pst->selector)
240 cmPkUdxStruct((uint8_t *)cfgInfo, sizeof(RlcCfgInfo),mBuf);
241 /* Need Not free CfgInfo here as it is stored
247 CMCHKPKLOG(oduPackPointer,(PTR)cfgInfo,mBuf,EUDXXXX,pst);
253 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
254 pst->event = (Event) UDX_EVT_CFG_REQ;
256 return (SPstTsk(pst,mBuf));
257 } /* cmPkUdxCfgReq */
264 * Desc: pack the primitive KwUiUdxCfgCfm
273 S16 cmPkUdxCfgCfm(Pst *pst,SuId suId,RlcCfgCfmInfo *cfgCfmInfo)
279 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
281 #if (ERRCLASS & ERRCLS_ADD_RES)
284 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
285 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
286 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
288 #endif /* ERRCLASS & ERRCLS_ADD_RES */
292 switch(pst->selector)
297 cmPkUdxStruct((uint8_t *)cfgCfmInfo, sizeof(RlcCfgCfmInfo),mBuf);
298 /* Need to free the cfgCfmInfo here as it is allocated
299 buffer call SPutStaticBuffer */
300 RLC_FREE_SHRABL_BUF(pst->region, pst->pool, cfgCfmInfo, sizeof(RlcCfgCfmInfo));
305 CMCHKPKLOG(oduPackPointer,(PTR)cfgCfmInfo,mBuf,EUDXXXX,pst);
311 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
312 pst->event = (Event) UDX_EVT_CFG_CFM;
314 return (SPstTsk(pst,mBuf));
315 } /* cmPkUdxCfgCfm */
320 * Fun: cmPkUdxUeIdChgReq
322 * Desc: pack the primitive KwUiUdxUeIdChgReq
331 S16 cmPkUdxUeIdChgReq
341 Buffer *mBuf = NULLP;
344 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
346 #if (ERRCLASS & ERRCLS_ADD_RES)
349 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
350 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
351 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
353 #endif /* ERRCLASS & ERRCLS_ADD_RES */
358 switch(pst->selector)
363 cmPkUdxStruct((uint8_t *)newUeInfo, sizeof(CkwUeInfo),mBuf);
364 cmPkUdxStruct((uint8_t *)ueInfo, sizeof(CkwUeInfo),mBuf);
365 /* No need to free ueInfo here as it is stored */
370 CMCHKPKLOG(oduPackPointer,(PTR)newUeInfo,mBuf,EUDXXXX,pst);
371 CMCHKPKLOG(oduPackPointer,(PTR)ueInfo,mBuf,EUDXXXX,pst);
376 DU_LOG("\nERROR --> RLC : cmPkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
381 CMCHKPKLOG(oduPackUInt32, transId, mBuf, EUDXXXX, pst);
382 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
383 pst->event = (Event) UDX_EVT_UEIDCHG_REQ;
385 return (SPstTsk(pst, mBuf));
387 } /* cmPkUdxUeIdChgReq */
391 * Fun: cmPkUdxUeIdChgCfm
393 * Desc: pack the primitive KwUiUdxUeIdChgCfm
402 S16 cmPkUdxUeIdChgCfm(Pst *pst,SuId suId,uint32_t transId,CmStatus status)
405 Buffer *mBuf = NULLP;
407 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
409 #if (ERRCLASS & ERRCLS_ADD_RES)
412 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
413 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
414 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
416 #endif /* ERRCLASS & ERRCLS_ADD_RES */
421 CMCHKPK(cmPkCmStatus, &status, mBuf);
422 CMCHKPKLOG(oduPackUInt32, transId, mBuf, EUDXXXX, pst);
423 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
424 pst->event = (Event) UDX_EVT_UEIDCHG_CFM;
426 return (SPstTsk(pst, mBuf));
428 } /* cmPkUdxUeIdChgCfm */
432 * Fun: cmPkUdxStaUpdCfm
434 * Desc: pack the primitive KwUiUdxUeIdChgCfm
443 S16 cmPkUdxStaUpdCfm(Pst *pst,SuId suId,CmLteRlcId *rlcId,RlcUdxBufLst *pStaPdu)
446 Buffer *mBuf = NULLP;
448 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
450 #if (ERRCLASS & ERRCLS_ADD_RES)
453 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
454 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
455 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
457 #endif /* ERRCLASS & ERRCLS_ADD_RES */
462 switch (pst->selector)
466 cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxBufLst),mBuf);
467 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
472 CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
473 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
477 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
478 pst->event = (Event) UDX_EVT_STA_UPD_CFM;
480 return (SPstTsk(pst, mBuf));
482 } /* cmPkUdxStaUpdCfm */
486 * Fun: cmPkUdxStaProhTmrStart
488 * Desc: pack the primitive
497 S16 cmPkUdxStaProhTmrStart(Pst *pst,SpId spId,CmLteRlcId *rlcId)
500 Buffer *mBuf = NULLP;
502 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
504 #if (ERRCLASS & ERRCLS_ADD_RES)
507 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
508 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
509 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
511 #endif /* ERRCLASS & ERRCLS_ADD_RES */
516 switch (pst->selector)
520 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
525 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
529 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
530 pst->event = (Event) UDX_EVT_STA_PHBT_TMR_START;
532 return (SPstTsk(pst, mBuf));
534 } /* cmPkUdxStaProhTmrStart */
538 * Fun: cmPkUdxStaUpdReq
540 * Desc: pack the primitive KwUiUdxUeIdChgCfm
549 S16 cmPkUdxStaUpdReq(Pst *pst,SpId spId,CmLteRlcId *rlcId,RlcUdxStaPdu *pStaPdu)
552 Buffer *mBuf = NULLP;
554 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
556 #if (ERRCLASS & ERRCLS_ADD_RES)
559 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
560 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
561 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
563 #endif /* ERRCLASS & ERRCLS_ADD_RES */
568 switch (pst->selector)
572 cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxStaPdu),mBuf);
573 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
574 RLC_FREE_SHRABL_BUF(pst->region,pst->pool, pStaPdu, sizeof(RlcUdxStaPdu));
580 CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
581 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
585 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
586 pst->event = (Event) UDX_EVT_STA_UPD_REQ;
588 return (SPstTsk(pst, mBuf));
590 } /* cmPkUdxStaUpdReq */
594 * Fun: cmPkUdxStaPduReq
596 * Desc: pack the primitive KwUiUdxUeIdChgCfm
605 S16 cmPkUdxStaPduReq(Pst *pst,SpId spId,CmLteRlcId *rlcId,RlcUdxDlStaPdu *pStaPdu)
608 Buffer *mBuf = NULLP;
610 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
612 #if (ERRCLASS & ERRCLS_ADD_RES)
615 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
616 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
617 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
619 #endif /* ERRCLASS & ERRCLS_ADD_RES */
624 switch (pst->selector)
628 cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxDlStaPdu),mBuf);
629 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
630 /* Free status Pdu here for LC */
631 RLC_FREE_SHRABL_BUF(pst->region,pst->pool, pStaPdu, sizeof(RlcUdxDlStaPdu));
636 CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
637 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
641 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
642 pst->event = (Event) UDX_EVT_STA_PDU_REQ;
644 return (SPstTsk(pst, mBuf));
646 } /* cmPkUdxStaUpdReq */
651 * Fun: cmPkUdxL2MeasReq
659 S16 cmPkUdxL2MeasReq(Pst *pst,RlcL2MeasReqEvt *measReqEvt)
662 Buffer *mBuf = NULLP;
664 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
666 #if (ERRCLASS & ERRCLS_ADD_RES)
669 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
670 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
671 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
673 #endif /* ERRCLASS & ERRCLS_ADD_RES */
678 switch (pst->selector)
682 cmPkUdxStruct((uint8_t *)measReqEvt, sizeof(RlcL2MeasReqEvt),mBuf);
687 CMCHKPK(oduPackPointer,(PTR) measReqEvt, mBuf);
691 pst->event = (Event) UDX_EVT_L2MEAS_REQ;
693 return (SPstTsk(pst, mBuf));
695 } /* cmPkUdxStaUpdReq */
699 * Fun: cmPkUdxL2MeasReq
707 S16 cmPkUdxL2MeasSendReq(Pst *pst,uint8_t measType)
710 Buffer *mBuf = NULLP;
712 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
714 #if (ERRCLASS & ERRCLS_ADD_RES)
717 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
718 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
719 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
721 #endif /* ERRCLASS & ERRCLS_ADD_RES */
726 switch (pst->selector)
731 CMCHKPKLOG(oduPackUInt8, measType, mBuf, EUDXXXX, pst);
735 pst->event = (Event) UDX_EVT_L2MEAS_SEND_REQ;
737 return (SPstTsk(pst, mBuf));
743 * Fun: cmPkUdxL2MeasStopReq
751 S16 cmPkUdxL2MeasStopReq(Pst *pst,uint8_t measType)
754 Buffer *mBuf = NULLP;
756 if((ret1 = ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf)) != ROK)
758 #if (ERRCLASS & ERRCLS_ADD_RES)
761 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
762 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
763 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
765 #endif /* ERRCLASS & ERRCLS_ADD_RES */
770 switch (pst->selector)
775 CMCHKPKLOG(oduPackUInt8, measType, mBuf, EUDXXXX, pst);
779 pst->event = (Event) UDX_EVT_L2MEAS_STOP_REQ;
781 return (SPstTsk(pst, mBuf));
785 /******************************************************************************
787 *****************************************************************************/
791 * Fun: cmUnpkUdxBndReq
793 * Desc: unpack the primitive UdxBndReq
802 S16 cmUnpkUdxBndReq(UdxBndReq func,Pst *pst,Buffer *mBuf)
807 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
808 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
809 ODU_PUT_MSG_BUF(mBuf);
811 return ((*func)(pst, suId, spId));
812 } /*end of function cmUnpkUdxBndReq*/
816 * Fun: cmUnpkUdxUbndReq
818 * Desc: unpack the primitive UdxUbndReq
827 S16 cmUnpkUdxUbndReq(UdxUbndReq func,Pst *pst,Buffer *mBuf)
832 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
833 CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, EUDXXXX, pst);
834 ODU_PUT_MSG_BUF(mBuf);
835 return ((*func)(pst, spId, reason));
836 } /*end of function cmUnpkUdxUbndReq*/
840 * Fun: cmUnpkUdxBndCfm
842 * Desc: unpack the primitive UdxBndCfm
851 S16 cmUnpkUdxBndCfm(UdxBndCfm func,Pst *pst,Buffer *mBuf)
856 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
857 CMCHKUNPKLOG(oduUnpackUInt8, &status, mBuf, EUDXXXX, pst);
858 ODU_PUT_MSG_BUF(mBuf);
860 return ((*func)(pst, suId, status));
861 } /*end of function cmUnpkUdxBndCfm*/
866 * Fun: cmUnpkUdxCfgReq
868 * Desc: unpack the primitive KwUiUdxCfgReq
877 S16 cmUnpkUdxCfgReq(UdxCfgReq func,Pst *pst,Buffer *mBuf)
879 #if(ERRCLASS & ERRCLS_DEBUG)
881 #endif /* ERRCLASS & ERRCLS_DEBUG */
883 RlcCfgInfo tmpCfgInfo;
884 RlcCfgInfo *cfgInfo; /*stack Variable because it is not freed */
886 CMCHKUNPK(SUnpkS16, &(spId), mBuf);
887 switch(pst->selector)
892 #if(ERRCLASS & ERRCLS_DEBUG)
893 ret1 = cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpCfgInfo,sizeof(RlcCfgInfo));
896 ODU_PUT_MSG_BUF(mBuf);
897 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
898 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
899 (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
903 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpCfgInfo,sizeof(RlcCfgInfo));
904 #endif /* ERRCLASS & ERRCLS_DEBUG */
905 cfgInfo = &tmpCfgInfo;
910 CMCHKUNPK(oduUnpackPointer,(PTR *) &cfgInfo, mBuf);
915 ODU_PUT_MSG_BUF(mBuf);
917 return ((*func)(pst, spId, cfgInfo));
918 } /* cmUnpkUdxCfgReq */
923 * Fun: cmUnpkUdxCfgCfm
925 * Desc: unpack the primitive KwUiUdxCfgCfm
934 S16 cmUnpkUdxCfgCfm(UdxCfgCfm func,Pst *pst,Buffer *mBuf)
938 RlcCfgCfmInfo *cfgCfmInfo = NULLP;
940 CMCHKUNPK(SUnpkS16, &suId, mBuf);
942 switch(pst->selector)
947 RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, cfgCfmInfo, sizeof(RlcCfgCfmInfo))
948 if(cfgCfmInfo == NULL)
950 #if (ERRCLASS & ERRCLS_ADD_RES)
951 if(cfgCfmInfo == NULL)
953 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
954 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
955 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
957 #endif /* ERRCLASS & ERRCLS_ADD_RES */
961 ret1 = cmUnpkUdxStruct(mBuf,0,(uint8_t *)cfgCfmInfo, sizeof(RlcCfgCfmInfo));
964 #if(ERRCLASS & ERRCLS_DEBUG)
965 ODU_PUT_MSG_BUF(mBuf);
966 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
967 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
968 (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
970 #endif /* ERRCLASS & ERRCLS_DEBUG */
976 CMCHKUNPK(oduUnpackPointer,(PTR *) &cfgCfmInfo, mBuf);
981 ODU_PUT_MSG_BUF(mBuf);
983 return ((*func)(pst, suId, cfgCfmInfo));
984 } /* cmUnpkUdxCfgCfm */
988 * Fun: cmUnpkUdxUeIdChgReq
990 * Desc: unpack the primitive KwUiUdxUeIdChgReq
999 S16 cmUnpkUdxUeIdChgReq(UdxUeIdChgReq func,Pst *pst,Buffer *mBuf)
1002 uint32_t transId = 0;
1003 CkwUeInfo tmpUeInfo;
1004 CkwUeInfo tmpNewUeInfo;
1006 CkwUeInfo *newUeInfo;
1008 CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1009 CMCHKUNPKLOG(oduUnpackUInt32, &transId, mBuf, EUDXXXX, pst);
1011 switch(pst->selector)
1016 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpNewUeInfo, sizeof(CkwUeInfo));
1017 cmUnpkUdxStruct(mBuf,sizeof(CkwUeInfo),(uint8_t *)&tmpUeInfo, sizeof(CkwUeInfo));
1019 ueInfo = &tmpUeInfo;
1020 newUeInfo = &tmpNewUeInfo;
1025 CMCHKUNPK(oduUnpackPointer,(PTR *) &ueInfo, mBuf);
1026 CMCHKUNPK(oduUnpackPointer,(PTR *) &newUeInfo, mBuf);
1031 DU_LOG("\nERROR --> RLC : cmUnpkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
1037 ODU_PUT_MSG_BUF(mBuf);
1039 return ((*func)(pst, spId, transId, ueInfo, newUeInfo));
1041 } /* cmUnpkUdxUeIdChgReq */
1045 * Fun: cmUnpkUdxUeIdChgCfm
1047 * Desc: unpack the primitive KwUiUdxUeIdChgCfm
1056 S16 cmUnpkUdxUeIdChgCfm(UdxUeIdChgCfm func,Pst *pst,Buffer *mBuf)
1059 uint32_t transId = 0;
1062 memset(&status, 0, sizeof(CmStatus));
1064 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1065 CMCHKUNPKLOG(oduUnpackUInt32, &transId, mBuf, EUDXXXX, pst);
1067 CMCHKUNPK(cmUnpkCmStatus, &status, mBuf);
1069 ODU_PUT_MSG_BUF(mBuf);
1071 return ((*func)(pst, suId, transId, status));
1073 } /* cmUnpkUdxUeIdChgCfm */
1077 * Fun: cmUnpkUdxStaUpdCfm
1079 * Desc: unpack the primitive KwUiUdxUeIdChgCfm
1088 S16 cmUnpkUdxStaUpdCfm(UdxStaUpdCfm func,Pst *pst,Buffer *mBuf)
1091 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1092 RlcUdxBufLst *pBufLst = NULLP; /* KW_FIX*/
1094 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1095 switch (pst->selector)
1103 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1104 CMCHKUNPK(oduUnpackPointer, (PTR *)&pBufLst,mBuf);
1109 ODU_PUT_MSG_BUF(mBuf);
1111 return ((*func)(pst, suId, rlcId, pBufLst));
1113 } /* cmUnpkUdxUeIdChgCfm */
1117 * Fun: cmUnpkUdxStaUpdReq
1119 * Desc: unpack the primitive KwUiUdxUeIdChgCfm
1128 S16 cmUnpkUdxStaUpdReq(UdxStaUpdReq func,Pst *pst,Buffer *mBuf)
1131 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1132 RlcUdxStaPdu *pStaPdu = NULLP; /* KW_FIX */
1133 CmLteRlcId tmpRlcId;
1135 CMCHKUNPK(SUnpkS16, &spId, mBuf);
1136 switch (pst->selector)
1140 RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, pStaPdu, sizeof(RlcUdxStaPdu))
1141 if(pStaPdu == NULLP)
1143 #if (ERRCLASS & ERRCLS_ADD_RES)
1144 if(pStaPdu == NULLP)
1146 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1147 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1148 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
1150 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1153 cmUnpkUdxStruct(mBuf,0,(uint8_t *)pStaPdu, sizeof(RlcUdxStaPdu));
1154 cmUnpkUdxStruct(mBuf,sizeof(RlcUdxStaPdu),(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1160 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1161 CMCHKUNPK(oduUnpackPointer, (PTR *)&pStaPdu,mBuf);
1166 ODU_PUT_MSG_BUF(mBuf);
1168 return ((*func)(pst, spId, rlcId, pStaPdu));
1170 } /* cmUnpkUdxUeIdChgCfm */
1174 * Fun: cmUnpkUdxStaPduReq
1176 * Desc: unpack the primitive KwUiUdxUeIdChgCfm
1185 S16 cmUnpkUdxStaPduReq(UdxStaPduReq func,Pst *pst,Buffer *mBuf)
1188 CmLteRlcId tmpRlcId;
1189 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1190 RlcUdxDlStaPdu *pStaPdu = NULLP; /* KW_FIX */
1192 CMCHKUNPK(SUnpkS16, &spId, mBuf);
1193 switch (pst->selector)
1197 RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, pStaPdu, sizeof(RlcUdxDlStaPdu))
1198 if(pStaPdu == NULLP)
1200 #if (ERRCLASS & ERRCLS_ADD_RES)
1201 if(pStaPdu == NULLP)
1203 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1204 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1205 (ErrVal)EUDXXXX, (ErrVal)0, "ODU_GET_MSG_BUF() failed");
1207 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1210 cmUnpkUdxStruct(mBuf,0, (uint8_t *)pStaPdu, sizeof(RlcUdxDlStaPdu));
1211 cmUnpkUdxStruct(mBuf,sizeof(RlcUdxDlStaPdu),(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1217 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1218 CMCHKUNPK(oduUnpackPointer, (PTR *)&pStaPdu,mBuf);
1223 ODU_PUT_MSG_BUF(mBuf);
1224 return ((*func)(pst, spId, rlcId, pStaPdu));
1226 } /* cmUnpkUdxUeIdChgCfm */
1230 * Fun: cmUnpkUdxStaProhTmrStart
1232 * Desc: unpack the Status prohibit timer start Msg
1238 * File: rlc_dl_ul_inf.c
1241 S16 cmUnpkUdxStaProhTmrStart(UdxStaProhTmrStart func,Pst *pst,Buffer *mBuf)
1244 CmLteRlcId tmpRlcId;
1245 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1247 CMCHKUNPK(SUnpkS16, &spId, mBuf);
1248 switch (pst->selector)
1252 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1258 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1263 ODU_PUT_MSG_BUF(mBuf);
1265 return ((*func)(pst, spId, rlcId));
1267 } /* cmUnpkUdxStaProhTmrStart */
1273 * Fun: cmUnpkUdxL2MeasReq
1281 S16 cmUnpkUdxL2MeasReq(UdxL2MeasReq func,Pst *pst,Buffer *mBuf)
1283 RlcL2MeasReqEvt tmpMeasReqEvt;
1284 RlcL2MeasReqEvt *measReqEvt = NULLP; /* KW_FIX */
1286 switch (pst->selector)
1290 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpMeasReqEvt,sizeof(RlcL2MeasReqEvt));
1291 measReqEvt = &tmpMeasReqEvt;
1296 CMCHKUNPK(oduUnpackPointer, (PTR *)&measReqEvt,mBuf);
1301 ODU_PUT_MSG_BUF(mBuf);
1303 return ((*func)(pst, measReqEvt));
1304 } /* cmUnpkUdxL2MeasReq */
1308 * Fun: cmUnpkUdxL2MeasSendReq
1316 S16 cmUnpkUdxL2MeasSendReq(UdxL2MeasSendReq func,Pst *pst,Buffer *mBuf)
1318 uint8_t measType = 0; /* KW_FIX */
1320 switch (pst->selector)
1325 CMCHKUNPK(oduUnpackUInt8, &measType, mBuf);
1330 ODU_PUT_MSG_BUF(mBuf);
1332 return ((*func)(pst, measType));
1333 } /* cmUnpkUdxL2MeasReq */
1337 * Fun: cmUnpkUdxL2MeasStopReq
1345 S16 cmUnpkUdxL2MeasStopReq(UdxL2MeasStopReq func,Pst *pst,Buffer *mBuf)
1347 uint8_t measType = 0; /* KW_FIX */
1349 switch (pst->selector)
1354 CMCHKUNPK(oduUnpackUInt8, &measType, mBuf);
1359 ODU_PUT_MSG_BUF(mBuf);
1361 return ((*func)(pst, measType));
1362 } /* cmUnpkUdxL2MeasStopReq */
1367 /********************************************************************30**
1369 **********************************************************************/