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"
33 #include "kw_udx.h" /* UDX defines */
36 /* extern (.x) include files */
47 * Desc: pack the primitive UdxBndReq
56 static S16 cmUnpkUdxStruct(Buffer *srcMBuf,uint32_t offset,uint8_t *dstBuf,uint32_t size)
60 return (SCpyMsgFix(srcMBuf,offset,size,dstBuf,&tmpLen));
62 } /*end of function cmPkUdxBndReq*/
68 * Desc: pack the primitive UdxBndReq
77 static S16 cmPkUdxStruct(uint8_t *srcBuf,MsgLen size,Buffer *dstMBuf)
80 return (SAddPstMsgMult(srcBuf,size,dstMBuf));
82 } /*end of function cmPkUdxBndReq*/
87 * Desc: pack the primitive UdxBndReq
96 S16 cmPkUdxBndReq(Pst *pst,SuId suId,SpId spId)
102 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
104 #if (ERRCLASS & ERRCLS_ADD_RES)
107 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
108 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
109 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
111 #endif /* ERRCLASS & ERRCLS_ADD_RES */
114 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
115 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
116 pst->event = (Event) UDX_EVT_BND_REQ;
118 return (SPstTsk(pst,mBuf));
119 } /*end of function cmPkUdxBndReq*/
123 * Fun: cmPkUdxUbndReq
125 * Desc: pack the primitive UdxUbndReq
134 S16 cmPkUdxUbndReq(Pst *pst,SpId spId,Reason reason)
140 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
142 #if (ERRCLASS & ERRCLS_ADD_RES)
145 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
146 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
147 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
149 #endif /* ERRCLASS & ERRCLS_ADD_RES */
152 CMCHKPKLOG(SPkS16, reason, mBuf, EUDXXXX, pst);
153 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
154 pst->event = (Event) UDX_EVT_UBND_REQ;
156 return (SPstTsk(pst,mBuf));
157 } /*end of function cmPkUdxUbndReq*/
163 * Desc: pack the primitive UdxBndCfm
172 S16 cmPkUdxBndCfm(Pst *pst,SuId suId,uint8_t status)
178 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
180 #if (ERRCLASS & ERRCLS_ADD_RES)
183 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
184 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
185 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
188 #endif /* ERRCLASS & ERRCLS_ADD_RES */
191 CMCHKPKLOG(oduUnpackUInt8, status, mBuf, EUDXXXX, pst);
192 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
193 pst->event = (Event) UDX_EVT_BND_CFM;
195 return (SPstTsk(pst,mBuf));
196 } /*end of function cmPkUdxBndCfm*/
203 * Desc: pack the primitive KwUiUdxCfgReq
212 S16 cmPkUdxCfgReq(Pst *pst,SpId spId,RlcCfgInfo *cfgInfo)
218 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
220 #if (ERRCLASS & ERRCLS_ADD_RES)
223 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
224 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
225 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
227 #endif /* ERRCLASS & ERRCLS_ADD_RES */
231 switch(pst->selector)
236 cmPkUdxStruct((uint8_t *)cfgInfo, sizeof(RlcCfgInfo),mBuf);
237 /* Need Not free CfgInfo here as it is stored
243 CMCHKPKLOG(oduPackPointer,(PTR)cfgInfo,mBuf,EUDXXXX,pst);
249 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
250 pst->event = (Event) UDX_EVT_CFG_REQ;
252 return (SPstTsk(pst,mBuf));
253 } /* cmPkUdxCfgReq */
260 * Desc: pack the primitive KwUiUdxCfgCfm
269 S16 cmPkUdxCfgCfm(Pst *pst,SuId suId,RlcCfgCfmInfo *cfgCfmInfo)
275 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
277 #if (ERRCLASS & ERRCLS_ADD_RES)
280 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
281 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
282 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
284 #endif /* ERRCLASS & ERRCLS_ADD_RES */
288 switch(pst->selector)
293 cmPkUdxStruct((uint8_t *)cfgCfmInfo, sizeof(RlcCfgCfmInfo),mBuf);
294 /* Need to free the cfgCfmInfo here as it is allocated
295 buffer call SPutStaticBuffer */
296 SPutStaticBuffer(pst->region,pst->pool,(Data *) cfgCfmInfo,
297 sizeof(RlcCfgCfmInfo),0);
302 CMCHKPKLOG(oduPackPointer,(PTR)cfgCfmInfo,mBuf,EUDXXXX,pst);
308 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
309 pst->event = (Event) UDX_EVT_CFG_CFM;
311 return (SPstTsk(pst,mBuf));
312 } /* cmPkUdxCfgCfm */
317 * Fun: cmPkUdxUeIdChgReq
319 * Desc: pack the primitive KwUiUdxUeIdChgReq
328 S16 cmPkUdxUeIdChgReq
338 Buffer *mBuf = NULLP;
341 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
343 #if (ERRCLASS & ERRCLS_ADD_RES)
346 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
347 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
348 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
350 #endif /* ERRCLASS & ERRCLS_ADD_RES */
355 switch(pst->selector)
360 cmPkUdxStruct((uint8_t *)newUeInfo, sizeof(CkwUeInfo),mBuf);
361 cmPkUdxStruct((uint8_t *)ueInfo, sizeof(CkwUeInfo),mBuf);
362 /* No need to free ueInfo here as it is stored */
367 CMCHKPKLOG(oduPackPointer,(PTR)newUeInfo,mBuf,EUDXXXX,pst);
368 CMCHKPKLOG(oduPackPointer,(PTR)ueInfo,mBuf,EUDXXXX,pst);
373 printf("cmPkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
378 CMCHKPKLOG(oduUnpackUInt32, transId, mBuf, EUDXXXX, pst);
379 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
380 pst->event = (Event) UDX_EVT_UEIDCHG_REQ;
382 return (SPstTsk(pst, mBuf));
384 } /* cmPkUdxUeIdChgReq */
388 * Fun: cmPkUdxUeIdChgCfm
390 * Desc: pack the primitive KwUiUdxUeIdChgCfm
399 S16 cmPkUdxUeIdChgCfm(Pst *pst,SuId suId,uint32_t transId,CmStatus status)
402 Buffer *mBuf = NULLP;
404 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
406 #if (ERRCLASS & ERRCLS_ADD_RES)
409 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
410 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
411 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
413 #endif /* ERRCLASS & ERRCLS_ADD_RES */
418 CMCHKPK(cmPkCmStatus, &status, mBuf);
419 CMCHKPKLOG(oduUnpackUInt32, transId, mBuf, EUDXXXX, pst);
420 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
421 pst->event = (Event) UDX_EVT_UEIDCHG_CFM;
423 return (SPstTsk(pst, mBuf));
425 } /* cmPkUdxUeIdChgCfm */
429 * Fun: cmPkUdxStaUpdCfm
431 * Desc: pack the primitive KwUiUdxUeIdChgCfm
440 S16 cmPkUdxStaUpdCfm(Pst *pst,SuId suId,CmLteRlcId *rlcId,RlcUdxBufLst *pStaPdu)
443 Buffer *mBuf = NULLP;
445 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
447 #if (ERRCLASS & ERRCLS_ADD_RES)
450 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
451 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
452 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
454 #endif /* ERRCLASS & ERRCLS_ADD_RES */
459 switch (pst->selector)
463 cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxBufLst),mBuf);
464 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
469 CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
470 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
474 CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
475 pst->event = (Event) UDX_EVT_STA_UPD_CFM;
477 return (SPstTsk(pst, mBuf));
479 } /* cmPkUdxStaUpdCfm */
483 * Fun: cmPkUdxStaProhTmrStart
485 * Desc: pack the primitive
494 S16 cmPkUdxStaProhTmrStart(Pst *pst,SpId spId,CmLteRlcId *rlcId)
497 Buffer *mBuf = NULLP;
499 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
501 #if (ERRCLASS & ERRCLS_ADD_RES)
504 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
505 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
506 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
508 #endif /* ERRCLASS & ERRCLS_ADD_RES */
513 switch (pst->selector)
517 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
522 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
526 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
527 pst->event = (Event) UDX_EVT_STA_PHBT_TMR_START;
529 return (SPstTsk(pst, mBuf));
531 } /* cmPkUdxStaProhTmrStart */
535 * Fun: cmPkUdxStaUpdReq
537 * Desc: pack the primitive KwUiUdxUeIdChgCfm
546 S16 cmPkUdxStaUpdReq(Pst *pst,SpId spId,CmLteRlcId *rlcId,RlcUdxStaPdu *pStaPdu)
549 Buffer *mBuf = NULLP;
551 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
553 #if (ERRCLASS & ERRCLS_ADD_RES)
556 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
557 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
558 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
560 #endif /* ERRCLASS & ERRCLS_ADD_RES */
565 switch (pst->selector)
569 cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxStaPdu),mBuf);
570 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
571 SPutStaticBuffer(pst->region,pst->pool,(Data *) pStaPdu,
572 sizeof(RlcUdxStaPdu),0);
578 CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
579 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
583 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
584 pst->event = (Event) UDX_EVT_STA_UPD_REQ;
586 return (SPstTsk(pst, mBuf));
588 } /* cmPkUdxStaUpdReq */
592 * Fun: cmPkUdxStaPduReq
594 * Desc: pack the primitive KwUiUdxUeIdChgCfm
603 S16 cmPkUdxStaPduReq(Pst *pst,SpId spId,CmLteRlcId *rlcId,RlcUdxDlStaPdu *pStaPdu)
606 Buffer *mBuf = NULLP;
608 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
610 #if (ERRCLASS & ERRCLS_ADD_RES)
613 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
614 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
615 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
617 #endif /* ERRCLASS & ERRCLS_ADD_RES */
622 switch (pst->selector)
626 cmPkUdxStruct((uint8_t *)pStaPdu, sizeof(RlcUdxDlStaPdu),mBuf);
627 cmPkUdxStruct((uint8_t *)rlcId, sizeof(CmLteRlcId),mBuf);
628 /* Free status Pdu here for LC */
629 SPutStaticBuffer(pst->region,pst->pool,(Data *) pStaPdu,
630 sizeof(RlcUdxDlStaPdu),0);
635 CMCHKPK(oduPackPointer,(PTR) pStaPdu, mBuf);
636 CMCHKPK(oduPackPointer,(PTR) rlcId, mBuf);
640 CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
641 pst->event = (Event) UDX_EVT_STA_PDU_REQ;
643 return (SPstTsk(pst, mBuf));
645 } /* cmPkUdxStaUpdReq */
650 * Fun: cmPkUdxL2MeasReq
658 S16 cmPkUdxL2MeasReq(Pst *pst,RlcL2MeasReqEvt *measReqEvt)
661 Buffer *mBuf = NULLP;
663 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
665 #if (ERRCLASS & ERRCLS_ADD_RES)
668 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
669 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
670 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
672 #endif /* ERRCLASS & ERRCLS_ADD_RES */
677 switch (pst->selector)
681 cmPkUdxStruct((uint8_t *)measReqEvt, sizeof(RlcL2MeasReqEvt),mBuf);
686 CMCHKPK(oduPackPointer,(PTR) measReqEvt, mBuf);
690 pst->event = (Event) UDX_EVT_L2MEAS_REQ;
692 return (SPstTsk(pst, mBuf));
694 } /* cmPkUdxStaUpdReq */
698 * Fun: cmPkUdxL2MeasReq
706 S16 cmPkUdxL2MeasSendReq(Pst *pst,uint8_t measType)
709 Buffer *mBuf = NULLP;
711 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
713 #if (ERRCLASS & ERRCLS_ADD_RES)
716 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
717 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
718 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
720 #endif /* ERRCLASS & ERRCLS_ADD_RES */
725 switch (pst->selector)
730 CMCHKPKLOG(oduUnpackUInt8, measType, mBuf, EUDXXXX, pst);
734 pst->event = (Event) UDX_EVT_L2MEAS_SEND_REQ;
736 return (SPstTsk(pst, mBuf));
742 * Fun: cmPkUdxL2MeasStopReq
750 S16 cmPkUdxL2MeasStopReq(Pst *pst,uint8_t measType)
753 Buffer *mBuf = NULLP;
755 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
757 #if (ERRCLASS & ERRCLS_ADD_RES)
760 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
761 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
762 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
764 #endif /* ERRCLASS & ERRCLS_ADD_RES */
769 switch (pst->selector)
774 CMCHKPKLOG(oduUnpackUInt8, measType, mBuf, EUDXXXX, pst);
778 pst->event = (Event) UDX_EVT_L2MEAS_STOP_REQ;
780 return (SPstTsk(pst, mBuf));
784 /******************************************************************************
786 *****************************************************************************/
790 * Fun: cmUnpkUdxBndReq
792 * Desc: unpack the primitive UdxBndReq
801 S16 cmUnpkUdxBndReq(UdxBndReq func,Pst *pst,Buffer *mBuf)
806 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
807 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
810 return ((*func)(pst, suId, spId));
811 } /*end of function cmUnpkUdxBndReq*/
815 * Fun: cmUnpkUdxUbndReq
817 * Desc: unpack the primitive UdxUbndReq
826 S16 cmUnpkUdxUbndReq(UdxUbndReq func,Pst *pst,Buffer *mBuf)
831 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
832 CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, EUDXXXX, pst);
834 return ((*func)(pst, spId, reason));
835 } /*end of function cmUnpkUdxUbndReq*/
839 * Fun: cmUnpkUdxBndCfm
841 * Desc: unpack the primitive UdxBndCfm
850 S16 cmUnpkUdxBndCfm(UdxBndCfm func,Pst *pst,Buffer *mBuf)
855 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
856 CMCHKUNPKLOG(oduPackUInt8, &status, mBuf, EUDXXXX, pst);
859 return ((*func)(pst, suId, status));
860 } /*end of function cmUnpkUdxBndCfm*/
865 * Fun: cmUnpkUdxCfgReq
867 * Desc: unpack the primitive KwUiUdxCfgReq
876 S16 cmUnpkUdxCfgReq(UdxCfgReq func,Pst *pst,Buffer *mBuf)
878 #if(ERRCLASS & ERRCLS_DEBUG)
880 #endif /* ERRCLASS & ERRCLS_DEBUG */
882 RlcCfgInfo tmpCfgInfo;
883 RlcCfgInfo *cfgInfo; /*stack Variable because it is not freed */
885 CMCHKUNPK(SUnpkS16, &(spId), mBuf);
886 switch(pst->selector)
891 #if(ERRCLASS & ERRCLS_DEBUG)
892 ret1 = cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpCfgInfo,sizeof(RlcCfgInfo));
896 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
897 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
898 (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
902 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpCfgInfo,sizeof(RlcCfgInfo));
903 #endif /* ERRCLASS & ERRCLS_DEBUG */
904 cfgInfo = &tmpCfgInfo;
909 CMCHKUNPK(oduUnpackPointer,(PTR *) &cfgInfo, mBuf);
916 return ((*func)(pst, spId, cfgInfo));
917 } /* cmUnpkUdxCfgReq */
922 * Fun: cmUnpkUdxCfgCfm
924 * Desc: unpack the primitive KwUiUdxCfgCfm
933 S16 cmUnpkUdxCfgCfm(UdxCfgCfm func,Pst *pst,Buffer *mBuf)
937 RlcCfgCfmInfo *cfgCfmInfo = NULLP;
939 CMCHKUNPK(SUnpkS16, &suId, mBuf);
941 switch(pst->selector)
946 if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&cfgCfmInfo,\
947 sizeof(RlcCfgCfmInfo),0)) != ROK)
949 #if (ERRCLASS & ERRCLS_ADD_RES)
952 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
953 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
954 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
956 #endif /* ERRCLASS & ERRCLS_ADD_RES */
960 ret1 = cmUnpkUdxStruct(mBuf,0,(uint8_t *)cfgCfmInfo, sizeof(RlcCfgCfmInfo));
961 #if(ERRCLASS & ERRCLS_DEBUG)
965 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
966 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
967 (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
970 #endif /* ERRCLASS & ERRCLS_DEBUG */
975 CMCHKUNPK(oduUnpackPointer,(PTR *) &cfgCfmInfo, mBuf);
982 return ((*func)(pst, suId, cfgCfmInfo));
983 } /* cmUnpkUdxCfgCfm */
987 * Fun: cmUnpkUdxUeIdChgReq
989 * Desc: unpack the primitive KwUiUdxUeIdChgReq
998 S16 cmUnpkUdxUeIdChgReq(UdxUeIdChgReq func,Pst *pst,Buffer *mBuf)
1001 uint32_t transId = 0;
1002 CkwUeInfo tmpUeInfo;
1003 CkwUeInfo tmpNewUeInfo;
1005 CkwUeInfo *newUeInfo;
1007 CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1008 CMCHKUNPKLOG(oduPackUInt32, &transId, mBuf, EUDXXXX, pst);
1010 switch(pst->selector)
1015 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpNewUeInfo, sizeof(CkwUeInfo));
1016 cmUnpkUdxStruct(mBuf,sizeof(CkwUeInfo),(uint8_t *)&tmpUeInfo, sizeof(CkwUeInfo));
1018 ueInfo = &tmpUeInfo;
1019 newUeInfo = &tmpNewUeInfo;
1024 CMCHKUNPK(oduUnpackPointer,(PTR *) &ueInfo, mBuf);
1025 CMCHKUNPK(oduUnpackPointer,(PTR *) &newUeInfo, mBuf);
1030 printf("cmUnpkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
1038 return ((*func)(pst, spId, transId, ueInfo, newUeInfo));
1040 } /* cmUnpkUdxUeIdChgReq */
1044 * Fun: cmUnpkUdxUeIdChgCfm
1046 * Desc: unpack the primitive KwUiUdxUeIdChgCfm
1055 S16 cmUnpkUdxUeIdChgCfm(UdxUeIdChgCfm func,Pst *pst,Buffer *mBuf)
1058 uint32_t transId = 0;
1061 memset(&status, 0, sizeof(CmStatus));
1063 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1064 CMCHKUNPKLOG(oduPackUInt32, &transId, mBuf, EUDXXXX, pst);
1066 CMCHKUNPK(cmUnpkCmStatus, &status, mBuf);
1070 return ((*func)(pst, suId, transId, status));
1072 } /* cmUnpkUdxUeIdChgCfm */
1076 * Fun: cmUnpkUdxStaUpdCfm
1078 * Desc: unpack the primitive KwUiUdxUeIdChgCfm
1087 S16 cmUnpkUdxStaUpdCfm(UdxStaUpdCfm func,Pst *pst,Buffer *mBuf)
1090 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1091 RlcUdxBufLst *pBufLst = NULLP; /* KW_FIX*/
1093 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1094 switch (pst->selector)
1102 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1103 CMCHKUNPK(oduUnpackPointer, (PTR *)&pBufLst,mBuf);
1110 return ((*func)(pst, suId, rlcId, pBufLst));
1112 } /* cmUnpkUdxUeIdChgCfm */
1116 * Fun: cmUnpkUdxStaUpdReq
1118 * Desc: unpack the primitive KwUiUdxUeIdChgCfm
1127 S16 cmUnpkUdxStaUpdReq(UdxStaUpdReq func,Pst *pst,Buffer *mBuf)
1130 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1131 RlcUdxStaPdu *pStaPdu = NULLP; /* KW_FIX */
1133 CmLteRlcId tmpRlcId;
1135 CMCHKUNPK(SUnpkS16, &spId, mBuf);
1136 switch (pst->selector)
1140 if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&pStaPdu,
1141 sizeof(RlcUdxStaPdu),0)) != ROK)
1143 #if (ERRCLASS & ERRCLS_ADD_RES)
1146 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1147 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1148 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
1150 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1153 ret1 = cmUnpkUdxStruct(mBuf,0,(uint8_t *)pStaPdu, sizeof(RlcUdxStaPdu));
1154 ret1 = cmUnpkUdxStruct(mBuf,sizeof(RlcUdxStaPdu),(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1160 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1161 CMCHKUNPK(oduUnpackPointer, (PTR *)&pStaPdu,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)
1189 CmLteRlcId tmpRlcId;
1190 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1191 RlcUdxDlStaPdu *pStaPdu = NULLP; /* KW_FIX */
1193 CMCHKUNPK(SUnpkS16, &spId, mBuf);
1194 switch (pst->selector)
1198 if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&pStaPdu,
1199 sizeof(RlcUdxDlStaPdu),0)) != ROK)
1201 #if (ERRCLASS & ERRCLS_ADD_RES)
1204 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1205 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1206 (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
1208 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1211 ret1 = cmUnpkUdxStruct(mBuf,0, (uint8_t *)pStaPdu, sizeof(RlcUdxDlStaPdu));
1212 ret1 = cmUnpkUdxStruct(mBuf,sizeof(RlcUdxDlStaPdu),(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1218 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1219 CMCHKUNPK(oduUnpackPointer, (PTR *)&pStaPdu,mBuf);
1225 return ((*func)(pst, spId, rlcId, pStaPdu));
1227 } /* cmUnpkUdxUeIdChgCfm */
1231 * Fun: cmUnpkUdxStaProhTmrStart
1233 * Desc: unpack the Status prohibit timer start Msg
1242 S16 cmUnpkUdxStaProhTmrStart(UdxStaProhTmrStart func,Pst *pst,Buffer *mBuf)
1245 CmLteRlcId tmpRlcId;
1246 CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1248 CMCHKUNPK(SUnpkS16, &spId, mBuf);
1249 switch (pst->selector)
1253 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpRlcId,sizeof(CmLteRlcId));
1259 CMCHKUNPK(oduUnpackPointer, (PTR *)&rlcId,mBuf);
1266 return ((*func)(pst, spId, rlcId));
1268 } /* cmUnpkUdxStaProhTmrStart */
1274 * Fun: cmUnpkUdxL2MeasReq
1282 S16 cmUnpkUdxL2MeasReq(UdxL2MeasReq func,Pst *pst,Buffer *mBuf)
1284 RlcL2MeasReqEvt tmpMeasReqEvt;
1285 RlcL2MeasReqEvt *measReqEvt = NULLP; /* KW_FIX */
1287 switch (pst->selector)
1291 cmUnpkUdxStruct(mBuf,0,(uint8_t *)&tmpMeasReqEvt,sizeof(RlcL2MeasReqEvt));
1292 measReqEvt = &tmpMeasReqEvt;
1297 CMCHKUNPK(oduUnpackPointer, (PTR *)&measReqEvt,mBuf);
1304 return ((*func)(pst, measReqEvt));
1305 } /* cmUnpkUdxL2MeasReq */
1309 * Fun: cmUnpkUdxL2MeasSendReq
1317 S16 cmUnpkUdxL2MeasSendReq(UdxL2MeasSendReq func,Pst *pst,Buffer *mBuf)
1319 uint8_t measType = 0; /* KW_FIX */
1321 switch (pst->selector)
1326 CMCHKUNPK(oduPackUInt8, &measType, mBuf);
1333 return ((*func)(pst, measType));
1334 } /* cmUnpkUdxL2MeasReq */
1338 * Fun: cmUnpkUdxL2MeasStopReq
1346 S16 cmUnpkUdxL2MeasStopReq(UdxL2MeasStopReq func,Pst *pst,Buffer *mBuf)
1348 uint8_t measType = 0; /* KW_FIX */
1350 switch (pst->selector)
1355 CMCHKUNPK(oduPackUInt8, &measType, mBuf);
1362 return ((*func)(pst, measType));
1363 } /* cmUnpkUdxL2MeasStopReq */
1368 /********************************************************************30**
1370 **********************************************************************/