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 "common_def.h"
35 /* extern (.x) include files */
40 #endif /*for extern "C"*/
47 * Desc: pack the primitive CkwBndReq
57 PUBLIC S16 cmPkCkwBndReq
64 PUBLIC S16 cmPkCkwBndReq(pst, suId, spId)
75 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
77 #if (ERRCLASS & ERRCLS_ADD_RES)
80 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
81 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
82 (ErrVal)ECKW001, (ErrVal)0, "SGetMsg() failed");
84 #endif /* ERRCLASS & ERRCLS_ADD_RES */
87 CMCHKPKLOG(SPkS16, spId, mBuf, ECKW002, pst);
88 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW003, pst);
89 pst->event = (Event) CKW_EVT_BND_REQ;
91 RETVALUE(SPstTsk(pst,mBuf));
92 } /*end of function cmPkCkwBndReq*/
98 * Desc: pack the primitive CkwUbndReq
108 PUBLIC S16 cmPkCkwUbndReq
115 PUBLIC S16 cmPkCkwUbndReq(pst, spId, reason)
126 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
128 #if (ERRCLASS & ERRCLS_ADD_RES)
131 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
132 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
133 (ErrVal)ECKW004, (ErrVal)0, "SGetMsg() failed");
135 #endif /* ERRCLASS & ERRCLS_ADD_RES */
138 CMCHKPKLOG(SPkS16, reason, mBuf, ECKW005, pst);
139 CMCHKPKLOG(SPkS16, spId, mBuf, ECKW006, pst);
140 pst->event = (Event) CKW_EVT_UBND_REQ;
142 RETVALUE(SPstTsk(pst,mBuf));
143 } /*end of function cmPkCkwUbndReq*/
149 * Desc: pack the primitive CkwBndCfm
159 PUBLIC S16 cmPkCkwBndCfm
166 PUBLIC S16 cmPkCkwBndCfm(pst, suId, status)
177 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
179 #if (ERRCLASS & ERRCLS_ADD_RES)
182 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
183 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
184 (ErrVal)ECKW007, (ErrVal)0, "SGetMsg() failed");
187 #endif /* ERRCLASS & ERRCLS_ADD_RES */
190 CMCHKPKLOG(SPkU8, status, mBuf, ECKW008, pst);
191 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW009, pst);
192 pst->event = (Event) CKW_EVT_BND_CFM;
194 RETVALUE(SPstTsk(pst,mBuf));
195 } /*end of function cmPkCkwBndCfm*/
202 * Desc: pack the structure CkwTmInfo
212 PUBLIC S16 cmPkCkwTmInfo
218 PUBLIC S16 cmPkCkwTmInfo(param, mBuf)
225 CMCHKPK(SPkU32, param->dl.buffSize, mBuf);
228 } /* cmPkCkwTmInfo */
235 * Desc: pack the structure CkwUmInfo
245 PUBLIC S16 cmPkCkwUmInfo
247 CkwEntCfgInfo *param,
251 PUBLIC S16 cmPkCkwUmInfo(param, mBuf)
252 CkwEntCfgInfo *param;
262 CMCHKPK(SPkU8, param->m.umInfo.dl.snLen, mBuf);
267 CMCHKPK(SPkU8, param->m.umInfo.ul.reOrdTmr, mBuf);
268 CMCHKPK(SPkU8, param->m.umInfo.ul.snLen, mBuf);
271 /* Patch ckw_c_001.main_3 */
272 case CKW_CFG_DIR_BOTH:
274 CMCHKPK(SPkU8, param->m.umInfo.dl.snLen, mBuf);
275 CMCHKPK(SPkU8, param->m.umInfo.ul.reOrdTmr, mBuf);
276 CMCHKPK(SPkU8, param->m.umInfo.ul.snLen, mBuf);
282 } /* cmPkCkwUmInfo */
289 * Desc: pack the structure CkwAmInfo
299 PUBLIC S16 cmPkCkwAmInfo
305 PUBLIC S16 cmPkCkwAmInfo(param, mBuf)
313 CMCHKPK(SPkU8, param->ul.reOrdTmr, mBuf);
314 CMCHKPK(SPkU16, param->ul.staProhTmr, mBuf);
315 CMCHKPK(SPkU8, param->ul.snLen, mBuf);
318 CMCHKPK(SPkU8, param->dl.maxRetx, mBuf);
319 CMCHKPK(SPkS32, param->dl.pollByte, mBuf);
320 CMCHKPK(SPkS16, param->dl.pollPdu, mBuf);
321 CMCHKPK(SPkU16, param->dl.pollRetxTmr, mBuf);
322 CMCHKPK(SPkU8, param->dl.snLen, mBuf);
325 } /* cmPkCkwAmInfo */
332 * Desc: pack the structure CkwLChInfo
342 PUBLIC S16 cmPkCkwLChInfo
348 PUBLIC S16 cmPkCkwLChInfo(param, mBuf)
355 CMCHKPK(SPkU8, param->type, mBuf);
356 CMCHKPK(SPkU8, param->lChId, mBuf);
359 } /* cmPkCkwLChInfo */
364 * Fun: cmPkCkwEntCfgInfo
366 * Desc: pack the structure CkwEntCfgInfo
376 PUBLIC S16 cmPkCkwEntCfgInfo
378 CkwEntCfgInfo *param,
382 PUBLIC S16 cmPkCkwEntCfgInfo(param, mBuf)
383 CkwEntCfgInfo *param;
387 TRC3(cmPkCkwEntCfgInfo)
389 switch(param->entMode)
393 CMCHKPK(cmPkCkwTmInfo, &(param->m.tmInfo), mBuf);
398 CMCHKPK(cmPkCkwUmInfo, param, mBuf);
403 CMCHKPK(cmPkCkwAmInfo, &(param->m.amInfo), mBuf);
408 /* Logical Channel Information */
409 switch(param->entMode)
413 CMCHKPK(cmPkCkwLChInfo, &(param->lCh[0]), mBuf);
416 /* ccpu00128195: Packing lCh[0] and lCh[1] for UM bearer as well */
420 CMCHKPK(cmPkCkwLChInfo, &(param->lCh[1]), mBuf);
421 CMCHKPK(cmPkCkwLChInfo, &(param->lCh[0]), mBuf);
426 #ifdef TENB_MULT_CELL_SUPPRT
427 CMCHKPK(SPkS16, param->rguSapId, mBuf);
429 CMCHKPK(SPkS16, param->discardTmr, mBuf);
430 CMCHKPK(SPkU8, param->dir, mBuf);
431 CMCHKPK(cmPkLteRlcMode, param->entMode, mBuf);
432 CMCHKPK(SPkU8, param->qci, mBuf);
433 CMCHKPK(SPkU8, param->rbType, mBuf);
434 CMCHKPK(SPkU8, param->rbId, mBuf);
435 CMCHKPK(SPkU8, param->cfgType, mBuf);
438 } /* cmPkCkwEntCfgInfo */
443 * Fun: cmPkCkwCfgInfo
445 * Desc: pack the structure CkwCfgInfo
455 PUBLIC S16 cmPkCkwCfgInfo
462 PUBLIC S16 cmPkCkwCfgInfo(param, pst, mBuf)
472 for (idx = param->numEnt-1; idx >= 0; idx--)
474 CMCHKPK(cmPkCkwEntCfgInfo, &(param->entCfg[idx]), mBuf);
477 CMCHKPK(SPkU8, param->numEnt, mBuf);
478 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
479 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
480 CMCHKPKLOG(SPkU32, param->transId, mBuf, ECKW010, pst);
483 } /* cmPkCkwCfgInfo */
488 * Fun: packUeCreateReq
490 * Desc: pack the primitive UE Create Req
500 PUBLIC S16 packUeCreateReq
506 PUBLIC S16 packUeCreateReq(pst, cfgInfo)
514 TRC3(packUeCreateReq)
516 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
518 #if (ERRCLASS & ERRCLS_ADD_RES)
521 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
522 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
523 (ErrVal)ECKW011, (ErrVal)0, "SGetMsg() failed");
525 #endif /* ERRCLASS & ERRCLS_ADD_RES */
529 switch(pst->selector)
531 case ODU_SELECTOR_LWLC:
533 CMCHKPK(cmPkPtr,(PTR) cfgInfo, mBuf);
537 pst->event = (Event) RLC_EVT_UE_CREATE_REQ;
539 RETVALUE(SPstTsk(pst,mBuf));
540 } /* packUeCreateReq */
545 * Fun: cmPkCkwEntCfgCfmInfo
547 * Desc: pack the structure CkwEntCfgInfo
557 PUBLIC S16 cmPkCkwEntCfgCfmInfo
559 CkwEntCfgCfmInfo *param,
563 PUBLIC S16 cmPkCkwEntCfgCfmInfo(param, mBuf)
564 CkwEntCfgCfmInfo *param;
568 TRC3(cmPkCkwEntCfgCfmInfo)
570 CMCHKPK(cmPkCmStatus, &(param->status), mBuf);
571 CMCHKPK(SPkU8, param->rbType, mBuf);
572 CMCHKPK(SPkU8, param->rbId, mBuf);
575 } /* cmPkCkwEntCfgCfmInfo */
580 * Fun: cmPkCkwCfgCfmInfo
582 * Desc: pack the structure CkwCfgCfmInfo
592 PUBLIC S16 cmPkCkwCfgCfmInfo
594 CkwCfgCfmInfo *param,
599 PUBLIC S16 cmPkCkwCfgCfmInfo(param, pst, mBuf)
600 CkwCfgCfmInfo *param;
607 TRC3(cmPkCkwCfgCfmInfo)
609 for (idx = param->numEnt-1; idx >= 0; idx--)
611 CMCHKPK(cmPkCkwEntCfgCfmInfo, &(param->entCfgCfm[(U8)idx]), mBuf);
614 CMCHKPK(SPkU8, param->numEnt, mBuf);
615 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
616 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
617 CMCHKPKLOG(SPkU32, param->transId, mBuf, ECKW014, pst);
620 } /* cmPkCkwCfgCfmInfo */
627 * Desc: pack the primitive KwUiCkwCfgCfm
637 PUBLIC S16 cmPkCkwCfgCfm
641 CkwCfgCfmInfo *cfgCfmInfo
644 PUBLIC S16 cmPkCkwCfgCfm(pst, suId, cfgCfmInfo)
647 CkwCfgCfmInfo *cfgCfmInfo;
655 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
657 #if (ERRCLASS & ERRCLS_ADD_RES)
660 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
661 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
662 (ErrVal)ECKW015, (ErrVal)0, "SGetMsg() failed");
664 #endif /* ERRCLASS & ERRCLS_ADD_RES */
668 switch(pst->selector)
671 case ODU_SELECTOR_LC:
673 ret1 = cmPkCkwCfgCfmInfo( (cfgCfmInfo), pst, mBuf);
674 #if (ERRCLASS & ERRCLS_ADD_RES)
678 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
679 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
680 (ErrVal)ECKW016, (ErrVal)ret1, "Packing failure");
683 #endif /* ERRCLASS & ERRCLS_ADD_RES */
684 if (SPutSBuf(pst->region, pst->pool, (Data *)cfgCfmInfo,
685 sizeof(CkwCfgCfmInfo)) != ROK)
696 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW017, pst);
697 pst->event = (Event) CKW_EVT_CFG_CFM;
699 RETVALUE(SPstTsk(pst,mBuf));
700 } /* cmPkCkwCfgCfm */
706 * Desc: pack the primitive KwUiCkwUeInfo
716 PUBLIC S16 cmPkCkwUeInfo
722 PUBLIC S16 cmPkCkwUeInfo(param, mBuf)
729 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
730 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
737 * Fun: cmPkCkwUeIdChgReq
739 * Desc: pack the primitive KwUiCkwUeIdChgReq
749 PUBLIC S16 cmPkCkwUeIdChgReq
758 PUBLIC S16 cmPkCkwUeIdChgReq(pst, spId, transId, ueInfo, newUeInfo)
763 CkwUeInfo *newUeInfo;
767 Buffer *mBuf = NULLP;
769 TRC3(cmPkCkwUeIdChgReq)
771 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
773 #if (ERRCLASS & ERRCLS_ADD_RES)
776 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
777 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
778 (ErrVal)ECKW018, (ErrVal)0, "SGetMsg() failed");
780 #endif /* ERRCLASS & ERRCLS_ADD_RES */
785 CMCHKPK(cmPkCkwUeInfo, newUeInfo, mBuf);
786 if (SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo,
787 sizeof(CkwUeInfo)) != ROK)
792 CMCHKPK(cmPkCkwUeInfo, ueInfo, mBuf);
793 if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo,
794 sizeof(CkwUeInfo)) != ROK)
799 CMCHKPKLOG(SPkU32, transId, mBuf, ECKW019, pst);
800 CMCHKPKLOG(SPkS16, spId, mBuf, ECKW020, pst);
801 pst->event = (Event) CKW_EVT_UEIDCHG_REQ;
803 RETVALUE(SPstTsk(pst, mBuf));
805 } /* cmPkCkwUeIdChgReq */
809 * Fun: cmPkCkwUeIdChgCfm
811 * Desc: pack the primitive KwUiCkwUeIdChgCfm
821 PUBLIC S16 cmPkCkwUeIdChgCfm
830 PUBLIC S16 cmPkCkwUeIdChgCfm(pst, suId, transId, ueInfo, status)
839 Buffer *mBuf = NULLP;
841 TRC3(cmPkCkwUeIdChgCfm)
843 if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
845 #if (ERRCLASS & ERRCLS_ADD_RES)
848 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
849 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
850 (ErrVal)ECKW021, (ErrVal)0, "SGetMsg() failed");
852 #endif /* ERRCLASS & ERRCLS_ADD_RES */
857 CMCHKPK(cmPkCmStatus, &status, mBuf);
858 CMCHKPK(cmPkCkwUeInfo, ueInfo, mBuf);
859 if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo,
860 sizeof(CkwUeInfo)) != ROK)
865 CMCHKPKLOG(SPkU32, transId, mBuf, ECKW022, pst);
866 CMCHKPKLOG(SPkS16, suId, mBuf, ECKW023, pst);
867 pst->event = (Event) CKW_EVT_UEIDCHG_CFM;
869 RETVALUE(SPstTsk(pst, mBuf));
871 } /* cmPkCkwUeIdChgCfm */
874 /******************************************************************************
876 *****************************************************************************/
880 * Fun: cmUnpkCkwBndReq
882 * Desc: unpack the primitive CkwBndReq
892 PUBLIC S16 cmUnpkCkwBndReq
899 PUBLIC S16 cmUnpkCkwBndReq(func, pst, mBuf)
908 TRC3(cmUnpkCkwBndReq)
910 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, ECKW024, pst);
911 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, ECKW025, pst);
914 RETVALUE((*func)(pst, suId, spId));
915 } /*end of function cmUnpkCkwBndReq*/
919 * Fun: cmUnpkCkwUbndReq
921 * Desc: unpack the primitive CkwUbndReq
931 PUBLIC S16 cmUnpkCkwUbndReq
938 PUBLIC S16 cmUnpkCkwUbndReq(func, pst, mBuf)
947 TRC3(cmUnpkCkwUbndReq)
949 CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, ECKW026, pst);
950 CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, ECKW027, pst);
952 RETVALUE((*func)(pst, spId, reason));
953 } /*end of function cmUnpkCkwUbndReq*/
957 * Fun: cmUnpkCkwBndCfm
959 * Desc: unpack the primitive CkwBndCfm
969 PUBLIC S16 cmUnpkCkwBndCfm
976 PUBLIC S16 cmUnpkCkwBndCfm(func, pst, mBuf)
985 TRC3(cmUnpkCkwBndCfm)
987 CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, ECKW028, pst);
988 CMCHKUNPKLOG(SUnpkU8, &status, mBuf, ECKW029, pst);
991 RETVALUE((*func)(pst, suId, status));
992 } /*end of function cmUnpkCkwBndCfm*/
997 * Fun: cmUnpkCkwTmInfo
999 * Desc: pack the structure CkwTmInfo
1009 PUBLIC S16 cmUnpkCkwTmInfo
1015 PUBLIC S16 cmUnpkCkwTmInfo(param, mBuf)
1020 TRC3(cmUnpkCkwTmInfo)
1022 CMCHKUNPK(SUnpkU32, &(param->dl.buffSize), mBuf);
1025 } /* cmUnpkCkwTmInfo */
1030 * Fun: cmUnpkCkwUmInfo
1032 * Desc: pack the structure CkwUmInfo
1042 PUBLIC S16 cmUnpkCkwUmInfo
1044 CkwEntCfgInfo *param,
1048 PUBLIC S16 cmUnpkCkwUmInfo(param, mBuf)
1049 CkwEntCfgInfo *param;
1053 TRC3(cmUnpkCkwUmInfo)
1057 case CKW_CFG_DIR_DL:
1059 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.dl.snLen), mBuf);
1062 case CKW_CFG_DIR_UL:
1064 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.snLen), mBuf);
1065 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.reOrdTmr), mBuf);
1068 /* Patch ckw_c_001.main_3 */
1069 case CKW_CFG_DIR_BOTH:
1071 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.snLen), mBuf);
1072 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.ul.reOrdTmr), mBuf);
1073 CMCHKUNPK(SUnpkU8, &(param->m.umInfo.dl.snLen), mBuf);
1079 } /* cmUnpkCkwUmInfo */
1084 * Fun: cmUnpkCkwAmInfo
1086 * Desc: pack the structure CkwAmInfo
1096 PUBLIC S16 cmUnpkCkwAmInfo
1102 PUBLIC S16 cmUnpkCkwAmInfo(param, mBuf)
1107 TRC3(cmUnpkCkwAmInfo)
1110 CMCHKUNPK(SUnpkU8, &(param->dl.snLen), mBuf);
1111 CMCHKUNPK(SUnpkU16, &(param->dl.pollRetxTmr), mBuf);
1112 CMCHKUNPK(SUnpkS16, &(param->dl.pollPdu), mBuf);
1113 CMCHKUNPK(SUnpkS32, &(param->dl.pollByte), mBuf);
1114 CMCHKUNPK(SUnpkU8, &(param->dl.maxRetx), mBuf);
1117 CMCHKUNPK(SUnpkU8, &(param->ul.snLen), mBuf);
1118 CMCHKUNPK(SUnpkU16, &(param->ul.staProhTmr), mBuf);
1119 CMCHKUNPK(SUnpkU8, &(param->ul.reOrdTmr), mBuf);
1122 } /* cmUnpkCkwAmInfo */
1127 * Fun: cmUnpkCkwLChInfo
1129 * Desc: pack the structure CkwLChInfo
1139 PUBLIC S16 cmUnpkCkwLChInfo
1145 PUBLIC S16 cmUnpkCkwLChInfo(param, mBuf)
1150 TRC3(cmUnpkCkwLChInfo)
1152 CMCHKUNPK(SUnpkU8, &(param->lChId), mBuf);
1153 CMCHKUNPK(SUnpkU8, &(param->type), mBuf);
1156 } /* cmUnpkCkwLChInfo */
1161 * Fun: cmUnpkCkwEntCfgCfmInfo
1163 * Desc: unpack the structure CkwEntCfgInfo
1173 PUBLIC S16 cmUnpkCkwEntCfgCfmInfo
1175 CkwEntCfgCfmInfo *param,
1179 PUBLIC S16 cmUnpkCkwEntCfgCfmInfo(param, mBuf)
1180 CkwEntCfgCfmInfo *param;
1184 TRC3(cmUnpkCkwEntCfgCfmInfo)
1186 CMCHKUNPK(SUnpkU8, &(param->rbId), mBuf);
1187 CMCHKUNPK(SUnpkU8, &(param->rbType), mBuf);
1188 CMCHKUNPK(cmUnpkCmStatus, &(param->status), mBuf);
1191 } /* cmUnpkCkwEntCfgCfmInfo */
1196 * Fun: cmUnpkCkwCfgCfmInfo
1198 * Desc: pack the structure CkwCfgCfmInfo
1208 PUBLIC S16 cmUnpkCkwCfgCfmInfo
1210 CkwCfgCfmInfo *param,
1215 PUBLIC S16 cmUnpkCkwCfgCfmInfo(param, pst, mBuf)
1216 CkwCfgCfmInfo *param;
1223 TRC3(cmUnpkCkwCfgCfmInfo)
1225 CMCHKUNPKLOG(SUnpkU32, &(param->transId), mBuf, ECKW030, pst);
1226 CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1227 CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1228 CMCHKUNPK(SUnpkU8, &(param->numEnt), mBuf);
1230 for (idx = 0; idx < param->numEnt; idx++)
1232 CMCHKUNPK(cmUnpkCkwEntCfgCfmInfo, &(param->entCfgCfm[idx]), mBuf);
1236 } /* cmUnpkCkwCfgCfmInfo */
1241 * Fun: cmUnpkCkwEntCfgInfo
1243 * Desc: pack the structure CkwEntCfgCfmInfo
1253 PUBLIC S16 cmUnpkCkwEntCfgInfo
1255 CkwEntCfgInfo *param,
1259 PUBLIC S16 cmUnpkCkwEntCfgInfo(param, mBuf)
1260 CkwEntCfgInfo *param;
1264 TRC3(cmUnpkCkwEntCfgInfo)
1266 CMCHKUNPK(SUnpkU8, &(param->cfgType), mBuf);
1267 CMCHKUNPK(SUnpkU8, &(param->rbId), mBuf);
1268 CMCHKUNPK(SUnpkU8, &(param->rbType), mBuf);
1269 CMCHKUNPK(SUnpkU8, &(param->qci), mBuf);
1270 CMCHKUNPK(cmUnpkLteRlcMode, &(param->entMode), mBuf);
1271 CMCHKUNPK(SUnpkU8, &(param->dir), mBuf);
1272 CMCHKUNPK(SUnpkS16, &(param->discardTmr), mBuf);
1273 #ifdef TENB_MULT_CELL_SUPPRT
1274 CMCHKUNPK(SUnpkS16, &(param->rguSapId), mBuf);
1277 /* Logical Channel Information */
1278 switch(param->entMode)
1280 case CM_LTE_MODE_TM:
1282 CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[0]), mBuf);
1285 /* ccpu00128195: Unpacking lCh[0] and lCh[1] for UM bearer as well */
1286 case CM_LTE_MODE_UM:
1287 case CM_LTE_MODE_AM:
1289 CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[0]), mBuf);
1290 CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[1]), mBuf);
1296 switch(param->entMode)
1298 case CM_LTE_MODE_TM:
1300 CMCHKUNPK(cmUnpkCkwTmInfo, &(param->m.tmInfo), mBuf);
1303 case CM_LTE_MODE_UM:
1305 CMCHKUNPK(cmUnpkCkwUmInfo, param, mBuf);
1308 case CM_LTE_MODE_AM:
1310 CMCHKUNPK(cmUnpkCkwAmInfo, &(param->m.amInfo), mBuf);
1316 } /* cmUnpkCkwEntCfgInfo */
1321 * Fun: cmUnpkCkwCfgInfo
1323 * Desc: unpack the structure CkwCfgInfo
1333 PUBLIC S16 cmUnpkCkwCfgInfo
1340 PUBLIC S16 cmUnpkCkwCfgInfo(param, pst, mBuf)
1348 TRC3(cmUnpkCkwCfgInfo)
1350 CMCHKUNPKLOG(SUnpkU32, &(param->transId), mBuf, ECKW031, pst);
1351 CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1352 CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1353 CMCHKUNPK(SUnpkU8, &(param->numEnt), mBuf);
1355 for (idx = 0; idx < param->numEnt; idx++)
1357 CMCHKUNPKLOG(cmUnpkCkwEntCfgInfo,&(param->entCfg[idx]), mBuf, ECKW032, pst);
1361 } /* cmUnpkCkwCfgInfo */
1366 * Fun: unpackUeCreateReq
1368 * Desc: unpack the primitive UE create request
1378 PUBLIC S16 unpackUeCreateReq
1385 PUBLIC S16 cmUnpkCkwCfgReq(func, pst, mBuf)
1392 CkwCfgInfo *cfgInfo = NULLP;
1394 TRC3(unpackUeCreateReq)
1396 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&cfgInfo,\
1397 sizeof(CkwCfgInfo))) != ROK)
1399 #if (ERRCLASS & ERRCLS_ADD_RES)
1401 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1402 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1403 (ErrVal)ECKW033, (ErrVal)0, "SGetMsg() failed");
1405 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1409 switch(pst->selector)
1411 case ODU_SELECTOR_LWLC:
1413 CMCHKUNPK(cmUnpkPtr,(PTR *) &cfgInfo, mBuf);
1419 RETVALUE((*func)(pst, cfgInfo));
1420 } /* cmUnpkCkwCfgReq */
1425 * Fun: cmUnpkCkwCfgCfm
1427 * Desc: unpack the primitive KwUiCkwCfgCfm
1437 PUBLIC S16 cmUnpkCkwCfgCfm
1444 PUBLIC S16 cmUnpkCkwCfgCfm(func, pst, mBuf)
1452 CkwCfgCfmInfo *cfgCfmInfo = NULLP;
1454 TRC3(cmUnpkCkwCfgCfm)
1456 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&cfgCfmInfo,\
1457 sizeof(CkwCfgCfmInfo))) != ROK)
1459 #if (ERRCLASS & ERRCLS_ADD_RES)
1462 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1463 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1464 (ErrVal)ECKW035, (ErrVal)0, "SGetMsg() failed");
1466 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1470 cmMemset((U8 *)cfgCfmInfo, 0, sizeof(CkwCfgCfmInfo));
1472 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1474 switch(pst->selector)
1477 case ODU_SELECTOR_LC:
1479 ret1 = cmUnpkCkwCfgCfmInfo( (cfgCfmInfo), pst, mBuf);
1480 #if(ERRCLASS & ERRCLS_DEBUG)
1484 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1485 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1486 (ErrVal)ECKW036, (ErrVal)ret1, "Unpacking failure");
1489 #endif /* ERRCLASS & ERRCLS_DEBUG */
1496 RETVALUE((*func)(pst, suId, cfgCfmInfo));
1497 } /* cmUnpkCkwCfgCfm */
1501 * Fun: cmUnpkCkwUeInfo
1503 * Desc: Unpack the primitive KwUiCkwUeInfo
1513 PUBLIC S16 cmUnpkCkwUeInfo
1519 PUBLIC S16 cmUnpkCkwUeInfo(param, mBuf)
1524 TRC2(cmUnpkCkwUeInfo)
1526 CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1527 CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1534 * Fun: cmUnpkCkwUeIdChgReq
1536 * Desc: unpack the primitive KwUiCkwUeIdChgReq
1546 PUBLIC S16 cmUnpkCkwUeIdChgReq
1553 PUBLIC S16 cmUnpkCkwUeIdChgReq(func, pst, mBuf)
1562 CkwUeInfo *ueInfo = NULLP;
1563 CkwUeInfo *newUeInfo = NULLP;
1565 TRC3(cmUnpkCkwUeIdChgReq)
1568 CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1569 CMCHKUNPKLOG(SUnpkU32, &transId, mBuf, ECKW037, pst);
1571 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo,\
1572 sizeof(CkwUeInfo))) != ROK)
1574 #if (ERRCLASS & ERRCLS_ADD_RES)
1576 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1577 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1578 (ErrVal)ECKW038, (ErrVal)0, "SGetMsg() failed");
1580 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1584 cmMemset((U8 *)ueInfo, 0, sizeof(CkwUeInfo));
1586 ret1 = cmUnpkCkwUeInfo((ueInfo), mBuf);
1587 #if(ERRCLASS & ERRCLS_DEBUG)
1591 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1592 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1593 (ErrVal)ECKW039, (ErrVal)ret1, "Unpacking failure");
1596 #endif /* ERRCLASS & ERRCLS_DEBUG */
1598 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&newUeInfo,\
1599 sizeof(CkwUeInfo))) != ROK)
1601 #if (ERRCLASS & ERRCLS_ADD_RES)
1603 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1604 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1605 (ErrVal)ECKW040, (ErrVal)0, "SGetMsg() failed");
1607 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1611 cmMemset((U8 *)newUeInfo, 0, sizeof(CkwUeInfo));
1613 ret1 = cmUnpkCkwUeInfo((newUeInfo), mBuf);
1614 #if(ERRCLASS & ERRCLS_DEBUG)
1618 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1619 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1620 (ErrVal)ECKW041, (ErrVal)ret1, "Unpacking failure");
1623 #endif /* ERRCLASS & ERRCLS_DEBUG */
1627 RETVALUE((*func)(pst, spId, transId, ueInfo, newUeInfo));
1629 } /* cmUnpkCkwUeIdChgReq */
1633 * Fun: cmUnpkCkwUeIdChgCfm
1635 * Desc: unpack the primitive KwUiCkwUeIdChgCfm
1645 PUBLIC S16 cmUnpkCkwUeIdChgCfm
1652 PUBLIC S16 cmUnpkCkwUeIdChgCfm(func, pst, mBuf)
1661 CkwUeInfo *ueInfo = NULLP;
1664 TRC3(cmUnpkCkwUeIdChgCfm)
1666 cmMemset((U8 *)&status, (U8)0, (PTR)sizeof(CmStatus));
1668 CMCHKUNPK(SUnpkS16, &suId, mBuf);
1669 CMCHKUNPKLOG(SUnpkU32, &transId, mBuf, ECKW042, pst);
1671 if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo,\
1672 sizeof(CkwUeInfo))) != ROK)
1674 #if (ERRCLASS & ERRCLS_ADD_RES)
1677 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1678 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1679 (ErrVal)ECKW043, (ErrVal)0, "SGetMsg() failed");
1681 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1685 cmMemset((U8 *)ueInfo, 0, sizeof(CkwUeInfo));
1687 ret1 = cmUnpkCkwUeInfo((ueInfo), mBuf);
1688 #if(ERRCLASS & ERRCLS_DEBUG)
1692 SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1693 __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1694 (ErrVal)ECKW044, (ErrVal)ret1, "Unpacking failure");
1697 #endif /* ERRCLASS & ERRCLS_DEBUG */
1699 CMCHKUNPK(cmUnpkCmStatus, &status, mBuf);
1703 RETVALUE((*func)(pst, suId, transId, ueInfo, status));
1705 } /* cmUnpkCkwUeIdChgCfm */
1710 #endif /* __cplusplus */
1713 /**********************************************************************
1715 **********************************************************************/