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**
25 Desc: C Source code for common packing and unpacking functions
26 for RLC Layer Manager Interfaces. It contains the
27 following function definitions
43 *********************************************************************21*/
46 /* header include files (.h) */
47 #include "common_def.h"
48 #include "lkw.h" /* Layer manager */
50 /* header/extern include files (.x) */
52 #include "lkw.x" /* layer manager */
56 Txt ptNmb[LKW_PART_NUM_STR_LEN]; /* Part number */
59 /* forward references */
61 static S16 cmPkRlcMngmt ARGS ((RlcMngmt *param ,Event eventType,
63 static S16 cmPkRlcCfg ARGS ((RlcMngmt *param ,Elmnt elmnt, Buffer *mBuf));
64 static S16 cmPkRlcCntrl ARGS ((RlcMngmt *cntrl, Elmnt elmnt, Buffer *mBuf));
65 static S16 cmPkRlcUsta ARGS ((RlcMngmt *usta, Elmnt elmnt, Buffer *mBuf));
66 static S16 cmPkRlcSsta ARGS ((RlcMngmt *ssta, Elmnt etmnt, Event eventType,
68 static S16 cmPkRlcSts ARGS ((RlcMngmt *sts, Elmnt elmnt, Buffer *mBuf));
69 static S16 cmPkGenSts ARGS ((RlcGenSts *gen, Buffer *mBuf));
70 static S16 cmPkCkwSapSts ARGS ((RlcCkwCntSts *rcSap, Buffer *mBuf));
71 static S16 cmPkKwuSapSts ARGS ((RlcKwuSapSts *ruSap, Buffer *mBuf));
72 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
73 * in general statstics.
75 static S16 cmPkRlcTrc ARGS ((RlcMngmt *trc, Buffer *mBuf));
77 static S16 cmUnpkRlcMngmt ARGS ((RlcMngmt *param, Event eventType,
79 static S16 cmUnpkRlcCfg ARGS ((RlcMngmt *cfg, Elmnt elmnt, Buffer *mBuf));
80 static S16 cmUnpkRlcCntrl ARGS ((RlcMngmt *param, Elmnt elmnt, Buffer *mBuf));
81 static S16 cmUnpkRlcUsta ARGS ((RlcMngmt *usta, Elmnt elmnt, Buffer *mBuf));
82 static S16 cmUnpkRlcSsta ARGS ((RlcMngmt *ssta, Elmnt elmnt, Event eventType,
84 static S16 cmUnpkRlcSts ARGS ((RlcMngmt *sts, Elmnt elmnt, Buffer *mBuf));
85 static S16 cmUnpkGenSts ARGS ((RlcGenSts *gen, Buffer *mBuf));
86 static S16 cmUnpkCkwSapSts ARGS ((RlcCkwCntSts *rcSap, Buffer *mBuf));
87 static S16 cmUnpkKwuSapSts ARGS ((RlcKwuSapSts *ruSap, Buffer *mBuf));
88 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
89 * in general statstics.
91 static S16 cmUnpkRlcTrc ARGS ((RlcMngmt *trc, Buffer *mBuf));
94 static S16 cmPkCkwSapSta ARGS ((RlcCkwCntSapSta *rcSap, Buffer *mBuf));
95 static S16 cmUnpkCkwSapSta ARGS ((RlcCkwCntSapSta *rcSap, Buffer *mBuf));
97 static S16 cmPkKwuSapSta ARGS ((RlcKwuSapSta *rlSap, Buffer *mBuf));
98 static S16 cmUnpkKwuSapSta ARGS ((RlcKwuSapSta *rlSap, Buffer *mBuf));
100 static S16 cmPkRguSapSta ARGS ((RlcRguSapSta *mkSap, Buffer *mBuf));
101 static S16 cmUnpkRguSapSta ARGS ((RlcRguSapSta *mkSap, Buffer *mBuf));
107 * @param[in] pst : post structure
108 * @param[in] cfg : RLC LM structure
111 * -# Failure : RFAILED
117 Pst *pst, /* post structure */
118 RlcMngmt *cfg /* RLC LM structure */
121 S16 packRlcConfigReq(pst, cfg)
122 Pst *pst; /* post structure */
123 RlcMngmt *cfg; /* RLC LM structure */
126 Buffer *mBuf; /* message buffer */
127 S16 ret1; /* return value */
130 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
133 #if (ERRCLASS & ERRCLS_ADD_RES)
136 LKWLOGERROR(pst, ERRCLS_ADD_RES, ELKW001, (ErrVal) ret1,
137 "SGetMsg failed ...!\n");
139 #endif /* ERRCLASS & ERRCLS_ADD_RES */
143 ret1 = cmPkRlcMngmt(cfg, LKW_EVT_CFG_REQ, mBuf);
148 #if (ERRCLASS & ERRCLS_ADD_RES)
151 LKWLOGERROR(pst, ERRCLS_ADD_RES, ELKW002, (ErrVal) ret1,
152 "cmPkRlcMngmt failure ......!");
154 #endif /* ERRCLASS & ERRCLS_ADD_RES */
158 pst->event = (Event) LKW_EVT_CFG_REQ; /* event */
163 } /* end of packRlcConfigReq */
167 Unpack Config Request
169 * @param[in] func : primitive to call
170 * @param[in] pst : post structure
171 * @param[in] mBuf : message buffer
174 * -# Failure : RFAILED
178 uint8_t unpackRlcConfigReq
180 RlcConfigReq func, /* primitive to call */
181 Pst *pst, /* post structure */
182 Buffer *mBuf /* message buffer */
185 uint8_t unpackRlcConfigReq(func, pst, mBuf)
186 RlcConfigReq func; /* primitive to call */
187 Pst *pst; /* post structure */
188 Buffer *mBuf; /* message buffer */
191 S16 ret1; /* Return value */
192 RlcMngmt cfg; /* RLC LM structure */
195 memset(&cfg, 0, sizeof(RlcMngmt));
196 ret1 = cmUnpkRlcMngmt(&cfg, LKW_EVT_CFG_REQ, mBuf);
201 #if (ERRCLASS & ERRCLS_DEBUG)
203 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW003, (ErrVal) ret1,
204 "cmUnpkRlcMngmt failure ......!");
206 #endif /* ERRCLASS & ERRCLS_DEBUG */
211 (Void) (*func)(pst, &cfg);
215 } /* end of unpackRlcConfigReq */
223 * @param[in] pst : post structure
224 * @param[in] cntrl : RLC LM structure
227 * -# Failure : RFAILED
233 Pst *pst, /* post structure */
234 RlcMngmt *cntrl /* RLC LM structure */
237 S16 cmPkLkwCntrlReq(pst,cntrl)
238 Pst *pst; /* post structure */
239 RlcMngmt *cntrl; /* RLC LM structure */
242 Buffer *mBuf; /* message buffer */
243 S16 ret1; /* return value */
246 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
249 #if (ERRCLASS & ERRCLS_ADD_RES)
252 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW004, (ErrVal) ret1,
253 "SGetMsg failure ......!");
255 #endif /* ERRCLASS & ERRCLS_ADD_RES */
259 ret1 = cmPkRlcMngmt(cntrl, LKW_EVT_CNTRL_REQ, mBuf);
264 #if (ERRCLASS & ERRCLS_ADD_RES)
267 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW005, (ErrVal) ret1,
268 "cmPkRlcMngmt failure ......!");
270 #endif /* ERRCLASS & ERRCLS_ADD_RES */
274 pst->event = (Event) LKW_EVT_CNTRL_REQ; /* event */
279 } /* end of cmPkLkwCntrlReq */
283 Unpack Control Request
285 * @param[in] func : primitive to call
286 * @param[in] pst : post structure
287 * @param[in] mBuf : message buffer
290 * -# Failure : RFAILED
294 S16 cmUnpkLkwCntrlReq
296 LkwCntrlReq func, /* primitive to call */
297 Pst *pst, /* post structure */
298 Buffer *mBuf /* message buffer */
301 S16 cmUnpkLkwCntrlReq(func, pst, mBuf)
302 LkwCntrlReq func; /* primitive to call */
303 Pst *pst; /* post structure */
304 Buffer *mBuf; /* message buffer */
307 S16 ret1; /* return value */
308 RlcMngmt cfm; /* Confirmation */
311 ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_CNTRL_REQ, mBuf);
316 #if (ERRCLASS & ERRCLS_DEBUG)
318 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW006, (ErrVal) ret1,
319 "cmUnpkRlcMngmt failure ......!");
321 #endif /* ERRCLASS & ERRCLS_DEBUG */
326 return ((*func)(pst, &cfm));
328 } /* end of cmUnpkLkwCntrlReq */
334 * @param[in] pst : post structure
335 * @param[in] cfg : RLC LM structure
338 * -# Failure : RFAILED
342 uint8_t cmPkLkwCntrlCfm
344 Pst *pst, /* post structure */
345 RlcMngmt *cfm /* RLC LM structure */
348 uint8_t cmPkLkwCntrlCfm(pst, cfm)
349 Pst *pst; /* post structure */
350 RlcMngmt *cfm; /* RLC LM structure */
353 Buffer *mBuf; /* message buffer */
354 S16 ret1; /* return value */
357 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
360 #if (ERRCLASS & ERRCLS_ADD_RES)
363 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW007, (ErrVal) ret1,
364 "SGetMsg failure ......!");
366 #endif /* ERRCLASS & ERRCLS_ADD_RES */
370 ret1 = cmPkRlcMngmt(cfm, LKW_EVT_CNTRL_CFM, mBuf);
375 #if (ERRCLASS & ERRCLS_ADD_RES)
378 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW008, (ErrVal) ret1,
379 "Packing failure ......!");
381 #endif /* ERRCLASS & ERRCLS_ADD_RES */
385 pst->event = (Event) LKW_EVT_CNTRL_CFM; /* event */
390 } /* end of cmPkLkwCntrlCfm */
395 Unpack Control confirm
397 * @param[in] func : primitive to call
398 * @param[in] pst : post structure
399 * @param[in] mBuf : message buffer
402 * -# Failure : RFAILED
406 S16 cmUnpkLkwCntrlCfm
408 LkwCntrlCfm func, /* primitive to call */
409 Pst *pst, /* post structure */
410 Buffer *mBuf /* message buffer */
413 S16 cmUnpkLkwCntrlCfm(func, pst, mBuf)
414 LkwCntrlCfm func; /* primitive to call */
415 Pst *pst; /* post structure */
416 Buffer *mBuf; /* message buffer */
419 RlcMngmt cfm; /* RLC LM structure */
420 S16 ret1; /* return value */
423 ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_CNTRL_CFM, mBuf);
428 #if (ERRCLASS & ERRCLS_DEBUG)
431 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW009, (ErrVal) ret1,
432 "cmUnpkRlcMngmt failure ......!");
434 #endif /* ERRCLASS & ERRCLS_DEBUG */
440 return ((*func)(pst, &cfm));
442 } /* end of cmUnpkLkwCntrlCfm */
446 Unpack statistics Confirm
448 * @param[in] func : primitive to call
449 * @param[in] pst : post structure
450 * @param[in] mBuf : message buffer
453 * -# Failure : RFAILED
458 LkwStsCfm func, /* primitive to call */
459 Pst *pst, /* post structure */
460 Buffer *mBuf /* message buffer */
463 S16 cmUnpkLkwStsCfm(func, pst, mBuf)
464 LkwStsCfm func; /* primitive to call */
465 Pst *pst; /* post structure */
466 Buffer *mBuf; /* message buffer */
469 RlcMngmt cfm; /* RLC LM structure */
470 S16 ret1; /* return value */
473 ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_STS_CFM, mBuf);
478 #if (ERRCLASS & ERRCLS_DEBUG)
481 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW010, (ErrVal) ret1,
482 "SPutMsg failure ......!");
484 #endif /* ERRCLASS & ERRCLS_DEBUG */
490 return ((*func)(pst, 0, &cfm));
492 } /* end of cmUnpkLkwStsCfm */
498 * @param[in] pst : post structure
499 * @param[in] cfg : RLC LM structure
502 * -# Failure : RFAILED
507 uint8_t packRlcConfigCfm
509 Pst *pst, /* post structure */
510 RlcMngmt *cfm /* RLC LM structure */
513 uint8_t packRlcConfigCfm(pst,cfm)
514 Pst *pst; /* post structure */
515 RlcMngmt *cfm; /* RLC LM structure */
518 Buffer *mBuf; /* message buffer */
519 S16 ret1; /* return value */
522 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
525 #if (ERRCLASS & ERRCLS_ADD_RES)
528 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW011, (ErrVal) ret1,
529 "SGetMsg failure ......!");
531 #endif /* ERRCLASS & ERRCLS_ADD_RES */
535 ret1 = cmPkRlcMngmt(cfm, LKW_EVT_CFG_CFM, mBuf);
540 #if (ERRCLASS & ERRCLS_ADD_RES)
543 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW012, (ErrVal) ret1,
544 "SPutMsg failure ......!");
546 #endif /* ERRCLASS & ERRCLS_ADD_RES */
550 pst->event = (Event) LKW_EVT_CFG_CFM; /* event */
555 } /* end of packRlcConfigCfm */
560 Unpack Config Confirm
562 * @param[in] func : primitive to call
563 * @param[in] pst : post structure
564 * @param[in] mBuf : message buffer
567 * -# Failure : RFAILED
570 uint8_t unpackRlcConfigCfm
572 RlcConfigCfm func, /* primitive to call */
573 Pst *pst, /* post structure */
574 Buffer *mBuf /* message buffer */
577 uint8_t unpackRlcConfigCfm(func, pst, mBuf)
578 RlcConfigCfm func; /* primitive to call */
579 Pst *pst; /* post structure */
580 Buffer *mBuf; /* message buffer */
583 S16 ret1; /* return value */
584 RlcMngmt cfm; /* RLC LM structure */
587 ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_CFG_CFM, mBuf);
592 #if (ERRCLASS & ERRCLS_DEBUG)
595 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW013, (ErrVal) ret1,
596 "SPutMsg failure ......!");
598 #endif /* ERRCLASS & ERRCLS_DEBUG */
603 return ((*func)(pst, &cfm));
605 } /* end of unpackRlcConfigCfm */
611 Pack Status Indication
613 * @param[in] pst : post structure
614 * @param[in] usta : RLC LM structure
617 * -# Failure : RFAILED
623 Pst *pst, /* post structure */
624 RlcMngmt *usta /* RLC LM structure */
627 S16 cmPkLkwStaInd(pst,usta)
628 Pst *pst; /* post structure */
629 RlcMngmt *usta; /* RLC LM structure */
632 Buffer *mBuf; /* message buffer */
633 S16 ret1; /* return value */
636 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
639 #if (ERRCLASS & ERRCLS_ADD_RES)
642 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW014, (ErrVal) ret1,
645 #endif /* ERRCLASS & ERRCLS_ADD_RES */
649 ret1 = cmPkRlcMngmt(usta, LKW_EVT_STA_IND, mBuf);
654 #if (ERRCLASS & ERRCLS_ADD_RES)
657 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW015, (ErrVal) ret1,
658 "cmPkRlcMngmt failure ......!");
660 #endif /* ERRCLASS & ERRCLS_ADD_RES */
664 pst->event = (Event) LKW_EVT_STA_IND; /* event */
669 } /* end of cmPkLkwStaInd */
674 Unpack Unsolicited Status indication
676 * @param[in] func : primitive to call
677 * @param[in] pst : post structure
678 * @param[in] mBuf : message buffer
681 * -# Failure : RFAILED
687 LkwStaInd func, /* primitive pointer */
688 Pst *pst, /* post structure */
689 Buffer *mBuf /* message buffer */
692 S16 cmUnpkLkwStaInd(func, pst, mBuf)
693 LkwStaInd func; /* primitive pointer */
694 Pst *pst; /* post structure */
695 Buffer *mBuf; /* message buffer */
698 RlcMngmt usta; /* RLC LM structure */
699 S16 ret1; /* return value */
702 ret1 = cmUnpkRlcMngmt(&usta, LKW_EVT_STA_IND, mBuf);
707 #if (ERRCLASS & ERRCLS_DEBUG)
710 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW016, (ErrVal) ret1,
711 "cmUnpkRlcMngmt failure ......!");
713 #endif /* ERRCLASS & ERRCLS_DEBUG */
719 return ((*func)(pst, &usta));
720 } /* end of cmUnpkLsnStaInd */
726 * @param[in] pst : post structure
727 * @param[in] sta : RLC LM structure
730 * -# Failure : RFAILED
736 Pst *pst, /* post structure */
737 RlcMngmt *sta /* status */
740 S16 cmPkLkwStaReq(pst,sta)
741 Pst *pst; /* post structure */
742 RlcMngmt *sta; /* status */
745 Buffer *mBuf; /* message buffer */
746 S16 ret1; /* return value */
749 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
752 #if (ERRCLASS & ERRCLS_ADD_RES)
755 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW017, (ErrVal) ret1,
756 "SGetMsg failure ......!");
758 #endif /* ERRCLASS & ERRCLS_ADD_RES */
762 ret1 = cmPkRlcMngmt(sta, LKW_EVT_STA_REQ, mBuf);
767 #if (ERRCLASS & ERRCLS_ADD_RES)
770 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW018, (ErrVal) ret1,
771 "SGetMsg() failure ......!");
773 #endif /* ERRCLASS & ERRCLS_ADD_RES */
777 pst->event = (Event) LKW_EVT_STA_REQ; /* event */
782 } /* end of cmPkLkwStaReq */
786 Unpack status confirmation
788 * @param[in] func : primitive to call
789 * @param[in] pst : post structure
790 * @param[in] mBuf : message buffer
793 * -# Failure : RFAILED
798 LkwStaReq func, /* primitive pointer */
799 Pst *pst, /* post structure */
800 Buffer *mBuf /* message buffer */
803 S16 cmUnpkLkwStaCfm(func, pst, mBuf)
804 LkwStaReq func; /* primitive pointer */
805 Pst *pst; /* post structure */
806 Buffer *mBuf; /* message buffer */
809 RlcMngmt cfm; /* RLC LM structure */
810 S16 ret1; /* return value */
813 ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_STA_CFM, mBuf);
818 #if (ERRCLASS & ERRCLS_DEBUG)
821 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW019, (ErrVal) ret1,
822 "Unpacking failure ......!");
824 #endif /* ERRCLASS & ERRCLS_DEBUG */
830 return ((*func)(pst, &cfm));
832 } /* end of function cmUnpkLkwStaCfm */
836 Unpack Status request
838 * @param[in] func : primitive to call
839 * @param[in] pst : post structure
840 * @param[in] mBuf : message buffer
843 * -# Failure : RFAILED
848 LkwStsReq func, /* primitive pointer */
849 Pst *pst, /* post structure */
850 Buffer *mBuf /* message buffer */
853 S16 cmUnpkLkwStsReq(func, pst, mBuf)
854 LkwStsReq func; /* primitive pointer */
855 Pst *pst; /* post structure */
856 Buffer *mBuf; /* message buffer */
859 RlcMngmt sts; /* RLC LM structure */
860 S16 ret1; /* return value */
861 Action action; /* Action */
864 CMCHKUNPK(SUnpkS16, &action, mBuf);
866 ret1 = cmUnpkRlcMngmt(&sts, LKW_EVT_STS_REQ, mBuf);
871 #if (ERRCLASS & ERRCLS_DEBUG)
873 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW020, (ErrVal) ret1,
874 "Unpacking failure ......!");
876 #endif /* ERRCLASS & ERRCLS_DEBUG */
882 return ((*func)(pst, action, &sts));
884 } /* end of function cmUnpkLkwStsReq */
891 * @param[in] func : primitive to call
892 * @param[in] pst : post structure
893 * @param[in] mBuf : message buffer
896 * -# Failure : RFAILED
901 LkwStaReq func, /* primitive pointer */
902 Pst *pst, /* post structure */
903 Buffer *mBuf /* message buffer */
906 S16 cmUnpkLkwStaReq(func, pst, mBuf)
907 LkwStaReq func; /* primitive pointer */
908 Pst *pst; /* post structure */
909 Buffer *mBuf; /* message buffer */
912 RlcMngmt sta; /* RLC LM structure */
913 S16 ret1; /* return value */
916 ret1 = cmUnpkRlcMngmt(&sta, LKW_EVT_STA_REQ, mBuf);
921 #if (ERRCLASS & ERRCLS_DEBUG)
923 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW021, (ErrVal) ret1,
924 "Unpacking failure ......!");
926 #endif /* ERRCLASS & ERRCLS_DEBUG */
932 return ((*func)(pst, &sta));
934 } /* end of function cmUnpkLkwStaReq */
939 Unpack Trace Indication
941 * @param[in] func : primitive to call
942 * @param[in] pst : post structure
943 * @param[in] mBuf : message buffer
946 * -# Failure : RFAILED
952 LkwTrcInd func, /* primitive to call */
953 Pst *pst, /* post structure */
954 Buffer *mBuf /* message buffer */
957 S16 cmUnpkLkwTrcInd(func, pst, mBuf)
958 LkwTrcInd func; /* primitive to call */
959 Pst *pst; /* post structure */
960 Buffer *mBuf; /* message buffer */
963 S16 ret1; /* return value */
964 RlcMngmt trc; /* RLC LM structure */
967 ret1 = cmUnpkRlcMngmt(&trc, LKW_EVT_TRC_IND, mBuf);
972 #if (ERRCLASS & ERRCLS_DEBUG)
975 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW022, (ErrVal) ret1,
976 "Unpacking failure ......!");
978 #endif /* ERRCLASS & ERRCLS_DEBUG */
982 (Void) (*func)(pst, &trc, mBuf);
986 } /* end of cmUnpkLkwTrcInd */
993 * @param[in] pst : post structure
994 * @param[in] cfg : RLC LM structure
997 * -# Failure : RFAILED
1001 static S16 cmPkCkwSapSta
1003 RlcCkwCntSapSta *rcSap, /* SAP statistics */
1004 Buffer *mBuf /* Message buffer */
1007 static S16 cmPkCkwSapSta(rcSap, mBuf)
1008 RlcCkwCntSapSta *rcSap; /* SAP statistics */
1009 Buffer *mBuf; /* Message buffer */
1013 CMCHKPK(cmPkState, rcSap->state, mBuf);
1014 CMCHKPK(SPkS16, rcSap->spId, mBuf);
1018 } /* end of cmPkCkwSapSta */
1024 * @param[out] rcSap: RLC LM structure
1025 * @param[in] buffer: Buffer
1028 * -# Failure : RFAILED
1031 static S16 cmUnpkCkwSapSta
1033 RlcCkwCntSapSta *rcSap, /* SAP statistics */
1034 Buffer *mBuf /* Message buffer */
1037 static S16 cmUnpkCkwSapSta(rcSap, mBuf)
1038 RlcCkwCntSapSta *rcSap; /* SAP statistics */
1039 Buffer *mBuf; /* Message buffer */
1043 CMCHKUNPK(SUnpkS16, &rcSap->spId, mBuf);
1044 CMCHKUNPK(cmUnpkState, &rcSap->state, mBuf);
1047 } /* end of function cmUnpkCkwSapSta */
1053 * @param[in] pst : post structure
1054 * @param[in] cfg : RLC LM structure
1057 * -# Failure : RFAILED
1060 static S16 cmPkKwuSapSta
1062 RlcKwuSapSta *rlSap, /* SAP statistics */
1063 Buffer *mBuf /* Message buffer */
1066 static S16 cmPkKwuSapSta(rlSap, mBuf)
1067 RlcKwuSapSta *rlSap; /* SAP statistics */
1068 Buffer *mBuf; /* Message buffer */
1072 CMCHKPK(cmPkState, rlSap->state, mBuf);
1073 CMCHKPK(SPkS16, rlSap->spId, mBuf);
1077 } /* end of cmPkKwuSapSta */
1083 * @param[out] rlSap : KwRLSapSta structure
1084 * @param[in] mBuf : message buffer
1087 * -# Failure : RFAILED
1090 static S16 cmUnpkKwuSapSta
1092 RlcKwuSapSta *rlSap, /* SAP statistics */
1093 Buffer *mBuf /* Message buffer */
1096 static S16 cmUnpkKwuSapSta(rlSap, mBuf)
1097 RlcKwuSapSta *rlSap; /* SAP statistics */
1098 Buffer *mBuf; /* Message buffer */
1102 CMCHKUNPK(SUnpkS16, &rlSap->spId, mBuf);
1103 CMCHKUNPK(cmUnpkState, &rlSap->state, mBuf);
1107 } /* end of function cmUnpkKwuSapSta */
1113 * @param[in] pst : post structure
1114 * @param[in] cfg : RLC LM structure
1117 * -# Failure : RFAILED
1120 static S16 cmPkRguSapSta
1122 RlcRguSapSta *mkSap, /* SAP statistics */
1123 Buffer *mBuf /* Message buffer */
1126 static S16 cmPkRguSapSta(mkSap, mBuf)
1127 RlcRguSapSta *mkSap; /* SAP statistics */
1128 Buffer *mBuf; /* Message buffer */
1132 CMCHKPK(cmPkState, mkSap->state, mBuf);
1133 CMCHKPK(cmPkSuId, mkSap->suId, mBuf);
1137 } /* end of cmPkRguSapSta */
1143 * @param[out] mkSap: RlcRguSapSta structure
1144 * @param[in] mBuf : message buffer
1147 * -# Failure : RFAILED
1150 static S16 cmUnpkRguSapSta
1152 RlcRguSapSta *mkSap, /* SAP statistics */
1153 Buffer *mBuf /* Message buffer */
1156 static S16 cmUnpkRguSapSta(mkSap, mBuf)
1157 RlcRguSapSta *mkSap; /* SAP statistics */
1158 Buffer *mBuf; /* Message buffer */
1162 CMCHKUNPK(cmUnpkSuId, &mkSap->suId, mBuf);
1163 CMCHKUNPK(cmUnpkState, &mkSap->state, mBuf);
1167 } /* end of function cmUnpkRguSapSta */
1173 * @param[in] pst : post structure
1174 * @param[in] cfg : RLC LM structure
1177 * -# Failure : RFAILED
1182 Pst *pst, /* post structure */
1183 RlcMngmt *cfm /* solicited status confirm */
1186 S16 cmPkLkwStaCfm(pst, cfm)
1187 Pst *pst; /* post structure */
1188 RlcMngmt *cfm; /* solicited status confirm */
1191 Buffer *mBuf; /* message buffer */
1192 S16 ret1; /* return value */
1195 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1198 #if (ERRCLASS & ERRCLS_ADD_RES)
1201 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW023, (ErrVal) ret1,
1202 "SGetMsg() failure ......!");
1204 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1208 ret1 = cmPkRlcMngmt(cfm, LKW_EVT_STA_CFM, mBuf);
1213 #if (ERRCLASS & ERRCLS_ADD_RES)
1216 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW024, (ErrVal) ret1,
1217 "packing failure ......!");
1219 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1223 pst->event = (Event) LKW_EVT_STA_CFM; /* event */
1227 } /* end of cmPkLkwStaCfm */
1234 * @param[in] pst : post structure
1235 * @param[in] cfg : RLC LM structure
1238 * -# Failure : RFAILED
1243 Pst *pst, /* post structure */
1244 RlcMngmt *trc, /* trace */
1245 Buffer *trcBuf /* trace buffer */
1248 S16 cmPkLkwTrcInd(pst, trc, trcBuf)
1249 Pst *pst; /* post structure */
1250 RlcMngmt *trc; /* trace */
1251 Buffer *trcBuf; /* trace buffer */
1254 S16 ret1 = ROK; /* return value */
1255 Buffer *mBuf = NULLP; /* Buffer to trace */
1258 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1261 #if (ERRCLASS & ERRCLS_ADD_RES)
1264 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW025, (ErrVal) ret1,
1265 "SGetMsg() failure ......!");
1267 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1273 ret1 = SCatMsg(mBuf, trcBuf, M1M2);
1278 #if (ERRCLASS & ERRCLS_ADD_RES)
1281 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW026, (ErrVal) ret1,
1282 "SGetMsg() failure ......!");
1284 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1291 ret1 = cmPkRlcMngmt(trc, LKW_EVT_TRC_IND, mBuf);
1296 #if (ERRCLASS & ERRCLS_ADD_RES)
1299 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW027, (ErrVal) ret1,
1300 "packing failure ......!");
1302 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1307 pst->event = (Event) LKW_EVT_TRC_IND; /* event */
1312 } /* end of cmPkLkwTrcInd */
1319 * @param[in] pst : post structure
1320 * @param[in] cfg : RLC LM structure
1323 * -# Failure : RFAILED
1328 Pst *pst, /* post structure */
1329 Action action, /* action */
1330 RlcMngmt *sts /* statistics request */
1333 S16 cmPkLkwStsReq(pst, action, sts)
1334 Pst *pst; /* post structure */
1335 Action action; /* action */
1336 RlcMngmt *sts; /* statistics request */
1340 Buffer *mBuf; /* message buffer */
1341 S16 ret1; /* return value */
1344 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1347 #if (ERRCLASS & ERRCLS_ADD_RES)
1350 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW028, (ErrVal) ret1,
1351 "SGetMsg() failure ......!");
1353 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1357 ret1 = cmPkRlcMngmt(sts, LKW_EVT_STS_REQ, mBuf);
1362 #if (ERRCLASS & ERRCLS_ADD_RES)
1365 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW029, (ErrVal) ret1,
1366 "Packing failure ......!");
1368 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1372 CMCHKPK(SPkS16, action, mBuf);
1373 pst->event = (Event) LKW_EVT_STS_REQ; /* event */
1378 } /* end of cmPkLkwStsReq */
1385 * @param[in] pst : post structure
1386 * @param[in] cfg : RLC LM structure
1389 * -# Failure : RFAILED
1394 Pst *pst, /* post structure */
1395 Action action, /* action */
1396 RlcMngmt *cfm /* statistics confirmation */
1399 S16 cmPkLkwStsCfm(pst, action, cfm)
1400 Pst *pst; /* post structure */
1401 Action action; /* action */
1402 RlcMngmt *cfm; /* statistics confirmation */
1405 Buffer *mBuf; /* message buffer */
1406 S16 ret1; /* return value */
1408 /* lkw_c_001.main_2 removed warning */
1410 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1413 #if (ERRCLASS & ERRCLS_ADD_RES)
1416 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW030, (ErrVal) ret1,
1417 "SGetMsg() failure ......!");
1419 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1423 ret1 = cmPkRlcMngmt(cfm, LKW_EVT_STS_CFM, mBuf);
1428 #if (ERRCLASS & ERRCLS_ADD_RES)
1431 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW031, (ErrVal) ret1,
1432 "Packing failure ......!");
1434 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1438 pst->event = (Event) LKW_EVT_STS_CFM; /* event */
1442 } /* end of cmPkLkwStsCfm */
1449 * @param[in] pst : post structure
1450 * @param[in] cfg : RLC LM structure
1453 * -# Failure : RFAILED
1457 static S16 cmPkRlcMngmt
1459 RlcMngmt *param, /* Managment */
1460 Event eventType, /* Event type */
1461 Buffer *mBuf /* Message Buffer */
1464 static S16 cmPkRlcMngmt(param ,eventType, mBuf)
1465 RlcMngmt *param; /* Managment */
1466 Event eventType; /* Event type */
1467 Buffer *mBuf; /* Message Buffer */
1470 S16 ret1; /* return value */
1475 case LKW_EVT_CFG_REQ:
1476 ret1 = cmPkRlcCfg(param, param->hdr.elmId.elmnt ,mBuf);
1483 case LKW_EVT_CNTRL_REQ:
1484 ret1 = cmPkRlcCntrl(param, param->hdr.elmId.elmnt ,mBuf);
1491 case LKW_EVT_STA_IND:
1492 ret1 = cmPkRlcUsta(param, param->hdr.elmId.elmnt ,mBuf);
1499 case LKW_EVT_STA_REQ:
1500 case LKW_EVT_STA_CFM:
1501 ret1 = cmPkRlcSsta(param, param->hdr.elmId.elmnt , eventType, mBuf);
1508 case LKW_EVT_STS_REQ:
1509 case LKW_EVT_STS_CFM:
1510 ret1 = cmPkRlcSts(param, param->hdr.elmId.elmnt ,mBuf);
1516 case LKW_EVT_TRC_IND:
1517 ret1 = cmPkRlcTrc(param, mBuf);
1523 case LKW_EVT_CNTRL_CFM:
1524 case LKW_EVT_CFG_CFM:
1528 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
1529 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
1532 } /* end of function cmPkRlcMngmt */
1539 * @param[in] pst : post structure
1540 * @param[in] cfg : RLC LM structure
1543 * -# Failure : RFAILED
1546 static S16 cmPkRlcCfg
1553 static S16 cmPkRlcCfg(cfg, elmnt, mBuf)
1564 CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.gen.maxRguSaps, mBuf);
1565 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.gen.rlcMode, mBuf);
1566 CMCHKPK(oduUnpackUInt32, cfg->t.cfg.s.gen.timeRes, mBuf);
1567 CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
1568 CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
1569 CMCHKPK(oduUnpackUInt32, cfg->t.cfg.s.gen.maxUe, mBuf);
1570 CMCHKPK(cmPkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
1579 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.route,mBuf);
1580 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.priority,mBuf);
1581 CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
1582 CMCHKPK(SPkS16, cfg->t.cfg.s.sap.sapId, mBuf);
1583 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.inst, mBuf);
1584 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.ent, mBuf);
1585 CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.sap.procId, mBuf);
1586 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.mem.pool, mBuf);
1587 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.mem.region, mBuf);
1588 CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.selector, mBuf);
1595 } /*end of function cmPkRlcCfg*/
1600 Pack kw control request
1602 * @param[in] cntrl : LM management structure
1603 * @param[in] elmnt : element
1604 * @param[in] mBuf : Buffer
1607 * -# Failure : RFAILED
1610 static S16 cmPkRlcCntrl
1617 static S16 cmPkRlcCntrl(cntrl, elmnt, mBuf)
1623 uint8_t subAction; /* sub action */
1630 subAction = cntrl->t.cntrl.subAction;
1637 CMCHKPK(oduUnpackUInt32, cntrl->t.cntrl.s.dbgCntrl.dbgMask,
1643 CMCHKPK(SPkS16, cntrl->t.cntrl.s.trcCntrl.trcLen,
1645 CMCHKPK(oduUnpackUInt8, cntrl->t.cntrl.s.trcCntrl.trcMask,
1652 CMCHKPK(oduUnpackUInt32, cntrl->t.cntrl.s.logMask, mBuf);
1663 CMCHKPK(SPkS16, cntrl->t.cntrl.s.sapCntrl.spId, mBuf);
1664 CMCHKPK(SPkS16, cntrl->t.cntrl.s.sapCntrl.suId, mBuf);
1670 CMCHKPK(oduUnpackUInt8, cntrl->t.cntrl.action, mBuf);
1671 CMCHKPK(oduUnpackUInt8, cntrl->t.cntrl.subAction, mBuf);
1672 CMCHKPK(cmPkDateTime, &cntrl->t.cntrl.dt, mBuf);
1675 } /*end of function cmPkRlcCntrl */
1679 Pack unsolicit status
1681 * @param[in] usta : RLC LM structure
1682 * @param[in] elmnt : element
1683 * @param[in] mBuf : Buffer
1686 * -# Failure : RFAILED
1689 static S16 cmPkRlcUsta
1696 static S16 cmPkRlcUsta(usta, elmnt, mBuf)
1703 /* lkw_c_001.main_2 removed warning */
1705 /* lkw_c_001.main_2 added support for L2 Measurement */
1707 CMCHKPK(oduUnpackUInt8, usta->t.usta.qci, mBuf);
1709 CMCHKPK(oduUnpackUInt32, usta->t.usta.ueId, mBuf);
1710 CMCHKPK(SPkS16, usta->t.usta.suId, mBuf);
1711 CMCHKPK(cmPkCmAlarm, &usta->t.usta.alarm,mBuf);
1712 CMCHKPK(cmPkDateTime, &usta->t.usta.dt, mBuf);
1716 } /* end of cmPkRlcUsta */
1723 * @param[in] pst : post structure
1724 * @param[in] cfg : RLC LM structure
1727 * -# Failure : RFAILED
1730 static S16 cmPkRlcSsta
1738 static S16 cmPkRlcSsta(ssta, elmnt, eventType, mBuf)
1752 if(eventType == LKW_EVT_STA_CFM)
1754 CMCHKPK(cmPkSystemId, &ssta->t.ssta.s.sysId,mBuf);
1758 ret1 = cmPkCkwSapSta(&ssta->t.ssta.s.ckwSap, mBuf);
1761 ret1 = cmPkKwuSapSta(&ssta->t.ssta.s.rlckwuSap, mBuf);
1765 ret1 = cmPkRguSapSta(&ssta->t.ssta.s.rguSap, mBuf);
1777 CMCHKPK(cmPkDateTime, &ssta->t.ssta.dt, mBuf);
1781 } /* end of cmPkRlcSsta */
1785 Pack Trace Indication
1787 * @param[in] trc : RLC LM structure
1788 * @param[in] mBuf : Buffer
1791 * -# Failure : RFAILED
1794 static S16 cmPkRlcTrc
1796 RlcMngmt *trc, /* trace */
1797 Buffer *mBuf /* data buffer */
1800 static S16 cmPkRlcTrc(trc, mBuf)
1801 RlcMngmt *trc; /* trace */
1802 Buffer *mBuf; /* data buffer */
1806 CMCHKPK(oduUnpackUInt16, trc->t.trc.event, mBuf);
1807 CMCHKPK(cmPkDateTime, &trc->t.trc.dt, mBuf);
1810 } /* end of cmPkRlcTrc */
1815 Pack Statistics request
1817 * @param[in] pst : post structure
1818 * @param[in] cfg : RLC LM structure
1821 * -# Failure : RFAILED
1825 static S16 cmPkRlcSts
1832 static S16 cmPkRlcSts(sts, elmnt, mBuf)
1844 ret1 = cmPkGenSts(&sts->t.sts.s.gen, mBuf);
1847 ret1 = cmPkCkwSapSts(&sts->t.sts.s.ckwSap, mBuf);
1850 ret1 = cmPkKwuSapSts(&sts->t.sts.s.rlckwuSap, mBuf);
1852 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
1853 * in general statstics.
1858 } /* end of switch */
1865 CMCHKPK(cmPkDateTime, &sts->t.sts.dt, mBuf);
1868 } /* end of cmPkRlcSts */
1874 Pack general statistics
1876 * @param[in] gen : RlcGenSts structure
1877 * @param[in] mBuf : Buffer
1880 * -# Failure : RFAILED
1883 static S16 cmPkGenSts
1889 static S16 cmPkGenSts(gen, mBuf)
1895 CMCHKPK(oduUnpackUInt32, gen->numSduDisc, mBuf);
1896 CMCHKPK(oduUnpackUInt32, gen->numOfRb, mBuf);
1897 CMCHKPK(oduUnpackUInt32, gen->protTimeOut, mBuf);
1898 CMCHKPK(oduUnpackUInt32, gen->errorPdusRecv, mBuf);
1899 CMCHKPK(oduUnpackUInt32, gen->unexpPdusRecv, mBuf);
1900 CMCHKPK(oduUnpackUInt32, gen->bytesSent, mBuf);
1901 CMCHKPK(oduUnpackUInt32, gen->bytesRecv, mBuf);
1902 CMCHKPK(oduUnpackUInt32, gen->pdusRetx, mBuf);
1903 CMCHKPK(oduUnpackUInt32, gen->pdusSent, mBuf);
1904 CMCHKPK(oduUnpackUInt32, gen->pdusRecv, mBuf);
1905 CMCHKPK(oduUnpackUInt32, gen->numUe, mBuf);
1909 } /* end of cmPkGenSts */
1915 * @param[in] pst : post structure
1916 * @param[in] cfg : RLC LM structure
1919 * -# Failure : RFAILED
1922 static S16 cmPkCkwSapSts
1924 RlcCkwCntSts *rcSap,
1928 static S16 cmPkCkwSapSts(rcSap, mBuf)
1929 RlcCkwCntSts *rcSap;
1934 CMCHKPK(oduUnpackUInt32, rcSap->statMsgs, mBuf);
1937 } /* end of cmPkCkwSapSts */
1943 * @param[in] pst : post structure
1944 * @param[in] cfg : RLC LM structure
1947 * -# Failure : RFAILED
1950 static S16 cmPkKwuSapSts
1952 RlcKwuSapSts *ruSap,
1956 static S16 cmPkKwuSapSts(ruSap, mBuf)
1957 RlcKwuSapSts *ruSap;
1962 CMCHKPK(oduUnpackUInt32, ruSap->sduTx, mBuf);
1963 CMCHKPK(oduUnpackUInt32, ruSap->sduRx, mBuf);
1964 /* lkw_c_001.main_2 changed from suId to spId */
1965 CMCHKPK(cmPkSuId, ruSap->spId, mBuf);
1968 } /* end of cmPkCkwSapSts */
1970 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
1971 * in general statstics.
1976 Unpack RLC Layer Management structure
1978 * @param[in] param : RLC LM structure
1979 * @param[in] eventType : event type
1980 * @param[in] mBuf : message buffer
1983 * -# Failure : RFAILED
1986 static S16 cmUnpkRlcMngmt
1993 static S16 cmUnpkRlcMngmt(param ,eventType, mBuf)
2001 memset(param, 0, sizeof(RlcMngmt));
2003 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
2004 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
2008 case LKW_EVT_CFG_REQ:
2009 ret1 = cmUnpkRlcCfg(param, param->hdr.elmId.elmnt ,mBuf);
2015 case LKW_EVT_CNTRL_REQ:
2016 ret1 = cmUnpkRlcCntrl(param, param->hdr.elmId.elmnt ,mBuf);
2023 case LKW_EVT_STA_IND:
2024 ret1 = cmUnpkRlcUsta(param, param->hdr.elmId.elmnt ,mBuf);
2031 case LKW_EVT_STA_REQ:
2032 case LKW_EVT_STA_CFM:
2033 ret1 = cmUnpkRlcSsta(param, param->hdr.elmId.elmnt, eventType,mBuf);
2040 case LKW_EVT_STS_REQ:
2041 case LKW_EVT_STS_CFM:
2043 ret1 = cmUnpkRlcSts(param, param->hdr.elmId.elmnt ,mBuf);
2049 case LKW_EVT_TRC_IND:
2050 ret1 = cmUnpkRlcTrc(param, mBuf);
2057 case LKW_EVT_CNTRL_CFM:
2058 case LKW_EVT_CFG_CFM:
2065 } /*end of function cmUnpkRlcMngmt*/
2069 Unpack Kw configuration structure
2071 * @param[out] cfg : RLC LM structure
2072 * @param[in] elmnt : element
2073 * @param[in] mBuf : message buffer
2076 * -# Failure : RFAILED
2079 static S16 cmUnpkRlcCfg
2086 static S16 cmUnpkRlcCfg(cfg ,elmnt, mBuf)
2097 CMCHKUNPK(cmUnpkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
2098 CMCHKUNPK(oduPackUInt32, &cfg->t.cfg.s.gen.maxUe, mBuf);
2099 CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
2100 CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
2101 CMCHKUNPK(oduPackUInt32, &cfg->t.cfg.s.gen.timeRes, mBuf);
2102 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.gen.rlcMode, mBuf);
2103 CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.gen.maxRguSaps, mBuf);
2112 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.selector, mBuf);
2113 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.mem.region, mBuf);
2114 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.mem.pool, mBuf);
2115 CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.sap.procId, mBuf);
2116 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.ent, mBuf);
2117 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.inst, mBuf);
2118 CMCHKUNPK(SUnpkS16, &cfg->t.cfg.s.sap.sapId, mBuf);
2119 CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
2120 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.priority,mBuf);
2121 CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.route,mBuf);
2126 } /* end of switch */
2129 } /* end of cmUnpkRlcCfg */
2133 Unpack Control Structure
2135 * @param[in] cfm : RLC LM structure
2136 * @param[in] elmnt : element
2137 * @param[in] mBuf : message buffer
2140 * -# Failure : RFAILED
2143 static S16 cmUnpkRlcCntrl
2150 static S16 cmUnpkRlcCntrl(cfm, elmnt, mBuf)
2157 RlcDbgCntrl *dbgCntrl;
2158 RlcTrcCntrl *trcCntrl;
2161 /* lkw_c_001.main_2 removed warning */
2164 CMCHKUNPK(cmUnpkDateTime, &cfm->t.cntrl.dt, mBuf);
2165 CMCHKUNPK(oduPackUInt8, &cfm->t.cntrl.subAction, mBuf);
2166 CMCHKUNPK(oduPackUInt8, &cfm->t.cntrl.action, mBuf);
2168 subAction = cfm->t.cntrl.subAction;
2170 switch(cfm->hdr.elmId.elmnt)
2180 dbgCntrl = &cfm->t.cntrl.s.dbgCntrl;
2181 CMCHKUNPK(oduPackUInt32, &dbgCntrl->dbgMask, mBuf);
2186 trcCntrl = &cfm->t.cntrl.s.trcCntrl;
2187 CMCHKUNPK(oduPackUInt8, &trcCntrl->trcMask, mBuf);
2188 CMCHKUNPK(SUnpkS16,&trcCntrl->trcLen, mBuf);
2194 CMCHKUNPK(oduPackUInt32, &cfm->t.cntrl.s.logMask, mBuf);
2205 CMCHKUNPK(SUnpkS16, &cfm->t.cntrl.s.sapCntrl.suId, mBuf);
2206 CMCHKUNPK(SUnpkS16, &cfm->t.cntrl.s.sapCntrl.spId, mBuf);
2214 } /* end of cmUnpkRlcCntrl */
2221 * @param[in] usta : RLC LM Structure
2222 * @param[in] elmnt : element
2223 * @param[out] mBuf : message buffer
2226 * -# Failure : RFAILED
2229 static S16 cmUnpkRlcUsta
2236 static S16 cmUnpkRlcUsta(usta ,elmnt, mBuf)
2243 /* lkw_c_001.main_2 removed warning */
2246 CMCHKUNPK(cmUnpkDateTime, &usta->t.usta.dt, mBuf);
2247 CMCHKUNPK(cmUnpkCmAlarm, &usta->t.usta.alarm,mBuf);
2248 CMCHKUNPK(SUnpkS16, &usta->t.usta.suId, mBuf);
2249 CMCHKUNPK(oduPackUInt32, &usta->t.usta.ueId, mBuf);
2250 /* lkw_c_001.main_2 added support for L2 Measurement */
2252 CMCHKUNPK(oduPackUInt8, &usta->t.usta.qci, mBuf);
2261 * @param[out] ssta: RLC LM structure
2262 * @param[in] elmnt : element
2263 * @param[in] mBuf : message buffer
2266 * -# Failure : RFAILED
2269 static S16 cmUnpkRlcSsta
2277 static S16 cmUnpkRlcSsta(ssta ,elmnt, eventType, mBuf)
2284 S16 ret1; /* return value */
2286 CMCHKUNPK(cmUnpkDateTime, &ssta->t.ssta.dt, mBuf);
2291 if(eventType == LKW_EVT_STA_CFM)
2293 memset( ptNmb, 0, LKW_PART_NUM_STR_LEN);
2294 ssta->t.ssta.s.sysId.ptNmb = ptNmb;
2295 CMCHKUNPK(cmUnpkSystemId, &ssta->t.ssta.s.sysId,mBuf);
2299 ret1 = cmUnpkCkwSapSta(&ssta->t.ssta.s.ckwSap, mBuf);
2302 ret1 = cmUnpkKwuSapSta(&ssta->t.ssta.s.rlckwuSap, mBuf);
2306 ret1 = cmUnpkRguSapSta(&ssta->t.ssta.s.rguSap, mBuf);
2324 Unpack trace Indication
2326 * @param[out] trc : RLC LM Structure
2327 * @param[in] mBuf : message buffer
2330 * -# Failure : RFAILED
2333 static S16 cmUnpkRlcTrc
2339 static S16 cmUnpkRlcTrc(trc, mBuf)
2345 CMCHKUNPK(cmUnpkDateTime, &trc->t.trc.dt, mBuf);
2346 CMCHKUNPK(oduPackUInt16, &trc->t.trc.event, mBuf);
2349 } /* end of cmUnpkRlcTrc */
2356 * @param[out] sts : RLC LM structure
2357 * @param[in] elmnt : element
2358 * @param[in] mBuf : message buffer
2361 * -# Failure : RFAILED
2364 static S16 cmUnpkRlcSts
2371 static S16 cmUnpkRlcSts(sts ,elmnt, mBuf)
2377 S16 ret1; /* return value */
2379 CMCHKUNPK(cmUnpkDateTime, &sts->t.sts.dt, mBuf);
2384 ret1 = cmUnpkGenSts(&sts->t.sts.s.gen, mBuf);
2387 ret1 = cmUnpkCkwSapSts(&sts->t.sts.s.ckwSap, mBuf);
2390 ret1 = cmUnpkKwuSapSts(&sts->t.sts.s.rlckwuSap, mBuf);
2392 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
2393 * in general statstics.
2398 } /* end of switch */
2406 } /* end of cmUnpkRlcSts */
2411 Unpack General statistics
2413 * @param[out] gen : RlcGenSts structure
2414 * @param[in] mBuf : message buffer
2417 * -# Failure : RFAILED
2420 static S16 cmUnpkGenSts
2426 static S16 cmUnpkGenSts(gen, mBuf)
2432 CMCHKUNPK(oduPackUInt32, &gen->numUe, mBuf);
2433 CMCHKUNPK(oduPackUInt32, &gen->pdusRecv, mBuf);
2434 CMCHKUNPK(oduPackUInt32, &gen->pdusSent, mBuf);
2435 CMCHKUNPK(oduPackUInt32, &gen->pdusRetx, mBuf);
2436 CMCHKUNPK(oduPackUInt32, &gen->bytesRecv, mBuf);
2437 CMCHKUNPK(oduPackUInt32, &gen->bytesSent, mBuf);
2438 CMCHKUNPK(oduPackUInt32, &gen->unexpPdusRecv, mBuf);
2439 CMCHKUNPK(oduPackUInt32, &gen->errorPdusRecv, mBuf);
2440 CMCHKUNPK(oduPackUInt32, &gen->protTimeOut, mBuf);
2441 CMCHKUNPK(oduPackUInt32, &gen->numOfRb, mBuf);
2442 CMCHKUNPK(oduPackUInt32, &gen->numSduDisc, mBuf);
2445 } /* end of cmUnpkGenSts */
2449 Unpack Ckw Sap Statistics
2451 * @param[out] rcSap : RlcCkwCntSts structure
2452 * @param[in] mBuf : message buffer
2455 * -# Failure : RFAILED
2458 static S16 cmUnpkCkwSapSts
2460 RlcCkwCntSts *rcSap,
2464 static S16 cmUnpkCkwSapSts(rcSap ,mBuf)
2465 RlcCkwCntSts *rcSap;
2471 CMCHKUNPK(oduPackUInt32, &rcSap->statMsgs, mBuf);
2475 } /* end of cmUnpkCkwSapSts */
2479 Unpack Kwu Sap statistics
2481 * @param[out] : RlcKwuSapSts structure
2482 * @param[in] mBuf : message buffer
2485 * -# Failure : RFAILED
2488 static S16 cmUnpkKwuSapSts
2490 RlcKwuSapSts *ruSap,
2494 static S16 cmUnpkKwuSapSts(ruSap, mBuf)
2495 RlcKwuSapSts *ruSap;
2500 /* lkw_c_001.main_2 changed from suId to spId */
2501 CMCHKUNPK(cmUnpkSuId, &ruSap->spId, mBuf);
2502 CMCHKUNPK(oduPackUInt32, &ruSap->sduRx, mBuf);
2503 CMCHKUNPK(oduPackUInt32, &ruSap->sduTx, mBuf);
2507 } /* end of cmUnpkKwuSapSts */
2509 /* lkw_c_001.main_2 added support for L2 Measurement */
2512 S16 cmPkLkwL2MeasReq
2515 RlcL2MeasReqEvt *measReqEvt
2518 S16 cmPkLkwL2MeasReq(pst, measReqEvt)
2520 RlcL2MeasReqEvt *measReqEvt;
2523 Buffer *mBuf = NULLP;
2525 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2526 #if (ERRCLASS & ERRCLS_ADD_RES)
2527 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2528 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2529 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2531 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
2534 if (cmPkRlcL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK) {
2535 #if (ERRCLASS & ERRCLS_ADD_RES)
2536 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2537 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2538 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2540 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
2544 if (oduUnpackUInt16(measReqEvt->measPeriod, mBuf) != ROK) {
2545 #if (ERRCLASS & ERRCLS_ADD_RES)
2546 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2547 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2548 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2550 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
2554 if (oduUnpackUInt32(measReqEvt->transId, mBuf) != ROK) {
2555 #if (ERRCLASS & ERRCLS_ADD_RES)
2556 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2557 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2558 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2560 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
2565 pst->event = (Event) LKW_EVT_L2MEAS_REQ;
2566 return (SPstTsk(pst,mBuf));
2570 S16 cmPkRlcL2MeasReqInfo
2572 RlcL2MeasReqInfo *param,
2576 S16 cmPkRlcL2MeasReqInfo(param, mBuf)
2577 RlcL2MeasReqInfo *param;
2585 if((param->measType & LKW_L2MEAS_DL_IP) ||
2586 (param->measType & LKW_L2MEAS_UL_IP))
2588 for(idx1 = 0;idx1 < param->val.ipThMeas.numUes;idx1++)
2591 CMCHKPK(cmPkLteCellId, param->val.ipThMeas.ueInfoLst[idx1].cellId, mBuf);
2592 CMCHKPK(cmPkLteRnti, param->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
2593 for(idx = 0; idx < param->val.ipThMeas.ueInfoLst[idx1].numQci; idx++)
2595 CMCHKPK(oduUnpackUInt8, param->val.ipThMeas.ueInfoLst[idx1].qci[idx], mBuf);
2597 CMCHKPK(oduUnpackUInt8, param->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
2599 CMCHKPK(oduUnpackUInt16, param->val.ipThMeas.numUes, mBuf);
2600 CMCHKPK(oduUnpackUInt8, param->measType, mBuf);
2605 for(idx = 0; idx < param->val.nonIpThMeas.numQci; idx++)
2607 CMCHKPK(oduUnpackUInt8, param->val.nonIpThMeas.qci[idx], mBuf);
2609 CMCHKPK(oduUnpackUInt8, param->val.nonIpThMeas.numQci, mBuf);
2610 CMCHKPK(oduUnpackUInt16, param->val.nonIpThMeas.numSamples, mBuf);
2612 CMCHKPK(oduUnpackUInt8, param->measType, mBuf);
2617 S16 cmPkLkwL2MeasStopReq
2623 S16 cmPkLkwL2MeasStopReq(pst, measType)
2628 Buffer *mBuf = NULLP;
2630 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2631 #if (ERRCLASS & ERRCLS_ADD_RES)
2632 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2633 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2634 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2638 CMCHKPK(oduUnpackUInt8, measType, mBuf);
2639 pst->event = (Event) LKW_EVT_L2MEAS_STOP_REQ;
2640 return (SPstTsk(pst,mBuf));
2644 S16 cmPkLkwL2MeasSendReq
2650 S16 cmPkLkwL2MeasSendReq(pst, measType)
2655 Buffer *mBuf = NULLP;
2657 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2658 #if (ERRCLASS & ERRCLS_ADD_RES)
2659 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2660 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2661 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2665 CMCHKPK(oduUnpackUInt8, measType, mBuf);
2666 pst->event = (Event) LKW_EVT_L2MEAS_SEND_REQ;
2667 return (SPstTsk(pst,mBuf));
2669 #ifdef TENB_SPLIT_ARCH
2671 S16 cmUnpkLkwL2MeasReq
2678 S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
2684 RlcL2MeasReqEvt measReqEvt;
2687 if (oduPackUInt32(&measReqEvt.transId, mBuf) != ROK) {
2689 #if (ERRCLASS & ERRCLS_ADD_RES)
2690 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2691 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2692 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2696 if (oduPackUInt16(&measReqEvt.measPeriod, mBuf) != ROK) {
2698 #if (ERRCLASS & ERRCLS_ADD_RES)
2699 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2700 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2701 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2705 if (cmUnpkRlcL2MeasReqInfo(&measReqEvt.measReq, mBuf) != ROK)
2707 /*SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));*/
2709 #if (ERRCLASS & ERRCLS_ADD_RES)
2710 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2711 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2712 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2717 return ((*func)(pst, &measReqEvt));
2721 S16 cmUnpkLkwL2MeasReq
2728 S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
2735 RlcL2MeasReqEvt *measReqEvt;
2739 if((ret = SGetSBuf(pst->region, pst->pool, (Data **)&measReqEvt,\
2740 sizeof(RlcL2MeasReqEvt))) != ROK)
2742 #if (ERRCLASS & ERRCLS_ADD_RES)
2743 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2744 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2745 (ErrVal)ERRLKW, (ErrVal)0, "SGetMsg() failed");
2746 #endif /* ERRCLASS & ERRCLS_ADD_RES */
2750 if (oduPackUInt32(&measReqEvt->transId, mBuf) != ROK) {
2752 #if (ERRCLASS & ERRCLS_ADD_RES)
2753 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2754 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2755 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2759 if (oduPackUInt16(&measReqEvt->measPeriod, mBuf) != ROK) {
2761 #if (ERRCLASS & ERRCLS_ADD_RES)
2762 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2763 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2764 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2768 if (cmUnpkRlcL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK)
2770 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
2772 #if (ERRCLASS & ERRCLS_ADD_RES)
2773 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2774 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2775 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2780 return ((*func)(pst, measReqEvt));
2785 S16 cmUnpkRlcL2MeasReqInfo
2787 RlcL2MeasReqInfo *param,
2791 S16 cmUnpkRlcL2MeasReqInfo(param, mBuf)
2792 RlcL2MeasReqInfo *param;
2800 CMCHKUNPK(oduPackUInt8, ¶m->measType, mBuf);
2802 if((param->measType & LKW_L2MEAS_DL_IP) ||
2803 (param->measType & LKW_L2MEAS_UL_IP))
2805 CMCHKUNPK(oduPackUInt16, ¶m->val.ipThMeas.numUes, mBuf);
2806 for(idx1 = 0;idx1 < param->val.ipThMeas.numUes;idx1++)
2808 CMCHKUNPK(oduPackUInt8, ¶m->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
2809 for(idx = param->val.ipThMeas.ueInfoLst[idx1].numQci; idx > 0; idx--)
2811 CMCHKUNPK(oduPackUInt8, ¶m->val.ipThMeas.ueInfoLst[idx1].\
2812 qci[idx - 1], mBuf);
2814 CMCHKUNPK(cmUnpkLteRnti, ¶m->val.ipThMeas.ueInfoLst[idx1].\
2816 CMCHKUNPK(cmUnpkLteCellId, ¶m->val.ipThMeas.\
2817 ueInfoLst[idx1].cellId, mBuf);
2823 CMCHKUNPK(oduPackUInt16, ¶m->val.nonIpThMeas.numSamples, mBuf);
2824 CMCHKUNPK(oduPackUInt8, ¶m->val.nonIpThMeas.numQci, mBuf);
2825 for(idx = param->val.nonIpThMeas.numQci; idx > 0; idx--)
2827 CMCHKUNPK(oduPackUInt8, ¶m->val.nonIpThMeas.qci[idx - 1], mBuf);
2834 S16 cmUnpkLkwL2MeasStopReq
2836 LkwL2MeasStopReq func,
2841 S16 cmUnpkLkwL2MeasStopReq(func, pst, mBuf)
2842 LkwL2MeasStopReq func;
2849 CMCHKUNPK(oduPackUInt8, &measType, mBuf);
2851 return ((*func)(pst, measType));
2855 S16 cmUnpkLkwL2MeasSendReq
2857 LkwL2MeasSendReq func,
2862 S16 cmUnpkLkwL2MeasSendReq(func, pst, mBuf)
2863 LkwL2MeasSendReq func;
2871 CMCHKUNPK(oduPackUInt8, &measType, mBuf);
2873 return ((*func)(pst, measType));
2877 S16 cmPkLkwL2MeasCfm
2880 RlcL2MeasCfmEvt *measCfmEvt
2883 S16 cmPkLkwL2MeasCfm(pst, measCfmEvt)
2885 RlcL2MeasCfmEvt *measCfmEvt;
2888 Buffer *mBuf = NULLP;
2893 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2894 #if (ERRCLASS & ERRCLS_ADD_RES)
2895 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2896 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2897 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2899 SPutSBuf(pst->region, pst->pool, (Data *)measCfmEvt, sizeof(RlcL2MeasCfmEvt));
2903 if((measCfmEvt->measType & LKW_L2MEAS_ACT_UE) || \
2904 (measCfmEvt->measType & LKW_L2MEAS_UU_LOSS) || \
2905 (measCfmEvt->measType & LKW_L2MEAS_DL_DISC) || \
2906 (measCfmEvt->measType & LKW_L2MEAS_DL_DELAY))
2908 for(idx = 0; idx < measCfmEvt->val.nonIpThMeas.numCfm; idx++)
2910 if (cmPkRlcL2MeasCfmInfo(&measCfmEvt->val.nonIpThMeas.measCfm[idx], \
2911 mBuf, measCfmEvt->measType) != ROK) {
2912 #if (ERRCLASS & ERRCLS_ADD_RES)
2913 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2914 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2915 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2922 if (oduUnpackUInt16(measCfmEvt->val.nonIpThMeas.numCfm, mBuf) != ROK) {
2923 #if (ERRCLASS & ERRCLS_ADD_RES)
2924 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2925 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2926 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2934 for(idx1 =0 ;idx1< measCfmEvt->val.ipThMeas.numUes;idx1++)
2937 for(idx = 0; idx < measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm; idx++)
2939 if (cmPkRlcL2MeasCfmInfo(&measCfmEvt->val.ipThMeas.ueInfoLst[idx1].\
2940 measCfm[idx], mBuf, measCfmEvt->measType) != ROK) {
2941 #if (ERRCLASS & ERRCLS_ADD_RES)
2942 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2943 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2944 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2951 if (oduUnpackUInt16(measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm, mBuf) != ROK) {
2952 #if (ERRCLASS & ERRCLS_ADD_RES)
2953 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2954 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2955 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2961 CMCHKPK(cmPkLteCellId, measCfmEvt->val.ipThMeas.ueInfoLst[idx1].cellId, mBuf);
2962 CMCHKPK(cmPkLteRnti, measCfmEvt->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
2964 oduUnpackUInt16(measCfmEvt->val.ipThMeas.numUes, mBuf);
2967 CMCHKPK(oduUnpackUInt8, measCfmEvt->measType, mBuf);
2968 CMCHKPK(cmPkCmStatus, &measCfmEvt->status, mBuf);
2969 if (oduUnpackUInt32(measCfmEvt->transId, mBuf) != ROK) {
2970 #if (ERRCLASS & ERRCLS_ADD_RES)
2971 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2972 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2973 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2978 pst->event = (Event) LKW_EVT_L2MEAS_CFM;
2979 return (SPstTsk(pst,mBuf));
2983 S16 cmPkRlcL2MeasCfmInfo
2985 RlcL2MeasCfmInfo *param,
2990 S16 cmPkRlcL2MeasCfmInfo(param, mBuf, measType)
2991 RlcL2MeasCfmInfo *param;
2997 if((measType & LKW_L2MEAS_DL_IP) ||
2998 (measType & LKW_L2MEAS_UL_IP))
3000 CMCHKPK(SPkF32, param->val.ipThrput.ulIpThPut, mBuf);
3001 CMCHKPK(SPkF32, param->val.ipThrput.dlIpThPut, mBuf);
3002 CMCHKPK(oduUnpackUInt8, param->qci, mBuf);
3007 CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.dlDiscRate, mBuf);
3008 CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.uuLoss, mBuf);
3009 CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.numActUe, mBuf);
3010 CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.dlSduDelay, mBuf);
3011 CMCHKPK(oduUnpackUInt8, param->qci, mBuf);
3017 S16 cmUnpkLkwL2MeasCfm
3024 S16 cmUnpkLkwL2MeasCfm(func, pst, mBuf)
3032 RlcL2MeasCfmEvt measCfmEvt;
3034 memset(&measCfmEvt, 0 , sizeof(RlcL2MeasCfmEvt));
3035 if (oduPackUInt32(&measCfmEvt.transId, mBuf) != ROK) {
3037 #if (ERRCLASS & ERRCLS_ADD_RES)
3038 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3039 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3040 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3044 CMCHKUNPK(cmUnpkCmStatus, &measCfmEvt.status, mBuf);
3045 CMCHKUNPK(oduPackUInt8, &measCfmEvt.measType, mBuf);
3047 if(measCfmEvt.measType & LKW_L2MEAS_DL_IP || measCfmEvt.measType & LKW_L2MEAS_UL_IP)
3049 CMCHKUNPK(oduPackUInt16, &measCfmEvt.val.ipThMeas.numUes, mBuf);
3050 for(idx1 = 0;idx1<measCfmEvt.val.ipThMeas.numUes;idx1++)
3052 CMCHKUNPK(cmUnpkLteRnti, &measCfmEvt.val.ipThMeas.\
3053 ueInfoLst[idx1].ueId, mBuf);
3054 CMCHKUNPK(cmUnpkLteCellId, &measCfmEvt.val.ipThMeas.\
3055 ueInfoLst[idx1].cellId, mBuf);
3056 if (oduPackUInt16(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
3057 numCfm, mBuf) != ROK) {
3059 #if (ERRCLASS & ERRCLS_ADD_RES)
3060 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3061 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3062 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3066 for(idx = measCfmEvt.val.ipThMeas.ueInfoLst[idx1].numCfm; idx > 0; idx--)
3068 if (cmUnpkRlcL2MeasCfmInfo(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
3069 measCfm[idx - 1], mBuf, measCfmEvt.measType) != ROK) {
3071 #if (ERRCLASS & ERRCLS_ADD_RES)
3072 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3073 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3074 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3083 if (oduPackUInt16(&measCfmEvt.val.nonIpThMeas.numCfm, mBuf) != ROK) {
3085 #if (ERRCLASS & ERRCLS_ADD_RES)
3086 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3087 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3088 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3092 for(idx = measCfmEvt.val.nonIpThMeas.numCfm; idx > 0; idx--)
3094 if (cmUnpkRlcL2MeasCfmInfo(&measCfmEvt.val.nonIpThMeas.measCfm[idx - 1], \
3095 mBuf, measCfmEvt.measType) != ROK) {
3097 #if (ERRCLASS & ERRCLS_ADD_RES)
3098 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3099 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3100 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3107 return ((*func)(pst, &measCfmEvt));
3111 S16 cmUnpkRlcL2MeasCfmInfo
3113 RlcL2MeasCfmInfo *param,
3118 S16 cmUnpkRlcL2MeasCfmInfo(param, mBuf, measType)
3119 RlcL2MeasCfmInfo *param;
3125 if((measType & LKW_L2MEAS_DL_IP) ||
3126 (measType & LKW_L2MEAS_UL_IP))
3128 CMCHKUNPK(oduPackUInt8, ¶m->qci, mBuf);
3129 CMCHKUNPK(SUnpkF32, ¶m->val.ipThrput.dlIpThPut, mBuf);
3130 CMCHKUNPK(SUnpkF32, ¶m->val.ipThrput.ulIpThPut, mBuf);
3135 CMCHKUNPK(oduPackUInt8, ¶m->qci, mBuf);
3136 CMCHKUNPK(oduPackUInt32, ¶m->val.nonIpThrput.dlSduDelay, mBuf);
3137 CMCHKUNPK(oduPackUInt32, ¶m->val.nonIpThrput.numActUe, mBuf);
3138 CMCHKUNPK(oduPackUInt32, ¶m->val.nonIpThrput.uuLoss, mBuf);
3139 CMCHKUNPK(oduPackUInt32, ¶m->val.nonIpThrput.dlDiscRate, mBuf);
3146 S16 cmPkLkwL2MeasStopCfm
3153 S16 cmPkLkwL2MeasStopCfm(pst, measType,status)
3159 Buffer *mBuf = NULLP;
3161 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3162 #if (ERRCLASS & ERRCLS_ADD_RES)
3163 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3164 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3165 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3169 CMCHKPK(oduUnpackUInt8, status, mBuf);
3170 CMCHKPK(oduUnpackUInt8, measType, mBuf);
3171 pst->event = (Event) LKW_EVT_L2MEAS_STOP_CFM;
3172 return (SPstTsk(pst,mBuf));
3176 S16 cmUnpkLkwL2MeasStopCfm
3178 LkwL2MeasStopCfm func,
3183 S16 cmUnpkLkwL2MeasStopCfm(func, pst, mBuf)
3184 LkwL2MeasStopCfm func;
3191 CMCHKUNPK(oduPackUInt8, &measType, mBuf);
3192 CMCHKUNPK(oduPackUInt8, &status, mBuf);
3194 return ((*func)(pst, measType,status));
3196 #endif /* LTE_L2_MEAS */
3200 /**********************************************************************
3202 **********************************************************************/