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 PRIVATE S16 cmPkKwMngmt ARGS ((KwMngmt *param ,Event eventType,
63 PRIVATE S16 cmPkKwCfg ARGS ((KwMngmt *param ,Elmnt elmnt, Buffer *mBuf));
64 PRIVATE S16 cmPkKwCntrl ARGS ((KwMngmt *cntrl, Elmnt elmnt, Buffer *mBuf));
65 PRIVATE S16 cmPkKwUsta ARGS ((KwMngmt *usta, Elmnt elmnt, Buffer *mBuf));
66 PRIVATE S16 cmPkKwSsta ARGS ((KwMngmt *ssta, Elmnt etmnt, Event eventType,
68 PRIVATE S16 cmPkKwSts ARGS ((KwMngmt *sts, Elmnt elmnt, Buffer *mBuf));
69 PRIVATE S16 cmPkGenSts ARGS ((KwGenSts *gen, Buffer *mBuf));
70 PRIVATE S16 cmPkCkwSapSts ARGS ((KwCkwCntSts *rcSap, Buffer *mBuf));
71 PRIVATE S16 cmPkKwuSapSts ARGS ((KwKwuSapSts *ruSap, Buffer *mBuf));
72 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
73 * in general statstics.
75 PRIVATE S16 cmPkKwTrc ARGS ((KwMngmt *trc, Buffer *mBuf));
77 PRIVATE S16 cmUnpkKwMngmt ARGS ((KwMngmt *param, Event eventType,
79 PRIVATE S16 cmUnpkKwCfg ARGS ((KwMngmt *cfg, Elmnt elmnt, Buffer *mBuf));
80 PRIVATE S16 cmUnpkKwCntrl ARGS ((KwMngmt *param, Elmnt elmnt, Buffer *mBuf));
81 PRIVATE S16 cmUnpkKwUsta ARGS ((KwMngmt *usta, Elmnt elmnt, Buffer *mBuf));
82 PRIVATE S16 cmUnpkKwSsta ARGS ((KwMngmt *ssta, Elmnt elmnt, Event eventType,
84 PRIVATE S16 cmUnpkKwSts ARGS ((KwMngmt *sts, Elmnt elmnt, Buffer *mBuf));
85 PRIVATE S16 cmUnpkGenSts ARGS ((KwGenSts *gen, Buffer *mBuf));
86 PRIVATE S16 cmUnpkCkwSapSts ARGS ((KwCkwCntSts *rcSap, Buffer *mBuf));
87 PRIVATE S16 cmUnpkKwuSapSts ARGS ((KwKwuSapSts *ruSap, Buffer *mBuf));
88 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
89 * in general statstics.
91 PRIVATE S16 cmUnpkKwTrc ARGS ((KwMngmt *trc, Buffer *mBuf));
94 PRIVATE S16 cmPkCkwSapSta ARGS ((KwCkwCntSapSta *rcSap, Buffer *mBuf));
95 PRIVATE S16 cmUnpkCkwSapSta ARGS ((KwCkwCntSapSta *rcSap, Buffer *mBuf));
97 PRIVATE S16 cmPkKwuSapSta ARGS ((KwKwuSapSta *rlSap, Buffer *mBuf));
98 PRIVATE S16 cmUnpkKwuSapSta ARGS ((KwKwuSapSta *rlSap, Buffer *mBuf));
100 PRIVATE S16 cmPkRguSapSta ARGS ((KwRguSapSta *mkSap, Buffer *mBuf));
101 PRIVATE S16 cmUnpkRguSapSta ARGS ((KwRguSapSta *mkSap, Buffer *mBuf));
107 * @param[in] pst : post structure
108 * @param[in] cfg : RLC LM structure
111 * -# Failure : RFAILED
115 PUBLIC S16 cmPkLkwCfgReq
117 Pst *pst, /* post structure */
118 KwMngmt *cfg /* RLC LM structure */
121 PUBLIC S16 cmPkLkwCfgReq(pst, cfg)
122 Pst *pst; /* post structure */
123 KwMngmt *cfg; /* RLC LM structure */
126 Buffer *mBuf; /* message buffer */
127 S16 ret1; /* return value */
131 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
134 #if (ERRCLASS & ERRCLS_ADD_RES)
137 LKWLOGERROR(pst, ERRCLS_ADD_RES, ELKW001, (ErrVal) ret1,
138 "SGetMsg failed ...!\n");
140 #endif /* ERRCLASS & ERRCLS_ADD_RES */
144 ret1 = cmPkKwMngmt(cfg, LKW_EVT_CFG_REQ, mBuf);
149 #if (ERRCLASS & ERRCLS_ADD_RES)
152 LKWLOGERROR(pst, ERRCLS_ADD_RES, ELKW002, (ErrVal) ret1,
153 "cmPkKwMngmt failure ......!");
155 #endif /* ERRCLASS & ERRCLS_ADD_RES */
159 pst->event = (Event) LKW_EVT_CFG_REQ; /* event */
164 } /* end of cmPkLkwCfgReq */
168 Unpack Config Request
170 * @param[in] func : primitive to call
171 * @param[in] pst : post structure
172 * @param[in] mBuf : message buffer
175 * -# Failure : RFAILED
179 PUBLIC S16 cmUnpkLkwCfgReq
181 LkwCfgReq func, /* primitive to call */
182 Pst *pst, /* post structure */
183 Buffer *mBuf /* message buffer */
186 PUBLIC S16 cmUnpkLkwCfgReq(func, pst, mBuf)
187 LkwCfgReq func; /* primitive to call */
188 Pst *pst; /* post structure */
189 Buffer *mBuf; /* message buffer */
192 S16 ret1; /* Return value */
193 KwMngmt cfg; /* RLC LM structure */
195 TRC3(cmUnpkLkwCfgReq)
197 cmMemset((U8 *) &cfg, (U8) 0, (S16) sizeof(KwMngmt));
198 ret1 = cmUnpkKwMngmt(&cfg, LKW_EVT_CFG_REQ, mBuf);
203 #if (ERRCLASS & ERRCLS_DEBUG)
205 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW003, (ErrVal) ret1,
206 "cmUnpkKwMngmt failure ......!");
208 #endif /* ERRCLASS & ERRCLS_DEBUG */
213 (Void) (*func)(pst, &cfg);
217 } /* end of cmUnpkLkwCfgReq */
225 * @param[in] pst : post structure
226 * @param[in] cntrl : RLC LM structure
229 * -# Failure : RFAILED
233 PUBLIC S16 cmPkLkwCntrlReq
235 Pst *pst, /* post structure */
236 KwMngmt *cntrl /* RLC LM structure */
239 PUBLIC S16 cmPkLkwCntrlReq(pst,cntrl)
240 Pst *pst; /* post structure */
241 KwMngmt *cntrl; /* RLC LM structure */
244 Buffer *mBuf; /* message buffer */
245 S16 ret1; /* return value */
247 TRC3(cmPkLkwCntrlReq)
249 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
252 #if (ERRCLASS & ERRCLS_ADD_RES)
255 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW004, (ErrVal) ret1,
256 "SGetMsg failure ......!");
258 #endif /* ERRCLASS & ERRCLS_ADD_RES */
262 ret1 = cmPkKwMngmt(cntrl, LKW_EVT_CNTRL_REQ, mBuf);
267 #if (ERRCLASS & ERRCLS_ADD_RES)
270 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW005, (ErrVal) ret1,
271 "cmPkKwMngmt failure ......!");
273 #endif /* ERRCLASS & ERRCLS_ADD_RES */
277 pst->event = (Event) LKW_EVT_CNTRL_REQ; /* event */
282 } /* end of cmPkLkwCntrlReq */
286 Unpack Control Request
288 * @param[in] func : primitive to call
289 * @param[in] pst : post structure
290 * @param[in] mBuf : message buffer
293 * -# Failure : RFAILED
297 PUBLIC S16 cmUnpkLkwCntrlReq
299 LkwCntrlReq func, /* primitive to call */
300 Pst *pst, /* post structure */
301 Buffer *mBuf /* message buffer */
304 PUBLIC S16 cmUnpkLkwCntrlReq(func, pst, mBuf)
305 LkwCntrlReq func; /* primitive to call */
306 Pst *pst; /* post structure */
307 Buffer *mBuf; /* message buffer */
310 S16 ret1; /* return value */
311 KwMngmt cfm; /* Confirmation */
313 TRC3(cmUnpkLkwCntrlReq)
315 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_CNTRL_REQ, mBuf);
320 #if (ERRCLASS & ERRCLS_DEBUG)
322 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW006, (ErrVal) ret1,
323 "cmUnpkKwMngmt failure ......!");
325 #endif /* ERRCLASS & ERRCLS_DEBUG */
330 RETVALUE((*func)(pst, &cfm));
332 } /* end of cmUnpkLkwCntrlReq */
338 * @param[in] pst : post structure
339 * @param[in] cfg : RLC LM structure
342 * -# Failure : RFAILED
346 PUBLIC S16 cmPkLkwCntrlCfm
348 Pst *pst, /* post structure */
349 KwMngmt *cfm /* RLC LM structure */
352 PUBLIC S16 cmPkLkwCntrlCfm(pst, cfm)
353 Pst *pst; /* post structure */
354 KwMngmt *cfm; /* RLC LM structure */
357 Buffer *mBuf; /* message buffer */
358 S16 ret1; /* return value */
360 TRC3(cmPkLkwCntrlCfm)
362 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
365 #if (ERRCLASS & ERRCLS_ADD_RES)
368 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW007, (ErrVal) ret1,
369 "SGetMsg failure ......!");
371 #endif /* ERRCLASS & ERRCLS_ADD_RES */
375 ret1 = cmPkKwMngmt(cfm, LKW_EVT_CNTRL_CFM, mBuf);
380 #if (ERRCLASS & ERRCLS_ADD_RES)
383 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW008, (ErrVal) ret1,
384 "Packing failure ......!");
386 #endif /* ERRCLASS & ERRCLS_ADD_RES */
390 pst->event = (Event) LKW_EVT_CNTRL_CFM; /* event */
395 } /* end of cmPkLkwCntrlCfm */
400 Unpack Control confirm
402 * @param[in] func : primitive to call
403 * @param[in] pst : post structure
404 * @param[in] mBuf : message buffer
407 * -# Failure : RFAILED
411 PUBLIC S16 cmUnpkLkwCntrlCfm
413 LkwCntrlCfm func, /* primitive to call */
414 Pst *pst, /* post structure */
415 Buffer *mBuf /* message buffer */
418 PUBLIC S16 cmUnpkLkwCntrlCfm(func, pst, mBuf)
419 LkwCntrlCfm func; /* primitive to call */
420 Pst *pst; /* post structure */
421 Buffer *mBuf; /* message buffer */
424 KwMngmt cfm; /* RLC LM structure */
425 S16 ret1; /* return value */
427 TRC3(cmUnpkLkwCntrlCfm)
429 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_CNTRL_CFM, mBuf);
434 #if (ERRCLASS & ERRCLS_DEBUG)
437 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW009, (ErrVal) ret1,
438 "cmUnpkKwMngmt failure ......!");
440 #endif /* ERRCLASS & ERRCLS_DEBUG */
446 RETVALUE((*func)(pst, &cfm));
448 } /* end of cmUnpkLkwCntrlCfm */
452 Unpack statistics Confirm
454 * @param[in] func : primitive to call
455 * @param[in] pst : post structure
456 * @param[in] mBuf : message buffer
459 * -# Failure : RFAILED
462 PUBLIC S16 cmUnpkLkwStsCfm
464 LkwStsCfm func, /* primitive to call */
465 Pst *pst, /* post structure */
466 Buffer *mBuf /* message buffer */
469 PUBLIC S16 cmUnpkLkwStsCfm(func, pst, mBuf)
470 LkwStsCfm func; /* primitive to call */
471 Pst *pst; /* post structure */
472 Buffer *mBuf; /* message buffer */
475 KwMngmt cfm; /* RLC LM structure */
476 S16 ret1; /* return value */
478 TRC3(cmUnpkLkwStsCfm)
480 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_STS_CFM, mBuf);
485 #if (ERRCLASS & ERRCLS_DEBUG)
488 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW010, (ErrVal) ret1,
489 "SPutMsg failure ......!");
491 #endif /* ERRCLASS & ERRCLS_DEBUG */
497 RETVALUE((*func)(pst, 0, &cfm));
499 } /* end of cmUnpkLkwStsCfm */
505 * @param[in] pst : post structure
506 * @param[in] cfg : RLC LM structure
509 * -# Failure : RFAILED
514 PUBLIC S16 cmPkLkwCfgCfm
516 Pst *pst, /* post structure */
517 KwMngmt *cfm /* RLC LM structure */
520 PUBLIC S16 cmPkLkwCfgCfm(pst,cfm)
521 Pst *pst; /* post structure */
522 KwMngmt *cfm; /* RLC LM structure */
525 Buffer *mBuf; /* message buffer */
526 S16 ret1; /* return value */
530 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
533 #if (ERRCLASS & ERRCLS_ADD_RES)
536 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW011, (ErrVal) ret1,
537 "SGetMsg failure ......!");
539 #endif /* ERRCLASS & ERRCLS_ADD_RES */
543 ret1 = cmPkKwMngmt(cfm, LKW_EVT_CFG_CFM, mBuf);
548 #if (ERRCLASS & ERRCLS_ADD_RES)
551 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW012, (ErrVal) ret1,
552 "SPutMsg failure ......!");
554 #endif /* ERRCLASS & ERRCLS_ADD_RES */
558 pst->event = (Event) LKW_EVT_CFG_CFM; /* event */
563 } /* end of cmPkLkwCfgCfm */
568 Unpack Config Confirm
570 * @param[in] func : primitive to call
571 * @param[in] pst : post structure
572 * @param[in] mBuf : message buffer
575 * -# Failure : RFAILED
578 PUBLIC S16 cmUnpkLkwCfgCfm
580 LkwCfgCfm func, /* primitive to call */
581 Pst *pst, /* post structure */
582 Buffer *mBuf /* message buffer */
585 PUBLIC S16 cmUnpkLkwCfgCfm(func, pst, mBuf)
586 LkwCfgCfm func; /* primitive to call */
587 Pst *pst; /* post structure */
588 Buffer *mBuf; /* message buffer */
591 S16 ret1; /* return value */
592 KwMngmt cfm; /* RLC LM structure */
594 TRC3(cmUnpkLkwCfgCfm)
596 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_CFG_CFM, mBuf);
601 #if (ERRCLASS & ERRCLS_DEBUG)
604 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW013, (ErrVal) ret1,
605 "SPutMsg failure ......!");
607 #endif /* ERRCLASS & ERRCLS_DEBUG */
612 RETVALUE((*func)(pst, &cfm));
614 } /* end of cmUnpkLkwCfgCfm */
620 Pack Status Indication
622 * @param[in] pst : post structure
623 * @param[in] usta : RLC LM structure
626 * -# Failure : RFAILED
630 PUBLIC S16 cmPkLkwStaInd
632 Pst *pst, /* post structure */
633 KwMngmt *usta /* RLC LM structure */
636 PUBLIC S16 cmPkLkwStaInd(pst,usta)
637 Pst *pst; /* post structure */
638 KwMngmt *usta; /* RLC LM structure */
641 Buffer *mBuf; /* message buffer */
642 S16 ret1; /* return value */
646 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
649 #if (ERRCLASS & ERRCLS_ADD_RES)
652 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW014, (ErrVal) ret1,
655 #endif /* ERRCLASS & ERRCLS_ADD_RES */
659 ret1 = cmPkKwMngmt(usta, LKW_EVT_STA_IND, mBuf);
664 #if (ERRCLASS & ERRCLS_ADD_RES)
667 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW015, (ErrVal) ret1,
668 "cmPkKwMngmt failure ......!");
670 #endif /* ERRCLASS & ERRCLS_ADD_RES */
674 pst->event = (Event) LKW_EVT_STA_IND; /* event */
679 } /* end of cmPkLkwStaInd */
684 Unpack Unsolicited Status indication
686 * @param[in] func : primitive to call
687 * @param[in] pst : post structure
688 * @param[in] mBuf : message buffer
691 * -# Failure : RFAILED
695 PUBLIC S16 cmUnpkLkwStaInd
697 LkwStaInd func, /* primitive pointer */
698 Pst *pst, /* post structure */
699 Buffer *mBuf /* message buffer */
702 PUBLIC S16 cmUnpkLkwStaInd(func, pst, mBuf)
703 LkwStaInd func; /* primitive pointer */
704 Pst *pst; /* post structure */
705 Buffer *mBuf; /* message buffer */
708 KwMngmt usta; /* RLC LM structure */
709 S16 ret1; /* return value */
711 TRC3(cmUnpkLkwStaInd)
713 ret1 = cmUnpkKwMngmt(&usta, LKW_EVT_STA_IND, mBuf);
718 #if (ERRCLASS & ERRCLS_DEBUG)
721 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW016, (ErrVal) ret1,
722 "cmUnpkKwMngmt failure ......!");
724 #endif /* ERRCLASS & ERRCLS_DEBUG */
730 RETVALUE((*func)(pst, &usta));
731 } /* end of cmUnpkLsnStaInd */
737 * @param[in] pst : post structure
738 * @param[in] sta : RLC LM structure
741 * -# Failure : RFAILED
745 PUBLIC S16 cmPkLkwStaReq
747 Pst *pst, /* post structure */
748 KwMngmt *sta /* status */
751 PUBLIC S16 cmPkLkwStaReq(pst,sta)
752 Pst *pst; /* post structure */
753 KwMngmt *sta; /* status */
756 Buffer *mBuf; /* message buffer */
757 S16 ret1; /* return value */
761 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
764 #if (ERRCLASS & ERRCLS_ADD_RES)
767 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW017, (ErrVal) ret1,
768 "SGetMsg failure ......!");
770 #endif /* ERRCLASS & ERRCLS_ADD_RES */
774 ret1 = cmPkKwMngmt(sta, LKW_EVT_STA_REQ, mBuf);
779 #if (ERRCLASS & ERRCLS_ADD_RES)
782 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW018, (ErrVal) ret1,
783 "SGetMsg() failure ......!");
785 #endif /* ERRCLASS & ERRCLS_ADD_RES */
789 pst->event = (Event) LKW_EVT_STA_REQ; /* event */
794 } /* end of cmPkLkwStaReq */
798 Unpack status confirmation
800 * @param[in] func : primitive to call
801 * @param[in] pst : post structure
802 * @param[in] mBuf : message buffer
805 * -# Failure : RFAILED
808 PUBLIC S16 cmUnpkLkwStaCfm
810 LkwStaReq func, /* primitive pointer */
811 Pst *pst, /* post structure */
812 Buffer *mBuf /* message buffer */
815 PUBLIC S16 cmUnpkLkwStaCfm(func, pst, mBuf)
816 LkwStaReq func; /* primitive pointer */
817 Pst *pst; /* post structure */
818 Buffer *mBuf; /* message buffer */
821 KwMngmt cfm; /* RLC LM structure */
822 S16 ret1; /* return value */
824 TRC3(cmUnpkLkwStaReq)
826 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_STA_CFM, mBuf);
831 #if (ERRCLASS & ERRCLS_DEBUG)
834 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW019, (ErrVal) ret1,
835 "Unpacking failure ......!");
837 #endif /* ERRCLASS & ERRCLS_DEBUG */
843 RETVALUE((*func)(pst, &cfm));
845 } /* end of function cmUnpkLkwStaCfm */
849 Unpack Status request
851 * @param[in] func : primitive to call
852 * @param[in] pst : post structure
853 * @param[in] mBuf : message buffer
856 * -# Failure : RFAILED
859 PUBLIC S16 cmUnpkLkwStsReq
861 LkwStsReq func, /* primitive pointer */
862 Pst *pst, /* post structure */
863 Buffer *mBuf /* message buffer */
866 PUBLIC S16 cmUnpkLkwStsReq(func, pst, mBuf)
867 LkwStsReq func; /* primitive pointer */
868 Pst *pst; /* post structure */
869 Buffer *mBuf; /* message buffer */
872 KwMngmt sts; /* RLC LM structure */
873 S16 ret1; /* return value */
874 Action action; /* Action */
876 TRC3(cmUnpkLkwStsReq)
878 CMCHKUNPK(SUnpkS16, &action, mBuf);
880 ret1 = cmUnpkKwMngmt(&sts, LKW_EVT_STS_REQ, mBuf);
885 #if (ERRCLASS & ERRCLS_DEBUG)
887 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW020, (ErrVal) ret1,
888 "Unpacking failure ......!");
890 #endif /* ERRCLASS & ERRCLS_DEBUG */
896 RETVALUE((*func)(pst, action, &sts));
898 } /* end of function cmUnpkLkwStsReq */
905 * @param[in] func : primitive to call
906 * @param[in] pst : post structure
907 * @param[in] mBuf : message buffer
910 * -# Failure : RFAILED
913 PUBLIC S16 cmUnpkLkwStaReq
915 LkwStaReq func, /* primitive pointer */
916 Pst *pst, /* post structure */
917 Buffer *mBuf /* message buffer */
920 PUBLIC S16 cmUnpkLkwStaReq(func, pst, mBuf)
921 LkwStaReq func; /* primitive pointer */
922 Pst *pst; /* post structure */
923 Buffer *mBuf; /* message buffer */
926 KwMngmt sta; /* RLC LM structure */
927 S16 ret1; /* return value */
929 TRC3(cmUnpkLkwStaReq)
931 ret1 = cmUnpkKwMngmt(&sta, LKW_EVT_STA_REQ, mBuf);
936 #if (ERRCLASS & ERRCLS_DEBUG)
938 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW021, (ErrVal) ret1,
939 "Unpacking failure ......!");
941 #endif /* ERRCLASS & ERRCLS_DEBUG */
947 RETVALUE((*func)(pst, &sta));
949 } /* end of function cmUnpkLkwStaReq */
954 Unpack Trace Indication
956 * @param[in] func : primitive to call
957 * @param[in] pst : post structure
958 * @param[in] mBuf : message buffer
961 * -# Failure : RFAILED
965 PUBLIC S16 cmUnpkLkwTrcInd
967 LkwTrcInd func, /* primitive to call */
968 Pst *pst, /* post structure */
969 Buffer *mBuf /* message buffer */
972 PUBLIC S16 cmUnpkLkwTrcInd(func, pst, mBuf)
973 LkwTrcInd func; /* primitive to call */
974 Pst *pst; /* post structure */
975 Buffer *mBuf; /* message buffer */
978 S16 ret1; /* return value */
979 KwMngmt trc; /* RLC LM structure */
981 TRC3(cmUnpkLkwTrcInd)
983 ret1 = cmUnpkKwMngmt(&trc, LKW_EVT_TRC_IND, mBuf);
988 #if (ERRCLASS & ERRCLS_DEBUG)
991 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW022, (ErrVal) ret1,
992 "Unpacking failure ......!");
994 #endif /* ERRCLASS & ERRCLS_DEBUG */
998 (Void) (*func)(pst, &trc, mBuf);
1002 } /* end of cmUnpkLkwTrcInd */
1009 * @param[in] pst : post structure
1010 * @param[in] cfg : RLC LM structure
1013 * -# Failure : RFAILED
1017 PRIVATE S16 cmPkCkwSapSta
1019 KwCkwCntSapSta *rcSap, /* SAP statistics */
1020 Buffer *mBuf /* Message buffer */
1023 PRIVATE S16 cmPkCkwSapSta(rcSap, mBuf)
1024 KwCkwCntSapSta *rcSap; /* SAP statistics */
1025 Buffer *mBuf; /* Message buffer */
1030 CMCHKPK(cmPkState, rcSap->state, mBuf);
1031 CMCHKPK(SPkS16, rcSap->spId, mBuf);
1035 } /* end of cmPkCkwSapSta */
1041 * @param[out] rcSap: RLC LM structure
1042 * @param[in] buffer: Buffer
1045 * -# Failure : RFAILED
1048 PRIVATE S16 cmUnpkCkwSapSta
1050 KwCkwCntSapSta *rcSap, /* SAP statistics */
1051 Buffer *mBuf /* Message buffer */
1054 PRIVATE S16 cmUnpkCkwSapSta(rcSap, mBuf)
1055 KwCkwCntSapSta *rcSap; /* SAP statistics */
1056 Buffer *mBuf; /* Message buffer */
1059 TRC3(cmUnpkCkwSapSta)
1061 CMCHKUNPK(SUnpkS16, &rcSap->spId, mBuf);
1062 CMCHKUNPK(cmUnpkState, &rcSap->state, mBuf);
1065 } /* end of function cmUnpkCkwSapSta */
1071 * @param[in] pst : post structure
1072 * @param[in] cfg : RLC LM structure
1075 * -# Failure : RFAILED
1078 PRIVATE S16 cmPkKwuSapSta
1080 KwKwuSapSta *rlSap, /* SAP statistics */
1081 Buffer *mBuf /* Message buffer */
1084 PRIVATE S16 cmPkKwuSapSta(rlSap, mBuf)
1085 KwKwuSapSta *rlSap; /* SAP statistics */
1086 Buffer *mBuf; /* Message buffer */
1091 CMCHKPK(cmPkState, rlSap->state, mBuf);
1092 CMCHKPK(SPkS16, rlSap->spId, mBuf);
1096 } /* end of cmPkKwuSapSta */
1102 * @param[out] rlSap : KwRLSapSta structure
1103 * @param[in] mBuf : message buffer
1106 * -# Failure : RFAILED
1109 PRIVATE S16 cmUnpkKwuSapSta
1111 KwKwuSapSta *rlSap, /* SAP statistics */
1112 Buffer *mBuf /* Message buffer */
1115 PRIVATE S16 cmUnpkKwuSapSta(rlSap, mBuf)
1116 KwKwuSapSta *rlSap; /* SAP statistics */
1117 Buffer *mBuf; /* Message buffer */
1120 TRC3(cmUnpkKwuSapSta)
1122 CMCHKUNPK(SUnpkS16, &rlSap->spId, mBuf);
1123 CMCHKUNPK(cmUnpkState, &rlSap->state, mBuf);
1127 } /* end of function cmUnpkKwuSapSta */
1133 * @param[in] pst : post structure
1134 * @param[in] cfg : RLC LM structure
1137 * -# Failure : RFAILED
1140 PRIVATE S16 cmPkRguSapSta
1142 KwRguSapSta *mkSap, /* SAP statistics */
1143 Buffer *mBuf /* Message buffer */
1146 PRIVATE S16 cmPkRguSapSta(mkSap, mBuf)
1147 KwRguSapSta *mkSap; /* SAP statistics */
1148 Buffer *mBuf; /* Message buffer */
1153 CMCHKPK(cmPkState, mkSap->state, mBuf);
1154 CMCHKPK(cmPkSuId, mkSap->suId, mBuf);
1158 } /* end of cmPkRguSapSta */
1164 * @param[out] mkSap: KwRguSapSta structure
1165 * @param[in] mBuf : message buffer
1168 * -# Failure : RFAILED
1171 PRIVATE S16 cmUnpkRguSapSta
1173 KwRguSapSta *mkSap, /* SAP statistics */
1174 Buffer *mBuf /* Message buffer */
1177 PRIVATE S16 cmUnpkRguSapSta(mkSap, mBuf)
1178 KwRguSapSta *mkSap; /* SAP statistics */
1179 Buffer *mBuf; /* Message buffer */
1182 TRC3(cmUnpkRguSapSta)
1184 CMCHKUNPK(cmUnpkSuId, &mkSap->suId, mBuf);
1185 CMCHKUNPK(cmUnpkState, &mkSap->state, mBuf);
1189 } /* end of function cmUnpkRguSapSta */
1195 * @param[in] pst : post structure
1196 * @param[in] cfg : RLC LM structure
1199 * -# Failure : RFAILED
1202 PUBLIC S16 cmPkLkwStaCfm
1204 Pst *pst, /* post structure */
1205 KwMngmt *cfm /* solicited status confirm */
1208 PUBLIC S16 cmPkLkwStaCfm(pst, cfm)
1209 Pst *pst; /* post structure */
1210 KwMngmt *cfm; /* solicited status confirm */
1213 Buffer *mBuf; /* message buffer */
1214 S16 ret1; /* return value */
1216 TRC3(cmPkLkwStaCfm);
1218 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1221 #if (ERRCLASS & ERRCLS_ADD_RES)
1224 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW023, (ErrVal) ret1,
1225 "SGetMsg() failure ......!");
1227 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1231 ret1 = cmPkKwMngmt(cfm, LKW_EVT_STA_CFM, mBuf);
1236 #if (ERRCLASS & ERRCLS_ADD_RES)
1239 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW024, (ErrVal) ret1,
1240 "packing failure ......!");
1242 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1246 pst->event = (Event) LKW_EVT_STA_CFM; /* event */
1250 } /* end of cmPkLkwStaCfm */
1257 * @param[in] pst : post structure
1258 * @param[in] cfg : RLC LM structure
1261 * -# Failure : RFAILED
1264 PUBLIC S16 cmPkLkwTrcInd
1266 Pst *pst, /* post structure */
1267 KwMngmt *trc, /* trace */
1268 Buffer *trcBuf /* trace buffer */
1271 PUBLIC S16 cmPkLkwTrcInd(pst, trc, trcBuf)
1272 Pst *pst; /* post structure */
1273 KwMngmt *trc; /* trace */
1274 Buffer *trcBuf; /* trace buffer */
1277 S16 ret1 = ROK; /* return value */
1278 Buffer *mBuf = NULLP; /* Buffer to trace */
1280 TRC3(cmPkLkwTrcInd);
1282 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1285 #if (ERRCLASS & ERRCLS_ADD_RES)
1288 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW025, (ErrVal) ret1,
1289 "SGetMsg() failure ......!");
1291 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1297 ret1 = SCatMsg(mBuf, trcBuf, M1M2);
1302 #if (ERRCLASS & ERRCLS_ADD_RES)
1305 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW026, (ErrVal) ret1,
1306 "SGetMsg() failure ......!");
1308 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1315 ret1 = cmPkKwMngmt(trc, LKW_EVT_TRC_IND, mBuf);
1320 #if (ERRCLASS & ERRCLS_ADD_RES)
1323 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW027, (ErrVal) ret1,
1324 "packing failure ......!");
1326 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1331 pst->event = (Event) LKW_EVT_TRC_IND; /* event */
1336 } /* end of cmPkLkwTrcInd */
1343 * @param[in] pst : post structure
1344 * @param[in] cfg : RLC LM structure
1347 * -# Failure : RFAILED
1350 PUBLIC S16 cmPkLkwStsReq
1352 Pst *pst, /* post structure */
1353 Action action, /* action */
1354 KwMngmt *sts /* statistics request */
1357 PUBLIC S16 cmPkLkwStsReq(pst, action, sts)
1358 Pst *pst; /* post structure */
1359 Action action; /* action */
1360 KwMngmt *sts; /* statistics request */
1364 Buffer *mBuf; /* message buffer */
1365 S16 ret1; /* return value */
1369 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1372 #if (ERRCLASS & ERRCLS_ADD_RES)
1375 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW028, (ErrVal) ret1,
1376 "SGetMsg() failure ......!");
1378 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1382 ret1 = cmPkKwMngmt(sts, LKW_EVT_STS_REQ, mBuf);
1387 #if (ERRCLASS & ERRCLS_ADD_RES)
1390 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW029, (ErrVal) ret1,
1391 "Packing failure ......!");
1393 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1397 CMCHKPK(SPkS16, action, mBuf);
1398 pst->event = (Event) LKW_EVT_STS_REQ; /* event */
1403 } /* end of cmPkLkwStsReq */
1410 * @param[in] pst : post structure
1411 * @param[in] cfg : RLC LM structure
1414 * -# Failure : RFAILED
1417 PUBLIC S16 cmPkLkwStsCfm
1419 Pst *pst, /* post structure */
1420 Action action, /* action */
1421 KwMngmt *cfm /* statistics confirmation */
1424 PUBLIC S16 cmPkLkwStsCfm(pst, action, cfm)
1425 Pst *pst; /* post structure */
1426 Action action; /* action */
1427 KwMngmt *cfm; /* statistics confirmation */
1430 Buffer *mBuf; /* message buffer */
1431 S16 ret1; /* return value */
1433 TRC3(cmPkLkwStsCfm);
1434 /* lkw_c_001.main_2 removed warning */
1436 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1439 #if (ERRCLASS & ERRCLS_ADD_RES)
1442 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW030, (ErrVal) ret1,
1443 "SGetMsg() failure ......!");
1445 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1449 ret1 = cmPkKwMngmt(cfm, LKW_EVT_STS_CFM, mBuf);
1454 #if (ERRCLASS & ERRCLS_ADD_RES)
1457 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW031, (ErrVal) ret1,
1458 "Packing failure ......!");
1460 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1464 pst->event = (Event) LKW_EVT_STS_CFM; /* event */
1468 } /* end of cmPkLkwStsCfm */
1475 * @param[in] pst : post structure
1476 * @param[in] cfg : RLC LM structure
1479 * -# Failure : RFAILED
1483 PRIVATE S16 cmPkKwMngmt
1485 KwMngmt *param, /* Managment */
1486 Event eventType, /* Event type */
1487 Buffer *mBuf /* Message Buffer */
1490 PRIVATE S16 cmPkKwMngmt(param ,eventType, mBuf)
1491 KwMngmt *param; /* Managment */
1492 Event eventType; /* Event type */
1493 Buffer *mBuf; /* Message Buffer */
1496 S16 ret1; /* return value */
1502 case LKW_EVT_CFG_REQ:
1503 ret1 = cmPkKwCfg(param, param->hdr.elmId.elmnt ,mBuf);
1510 case LKW_EVT_CNTRL_REQ:
1511 ret1 = cmPkKwCntrl(param, param->hdr.elmId.elmnt ,mBuf);
1518 case LKW_EVT_STA_IND:
1519 ret1 = cmPkKwUsta(param, param->hdr.elmId.elmnt ,mBuf);
1526 case LKW_EVT_STA_REQ:
1527 case LKW_EVT_STA_CFM:
1528 ret1 = cmPkKwSsta(param, param->hdr.elmId.elmnt , eventType, mBuf);
1535 case LKW_EVT_STS_REQ:
1536 case LKW_EVT_STS_CFM:
1537 ret1 = cmPkKwSts(param, param->hdr.elmId.elmnt ,mBuf);
1543 case LKW_EVT_TRC_IND:
1544 ret1 = cmPkKwTrc(param, mBuf);
1550 case LKW_EVT_CNTRL_CFM:
1551 case LKW_EVT_CFG_CFM:
1555 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
1556 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
1559 } /* end of function cmPkKwMngmt */
1566 * @param[in] pst : post structure
1567 * @param[in] cfg : RLC LM structure
1570 * -# Failure : RFAILED
1573 PRIVATE S16 cmPkKwCfg
1580 PRIVATE S16 cmPkKwCfg(cfg, elmnt, mBuf)
1592 CMCHKPK(SPkU16, cfg->t.cfg.s.gen.maxRguSaps, mBuf);
1593 CMCHKPK(SPkU8, cfg->t.cfg.s.gen.rlcMode, mBuf);
1594 CMCHKPK(SPkU32, cfg->t.cfg.s.gen.timeRes, mBuf);
1595 CMCHKPK(SPkU16, cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
1596 CMCHKPK(SPkU16, cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
1597 CMCHKPK(SPkU32, cfg->t.cfg.s.gen.maxUe, mBuf);
1598 CMCHKPK(cmPkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
1607 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.route,mBuf);
1608 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.priority,mBuf);
1609 CMCHKPK(SPkU16, cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
1610 CMCHKPK(SPkS16, cfg->t.cfg.s.sap.sapId, mBuf);
1611 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.inst, mBuf);
1612 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.ent, mBuf);
1613 CMCHKPK(SPkU16, cfg->t.cfg.s.sap.procId, mBuf);
1614 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.mem.pool, mBuf);
1615 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.mem.region, mBuf);
1616 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.selector, mBuf);
1623 } /*end of function cmPkKwCfg*/
1628 Pack kw control request
1630 * @param[in] cntrl : LM management structure
1631 * @param[in] elmnt : element
1632 * @param[in] mBuf : Buffer
1635 * -# Failure : RFAILED
1638 PRIVATE S16 cmPkKwCntrl
1645 PRIVATE S16 cmPkKwCntrl(cntrl, elmnt, mBuf)
1651 U8 subAction; /* sub action */
1659 subAction = cntrl->t.cntrl.subAction;
1666 CMCHKPK(SPkU32, cntrl->t.cntrl.s.dbgCntrl.dbgMask,
1672 CMCHKPK(SPkS16, cntrl->t.cntrl.s.trcCntrl.trcLen,
1674 CMCHKPK(SPkU8, cntrl->t.cntrl.s.trcCntrl.trcMask,
1681 CMCHKPK(SPkU32, cntrl->t.cntrl.s.logMask, mBuf);
1692 CMCHKPK(SPkS16, cntrl->t.cntrl.s.sapCntrl.spId, mBuf);
1693 CMCHKPK(SPkS16, cntrl->t.cntrl.s.sapCntrl.suId, mBuf);
1699 CMCHKPK(SPkU8, cntrl->t.cntrl.action, mBuf);
1700 CMCHKPK(SPkU8, cntrl->t.cntrl.subAction, mBuf);
1701 CMCHKPK(cmPkDateTime, &cntrl->t.cntrl.dt, mBuf);
1704 } /*end of function cmPkKwCntrl */
1708 Pack unsolicit status
1710 * @param[in] usta : RLC LM structure
1711 * @param[in] elmnt : element
1712 * @param[in] mBuf : Buffer
1715 * -# Failure : RFAILED
1718 PRIVATE S16 cmPkKwUsta
1725 PRIVATE S16 cmPkKwUsta(usta, elmnt, mBuf)
1733 /* lkw_c_001.main_2 removed warning */
1735 /* lkw_c_001.main_2 added support for L2 Measurement */
1737 CMCHKPK(SPkU8, usta->t.usta.qci, mBuf);
1739 CMCHKPK(SPkU32, usta->t.usta.ueId, mBuf);
1740 CMCHKPK(SPkS16, usta->t.usta.suId, mBuf);
1741 CMCHKPK(cmPkCmAlarm, &usta->t.usta.alarm,mBuf);
1742 CMCHKPK(cmPkDateTime, &usta->t.usta.dt, mBuf);
1746 } /* end of cmPkKwUsta */
1753 * @param[in] pst : post structure
1754 * @param[in] cfg : RLC LM structure
1757 * -# Failure : RFAILED
1760 PRIVATE S16 cmPkKwSsta
1768 PRIVATE S16 cmPkKwSsta(ssta, elmnt, eventType, mBuf)
1783 if(eventType == LKW_EVT_STA_CFM)
1785 CMCHKPK(cmPkSystemId, &ssta->t.ssta.s.sysId,mBuf);
1789 ret1 = cmPkCkwSapSta(&ssta->t.ssta.s.ckwSap, mBuf);
1792 ret1 = cmPkKwuSapSta(&ssta->t.ssta.s.kwuSap, mBuf);
1796 ret1 = cmPkRguSapSta(&ssta->t.ssta.s.rguSap, mBuf);
1808 CMCHKPK(cmPkDateTime, &ssta->t.ssta.dt, mBuf);
1812 } /* end of cmPkKwSsta */
1816 Pack Trace Indication
1818 * @param[in] trc : RLC LM structure
1819 * @param[in] mBuf : Buffer
1822 * -# Failure : RFAILED
1825 PRIVATE S16 cmPkKwTrc
1827 KwMngmt *trc, /* trace */
1828 Buffer *mBuf /* data buffer */
1831 PRIVATE S16 cmPkKwTrc(trc, mBuf)
1832 KwMngmt *trc; /* trace */
1833 Buffer *mBuf; /* data buffer */
1838 CMCHKPK(SPkU16, trc->t.trc.event, mBuf);
1839 CMCHKPK(cmPkDateTime, &trc->t.trc.dt, mBuf);
1842 } /* end of cmPkKwTrc */
1847 Pack Statistics request
1849 * @param[in] pst : post structure
1850 * @param[in] cfg : RLC LM structure
1853 * -# Failure : RFAILED
1857 PRIVATE S16 cmPkKwSts
1864 PRIVATE S16 cmPkKwSts(sts, elmnt, mBuf)
1877 ret1 = cmPkGenSts(&sts->t.sts.s.gen, mBuf);
1880 ret1 = cmPkCkwSapSts(&sts->t.sts.s.ckwSap, mBuf);
1883 ret1 = cmPkKwuSapSts(&sts->t.sts.s.kwuSap, mBuf);
1885 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
1886 * in general statstics.
1891 } /* end of switch */
1898 CMCHKPK(cmPkDateTime, &sts->t.sts.dt, mBuf);
1901 } /* end of cmPkKwSts */
1907 Pack general statistics
1909 * @param[in] gen : KwGenSts structure
1910 * @param[in] mBuf : Buffer
1913 * -# Failure : RFAILED
1916 PRIVATE S16 cmPkGenSts
1922 PRIVATE S16 cmPkGenSts(gen, mBuf)
1929 CMCHKPK(SPkU32, gen->numSduDisc, mBuf);
1930 CMCHKPK(SPkU32, gen->numOfRb, mBuf);
1931 CMCHKPK(SPkU32, gen->protTimeOut, mBuf);
1932 CMCHKPK(SPkU32, gen->errorPdusRecv, mBuf);
1933 CMCHKPK(SPkU32, gen->unexpPdusRecv, mBuf);
1934 CMCHKPK(SPkU32, gen->bytesSent, mBuf);
1935 CMCHKPK(SPkU32, gen->bytesRecv, mBuf);
1936 CMCHKPK(SPkU32, gen->pdusRetx, mBuf);
1937 CMCHKPK(SPkU32, gen->pdusSent, mBuf);
1938 CMCHKPK(SPkU32, gen->pdusRecv, mBuf);
1939 CMCHKPK(SPkU32, gen->numUe, mBuf);
1943 } /* end of cmPkGenSts */
1949 * @param[in] pst : post structure
1950 * @param[in] cfg : RLC LM structure
1953 * -# Failure : RFAILED
1956 PRIVATE S16 cmPkCkwSapSts
1962 PRIVATE S16 cmPkCkwSapSts(rcSap, mBuf)
1969 CMCHKPK(SPkU32, rcSap->statMsgs, mBuf);
1972 } /* end of cmPkCkwSapSts */
1978 * @param[in] pst : post structure
1979 * @param[in] cfg : RLC LM structure
1982 * -# Failure : RFAILED
1985 PRIVATE S16 cmPkKwuSapSts
1991 PRIVATE S16 cmPkKwuSapSts(ruSap, mBuf)
1998 CMCHKPK(SPkU32, ruSap->sduTx, mBuf);
1999 CMCHKPK(SPkU32, ruSap->sduRx, mBuf);
2000 /* lkw_c_001.main_2 changed from suId to spId */
2001 CMCHKPK(cmPkSuId, ruSap->spId, mBuf);
2004 } /* end of cmPkCkwSapSts */
2006 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
2007 * in general statstics.
2012 Unpack RLC Layer Management structure
2014 * @param[in] param : RLC LM structure
2015 * @param[in] eventType : event type
2016 * @param[in] mBuf : message buffer
2019 * -# Failure : RFAILED
2022 PRIVATE S16 cmUnpkKwMngmt
2029 PRIVATE S16 cmUnpkKwMngmt(param ,eventType, mBuf)
2038 cmMemset((U8 *) param, (U8) 0, (S16) sizeof(KwMngmt));
2040 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
2041 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
2045 case LKW_EVT_CFG_REQ:
2046 ret1 = cmUnpkKwCfg(param, param->hdr.elmId.elmnt ,mBuf);
2052 case LKW_EVT_CNTRL_REQ:
2053 ret1 = cmUnpkKwCntrl(param, param->hdr.elmId.elmnt ,mBuf);
2060 case LKW_EVT_STA_IND:
2061 ret1 = cmUnpkKwUsta(param, param->hdr.elmId.elmnt ,mBuf);
2068 case LKW_EVT_STA_REQ:
2069 case LKW_EVT_STA_CFM:
2070 ret1 = cmUnpkKwSsta(param, param->hdr.elmId.elmnt, eventType,mBuf);
2077 case LKW_EVT_STS_REQ:
2078 case LKW_EVT_STS_CFM:
2080 ret1 = cmUnpkKwSts(param, param->hdr.elmId.elmnt ,mBuf);
2086 case LKW_EVT_TRC_IND:
2087 ret1 = cmUnpkKwTrc(param, mBuf);
2094 case LKW_EVT_CNTRL_CFM:
2095 case LKW_EVT_CFG_CFM:
2102 } /*end of function cmUnpkKwMngmt*/
2106 Unpack Kw configuration structure
2108 * @param[out] cfg : RLC LM structure
2109 * @param[in] elmnt : element
2110 * @param[in] mBuf : message buffer
2113 * -# Failure : RFAILED
2116 PRIVATE S16 cmUnpkKwCfg
2123 PRIVATE S16 cmUnpkKwCfg(cfg ,elmnt, mBuf)
2135 CMCHKUNPK(cmUnpkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
2136 CMCHKUNPK(SUnpkU32, &cfg->t.cfg.s.gen.maxUe, mBuf);
2137 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
2138 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
2139 CMCHKUNPK(SUnpkU32, &cfg->t.cfg.s.gen.timeRes, mBuf);
2140 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.gen.rlcMode, mBuf);
2141 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.gen.maxRguSaps, mBuf);
2150 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.selector, mBuf);
2151 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.mem.region, mBuf);
2152 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.mem.pool, mBuf);
2153 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.sap.procId, mBuf);
2154 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.ent, mBuf);
2155 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.inst, mBuf);
2156 CMCHKUNPK(SUnpkS16, &cfg->t.cfg.s.sap.sapId, mBuf);
2157 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
2158 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.priority,mBuf);
2159 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.route,mBuf);
2164 } /* end of switch */
2167 } /* end of cmUnpkKwCfg */
2171 Unpack Control Structure
2173 * @param[in] cfm : RLC LM structure
2174 * @param[in] elmnt : element
2175 * @param[in] mBuf : message buffer
2178 * -# Failure : RFAILED
2181 PRIVATE S16 cmUnpkKwCntrl
2188 PRIVATE S16 cmUnpkKwCntrl(cfm, elmnt, mBuf)
2195 KwDbgCntrl *dbgCntrl;
2196 KwTrcCntrl *trcCntrl;
2198 TRC3(cmUnpkKwCntrl);
2200 /* lkw_c_001.main_2 removed warning */
2203 CMCHKUNPK(cmUnpkDateTime, &cfm->t.cntrl.dt, mBuf);
2204 CMCHKUNPK(SUnpkU8, &cfm->t.cntrl.subAction, mBuf);
2205 CMCHKUNPK(SUnpkU8, &cfm->t.cntrl.action, mBuf);
2207 subAction = cfm->t.cntrl.subAction;
2209 switch(cfm->hdr.elmId.elmnt)
2219 dbgCntrl = &cfm->t.cntrl.s.dbgCntrl;
2220 CMCHKUNPK(SUnpkU32, &dbgCntrl->dbgMask, mBuf);
2225 trcCntrl = &cfm->t.cntrl.s.trcCntrl;
2226 CMCHKUNPK(SUnpkU8, &trcCntrl->trcMask, mBuf);
2227 CMCHKUNPK(SUnpkS16,&trcCntrl->trcLen, mBuf);
2233 CMCHKUNPK(SUnpkU32, &cfm->t.cntrl.s.logMask, mBuf);
2244 CMCHKUNPK(SUnpkS16, &cfm->t.cntrl.s.sapCntrl.suId, mBuf);
2245 CMCHKUNPK(SUnpkS16, &cfm->t.cntrl.s.sapCntrl.spId, mBuf);
2253 } /* end of cmUnpkKwCntrl */
2260 * @param[in] usta : RLC LM Structure
2261 * @param[in] elmnt : element
2262 * @param[out] mBuf : message buffer
2265 * -# Failure : RFAILED
2268 PRIVATE S16 cmUnpkKwUsta
2275 PRIVATE S16 cmUnpkKwUsta(usta ,elmnt, mBuf)
2283 /* lkw_c_001.main_2 removed warning */
2286 CMCHKUNPK(cmUnpkDateTime, &usta->t.usta.dt, mBuf);
2287 CMCHKUNPK(cmUnpkCmAlarm, &usta->t.usta.alarm,mBuf);
2288 CMCHKUNPK(SUnpkS16, &usta->t.usta.suId, mBuf);
2289 CMCHKUNPK(SUnpkU32, &usta->t.usta.ueId, mBuf);
2290 /* lkw_c_001.main_2 added support for L2 Measurement */
2292 CMCHKUNPK(SUnpkU8, &usta->t.usta.qci, mBuf);
2301 * @param[out] ssta: RLC LM structure
2302 * @param[in] elmnt : element
2303 * @param[in] mBuf : message buffer
2306 * -# Failure : RFAILED
2309 PRIVATE S16 cmUnpkKwSsta
2317 PRIVATE S16 cmUnpkKwSsta(ssta ,elmnt, eventType, mBuf)
2324 S16 ret1; /* return value */
2327 CMCHKUNPK(cmUnpkDateTime, &ssta->t.ssta.dt, mBuf);
2332 if(eventType == LKW_EVT_STA_CFM)
2334 cmMemset((U8 *) ptNmb, (U8) 0, LKW_PART_NUM_STR_LEN);
2335 ssta->t.ssta.s.sysId.ptNmb = ptNmb;
2336 CMCHKUNPK(cmUnpkSystemId, &ssta->t.ssta.s.sysId,mBuf);
2340 ret1 = cmUnpkCkwSapSta(&ssta->t.ssta.s.ckwSap, mBuf);
2343 ret1 = cmUnpkKwuSapSta(&ssta->t.ssta.s.kwuSap, mBuf);
2347 ret1 = cmUnpkRguSapSta(&ssta->t.ssta.s.rguSap, mBuf);
2365 Unpack trace Indication
2367 * @param[out] trc : RLC LM Structure
2368 * @param[in] mBuf : message buffer
2371 * -# Failure : RFAILED
2374 PRIVATE S16 cmUnpkKwTrc
2380 PRIVATE S16 cmUnpkKwTrc(trc, mBuf)
2387 CMCHKUNPK(cmUnpkDateTime, &trc->t.trc.dt, mBuf);
2388 CMCHKUNPK(SUnpkU16, &trc->t.trc.event, mBuf);
2391 } /* end of cmUnpkKwTrc */
2398 * @param[out] sts : RLC LM structure
2399 * @param[in] elmnt : element
2400 * @param[in] mBuf : message buffer
2403 * -# Failure : RFAILED
2406 PRIVATE S16 cmUnpkKwSts
2413 PRIVATE S16 cmUnpkKwSts(sts ,elmnt, mBuf)
2419 S16 ret1; /* return value */
2422 CMCHKUNPK(cmUnpkDateTime, &sts->t.sts.dt, mBuf);
2427 ret1 = cmUnpkGenSts(&sts->t.sts.s.gen, mBuf);
2430 ret1 = cmUnpkCkwSapSts(&sts->t.sts.s.ckwSap, mBuf);
2433 ret1 = cmUnpkKwuSapSts(&sts->t.sts.s.kwuSap, mBuf);
2435 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
2436 * in general statstics.
2441 } /* end of switch */
2449 } /* end of cmUnpkKwSts */
2454 Unpack General statistics
2456 * @param[out] gen : KwGenSts structure
2457 * @param[in] mBuf : message buffer
2460 * -# Failure : RFAILED
2463 PRIVATE S16 cmUnpkGenSts
2469 PRIVATE S16 cmUnpkGenSts(gen, mBuf)
2476 CMCHKUNPK(SUnpkU32, &gen->numUe, mBuf);
2477 CMCHKUNPK(SUnpkU32, &gen->pdusRecv, mBuf);
2478 CMCHKUNPK(SUnpkU32, &gen->pdusSent, mBuf);
2479 CMCHKUNPK(SUnpkU32, &gen->pdusRetx, mBuf);
2480 CMCHKUNPK(SUnpkU32, &gen->bytesRecv, mBuf);
2481 CMCHKUNPK(SUnpkU32, &gen->bytesSent, mBuf);
2482 CMCHKUNPK(SUnpkU32, &gen->unexpPdusRecv, mBuf);
2483 CMCHKUNPK(SUnpkU32, &gen->errorPdusRecv, mBuf);
2484 CMCHKUNPK(SUnpkU32, &gen->protTimeOut, mBuf);
2485 CMCHKUNPK(SUnpkU32, &gen->numOfRb, mBuf);
2486 CMCHKUNPK(SUnpkU32, &gen->numSduDisc, mBuf);
2489 } /* end of cmUnpkGenSts */
2493 Unpack Ckw Sap Statistics
2495 * @param[out] rcSap : KwCkwCntSts structure
2496 * @param[in] mBuf : message buffer
2499 * -# Failure : RFAILED
2502 PRIVATE S16 cmUnpkCkwSapSts
2508 PRIVATE S16 cmUnpkCkwSapSts(rcSap ,mBuf)
2514 TRC3(cmUnpkCkwSapSts);
2516 CMCHKUNPK(SUnpkU32, &rcSap->statMsgs, mBuf);
2520 } /* end of cmUnpkCkwSapSts */
2524 Unpack Kwu Sap statistics
2526 * @param[out] : KwKwuSapSts structure
2527 * @param[in] mBuf : message buffer
2530 * -# Failure : RFAILED
2533 PRIVATE S16 cmUnpkKwuSapSts
2539 PRIVATE S16 cmUnpkKwuSapSts(ruSap, mBuf)
2544 TRC3(cmUnpkKwuSapSts)
2546 /* lkw_c_001.main_2 changed from suId to spId */
2547 CMCHKUNPK(cmUnpkSuId, &ruSap->spId, mBuf);
2548 CMCHKUNPK(SUnpkU32, &ruSap->sduRx, mBuf);
2549 CMCHKUNPK(SUnpkU32, &ruSap->sduTx, mBuf);
2553 } /* end of cmUnpkKwuSapSts */
2555 /* lkw_c_001.main_2 added support for L2 Measurement */
2558 PUBLIC S16 cmPkLkwL2MeasReq
2561 KwL2MeasReqEvt *measReqEvt
2564 PUBLIC S16 cmPkLkwL2MeasReq(pst, measReqEvt)
2566 KwL2MeasReqEvt *measReqEvt;
2569 Buffer *mBuf = NULLP;
2570 TRC3(cmPkLkwL2MeasReq)
2572 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2573 #if (ERRCLASS & ERRCLS_ADD_RES)
2574 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2575 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2576 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2578 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2581 if (cmPkKwL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK) {
2582 #if (ERRCLASS & ERRCLS_ADD_RES)
2583 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2584 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2585 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2587 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2591 if (SPkU16(measReqEvt->measPeriod, mBuf) != ROK) {
2592 #if (ERRCLASS & ERRCLS_ADD_RES)
2593 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2594 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2595 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2597 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2601 if (SPkU32(measReqEvt->transId, mBuf) != ROK) {
2602 #if (ERRCLASS & ERRCLS_ADD_RES)
2603 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2604 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2605 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2607 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2612 pst->event = (Event) LKW_EVT_L2MEAS_REQ;
2613 RETVALUE(SPstTsk(pst,mBuf));
2617 PUBLIC S16 cmPkKwL2MeasReqInfo
2619 KwL2MeasReqInfo *param,
2623 PUBLIC S16 cmPkKwL2MeasReqInfo(param, mBuf)
2624 KwL2MeasReqInfo *param;
2631 TRC3(cmPkKwL2MeasReqInfo)
2633 if((param->measType & LKW_L2MEAS_DL_IP) ||
2634 (param->measType & LKW_L2MEAS_UL_IP))
2636 for(idx1 = 0;idx1 < param->val.ipThMeas.numUes;idx1++)
2639 CMCHKPK(cmPkLteCellId, param->val.ipThMeas.ueInfoLst[idx1].cellId, mBuf);
2640 CMCHKPK(cmPkLteRnti, param->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
2641 for(idx = 0; idx < param->val.ipThMeas.ueInfoLst[idx1].numQci; idx++)
2643 CMCHKPK(SPkU8, param->val.ipThMeas.ueInfoLst[idx1].qci[idx], mBuf);
2645 CMCHKPK(SPkU8, param->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
2647 CMCHKPK(SPkU16, param->val.ipThMeas.numUes, mBuf);
2648 CMCHKPK(SPkU8, param->measType, mBuf);
2653 for(idx = 0; idx < param->val.nonIpThMeas.numQci; idx++)
2655 CMCHKPK(SPkU8, param->val.nonIpThMeas.qci[idx], mBuf);
2657 CMCHKPK(SPkU8, param->val.nonIpThMeas.numQci, mBuf);
2658 CMCHKPK(SPkU16, param->val.nonIpThMeas.numSamples, mBuf);
2660 CMCHKPK(SPkU8, param->measType, mBuf);
2665 PUBLIC S16 cmPkLkwL2MeasStopReq
2671 PUBLIC S16 cmPkLkwL2MeasStopReq(pst, measType)
2676 Buffer *mBuf = NULLP;
2678 TRC3(cmPkLkwL2MeasStopReq)
2679 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2680 #if (ERRCLASS & ERRCLS_ADD_RES)
2681 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2682 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2683 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2687 CMCHKPK(SPkU8, measType, mBuf);
2688 pst->event = (Event) LKW_EVT_L2MEAS_STOP_REQ;
2689 RETVALUE(SPstTsk(pst,mBuf));
2693 PUBLIC S16 cmPkLkwL2MeasSendReq
2699 PUBLIC S16 cmPkLkwL2MeasSendReq(pst, measType)
2704 Buffer *mBuf = NULLP;
2706 TRC3(cmPkLkwL2MeasSendReq)
2707 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2708 #if (ERRCLASS & ERRCLS_ADD_RES)
2709 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2710 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2711 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2715 CMCHKPK(SPkU8, measType, mBuf);
2716 pst->event = (Event) LKW_EVT_L2MEAS_SEND_REQ;
2717 RETVALUE(SPstTsk(pst,mBuf));
2719 #ifdef TENB_SPLIT_ARCH
2721 PUBLIC S16 cmUnpkLkwL2MeasReq
2728 PUBLIC S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
2734 KwL2MeasReqEvt measReqEvt;
2736 TRC3(cmUnpkLkwL2MeasReq)
2738 if (SUnpkU32(&measReqEvt.transId, mBuf) != ROK) {
2740 #if (ERRCLASS & ERRCLS_ADD_RES)
2741 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2742 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2743 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2747 if (SUnpkU16(&measReqEvt.measPeriod, mBuf) != ROK) {
2749 #if (ERRCLASS & ERRCLS_ADD_RES)
2750 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2751 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2752 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2756 if (cmUnpkKwL2MeasReqInfo(&measReqEvt.measReq, mBuf) != ROK)
2758 /*SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));*/
2760 #if (ERRCLASS & ERRCLS_ADD_RES)
2761 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2762 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2763 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2768 RETVALUE((*func)(pst, &measReqEvt));
2772 PUBLIC S16 cmUnpkLkwL2MeasReq
2779 PUBLIC S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
2786 KwL2MeasReqEvt *measReqEvt;
2788 TRC3(cmUnpkLkwL2MeasReq)
2791 if((ret = SGetSBuf(pst->region, pst->pool, (Data **)&measReqEvt,\
2792 sizeof(KwL2MeasReqEvt))) != ROK)
2794 #if (ERRCLASS & ERRCLS_ADD_RES)
2795 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2796 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2797 (ErrVal)ERRLKW, (ErrVal)0, "SGetMsg() failed");
2798 #endif /* ERRCLASS & ERRCLS_ADD_RES */
2802 if (SUnpkU32(&measReqEvt->transId, mBuf) != ROK) {
2804 #if (ERRCLASS & ERRCLS_ADD_RES)
2805 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2806 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2807 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2811 if (SUnpkU16(&measReqEvt->measPeriod, mBuf) != ROK) {
2813 #if (ERRCLASS & ERRCLS_ADD_RES)
2814 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2815 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2816 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2820 if (cmUnpkKwL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK)
2822 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2824 #if (ERRCLASS & ERRCLS_ADD_RES)
2825 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2826 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2827 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2832 RETVALUE((*func)(pst, measReqEvt));
2837 PUBLIC S16 cmUnpkKwL2MeasReqInfo
2839 KwL2MeasReqInfo *param,
2843 PUBLIC S16 cmUnpkKwL2MeasReqInfo(param, mBuf)
2844 KwL2MeasReqInfo *param;
2851 TRC3(cmUnpkKwL2MeasReqInfo)
2853 CMCHKUNPK(SUnpkU8, ¶m->measType, mBuf);
2855 if((param->measType & LKW_L2MEAS_DL_IP) ||
2856 (param->measType & LKW_L2MEAS_UL_IP))
2858 CMCHKUNPK(SUnpkU16, ¶m->val.ipThMeas.numUes, mBuf);
2859 for(idx1 = 0;idx1 < param->val.ipThMeas.numUes;idx1++)
2861 CMCHKUNPK(SUnpkU8, ¶m->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
2862 for(idx = param->val.ipThMeas.ueInfoLst[idx1].numQci; idx > 0; idx--)
2864 CMCHKUNPK(SUnpkU8, ¶m->val.ipThMeas.ueInfoLst[idx1].\
2865 qci[idx - 1], mBuf);
2867 CMCHKUNPK(cmUnpkLteRnti, ¶m->val.ipThMeas.ueInfoLst[idx1].\
2869 CMCHKUNPK(cmUnpkLteCellId, ¶m->val.ipThMeas.\
2870 ueInfoLst[idx1].cellId, mBuf);
2876 CMCHKUNPK(SUnpkU16, ¶m->val.nonIpThMeas.numSamples, mBuf);
2877 CMCHKUNPK(SUnpkU8, ¶m->val.nonIpThMeas.numQci, mBuf);
2878 for(idx = param->val.nonIpThMeas.numQci; idx > 0; idx--)
2880 CMCHKUNPK(SUnpkU8, ¶m->val.nonIpThMeas.qci[idx - 1], mBuf);
2887 PUBLIC S16 cmUnpkLkwL2MeasStopReq
2889 LkwL2MeasStopReq func,
2894 PUBLIC S16 cmUnpkLkwL2MeasStopReq(func, pst, mBuf)
2895 LkwL2MeasStopReq func;
2901 TRC3(cmUnpkLkwL2MeasReq)
2903 CMCHKUNPK(SUnpkU8, &measType, mBuf);
2905 RETVALUE((*func)(pst, measType));
2909 PUBLIC S16 cmUnpkLkwL2MeasSendReq
2911 LkwL2MeasSendReq func,
2916 PUBLIC S16 cmUnpkLkwL2MeasSendReq(func, pst, mBuf)
2917 LkwL2MeasSendReq func;
2924 TRC3(cmUnpkLkwL2MeasSendReq)
2926 CMCHKUNPK(SUnpkU8, &measType, mBuf);
2928 RETVALUE((*func)(pst, measType));
2932 PUBLIC S16 cmPkLkwL2MeasCfm
2935 KwL2MeasCfmEvt *measCfmEvt
2938 PUBLIC S16 cmPkLkwL2MeasCfm(pst, measCfmEvt)
2940 KwL2MeasCfmEvt *measCfmEvt;
2943 Buffer *mBuf = NULLP;
2947 TRC3(cmPkLkwL2MeasCfm)
2949 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2950 #if (ERRCLASS & ERRCLS_ADD_RES)
2951 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2952 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2953 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2955 SPutSBuf(pst->region, pst->pool, (Data *)measCfmEvt, sizeof(KwL2MeasCfmEvt));
2959 if((measCfmEvt->measType & LKW_L2MEAS_ACT_UE) || \
2960 (measCfmEvt->measType & LKW_L2MEAS_UU_LOSS) || \
2961 (measCfmEvt->measType & LKW_L2MEAS_DL_DISC) || \
2962 (measCfmEvt->measType & LKW_L2MEAS_DL_DELAY))
2964 for(idx = 0; idx < measCfmEvt->val.nonIpThMeas.numCfm; idx++)
2966 if (cmPkKwL2MeasCfmInfo(&measCfmEvt->val.nonIpThMeas.measCfm[idx], \
2967 mBuf, measCfmEvt->measType) != ROK) {
2968 #if (ERRCLASS & ERRCLS_ADD_RES)
2969 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2970 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2971 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2978 if (SPkU16(measCfmEvt->val.nonIpThMeas.numCfm, mBuf) != ROK) {
2979 #if (ERRCLASS & ERRCLS_ADD_RES)
2980 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2981 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2982 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2990 for(idx1 =0 ;idx1< measCfmEvt->val.ipThMeas.numUes;idx1++)
2993 for(idx = 0; idx < measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm; idx++)
2995 if (cmPkKwL2MeasCfmInfo(&measCfmEvt->val.ipThMeas.ueInfoLst[idx1].\
2996 measCfm[idx], mBuf, measCfmEvt->measType) != ROK) {
2997 #if (ERRCLASS & ERRCLS_ADD_RES)
2998 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2999 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3000 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3007 if (SPkU16(measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm, mBuf) != ROK) {
3008 #if (ERRCLASS & ERRCLS_ADD_RES)
3009 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3010 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3011 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3017 CMCHKPK(cmPkLteCellId, measCfmEvt->val.ipThMeas.ueInfoLst[idx1].cellId, mBuf);
3018 CMCHKPK(cmPkLteRnti, measCfmEvt->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
3020 SPkU16(measCfmEvt->val.ipThMeas.numUes, mBuf);
3023 CMCHKPK(SPkU8, measCfmEvt->measType, mBuf);
3024 CMCHKPK(cmPkCmStatus, &measCfmEvt->status, mBuf);
3025 if (SPkU32(measCfmEvt->transId, mBuf) != ROK) {
3026 #if (ERRCLASS & ERRCLS_ADD_RES)
3027 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3028 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3029 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3034 pst->event = (Event) LKW_EVT_L2MEAS_CFM;
3035 RETVALUE(SPstTsk(pst,mBuf));
3039 PUBLIC S16 cmPkKwL2MeasCfmInfo
3041 KwL2MeasCfmInfo *param,
3046 PUBLIC S16 cmPkKwL2MeasCfmInfo(param, mBuf, measType)
3047 KwL2MeasCfmInfo *param;
3052 TRC3(cmPkKwL2MeasCfmInfo)
3054 if((measType & LKW_L2MEAS_DL_IP) ||
3055 (measType & LKW_L2MEAS_UL_IP))
3057 CMCHKPK(SPkF32, param->val.ipThrput.ulIpThPut, mBuf);
3058 CMCHKPK(SPkF32, param->val.ipThrput.dlIpThPut, mBuf);
3059 CMCHKPK(SPkU8, param->qci, mBuf);
3064 CMCHKPK(SPkU32, param->val.nonIpThrput.dlDiscRate, mBuf);
3065 CMCHKPK(SPkU32, param->val.nonIpThrput.uuLoss, mBuf);
3066 CMCHKPK(SPkU32, param->val.nonIpThrput.numActUe, mBuf);
3067 CMCHKPK(SPkU32, param->val.nonIpThrput.dlSduDelay, mBuf);
3068 CMCHKPK(SPkU8, param->qci, mBuf);
3074 PUBLIC S16 cmUnpkLkwL2MeasCfm
3081 PUBLIC S16 cmUnpkLkwL2MeasCfm(func, pst, mBuf)
3089 KwL2MeasCfmEvt measCfmEvt;
3091 TRC3(cmUnpkLkwL2MeasCfm)
3093 cmMemset((U8 *)&measCfmEvt, 0 , sizeof(KwL2MeasCfmEvt));
3095 if (SUnpkU32(&measCfmEvt.transId, mBuf) != 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");
3104 CMCHKUNPK(cmUnpkCmStatus, &measCfmEvt.status, mBuf);
3105 CMCHKUNPK(SUnpkU8, &measCfmEvt.measType, mBuf);
3107 if(measCfmEvt.measType & LKW_L2MEAS_DL_IP || measCfmEvt.measType & LKW_L2MEAS_UL_IP)
3109 CMCHKUNPK(SUnpkU16, &measCfmEvt.val.ipThMeas.numUes, mBuf);
3110 for(idx1 = 0;idx1<measCfmEvt.val.ipThMeas.numUes;idx1++)
3112 CMCHKUNPK(cmUnpkLteRnti, &measCfmEvt.val.ipThMeas.\
3113 ueInfoLst[idx1].ueId, mBuf);
3114 CMCHKUNPK(cmUnpkLteCellId, &measCfmEvt.val.ipThMeas.\
3115 ueInfoLst[idx1].cellId, mBuf);
3116 if (SUnpkU16(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
3117 numCfm, mBuf) != ROK) {
3119 #if (ERRCLASS & ERRCLS_ADD_RES)
3120 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3121 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3122 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3126 for(idx = measCfmEvt.val.ipThMeas.ueInfoLst[idx1].numCfm; idx > 0; idx--)
3128 if (cmUnpkKwL2MeasCfmInfo(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
3129 measCfm[idx - 1], mBuf, measCfmEvt.measType) != ROK) {
3131 #if (ERRCLASS & ERRCLS_ADD_RES)
3132 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3133 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3134 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3143 if (SUnpkU16(&measCfmEvt.val.nonIpThMeas.numCfm, mBuf) != ROK) {
3145 #if (ERRCLASS & ERRCLS_ADD_RES)
3146 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3147 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3148 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3152 for(idx = measCfmEvt.val.nonIpThMeas.numCfm; idx > 0; idx--)
3154 if (cmUnpkKwL2MeasCfmInfo(&measCfmEvt.val.nonIpThMeas.measCfm[idx - 1], \
3155 mBuf, measCfmEvt.measType) != ROK) {
3157 #if (ERRCLASS & ERRCLS_ADD_RES)
3158 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3159 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3160 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3167 RETVALUE((*func)(pst, &measCfmEvt));
3171 PUBLIC S16 cmUnpkKwL2MeasCfmInfo
3173 KwL2MeasCfmInfo *param,
3178 PUBLIC S16 cmUnpkKwL2MeasCfmInfo(param, mBuf, measType)
3179 KwL2MeasCfmInfo *param;
3184 TRC3(cmUnpkKwL2MeasCfmInfo)
3186 if((measType & LKW_L2MEAS_DL_IP) ||
3187 (measType & LKW_L2MEAS_UL_IP))
3189 CMCHKUNPK(SUnpkU8, ¶m->qci, mBuf);
3190 CMCHKUNPK(SUnpkF32, ¶m->val.ipThrput.dlIpThPut, mBuf);
3191 CMCHKUNPK(SUnpkF32, ¶m->val.ipThrput.ulIpThPut, mBuf);
3196 CMCHKUNPK(SUnpkU8, ¶m->qci, mBuf);
3197 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.dlSduDelay, mBuf);
3198 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.numActUe, mBuf);
3199 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.uuLoss, mBuf);
3200 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.dlDiscRate, mBuf);
3207 PUBLIC S16 cmPkLkwL2MeasStopCfm
3214 PUBLIC S16 cmPkLkwL2MeasStopCfm(pst, measType,status)
3220 Buffer *mBuf = NULLP;
3221 TRC3(cmPkLkwL2MeasStopCfm)
3223 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3224 #if (ERRCLASS & ERRCLS_ADD_RES)
3225 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3226 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3227 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3231 CMCHKPK(SPkU8, status, mBuf);
3232 CMCHKPK(SPkU8, measType, mBuf);
3233 pst->event = (Event) LKW_EVT_L2MEAS_STOP_CFM;
3234 RETVALUE(SPstTsk(pst,mBuf));
3238 PUBLIC S16 cmUnpkLkwL2MeasStopCfm
3240 LkwL2MeasStopCfm func,
3245 PUBLIC S16 cmUnpkLkwL2MeasStopCfm(func, pst, mBuf)
3246 LkwL2MeasStopCfm func;
3253 TRC3(cmUnpkLkwL2MeasCfm)
3254 CMCHKUNPK(SUnpkU8, &measType, mBuf);
3255 CMCHKUNPK(SUnpkU8, &status, mBuf);
3257 RETVALUE((*func)(pst, measType,status));
3259 #endif /* LTE_L2_MEAS */
3263 /**********************************************************************
3265 **********************************************************************/