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: CKW RRC Control Interface
25 Desc: This file Contains the packing and unpacking functions for
30 *********************************************************************21*/
32 #include "envopt.h" /* environment options */
33 #include "envdep.h" /* environment dependent */
34 #include "envind.h" /* environment independent */
36 #include "gen.h" /* general */
37 #include "ssi.h" /* system services */
38 #include "cm5.h" /* common timer defines */
39 #include "cm_tkns.h" /* common tokens defines */
40 #include "cm_mblk.h" /* common memory allocation library defines */
41 #include "cm_llist.h" /* common link list defines */
42 #include "cm_hash.h" /* common hash list defines */
43 #include "cm_lte.h" /* common LTE defines */
44 #include "ckw.h" /* CKW defines */
46 /* extern (.x) include files */
47 #include "gen.x" /* general */
48 #include "ssi.x" /* system services */
50 #include "cm5.x" /* common timer library */
51 #include "cm_tkns.x" /* common tokens */
52 #include "cm_mblk.x" /* common memory allocation */
53 #include "cm_llist.x" /* common link list */
54 #include "cm_hash.x" /* common hash list */
55 #include "cm_lte.x" /* common LTE includes */
56 #include "cm_lib.x" /* common memory allocation library */
57 #include "ckw.x" /* CKW */
62 #endif /*for extern "C"*/
69 * Desc: pack the primitive CkwBndReq
79 PUBLIC S16 cmPkCkwBndReq
86 PUBLIC S16 cmPkCkwBndReq(pst, suId, spId)
97 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
99 #if (ERRCLASS & ERRCLS_ADD_RES)
102 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
103 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
104 (ErrVal)ECKW001, (ErrVal)0, "SGetMsg() failed");
106 #endif /* ERRCLASS & ERRCLS_ADD_RES */
109 CMCHKPKLOG(SPkS16, spId, mBuf, ECKW002, pst);
110 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW003, pst);
111 pst->event = (Event) CKW_EVT_BND_REQ;
113 RETVALUE(SPstTsk(pst,mBuf));
114 } /*end of function cmPkCkwBndReq*/
118 * Fun: cmPkCkwUbndReq
120 * Desc: pack the primitive CkwUbndReq
130 PUBLIC S16 cmPkCkwUbndReq
137 PUBLIC S16 cmPkCkwUbndReq(pst, spId, reason)
148 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
150 #if (ERRCLASS & ERRCLS_ADD_RES)
153 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
154 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
155 (ErrVal)ECKW004, (ErrVal)0, "SGetMsg() failed");
157 #endif /* ERRCLASS & ERRCLS_ADD_RES */
160 CMCHKPKLOG(SPkS16, reason, mBuf, ECKW005, pst);
161 CMCHKPKLOG(SPkS16, spId, mBuf, ECKW006, pst);
162 pst->event = (Event) CKW_EVT_UBND_REQ;
164 RETVALUE(SPstTsk(pst,mBuf));
165 } /*end of function cmPkCkwUbndReq*/
171 * Desc: pack the primitive CkwBndCfm
181 PUBLIC S16 cmPkCkwBndCfm
188 PUBLIC S16 cmPkCkwBndCfm(pst, suId, status)
199 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
201 #if (ERRCLASS & ERRCLS_ADD_RES)
204 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
205 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
206 (ErrVal)ECKW007, (ErrVal)0, "SGetMsg() failed");
209 #endif /* ERRCLASS & ERRCLS_ADD_RES */
212 CMCHKPKLOG(SPkU8, status, mBuf, ECKW008, pst);
213 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW009, pst);
214 pst->event = (Event) CKW_EVT_BND_CFM;
216 RETVALUE(SPstTsk(pst,mBuf));
217 } /*end of function cmPkCkwBndCfm*/
224 * Desc: pack the structure CkwTmInfo
234 PUBLIC S16 cmPkCkwTmInfo
240 PUBLIC S16 cmPkCkwTmInfo(param, mBuf)
247 CMCHKPK(SPkU32, param->dl.buffSize, mBuf);
250 } /* cmPkCkwTmInfo */
257 * Desc: pack the structure CkwUmInfo
267 PUBLIC S16 cmPkCkwUmInfo
269 CkwEntCfgInfo *param,
273 PUBLIC S16 cmPkCkwUmInfo(param, mBuf)
274 CkwEntCfgInfo *param;
284 CMCHKPK(SPkU8, param->m.umInfo.dl.snLen, mBuf);
289 CMCHKPK(SPkU8, param->m.umInfo.ul.reOrdTmr, mBuf);
290 CMCHKPK(SPkU8, param->m.umInfo.ul.snLen, mBuf);
293 /* Patch ckw_c_001.main_3 */
294 case CKW_CFG_DIR_BOTH:
296 CMCHKPK(SPkU8, param->m.umInfo.dl.snLen, mBuf);
297 CMCHKPK(SPkU8, param->m.umInfo.ul.reOrdTmr, mBuf);
298 CMCHKPK(SPkU8, param->m.umInfo.ul.snLen, mBuf);
304 } /* cmPkCkwUmInfo */
311 * Desc: pack the structure CkwAmInfo
321 PUBLIC S16 cmPkCkwAmInfo
327 PUBLIC S16 cmPkCkwAmInfo(param, mBuf)
335 CMCHKPK(SPkU8, param->ul.reOrdTmr, mBuf);
336 CMCHKPK(SPkU16, param->ul.staProhTmr, mBuf);
337 CMCHKPK(SPkU8, param->ul.snLen, mBuf);
340 CMCHKPK(SPkU8, param->dl.maxRetx, mBuf);
341 CMCHKPK(SPkS32, param->dl.pollByte, mBuf);
342 CMCHKPK(SPkS16, param->dl.pollPdu, mBuf);
343 CMCHKPK(SPkU16, param->dl.pollRetxTmr, mBuf);
344 CMCHKPK(SPkU8, param->dl.snLen, mBuf);
347 } /* cmPkCkwAmInfo */
354 * Desc: pack the structure CkwLChInfo
364 PUBLIC S16 cmPkCkwLChInfo
370 PUBLIC S16 cmPkCkwLChInfo(param, mBuf)
377 CMCHKPK(SPkU8, param->type, mBuf);
378 CMCHKPK(SPkU8, param->lChId, mBuf);
381 } /* cmPkCkwLChInfo */
386 * Fun: cmPkCkwEntCfgInfo
388 * Desc: pack the structure CkwEntCfgInfo
398 PUBLIC S16 cmPkCkwEntCfgInfo
400 CkwEntCfgInfo *param,
404 PUBLIC S16 cmPkCkwEntCfgInfo(param, mBuf)
405 CkwEntCfgInfo *param;
409 TRC3(cmPkCkwEntCfgInfo)
411 switch(param->entMode)
415 CMCHKPK(cmPkCkwTmInfo, &(param->m.tmInfo), mBuf);
420 CMCHKPK(cmPkCkwUmInfo, param, mBuf);
425 CMCHKPK(cmPkCkwAmInfo, &(param->m.amInfo), mBuf);
430 /* Logical Channel Information */
431 switch(param->entMode)
435 CMCHKPK(cmPkCkwLChInfo, &(param->lCh[0]), mBuf);
438 /* ccpu00128195: Packing lCh[0] and lCh[1] for UM bearer as well */
442 CMCHKPK(cmPkCkwLChInfo, &(param->lCh[1]), mBuf);
443 CMCHKPK(cmPkCkwLChInfo, &(param->lCh[0]), mBuf);
448 #ifdef TENB_MULT_CELL_SUPPRT
449 CMCHKPK(SPkS16, param->rguSapId, mBuf);
451 CMCHKPK(SPkS16, param->discardTmr, mBuf);
452 CMCHKPK(SPkU8, param->dir, mBuf);
453 CMCHKPK(cmPkLteRlcMode, param->entMode, mBuf);
454 CMCHKPK(SPkU8, param->qci, mBuf);
455 CMCHKPK(SPkU8, param->rbType, mBuf);
456 CMCHKPK(SPkU8, param->rbId, mBuf);
457 CMCHKPK(SPkU8, param->cfgType, mBuf);
460 } /* cmPkCkwEntCfgInfo */
465 * Fun: cmPkCkwCfgInfo
467 * Desc: pack the structure CkwCfgInfo
477 PUBLIC S16 cmPkCkwCfgInfo
484 PUBLIC S16 cmPkCkwCfgInfo(param, pst, mBuf)
494 for (idx = param->numEnt-1; idx >= 0; idx--)
496 CMCHKPK(cmPkCkwEntCfgInfo, &(param->entCfg[idx]), mBuf);
499 CMCHKPK(SPkU8, param->numEnt, mBuf);
500 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
501 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
502 CMCHKPKLOG(SPkU32, param->transId, mBuf, ECKW010, pst);
505 } /* cmPkCkwCfgInfo */
510 * Fun: packUeCreateReq
512 * Desc: pack the primitive UE Create Req
522 PUBLIC S16 packUeCreateReq
528 PUBLIC S16 packUeCreateReq(pst, cfgInfo)
536 TRC3(packUeCreateReq)
538 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
540 #if (ERRCLASS & ERRCLS_ADD_RES)
543 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
544 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
545 (ErrVal)ECKW011, (ErrVal)0, "SGetMsg() failed");
547 #endif /* ERRCLASS & ERRCLS_ADD_RES */
551 switch(pst->selector)
555 CMCHKPK(cmPkPtr,(PTR) cfgInfo, mBuf);
559 pst->event = (Event) RLC_EVT_UE_CREATE_REQ;
561 RETVALUE(SPstTsk(pst,mBuf));
562 } /* packUeCreateReq */
567 * Fun: cmPkCkwEntCfgCfmInfo
569 * Desc: pack the structure CkwEntCfgInfo
579 PUBLIC S16 cmPkCkwEntCfgCfmInfo
581 CkwEntCfgCfmInfo *param,
585 PUBLIC S16 cmPkCkwEntCfgCfmInfo(param, mBuf)
586 CkwEntCfgCfmInfo *param;
590 TRC3(cmPkCkwEntCfgCfmInfo)
592 CMCHKPK(cmPkCmStatus, &(param->status), mBuf);
593 CMCHKPK(SPkU8, param->rbType, mBuf);
594 CMCHKPK(SPkU8, param->rbId, mBuf);
597 } /* cmPkCkwEntCfgCfmInfo */
602 * Fun: cmPkCkwCfgCfmInfo
604 * Desc: pack the structure CkwCfgCfmInfo
614 PUBLIC S16 cmPkCkwCfgCfmInfo
616 CkwCfgCfmInfo *param,
621 PUBLIC S16 cmPkCkwCfgCfmInfo(param, pst, mBuf)
622 CkwCfgCfmInfo *param;
629 TRC3(cmPkCkwCfgCfmInfo)
631 for (idx = param->numEnt-1; idx >= 0; idx--)
633 CMCHKPK(cmPkCkwEntCfgCfmInfo, &(param->entCfgCfm[(U8)idx]), mBuf);
636 CMCHKPK(SPkU8, param->numEnt, mBuf);
637 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
638 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
639 CMCHKPKLOG(SPkU32, param->transId, mBuf, ECKW014, pst);
642 } /* cmPkCkwCfgCfmInfo */
649 * Desc: pack the primitive KwUiCkwCfgCfm
659 PUBLIC S16 cmPkCkwCfgCfm
663 CkwCfgCfmInfo *cfgCfmInfo
666 PUBLIC S16 cmPkCkwCfgCfm(pst, suId, cfgCfmInfo)
669 CkwCfgCfmInfo *cfgCfmInfo;
677 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
679 #if (ERRCLASS & ERRCLS_ADD_RES)
682 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
683 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
684 (ErrVal)ECKW015, (ErrVal)0, "SGetMsg() failed");
686 #endif /* ERRCLASS & ERRCLS_ADD_RES */
690 switch(pst->selector)
695 ret1 = cmPkCkwCfgCfmInfo( (cfgCfmInfo), pst, mBuf);
696 #if (ERRCLASS & ERRCLS_ADD_RES)
700 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
701 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
702 (ErrVal)ECKW016, (ErrVal)ret1, "Packing failure");
705 #endif /* ERRCLASS & ERRCLS_ADD_RES */
706 if (SPutSBuf(pst->region, pst->pool, (Data *)cfgCfmInfo,
707 sizeof(CkwCfgCfmInfo)) != ROK)
718 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW017, pst);
719 pst->event = (Event) CKW_EVT_CFG_CFM;
721 RETVALUE(SPstTsk(pst,mBuf));
722 } /* cmPkCkwCfgCfm */
728 * Desc: pack the primitive KwUiCkwUeInfo
738 PUBLIC S16 cmPkCkwUeInfo
744 PUBLIC S16 cmPkCkwUeInfo(param, mBuf)
751 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
752 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
759 * Fun: cmPkCkwUeIdChgReq
761 * Desc: pack the primitive KwUiCkwUeIdChgReq
771 PUBLIC S16 cmPkCkwUeIdChgReq
780 PUBLIC S16 cmPkCkwUeIdChgReq(pst, spId, transId, ueInfo, newUeInfo)
785 CkwUeInfo *newUeInfo;
789 Buffer *mBuf = NULLP;
791 TRC3(cmPkCkwUeIdChgReq)
793 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
795 #if (ERRCLASS & ERRCLS_ADD_RES)
798 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
799 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
800 (ErrVal)ECKW018, (ErrVal)0, "SGetMsg() failed");
802 #endif /* ERRCLASS & ERRCLS_ADD_RES */
807 CMCHKPK(cmPkCkwUeInfo, newUeInfo, mBuf);
808 if (SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo,
809 sizeof(CkwUeInfo)) != ROK)
814 CMCHKPK(cmPkCkwUeInfo, ueInfo, mBuf);
815 if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo,
816 sizeof(CkwUeInfo)) != ROK)
821 CMCHKPKLOG(SPkU32, transId, mBuf, ECKW019, pst);
822 CMCHKPKLOG(SPkS16, spId, mBuf, ECKW020, pst);
823 pst->event = (Event) CKW_EVT_UEIDCHG_REQ;
825 RETVALUE(SPstTsk(pst, mBuf));
827 } /* cmPkCkwUeIdChgReq */
831 * Fun: cmPkCkwUeIdChgCfm
833 * Desc: pack the primitive KwUiCkwUeIdChgCfm
843 PUBLIC S16 cmPkCkwUeIdChgCfm
852 PUBLIC S16 cmPkCkwUeIdChgCfm(pst, suId, transId, ueInfo, status)
861 Buffer *mBuf = NULLP;
863 TRC3(cmPkCkwUeIdChgCfm)
865 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
867 #if (ERRCLASS & ERRCLS_ADD_RES)
870 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
871 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
872 (ErrVal)ECKW021, (ErrVal)0, "SGetMsg() failed");
874 #endif /* ERRCLASS & ERRCLS_ADD_RES */
879 CMCHKPK(cmPkCmStatus, &status, mBuf);
880 CMCHKPK(cmPkCkwUeInfo, ueInfo, mBuf);
881 if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo,
882 sizeof(CkwUeInfo)) != ROK)
887 CMCHKPKLOG(SPkU32, transId, mBuf, ECKW022, pst);
888 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW023, pst);
889 pst->event = (Event) CKW_EVT_UEIDCHG_CFM;
891 RETVALUE(SPstTsk(pst, mBuf));
893 } /* cmPkCkwUeIdChgCfm */
896 /******************************************************************************
898 *****************************************************************************/
902 * Fun: cmUnpkCkwBndReq
904 * Desc: unpack the primitive CkwBndReq
914 PUBLIC S16 cmUnpkCkwBndReq
921 PUBLIC S16 cmUnpkCkwBndReq(func, pst, mBuf)
930 TRC3(cmUnpkCkwBndReq)
932 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, ECKW024, pst);
933 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, ECKW025, pst);
936 RETVALUE((*func)(pst, suId, spId));
937 } /*end of function cmUnpkCkwBndReq*/
941 * Fun: cmUnpkCkwUbndReq
943 * Desc: unpack the primitive CkwUbndReq
953 PUBLIC S16 cmUnpkCkwUbndReq
960 PUBLIC S16 cmUnpkCkwUbndReq(func, pst, mBuf)
969 TRC3(cmUnpkCkwUbndReq)
971 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, ECKW026, pst);
972 CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, ECKW027, pst);
974 RETVALUE((*func)(pst, spId, reason));
975 } /*end of function cmUnpkCkwUbndReq*/
979 * Fun: cmUnpkCkwBndCfm
981 * Desc: unpack the primitive CkwBndCfm
991 PUBLIC S16 cmUnpkCkwBndCfm
998 PUBLIC S16 cmUnpkCkwBndCfm(func, pst, mBuf)
1007 TRC3(cmUnpkCkwBndCfm)
1009 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, ECKW028, pst);
1010 CMCHKUNPKLOG(SUnpkU8, &status, mBuf, ECKW029, pst);
1013 RETVALUE((*func)(pst, suId, status));
1014 } /*end of function cmUnpkCkwBndCfm*/
1019 * Fun: cmUnpkCkwTmInfo
1021 * Desc: pack the structure CkwTmInfo
1031 PUBLIC S16 cmUnpkCkwTmInfo
1037 PUBLIC S16 cmUnpkCkwTmInfo(param, mBuf)
1042 TRC3(cmUnpkCkwTmInfo)
1044 CMCHKUNPK(SUnpkU32, &(param->dl.buffSize), mBuf);
1047 } /* cmUnpkCkwTmInfo */
1052 * Fun: cmUnpkCkwUmInfo
1054 * Desc: pack the structure CkwUmInfo
1064 PUBLIC S16 cmUnpkCkwUmInfo
1066 CkwEntCfgInfo *param,
1070 PUBLIC S16 cmUnpkCkwUmInfo(param, mBuf)
1071 CkwEntCfgInfo *param;
1075 TRC3(cmUnpkCkwUmInfo)
1079 case CKW_CFG_DIR_DL:
1081 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.dl.snLen), mBuf);
1084 case CKW_CFG_DIR_UL:
1086 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.snLen), mBuf);
1087 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.reOrdTmr), mBuf);
1090 /* Patch ckw_c_001.main_3 */
1091 case CKW_CFG_DIR_BOTH:
1093 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.snLen), mBuf);
1094 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.reOrdTmr), mBuf);
1095 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.dl.snLen), mBuf);
1101 } /* cmUnpkCkwUmInfo */
1106 * Fun: cmUnpkCkwAmInfo
1108 * Desc: pack the structure CkwAmInfo
1118 PUBLIC S16 cmUnpkCkwAmInfo
1124 PUBLIC S16 cmUnpkCkwAmInfo(param, mBuf)
1129 TRC3(cmUnpkCkwAmInfo)
1132 CMCHKUNPK(SUnpkU8, &(param->dl.snLen), mBuf);
1133 CMCHKUNPK(SUnpkU16, &(param->dl.pollRetxTmr), mBuf);
1134 CMCHKUNPK(SUnpkS16, &(param->dl.pollPdu), mBuf);
1135 CMCHKUNPK(SUnpkS32, &(param->dl.pollByte), mBuf);
1136 CMCHKUNPK(SUnpkU8, &(param->dl.maxRetx), mBuf);
1139 CMCHKUNPK(SUnpkU8, &(param->ul.snLen), mBuf);
1140 CMCHKUNPK(SUnpkU16, &(param->ul.staProhTmr), mBuf);
1141 CMCHKUNPK(SUnpkU8, &(param->ul.reOrdTmr), mBuf);
1144 } /* cmUnpkCkwAmInfo */
1149 * Fun: cmUnpkCkwLChInfo
1151 * Desc: pack the structure CkwLChInfo
1161 PUBLIC S16 cmUnpkCkwLChInfo
1167 PUBLIC S16 cmUnpkCkwLChInfo(param, mBuf)
1172 TRC3(cmUnpkCkwLChInfo)
1174 CMCHKUNPK(SUnpkU8, &(param->lChId), mBuf);
1175 CMCHKUNPK(SUnpkU8, &(param->type), mBuf);
1178 } /* cmUnpkCkwLChInfo */
1183 * Fun: cmUnpkCkwEntCfgCfmInfo
1185 * Desc: unpack the structure CkwEntCfgInfo
1195 PUBLIC S16 cmUnpkCkwEntCfgCfmInfo
1197 CkwEntCfgCfmInfo *param,
1201 PUBLIC S16 cmUnpkCkwEntCfgCfmInfo(param, mBuf)
1202 CkwEntCfgCfmInfo *param;
1206 TRC3(cmUnpkCkwEntCfgCfmInfo)
1208 CMCHKUNPK(SUnpkU8, &(param->rbId), mBuf);
1209 CMCHKUNPK(SUnpkU8, &(param->rbType), mBuf);
1210 CMCHKUNPK(cmUnpkCmStatus, &(param->status), mBuf);
1213 } /* cmUnpkCkwEntCfgCfmInfo */
1218 * Fun: cmUnpkCkwCfgCfmInfo
1220 * Desc: pack the structure CkwCfgCfmInfo
1230 PUBLIC S16 cmUnpkCkwCfgCfmInfo
1232 CkwCfgCfmInfo *param,
1237 PUBLIC S16 cmUnpkCkwCfgCfmInfo(param, pst, mBuf)
1238 CkwCfgCfmInfo *param;
1245 TRC3(cmUnpkCkwCfgCfmInfo)
1247 CMCHKUNPKLOG(SUnpkU32, &(param->transId), mBuf, ECKW030, pst);
1248 CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1249 CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1250 CMCHKUNPK(SUnpkU8, &(param->numEnt), mBuf);
1252 for (idx = 0; idx < param->numEnt; idx++)
1254 CMCHKUNPK(cmUnpkCkwEntCfgCfmInfo, &(param->entCfgCfm[idx]), mBuf);
1258 } /* cmUnpkCkwCfgCfmInfo */
1263 * Fun: cmUnpkCkwEntCfgInfo
1265 * Desc: pack the structure CkwEntCfgCfmInfo
1275 PUBLIC S16 cmUnpkCkwEntCfgInfo
1277 CkwEntCfgInfo *param,
1281 PUBLIC S16 cmUnpkCkwEntCfgInfo(param, mBuf)
1282 CkwEntCfgInfo *param;
1286 TRC3(cmUnpkCkwEntCfgInfo)
1288 CMCHKUNPK(SUnpkU8, &(param->cfgType), mBuf);
1289 CMCHKUNPK(SUnpkU8, &(param->rbId), mBuf);
1290 CMCHKUNPK(SUnpkU8, &(param->rbType), mBuf);
1291 CMCHKUNPK(SUnpkU8, &(param->qci), mBuf);
1292 CMCHKUNPK(cmUnpkLteRlcMode, &(param->entMode), mBuf);
1293 CMCHKUNPK(SUnpkU8, &(param->dir), mBuf);
1294 CMCHKUNPK(SUnpkS16, &(param->discardTmr), mBuf);
1295 #ifdef TENB_MULT_CELL_SUPPRT
1296 CMCHKUNPK(SUnpkS16, &(param->rguSapId), mBuf);
1299 /* Logical Channel Information */
1300 switch(param->entMode)
1302 case CM_LTE_MODE_TM:
1304 CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[0]), mBuf);
1307 /* ccpu00128195: Unpacking lCh[0] and lCh[1] for UM bearer as well */
1308 case CM_LTE_MODE_UM:
1309 case CM_LTE_MODE_AM:
1311 CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[0]), mBuf);
1312 CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[1]), mBuf);
1318 switch(param->entMode)
1320 case CM_LTE_MODE_TM:
1322 CMCHKUNPK(cmUnpkCkwTmInfo, &(param->m.tmInfo), mBuf);
1325 case CM_LTE_MODE_UM:
1327 CMCHKUNPK(cmUnpkCkwUmInfo, param, mBuf);
1330 case CM_LTE_MODE_AM:
1332 CMCHKUNPK(cmUnpkCkwAmInfo, &(param->m.amInfo), mBuf);
1338 } /* cmUnpkCkwEntCfgInfo */
1343 * Fun: cmUnpkCkwCfgInfo
1345 * Desc: unpack the structure CkwCfgInfo
1355 PUBLIC S16 cmUnpkCkwCfgInfo
1362 PUBLIC S16 cmUnpkCkwCfgInfo(param, pst, mBuf)
1370 TRC3(cmUnpkCkwCfgInfo)
1372 CMCHKUNPKLOG(SUnpkU32, &(param->transId), mBuf, ECKW031, pst);
1373 CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1374 CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1375 CMCHKUNPK(SUnpkU8, &(param->numEnt), mBuf);
1377 for (idx = 0; idx < param->numEnt; idx++)
1379 CMCHKUNPKLOG(cmUnpkCkwEntCfgInfo,&(param->entCfg[idx]), mBuf, ECKW032, pst);
1383 } /* cmUnpkCkwCfgInfo */
1388 * Fun: unpackUeCreateReq
1390 * Desc: unpack the primitive UE create request
1400 PUBLIC S16 unpackUeCreateReq
1407 PUBLIC S16 cmUnpkCkwCfgReq(func, pst, mBuf)
1414 CkwCfgInfo *cfgInfo = NULLP;
1416 TRC3(unpackUeCreateReq)
1418 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&cfgInfo,\
1419 sizeof(CkwCfgInfo))) != ROK)
1421 #if (ERRCLASS & ERRCLS_ADD_RES)
1423 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1424 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1425 (ErrVal)ECKW033, (ErrVal)0, "SGetMsg() failed");
1427 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1431 switch(pst->selector)
1435 CMCHKUNPK(cmUnpkPtr,(PTR *) &cfgInfo, mBuf);
1441 RETVALUE((*func)(pst, cfgInfo));
1442 } /* cmUnpkCkwCfgReq */
1447 * Fun: cmUnpkCkwCfgCfm
1449 * Desc: unpack the primitive KwUiCkwCfgCfm
1459 PUBLIC S16 cmUnpkCkwCfgCfm
1466 PUBLIC S16 cmUnpkCkwCfgCfm(func, pst, mBuf)
1474 CkwCfgCfmInfo *cfgCfmInfo = NULLP;
1476 TRC3(cmUnpkCkwCfgCfm)
1478 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&cfgCfmInfo,\
1479 sizeof(CkwCfgCfmInfo))) != ROK)
1481 #if (ERRCLASS & ERRCLS_ADD_RES)
1484 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1485 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1486 (ErrVal)ECKW035, (ErrVal)0, "SGetMsg() failed");
1488 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1492 cmMemset((U8 *)cfgCfmInfo, 0, sizeof(CkwCfgCfmInfo));
1494 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1496 switch(pst->selector)
1501 ret1 = cmUnpkCkwCfgCfmInfo( (cfgCfmInfo), pst, mBuf);
1502 #if(ERRCLASS & ERRCLS_DEBUG)
1506 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1507 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1508 (ErrVal)ECKW036, (ErrVal)ret1, "Unpacking failure");
1511 #endif /* ERRCLASS & ERRCLS_DEBUG */
1518 RETVALUE((*func)(pst, suId, cfgCfmInfo));
1519 } /* cmUnpkCkwCfgCfm */
1523 * Fun: cmUnpkCkwUeInfo
1525 * Desc: Unpack the primitive KwUiCkwUeInfo
1535 PUBLIC S16 cmUnpkCkwUeInfo
1541 PUBLIC S16 cmUnpkCkwUeInfo(param, mBuf)
1546 TRC2(cmUnpkCkwUeInfo)
1548 CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1549 CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1556 * Fun: cmUnpkCkwUeIdChgReq
1558 * Desc: unpack the primitive KwUiCkwUeIdChgReq
1568 PUBLIC S16 cmUnpkCkwUeIdChgReq
1575 PUBLIC S16 cmUnpkCkwUeIdChgReq(func, pst, mBuf)
1584 CkwUeInfo *ueInfo = NULLP;
1585 CkwUeInfo *newUeInfo = NULLP;
1587 TRC3(cmUnpkCkwUeIdChgReq)
1590 CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1591 CMCHKUNPKLOG(SUnpkU32, &transId, mBuf, ECKW037, pst);
1593 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo,\
1594 sizeof(CkwUeInfo))) != ROK)
1596 #if (ERRCLASS & ERRCLS_ADD_RES)
1598 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1599 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1600 (ErrVal)ECKW038, (ErrVal)0, "SGetMsg() failed");
1602 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1606 cmMemset((U8 *)ueInfo, 0, sizeof(CkwUeInfo));
1608 ret1 = cmUnpkCkwUeInfo((ueInfo), mBuf);
1609 #if(ERRCLASS & ERRCLS_DEBUG)
1613 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1614 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1615 (ErrVal)ECKW039, (ErrVal)ret1, "Unpacking failure");
1618 #endif /* ERRCLASS & ERRCLS_DEBUG */
1620 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&newUeInfo,\
1621 sizeof(CkwUeInfo))) != ROK)
1623 #if (ERRCLASS & ERRCLS_ADD_RES)
1625 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1626 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1627 (ErrVal)ECKW040, (ErrVal)0, "SGetMsg() failed");
1629 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1633 cmMemset((U8 *)newUeInfo, 0, sizeof(CkwUeInfo));
1635 ret1 = cmUnpkCkwUeInfo((newUeInfo), mBuf);
1636 #if(ERRCLASS & ERRCLS_DEBUG)
1640 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1641 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1642 (ErrVal)ECKW041, (ErrVal)ret1, "Unpacking failure");
1645 #endif /* ERRCLASS & ERRCLS_DEBUG */
1649 RETVALUE((*func)(pst, spId, transId, ueInfo, newUeInfo));
1651 } /* cmUnpkCkwUeIdChgReq */
1655 * Fun: cmUnpkCkwUeIdChgCfm
1657 * Desc: unpack the primitive KwUiCkwUeIdChgCfm
1667 PUBLIC S16 cmUnpkCkwUeIdChgCfm
1674 PUBLIC S16 cmUnpkCkwUeIdChgCfm(func, pst, mBuf)
1683 CkwUeInfo *ueInfo = NULLP;
1686 TRC3(cmUnpkCkwUeIdChgCfm)
1688 cmMemset((U8 *)&status, (U8)0, (PTR)sizeof(CmStatus));
1690 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1691 CMCHKUNPKLOG(SUnpkU32, &transId, mBuf, ECKW042, pst);
1693 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo,\
1694 sizeof(CkwUeInfo))) != ROK)
1696 #if (ERRCLASS & ERRCLS_ADD_RES)
1699 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1700 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1701 (ErrVal)ECKW043, (ErrVal)0, "SGetMsg() failed");
1703 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1707 cmMemset((U8 *)ueInfo, 0, sizeof(CkwUeInfo));
1709 ret1 = cmUnpkCkwUeInfo((ueInfo), mBuf);
1710 #if(ERRCLASS & ERRCLS_DEBUG)
1714 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1715 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1716 (ErrVal)ECKW044, (ErrVal)ret1, "Unpacking failure");
1719 #endif /* ERRCLASS & ERRCLS_DEBUG */
1721 CMCHKUNPK(cmUnpkCmStatus, &status, mBuf);
1725 RETVALUE((*func)(pst, suId, transId, ueInfo, status));
1727 } /* cmUnpkCkwUeIdChgCfm */
1732 #endif /* __cplusplus */
1735 /**********************************************************************
1737 **********************************************************************/