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) */
48 #include "envopt.h" /* environment options */
49 #include "envdep.h" /* environment dependent */
50 #include "envind.h" /* environment independent */
52 #include "gen.h" /* general */
53 #include "ssi.h" /* system services interface */
54 #include "cm_lte.h" /* layer manager */
55 #include "lkw.h" /* Layer manager */
57 /* header/extern include files (.x) */
59 #include "gen.x" /* general */
60 #include "ssi.x" /* system services interface */
61 #include "cm_lib.x" /* common library header file */
62 #include "cm_lte.x" /* layer manager */
63 #include "lkw.x" /* layer manager */
67 Txt ptNmb[LKW_PART_NUM_STR_LEN]; /* Part number */
70 /* forward references */
72 PRIVATE S16 cmPkKwMngmt ARGS ((KwMngmt *param ,Event eventType,
74 PRIVATE S16 cmPkKwCfg ARGS ((KwMngmt *param ,Elmnt elmnt, Buffer *mBuf));
75 PRIVATE S16 cmPkKwCntrl ARGS ((KwMngmt *cntrl, Elmnt elmnt, Buffer *mBuf));
76 PRIVATE S16 cmPkKwUsta ARGS ((KwMngmt *usta, Elmnt elmnt, Buffer *mBuf));
77 PRIVATE S16 cmPkKwSsta ARGS ((KwMngmt *ssta, Elmnt etmnt, Event eventType,
79 PRIVATE S16 cmPkKwSts ARGS ((KwMngmt *sts, Elmnt elmnt, Buffer *mBuf));
80 PRIVATE S16 cmPkGenSts ARGS ((KwGenSts *gen, Buffer *mBuf));
81 PRIVATE S16 cmPkCkwSapSts ARGS ((KwCkwCntSts *rcSap, Buffer *mBuf));
82 PRIVATE S16 cmPkKwuSapSts ARGS ((KwKwuSapSts *ruSap, Buffer *mBuf));
83 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
84 * in general statstics.
86 PRIVATE S16 cmPkKwTrc ARGS ((KwMngmt *trc, Buffer *mBuf));
88 PRIVATE S16 cmUnpkKwMngmt ARGS ((KwMngmt *param, Event eventType,
90 PRIVATE S16 cmUnpkKwCfg ARGS ((KwMngmt *cfg, Elmnt elmnt, Buffer *mBuf));
91 PRIVATE S16 cmUnpkKwCntrl ARGS ((KwMngmt *param, Elmnt elmnt, Buffer *mBuf));
92 PRIVATE S16 cmUnpkKwUsta ARGS ((KwMngmt *usta, Elmnt elmnt, Buffer *mBuf));
93 PRIVATE S16 cmUnpkKwSsta ARGS ((KwMngmt *ssta, Elmnt elmnt, Event eventType,
95 PRIVATE S16 cmUnpkKwSts ARGS ((KwMngmt *sts, Elmnt elmnt, Buffer *mBuf));
96 PRIVATE S16 cmUnpkGenSts ARGS ((KwGenSts *gen, Buffer *mBuf));
97 PRIVATE S16 cmUnpkCkwSapSts ARGS ((KwCkwCntSts *rcSap, Buffer *mBuf));
98 PRIVATE S16 cmUnpkKwuSapSts ARGS ((KwKwuSapSts *ruSap, Buffer *mBuf));
99 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
100 * in general statstics.
102 PRIVATE S16 cmUnpkKwTrc ARGS ((KwMngmt *trc, Buffer *mBuf));
105 PRIVATE S16 cmPkCkwSapSta ARGS ((KwCkwCntSapSta *rcSap, Buffer *mBuf));
106 PRIVATE S16 cmUnpkCkwSapSta ARGS ((KwCkwCntSapSta *rcSap, Buffer *mBuf));
108 PRIVATE S16 cmPkKwuSapSta ARGS ((KwKwuSapSta *rlSap, Buffer *mBuf));
109 PRIVATE S16 cmUnpkKwuSapSta ARGS ((KwKwuSapSta *rlSap, Buffer *mBuf));
111 PRIVATE S16 cmPkRguSapSta ARGS ((KwRguSapSta *mkSap, Buffer *mBuf));
112 PRIVATE S16 cmUnpkRguSapSta ARGS ((KwRguSapSta *mkSap, Buffer *mBuf));
118 * @param[in] pst : post structure
119 * @param[in] cfg : RLC LM structure
122 * -# Failure : RFAILED
126 PUBLIC S16 cmPkLkwCfgReq
128 Pst *pst, /* post structure */
129 KwMngmt *cfg /* RLC LM structure */
132 PUBLIC S16 cmPkLkwCfgReq(pst, cfg)
133 Pst *pst; /* post structure */
134 KwMngmt *cfg; /* RLC LM structure */
137 Buffer *mBuf; /* message buffer */
138 S16 ret1; /* return value */
142 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
145 #if (ERRCLASS & ERRCLS_ADD_RES)
148 LKWLOGERROR(pst, ERRCLS_ADD_RES, ELKW001, (ErrVal) ret1,
149 "SGetMsg failed ...!\n");
151 #endif /* ERRCLASS & ERRCLS_ADD_RES */
155 ret1 = cmPkKwMngmt(cfg, LKW_EVT_CFG_REQ, mBuf);
160 #if (ERRCLASS & ERRCLS_ADD_RES)
163 LKWLOGERROR(pst, ERRCLS_ADD_RES, ELKW002, (ErrVal) ret1,
164 "cmPkKwMngmt failure ......!");
166 #endif /* ERRCLASS & ERRCLS_ADD_RES */
170 pst->event = (Event) LKW_EVT_CFG_REQ; /* event */
175 } /* end of cmPkLkwCfgReq */
179 Unpack Config Request
181 * @param[in] func : primitive to call
182 * @param[in] pst : post structure
183 * @param[in] mBuf : message buffer
186 * -# Failure : RFAILED
190 PUBLIC S16 cmUnpkLkwCfgReq
192 LkwCfgReq func, /* primitive to call */
193 Pst *pst, /* post structure */
194 Buffer *mBuf /* message buffer */
197 PUBLIC S16 cmUnpkLkwCfgReq(func, pst, mBuf)
198 LkwCfgReq func; /* primitive to call */
199 Pst *pst; /* post structure */
200 Buffer *mBuf; /* message buffer */
203 S16 ret1; /* Return value */
204 KwMngmt cfg; /* RLC LM structure */
206 TRC3(cmUnpkLkwCfgReq)
208 cmMemset((U8 *) &cfg, (U8) 0, (S16) sizeof(KwMngmt));
209 ret1 = cmUnpkKwMngmt(&cfg, LKW_EVT_CFG_REQ, mBuf);
214 #if (ERRCLASS & ERRCLS_DEBUG)
216 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW003, (ErrVal) ret1,
217 "cmUnpkKwMngmt failure ......!");
219 #endif /* ERRCLASS & ERRCLS_DEBUG */
224 (Void) (*func)(pst, &cfg);
228 } /* end of cmUnpkLkwCfgReq */
236 * @param[in] pst : post structure
237 * @param[in] cntrl : RLC LM structure
240 * -# Failure : RFAILED
244 PUBLIC S16 cmPkLkwCntrlReq
246 Pst *pst, /* post structure */
247 KwMngmt *cntrl /* RLC LM structure */
250 PUBLIC S16 cmPkLkwCntrlReq(pst,cntrl)
251 Pst *pst; /* post structure */
252 KwMngmt *cntrl; /* RLC LM structure */
255 Buffer *mBuf; /* message buffer */
256 S16 ret1; /* return value */
258 TRC3(cmPkLkwCntrlReq)
260 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
263 #if (ERRCLASS & ERRCLS_ADD_RES)
266 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW004, (ErrVal) ret1,
267 "SGetMsg failure ......!");
269 #endif /* ERRCLASS & ERRCLS_ADD_RES */
273 ret1 = cmPkKwMngmt(cntrl, LKW_EVT_CNTRL_REQ, mBuf);
278 #if (ERRCLASS & ERRCLS_ADD_RES)
281 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW005, (ErrVal) ret1,
282 "cmPkKwMngmt failure ......!");
284 #endif /* ERRCLASS & ERRCLS_ADD_RES */
288 pst->event = (Event) LKW_EVT_CNTRL_REQ; /* event */
293 } /* end of cmPkLkwCntrlReq */
297 Unpack Control Request
299 * @param[in] func : primitive to call
300 * @param[in] pst : post structure
301 * @param[in] mBuf : message buffer
304 * -# Failure : RFAILED
308 PUBLIC S16 cmUnpkLkwCntrlReq
310 LkwCntrlReq func, /* primitive to call */
311 Pst *pst, /* post structure */
312 Buffer *mBuf /* message buffer */
315 PUBLIC S16 cmUnpkLkwCntrlReq(func, pst, mBuf)
316 LkwCntrlReq func; /* primitive to call */
317 Pst *pst; /* post structure */
318 Buffer *mBuf; /* message buffer */
321 S16 ret1; /* return value */
322 KwMngmt cfm; /* Confirmation */
324 TRC3(cmUnpkLkwCntrlReq)
326 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_CNTRL_REQ, mBuf);
331 #if (ERRCLASS & ERRCLS_DEBUG)
333 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW006, (ErrVal) ret1,
334 "cmUnpkKwMngmt failure ......!");
336 #endif /* ERRCLASS & ERRCLS_DEBUG */
341 RETVALUE((*func)(pst, &cfm));
343 } /* end of cmUnpkLkwCntrlReq */
349 * @param[in] pst : post structure
350 * @param[in] cfg : RLC LM structure
353 * -# Failure : RFAILED
357 PUBLIC S16 cmPkLkwCntrlCfm
359 Pst *pst, /* post structure */
360 KwMngmt *cfm /* RLC LM structure */
363 PUBLIC S16 cmPkLkwCntrlCfm(pst, cfm)
364 Pst *pst; /* post structure */
365 KwMngmt *cfm; /* RLC LM structure */
368 Buffer *mBuf; /* message buffer */
369 S16 ret1; /* return value */
371 TRC3(cmPkLkwCntrlCfm)
373 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
376 #if (ERRCLASS & ERRCLS_ADD_RES)
379 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW007, (ErrVal) ret1,
380 "SGetMsg failure ......!");
382 #endif /* ERRCLASS & ERRCLS_ADD_RES */
386 ret1 = cmPkKwMngmt(cfm, LKW_EVT_CNTRL_CFM, mBuf);
391 #if (ERRCLASS & ERRCLS_ADD_RES)
394 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW008, (ErrVal) ret1,
395 "Packing failure ......!");
397 #endif /* ERRCLASS & ERRCLS_ADD_RES */
401 pst->event = (Event) LKW_EVT_CNTRL_CFM; /* event */
406 } /* end of cmPkLkwCntrlCfm */
411 Unpack Control confirm
413 * @param[in] func : primitive to call
414 * @param[in] pst : post structure
415 * @param[in] mBuf : message buffer
418 * -# Failure : RFAILED
422 PUBLIC S16 cmUnpkLkwCntrlCfm
424 LkwCntrlCfm func, /* primitive to call */
425 Pst *pst, /* post structure */
426 Buffer *mBuf /* message buffer */
429 PUBLIC S16 cmUnpkLkwCntrlCfm(func, pst, mBuf)
430 LkwCntrlCfm func; /* primitive to call */
431 Pst *pst; /* post structure */
432 Buffer *mBuf; /* message buffer */
435 KwMngmt cfm; /* RLC LM structure */
436 S16 ret1; /* return value */
438 TRC3(cmUnpkLkwCntrlCfm)
440 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_CNTRL_CFM, mBuf);
445 #if (ERRCLASS & ERRCLS_DEBUG)
448 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW009, (ErrVal) ret1,
449 "cmUnpkKwMngmt failure ......!");
451 #endif /* ERRCLASS & ERRCLS_DEBUG */
457 RETVALUE((*func)(pst, &cfm));
459 } /* end of cmUnpkLkwCntrlCfm */
463 Unpack statistics Confirm
465 * @param[in] func : primitive to call
466 * @param[in] pst : post structure
467 * @param[in] mBuf : message buffer
470 * -# Failure : RFAILED
473 PUBLIC S16 cmUnpkLkwStsCfm
475 LkwStsCfm func, /* primitive to call */
476 Pst *pst, /* post structure */
477 Buffer *mBuf /* message buffer */
480 PUBLIC S16 cmUnpkLkwStsCfm(func, pst, mBuf)
481 LkwStsCfm func; /* primitive to call */
482 Pst *pst; /* post structure */
483 Buffer *mBuf; /* message buffer */
486 KwMngmt cfm; /* RLC LM structure */
487 S16 ret1; /* return value */
489 TRC3(cmUnpkLkwStsCfm)
491 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_STS_CFM, mBuf);
496 #if (ERRCLASS & ERRCLS_DEBUG)
499 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW010, (ErrVal) ret1,
500 "SPutMsg failure ......!");
502 #endif /* ERRCLASS & ERRCLS_DEBUG */
508 RETVALUE((*func)(pst, 0, &cfm));
510 } /* end of cmUnpkLkwStsCfm */
516 * @param[in] pst : post structure
517 * @param[in] cfg : RLC LM structure
520 * -# Failure : RFAILED
525 PUBLIC S16 cmPkLkwCfgCfm
527 Pst *pst, /* post structure */
528 KwMngmt *cfm /* RLC LM structure */
531 PUBLIC S16 cmPkLkwCfgCfm(pst,cfm)
532 Pst *pst; /* post structure */
533 KwMngmt *cfm; /* RLC LM structure */
536 Buffer *mBuf; /* message buffer */
537 S16 ret1; /* return value */
541 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
544 #if (ERRCLASS & ERRCLS_ADD_RES)
547 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW011, (ErrVal) ret1,
548 "SGetMsg failure ......!");
550 #endif /* ERRCLASS & ERRCLS_ADD_RES */
554 ret1 = cmPkKwMngmt(cfm, LKW_EVT_CFG_CFM, mBuf);
559 #if (ERRCLASS & ERRCLS_ADD_RES)
562 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW012, (ErrVal) ret1,
563 "SPutMsg failure ......!");
565 #endif /* ERRCLASS & ERRCLS_ADD_RES */
569 pst->event = (Event) LKW_EVT_CFG_CFM; /* event */
574 } /* end of cmPkLkwCfgCfm */
579 Unpack Config Confirm
581 * @param[in] func : primitive to call
582 * @param[in] pst : post structure
583 * @param[in] mBuf : message buffer
586 * -# Failure : RFAILED
589 PUBLIC S16 cmUnpkLkwCfgCfm
591 LkwCfgCfm func, /* primitive to call */
592 Pst *pst, /* post structure */
593 Buffer *mBuf /* message buffer */
596 PUBLIC S16 cmUnpkLkwCfgCfm(func, pst, mBuf)
597 LkwCfgCfm func; /* primitive to call */
598 Pst *pst; /* post structure */
599 Buffer *mBuf; /* message buffer */
602 S16 ret1; /* return value */
603 KwMngmt cfm; /* RLC LM structure */
605 TRC3(cmUnpkLkwCfgCfm)
607 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_CFG_CFM, mBuf);
612 #if (ERRCLASS & ERRCLS_DEBUG)
615 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW013, (ErrVal) ret1,
616 "SPutMsg failure ......!");
618 #endif /* ERRCLASS & ERRCLS_DEBUG */
623 RETVALUE((*func)(pst, &cfm));
625 } /* end of cmUnpkLkwCfgCfm */
631 Pack Status Indication
633 * @param[in] pst : post structure
634 * @param[in] usta : RLC LM structure
637 * -# Failure : RFAILED
641 PUBLIC S16 cmPkLkwStaInd
643 Pst *pst, /* post structure */
644 KwMngmt *usta /* RLC LM structure */
647 PUBLIC S16 cmPkLkwStaInd(pst,usta)
648 Pst *pst; /* post structure */
649 KwMngmt *usta; /* RLC LM structure */
652 Buffer *mBuf; /* message buffer */
653 S16 ret1; /* return value */
657 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
660 #if (ERRCLASS & ERRCLS_ADD_RES)
663 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW014, (ErrVal) ret1,
666 #endif /* ERRCLASS & ERRCLS_ADD_RES */
670 ret1 = cmPkKwMngmt(usta, LKW_EVT_STA_IND, mBuf);
675 #if (ERRCLASS & ERRCLS_ADD_RES)
678 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW015, (ErrVal) ret1,
679 "cmPkKwMngmt failure ......!");
681 #endif /* ERRCLASS & ERRCLS_ADD_RES */
685 pst->event = (Event) LKW_EVT_STA_IND; /* event */
690 } /* end of cmPkLkwStaInd */
695 Unpack Unsolicited Status indication
697 * @param[in] func : primitive to call
698 * @param[in] pst : post structure
699 * @param[in] mBuf : message buffer
702 * -# Failure : RFAILED
706 PUBLIC S16 cmUnpkLkwStaInd
708 LkwStaInd func, /* primitive pointer */
709 Pst *pst, /* post structure */
710 Buffer *mBuf /* message buffer */
713 PUBLIC S16 cmUnpkLkwStaInd(func, pst, mBuf)
714 LkwStaInd func; /* primitive pointer */
715 Pst *pst; /* post structure */
716 Buffer *mBuf; /* message buffer */
719 KwMngmt usta; /* RLC LM structure */
720 S16 ret1; /* return value */
722 TRC3(cmUnpkLkwStaInd)
724 ret1 = cmUnpkKwMngmt(&usta, LKW_EVT_STA_IND, mBuf);
729 #if (ERRCLASS & ERRCLS_DEBUG)
732 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW016, (ErrVal) ret1,
733 "cmUnpkKwMngmt failure ......!");
735 #endif /* ERRCLASS & ERRCLS_DEBUG */
741 RETVALUE((*func)(pst, &usta));
742 } /* end of cmUnpkLsnStaInd */
748 * @param[in] pst : post structure
749 * @param[in] sta : RLC LM structure
752 * -# Failure : RFAILED
756 PUBLIC S16 cmPkLkwStaReq
758 Pst *pst, /* post structure */
759 KwMngmt *sta /* status */
762 PUBLIC S16 cmPkLkwStaReq(pst,sta)
763 Pst *pst; /* post structure */
764 KwMngmt *sta; /* status */
767 Buffer *mBuf; /* message buffer */
768 S16 ret1; /* return value */
772 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
775 #if (ERRCLASS & ERRCLS_ADD_RES)
778 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW017, (ErrVal) ret1,
779 "SGetMsg failure ......!");
781 #endif /* ERRCLASS & ERRCLS_ADD_RES */
785 ret1 = cmPkKwMngmt(sta, LKW_EVT_STA_REQ, mBuf);
790 #if (ERRCLASS & ERRCLS_ADD_RES)
793 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW018, (ErrVal) ret1,
794 "SGetMsg() failure ......!");
796 #endif /* ERRCLASS & ERRCLS_ADD_RES */
800 pst->event = (Event) LKW_EVT_STA_REQ; /* event */
805 } /* end of cmPkLkwStaReq */
809 Unpack status confirmation
811 * @param[in] func : primitive to call
812 * @param[in] pst : post structure
813 * @param[in] mBuf : message buffer
816 * -# Failure : RFAILED
819 PUBLIC S16 cmUnpkLkwStaCfm
821 LkwStaReq func, /* primitive pointer */
822 Pst *pst, /* post structure */
823 Buffer *mBuf /* message buffer */
826 PUBLIC S16 cmUnpkLkwStaCfm(func, pst, mBuf)
827 LkwStaReq func; /* primitive pointer */
828 Pst *pst; /* post structure */
829 Buffer *mBuf; /* message buffer */
832 KwMngmt cfm; /* RLC LM structure */
833 S16 ret1; /* return value */
835 TRC3(cmUnpkLkwStaReq)
837 ret1 = cmUnpkKwMngmt(&cfm, LKW_EVT_STA_CFM, mBuf);
842 #if (ERRCLASS & ERRCLS_DEBUG)
845 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW019, (ErrVal) ret1,
846 "Unpacking failure ......!");
848 #endif /* ERRCLASS & ERRCLS_DEBUG */
854 RETVALUE((*func)(pst, &cfm));
856 } /* end of function cmUnpkLkwStaCfm */
860 Unpack Status request
862 * @param[in] func : primitive to call
863 * @param[in] pst : post structure
864 * @param[in] mBuf : message buffer
867 * -# Failure : RFAILED
870 PUBLIC S16 cmUnpkLkwStsReq
872 LkwStsReq func, /* primitive pointer */
873 Pst *pst, /* post structure */
874 Buffer *mBuf /* message buffer */
877 PUBLIC S16 cmUnpkLkwStsReq(func, pst, mBuf)
878 LkwStsReq func; /* primitive pointer */
879 Pst *pst; /* post structure */
880 Buffer *mBuf; /* message buffer */
883 KwMngmt sts; /* RLC LM structure */
884 S16 ret1; /* return value */
885 Action action; /* Action */
887 TRC3(cmUnpkLkwStsReq)
889 CMCHKUNPK(SUnpkS16, &action, mBuf);
891 ret1 = cmUnpkKwMngmt(&sts, LKW_EVT_STS_REQ, mBuf);
896 #if (ERRCLASS & ERRCLS_DEBUG)
898 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW020, (ErrVal) ret1,
899 "Unpacking failure ......!");
901 #endif /* ERRCLASS & ERRCLS_DEBUG */
907 RETVALUE((*func)(pst, action, &sts));
909 } /* end of function cmUnpkLkwStsReq */
916 * @param[in] func : primitive to call
917 * @param[in] pst : post structure
918 * @param[in] mBuf : message buffer
921 * -# Failure : RFAILED
924 PUBLIC S16 cmUnpkLkwStaReq
926 LkwStaReq func, /* primitive pointer */
927 Pst *pst, /* post structure */
928 Buffer *mBuf /* message buffer */
931 PUBLIC S16 cmUnpkLkwStaReq(func, pst, mBuf)
932 LkwStaReq func; /* primitive pointer */
933 Pst *pst; /* post structure */
934 Buffer *mBuf; /* message buffer */
937 KwMngmt sta; /* RLC LM structure */
938 S16 ret1; /* return value */
940 TRC3(cmUnpkLkwStaReq)
942 ret1 = cmUnpkKwMngmt(&sta, LKW_EVT_STA_REQ, mBuf);
947 #if (ERRCLASS & ERRCLS_DEBUG)
949 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW021, (ErrVal) ret1,
950 "Unpacking failure ......!");
952 #endif /* ERRCLASS & ERRCLS_DEBUG */
958 RETVALUE((*func)(pst, &sta));
960 } /* end of function cmUnpkLkwStaReq */
965 Unpack Trace Indication
967 * @param[in] func : primitive to call
968 * @param[in] pst : post structure
969 * @param[in] mBuf : message buffer
972 * -# Failure : RFAILED
976 PUBLIC S16 cmUnpkLkwTrcInd
978 LkwTrcInd func, /* primitive to call */
979 Pst *pst, /* post structure */
980 Buffer *mBuf /* message buffer */
983 PUBLIC S16 cmUnpkLkwTrcInd(func, pst, mBuf)
984 LkwTrcInd func; /* primitive to call */
985 Pst *pst; /* post structure */
986 Buffer *mBuf; /* message buffer */
989 S16 ret1; /* return value */
990 KwMngmt trc; /* RLC LM structure */
992 TRC3(cmUnpkLkwTrcInd)
994 ret1 = cmUnpkKwMngmt(&trc, LKW_EVT_TRC_IND, mBuf);
999 #if (ERRCLASS & ERRCLS_DEBUG)
1002 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW022, (ErrVal) ret1,
1003 "Unpacking failure ......!");
1005 #endif /* ERRCLASS & ERRCLS_DEBUG */
1009 (Void) (*func)(pst, &trc, mBuf);
1013 } /* end of cmUnpkLkwTrcInd */
1020 * @param[in] pst : post structure
1021 * @param[in] cfg : RLC LM structure
1024 * -# Failure : RFAILED
1028 PRIVATE S16 cmPkCkwSapSta
1030 KwCkwCntSapSta *rcSap, /* SAP statistics */
1031 Buffer *mBuf /* Message buffer */
1034 PRIVATE S16 cmPkCkwSapSta(rcSap, mBuf)
1035 KwCkwCntSapSta *rcSap; /* SAP statistics */
1036 Buffer *mBuf; /* Message buffer */
1041 CMCHKPK(cmPkState, rcSap->state, mBuf);
1042 CMCHKPK(SPkS16, rcSap->spId, mBuf);
1046 } /* end of cmPkCkwSapSta */
1052 * @param[out] rcSap: RLC LM structure
1053 * @param[in] buffer: Buffer
1056 * -# Failure : RFAILED
1059 PRIVATE S16 cmUnpkCkwSapSta
1061 KwCkwCntSapSta *rcSap, /* SAP statistics */
1062 Buffer *mBuf /* Message buffer */
1065 PRIVATE S16 cmUnpkCkwSapSta(rcSap, mBuf)
1066 KwCkwCntSapSta *rcSap; /* SAP statistics */
1067 Buffer *mBuf; /* Message buffer */
1070 TRC3(cmUnpkCkwSapSta)
1072 CMCHKUNPK(SUnpkS16, &rcSap->spId, mBuf);
1073 CMCHKUNPK(cmUnpkState, &rcSap->state, mBuf);
1076 } /* end of function cmUnpkCkwSapSta */
1082 * @param[in] pst : post structure
1083 * @param[in] cfg : RLC LM structure
1086 * -# Failure : RFAILED
1089 PRIVATE S16 cmPkKwuSapSta
1091 KwKwuSapSta *rlSap, /* SAP statistics */
1092 Buffer *mBuf /* Message buffer */
1095 PRIVATE S16 cmPkKwuSapSta(rlSap, mBuf)
1096 KwKwuSapSta *rlSap; /* SAP statistics */
1097 Buffer *mBuf; /* Message buffer */
1102 CMCHKPK(cmPkState, rlSap->state, mBuf);
1103 CMCHKPK(SPkS16, rlSap->spId, mBuf);
1107 } /* end of cmPkKwuSapSta */
1113 * @param[out] rlSap : KwRLSapSta structure
1114 * @param[in] mBuf : message buffer
1117 * -# Failure : RFAILED
1120 PRIVATE S16 cmUnpkKwuSapSta
1122 KwKwuSapSta *rlSap, /* SAP statistics */
1123 Buffer *mBuf /* Message buffer */
1126 PRIVATE S16 cmUnpkKwuSapSta(rlSap, mBuf)
1127 KwKwuSapSta *rlSap; /* SAP statistics */
1128 Buffer *mBuf; /* Message buffer */
1131 TRC3(cmUnpkKwuSapSta)
1133 CMCHKUNPK(SUnpkS16, &rlSap->spId, mBuf);
1134 CMCHKUNPK(cmUnpkState, &rlSap->state, mBuf);
1138 } /* end of function cmUnpkKwuSapSta */
1144 * @param[in] pst : post structure
1145 * @param[in] cfg : RLC LM structure
1148 * -# Failure : RFAILED
1151 PRIVATE S16 cmPkRguSapSta
1153 KwRguSapSta *mkSap, /* SAP statistics */
1154 Buffer *mBuf /* Message buffer */
1157 PRIVATE S16 cmPkRguSapSta(mkSap, mBuf)
1158 KwRguSapSta *mkSap; /* SAP statistics */
1159 Buffer *mBuf; /* Message buffer */
1164 CMCHKPK(cmPkState, mkSap->state, mBuf);
1165 CMCHKPK(cmPkSuId, mkSap->suId, mBuf);
1169 } /* end of cmPkRguSapSta */
1175 * @param[out] mkSap: KwRguSapSta structure
1176 * @param[in] mBuf : message buffer
1179 * -# Failure : RFAILED
1182 PRIVATE S16 cmUnpkRguSapSta
1184 KwRguSapSta *mkSap, /* SAP statistics */
1185 Buffer *mBuf /* Message buffer */
1188 PRIVATE S16 cmUnpkRguSapSta(mkSap, mBuf)
1189 KwRguSapSta *mkSap; /* SAP statistics */
1190 Buffer *mBuf; /* Message buffer */
1193 TRC3(cmUnpkRguSapSta)
1195 CMCHKUNPK(cmUnpkSuId, &mkSap->suId, mBuf);
1196 CMCHKUNPK(cmUnpkState, &mkSap->state, mBuf);
1200 } /* end of function cmUnpkRguSapSta */
1206 * @param[in] pst : post structure
1207 * @param[in] cfg : RLC LM structure
1210 * -# Failure : RFAILED
1213 PUBLIC S16 cmPkLkwStaCfm
1215 Pst *pst, /* post structure */
1216 KwMngmt *cfm /* solicited status confirm */
1219 PUBLIC S16 cmPkLkwStaCfm(pst, cfm)
1220 Pst *pst; /* post structure */
1221 KwMngmt *cfm; /* solicited status confirm */
1224 Buffer *mBuf; /* message buffer */
1225 S16 ret1; /* return value */
1227 TRC3(cmPkLkwStaCfm);
1229 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1232 #if (ERRCLASS & ERRCLS_ADD_RES)
1235 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW023, (ErrVal) ret1,
1236 "SGetMsg() failure ......!");
1238 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1242 ret1 = cmPkKwMngmt(cfm, LKW_EVT_STA_CFM, mBuf);
1247 #if (ERRCLASS & ERRCLS_ADD_RES)
1250 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW024, (ErrVal) ret1,
1251 "packing failure ......!");
1253 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1257 pst->event = (Event) LKW_EVT_STA_CFM; /* event */
1261 } /* end of cmPkLkwStaCfm */
1268 * @param[in] pst : post structure
1269 * @param[in] cfg : RLC LM structure
1272 * -# Failure : RFAILED
1275 PUBLIC S16 cmPkLkwTrcInd
1277 Pst *pst, /* post structure */
1278 KwMngmt *trc, /* trace */
1279 Buffer *trcBuf /* trace buffer */
1282 PUBLIC S16 cmPkLkwTrcInd(pst, trc, trcBuf)
1283 Pst *pst; /* post structure */
1284 KwMngmt *trc; /* trace */
1285 Buffer *trcBuf; /* trace buffer */
1288 S16 ret1 = ROK; /* return value */
1289 Buffer *mBuf = NULLP; /* Buffer to trace */
1291 TRC3(cmPkLkwTrcInd);
1293 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1296 #if (ERRCLASS & ERRCLS_ADD_RES)
1299 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW025, (ErrVal) ret1,
1300 "SGetMsg() failure ......!");
1302 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1308 ret1 = SCatMsg(mBuf, trcBuf, M1M2);
1313 #if (ERRCLASS & ERRCLS_ADD_RES)
1316 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW026, (ErrVal) ret1,
1317 "SGetMsg() failure ......!");
1319 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1326 ret1 = cmPkKwMngmt(trc, LKW_EVT_TRC_IND, mBuf);
1331 #if (ERRCLASS & ERRCLS_ADD_RES)
1334 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW027, (ErrVal) ret1,
1335 "packing failure ......!");
1337 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1342 pst->event = (Event) LKW_EVT_TRC_IND; /* event */
1347 } /* end of cmPkLkwTrcInd */
1354 * @param[in] pst : post structure
1355 * @param[in] cfg : RLC LM structure
1358 * -# Failure : RFAILED
1361 PUBLIC S16 cmPkLkwStsReq
1363 Pst *pst, /* post structure */
1364 Action action, /* action */
1365 KwMngmt *sts /* statistics request */
1368 PUBLIC S16 cmPkLkwStsReq(pst, action, sts)
1369 Pst *pst; /* post structure */
1370 Action action; /* action */
1371 KwMngmt *sts; /* statistics request */
1375 Buffer *mBuf; /* message buffer */
1376 S16 ret1; /* return value */
1380 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1383 #if (ERRCLASS & ERRCLS_ADD_RES)
1386 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW028, (ErrVal) ret1,
1387 "SGetMsg() failure ......!");
1389 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1393 ret1 = cmPkKwMngmt(sts, LKW_EVT_STS_REQ, mBuf);
1398 #if (ERRCLASS & ERRCLS_ADD_RES)
1401 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW029, (ErrVal) ret1,
1402 "Packing failure ......!");
1404 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1408 CMCHKPK(SPkS16, action, mBuf);
1409 pst->event = (Event) LKW_EVT_STS_REQ; /* event */
1414 } /* end of cmPkLkwStsReq */
1421 * @param[in] pst : post structure
1422 * @param[in] cfg : RLC LM structure
1425 * -# Failure : RFAILED
1428 PUBLIC S16 cmPkLkwStsCfm
1430 Pst *pst, /* post structure */
1431 Action action, /* action */
1432 KwMngmt *cfm /* statistics confirmation */
1435 PUBLIC S16 cmPkLkwStsCfm(pst, action, cfm)
1436 Pst *pst; /* post structure */
1437 Action action; /* action */
1438 KwMngmt *cfm; /* statistics confirmation */
1441 Buffer *mBuf; /* message buffer */
1442 S16 ret1; /* return value */
1444 TRC3(cmPkLkwStsCfm);
1445 /* lkw_c_001.main_2 removed warning */
1447 ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
1450 #if (ERRCLASS & ERRCLS_ADD_RES)
1453 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW030, (ErrVal) ret1,
1454 "SGetMsg() failure ......!");
1456 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1460 ret1 = cmPkKwMngmt(cfm, LKW_EVT_STS_CFM, mBuf);
1465 #if (ERRCLASS & ERRCLS_ADD_RES)
1468 LKWLOGERROR(pst, ERRCLS_INT_PAR, ELKW031, (ErrVal) ret1,
1469 "Packing failure ......!");
1471 #endif /* ERRCLASS & ERRCLS_ADD_RES */
1475 pst->event = (Event) LKW_EVT_STS_CFM; /* event */
1479 } /* end of cmPkLkwStsCfm */
1486 * @param[in] pst : post structure
1487 * @param[in] cfg : RLC LM structure
1490 * -# Failure : RFAILED
1494 PRIVATE S16 cmPkKwMngmt
1496 KwMngmt *param, /* Managment */
1497 Event eventType, /* Event type */
1498 Buffer *mBuf /* Message Buffer */
1501 PRIVATE S16 cmPkKwMngmt(param ,eventType, mBuf)
1502 KwMngmt *param; /* Managment */
1503 Event eventType; /* Event type */
1504 Buffer *mBuf; /* Message Buffer */
1507 S16 ret1; /* return value */
1513 case LKW_EVT_CFG_REQ:
1514 ret1 = cmPkKwCfg(param, param->hdr.elmId.elmnt ,mBuf);
1521 case LKW_EVT_CNTRL_REQ:
1522 ret1 = cmPkKwCntrl(param, param->hdr.elmId.elmnt ,mBuf);
1529 case LKW_EVT_STA_IND:
1530 ret1 = cmPkKwUsta(param, param->hdr.elmId.elmnt ,mBuf);
1537 case LKW_EVT_STA_REQ:
1538 case LKW_EVT_STA_CFM:
1539 ret1 = cmPkKwSsta(param, param->hdr.elmId.elmnt , eventType, mBuf);
1546 case LKW_EVT_STS_REQ:
1547 case LKW_EVT_STS_CFM:
1548 ret1 = cmPkKwSts(param, param->hdr.elmId.elmnt ,mBuf);
1554 case LKW_EVT_TRC_IND:
1555 ret1 = cmPkKwTrc(param, mBuf);
1561 case LKW_EVT_CNTRL_CFM:
1562 case LKW_EVT_CFG_CFM:
1566 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
1567 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
1570 } /* end of function cmPkKwMngmt */
1577 * @param[in] pst : post structure
1578 * @param[in] cfg : RLC LM structure
1581 * -# Failure : RFAILED
1584 PRIVATE S16 cmPkKwCfg
1591 PRIVATE S16 cmPkKwCfg(cfg, elmnt, mBuf)
1603 CMCHKPK(SPkU16, cfg->t.cfg.s.gen.maxRguSaps, mBuf);
1604 CMCHKPK(SPkU8, cfg->t.cfg.s.gen.rlcMode, mBuf);
1605 CMCHKPK(SPkU32, cfg->t.cfg.s.gen.timeRes, mBuf);
1606 CMCHKPK(SPkU16, cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
1607 CMCHKPK(SPkU16, cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
1608 CMCHKPK(SPkU32, cfg->t.cfg.s.gen.maxUe, mBuf);
1609 CMCHKPK(cmPkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
1618 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.route,mBuf);
1619 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.priority,mBuf);
1620 CMCHKPK(SPkU16, cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
1621 CMCHKPK(SPkS16, cfg->t.cfg.s.sap.sapId, mBuf);
1622 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.inst, mBuf);
1623 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.ent, mBuf);
1624 CMCHKPK(SPkU16, cfg->t.cfg.s.sap.procId, mBuf);
1625 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.mem.pool, mBuf);
1626 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.mem.region, mBuf);
1627 CMCHKPK(SPkU8, cfg->t.cfg.s.sap.selector, mBuf);
1634 } /*end of function cmPkKwCfg*/
1639 Pack kw control request
1641 * @param[in] cntrl : LM management structure
1642 * @param[in] elmnt : element
1643 * @param[in] mBuf : Buffer
1646 * -# Failure : RFAILED
1649 PRIVATE S16 cmPkKwCntrl
1656 PRIVATE S16 cmPkKwCntrl(cntrl, elmnt, mBuf)
1662 U8 subAction; /* sub action */
1670 subAction = cntrl->t.cntrl.subAction;
1677 CMCHKPK(SPkU32, cntrl->t.cntrl.s.dbgCntrl.dbgMask,
1683 CMCHKPK(SPkS16, cntrl->t.cntrl.s.trcCntrl.trcLen,
1685 CMCHKPK(SPkU8, cntrl->t.cntrl.s.trcCntrl.trcMask,
1692 CMCHKPK(SPkU32, cntrl->t.cntrl.s.logMask, mBuf);
1703 CMCHKPK(SPkS16, cntrl->t.cntrl.s.sapCntrl.spId, mBuf);
1704 CMCHKPK(SPkS16, cntrl->t.cntrl.s.sapCntrl.suId, mBuf);
1710 CMCHKPK(SPkU8, cntrl->t.cntrl.action, mBuf);
1711 CMCHKPK(SPkU8, cntrl->t.cntrl.subAction, mBuf);
1712 CMCHKPK(cmPkDateTime, &cntrl->t.cntrl.dt, mBuf);
1715 } /*end of function cmPkKwCntrl */
1719 Pack unsolicit status
1721 * @param[in] usta : RLC LM structure
1722 * @param[in] elmnt : element
1723 * @param[in] mBuf : Buffer
1726 * -# Failure : RFAILED
1729 PRIVATE S16 cmPkKwUsta
1736 PRIVATE S16 cmPkKwUsta(usta, elmnt, mBuf)
1744 /* lkw_c_001.main_2 removed warning */
1746 /* lkw_c_001.main_2 added support for L2 Measurement */
1748 CMCHKPK(SPkU8, usta->t.usta.qci, mBuf);
1750 CMCHKPK(SPkU32, usta->t.usta.ueId, mBuf);
1751 CMCHKPK(SPkS16, usta->t.usta.suId, mBuf);
1752 CMCHKPK(cmPkCmAlarm, &usta->t.usta.alarm,mBuf);
1753 CMCHKPK(cmPkDateTime, &usta->t.usta.dt, mBuf);
1757 } /* end of cmPkKwUsta */
1764 * @param[in] pst : post structure
1765 * @param[in] cfg : RLC LM structure
1768 * -# Failure : RFAILED
1771 PRIVATE S16 cmPkKwSsta
1779 PRIVATE S16 cmPkKwSsta(ssta, elmnt, eventType, mBuf)
1794 if(eventType == LKW_EVT_STA_CFM)
1796 CMCHKPK(cmPkSystemId, &ssta->t.ssta.s.sysId,mBuf);
1800 ret1 = cmPkCkwSapSta(&ssta->t.ssta.s.ckwSap, mBuf);
1803 ret1 = cmPkKwuSapSta(&ssta->t.ssta.s.kwuSap, mBuf);
1807 ret1 = cmPkRguSapSta(&ssta->t.ssta.s.rguSap, mBuf);
1819 CMCHKPK(cmPkDateTime, &ssta->t.ssta.dt, mBuf);
1823 } /* end of cmPkKwSsta */
1827 Pack Trace Indication
1829 * @param[in] trc : RLC LM structure
1830 * @param[in] mBuf : Buffer
1833 * -# Failure : RFAILED
1836 PRIVATE S16 cmPkKwTrc
1838 KwMngmt *trc, /* trace */
1839 Buffer *mBuf /* data buffer */
1842 PRIVATE S16 cmPkKwTrc(trc, mBuf)
1843 KwMngmt *trc; /* trace */
1844 Buffer *mBuf; /* data buffer */
1849 CMCHKPK(SPkU16, trc->t.trc.event, mBuf);
1850 CMCHKPK(cmPkDateTime, &trc->t.trc.dt, mBuf);
1853 } /* end of cmPkKwTrc */
1858 Pack Statistics request
1860 * @param[in] pst : post structure
1861 * @param[in] cfg : RLC LM structure
1864 * -# Failure : RFAILED
1868 PRIVATE S16 cmPkKwSts
1875 PRIVATE S16 cmPkKwSts(sts, elmnt, mBuf)
1888 ret1 = cmPkGenSts(&sts->t.sts.s.gen, mBuf);
1891 ret1 = cmPkCkwSapSts(&sts->t.sts.s.ckwSap, mBuf);
1894 ret1 = cmPkKwuSapSts(&sts->t.sts.s.kwuSap, mBuf);
1896 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
1897 * in general statstics.
1902 } /* end of switch */
1909 CMCHKPK(cmPkDateTime, &sts->t.sts.dt, mBuf);
1912 } /* end of cmPkKwSts */
1918 Pack general statistics
1920 * @param[in] gen : KwGenSts structure
1921 * @param[in] mBuf : Buffer
1924 * -# Failure : RFAILED
1927 PRIVATE S16 cmPkGenSts
1933 PRIVATE S16 cmPkGenSts(gen, mBuf)
1940 CMCHKPK(SPkU32, gen->numSduDisc, mBuf);
1941 CMCHKPK(SPkU32, gen->numOfRb, mBuf);
1942 CMCHKPK(SPkU32, gen->protTimeOut, mBuf);
1943 CMCHKPK(SPkU32, gen->errorPdusRecv, mBuf);
1944 CMCHKPK(SPkU32, gen->unexpPdusRecv, mBuf);
1945 CMCHKPK(SPkU32, gen->bytesSent, mBuf);
1946 CMCHKPK(SPkU32, gen->bytesRecv, mBuf);
1947 CMCHKPK(SPkU32, gen->pdusRetx, mBuf);
1948 CMCHKPK(SPkU32, gen->pdusSent, mBuf);
1949 CMCHKPK(SPkU32, gen->pdusRecv, mBuf);
1950 CMCHKPK(SPkU32, gen->numUe, mBuf);
1954 } /* end of cmPkGenSts */
1960 * @param[in] pst : post structure
1961 * @param[in] cfg : RLC LM structure
1964 * -# Failure : RFAILED
1967 PRIVATE S16 cmPkCkwSapSts
1973 PRIVATE S16 cmPkCkwSapSts(rcSap, mBuf)
1980 CMCHKPK(SPkU32, rcSap->statMsgs, mBuf);
1983 } /* end of cmPkCkwSapSts */
1989 * @param[in] pst : post structure
1990 * @param[in] cfg : RLC LM structure
1993 * -# Failure : RFAILED
1996 PRIVATE S16 cmPkKwuSapSts
2002 PRIVATE S16 cmPkKwuSapSts(ruSap, mBuf)
2009 CMCHKPK(SPkU32, ruSap->sduTx, mBuf);
2010 CMCHKPK(SPkU32, ruSap->sduRx, mBuf);
2011 /* lkw_c_001.main_2 changed from suId to spId */
2012 CMCHKPK(cmPkSuId, ruSap->spId, mBuf);
2015 } /* end of cmPkCkwSapSts */
2017 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
2018 * in general statstics.
2023 Unpack RLC Layer Management structure
2025 * @param[in] param : RLC LM structure
2026 * @param[in] eventType : event type
2027 * @param[in] mBuf : message buffer
2030 * -# Failure : RFAILED
2033 PRIVATE S16 cmUnpkKwMngmt
2040 PRIVATE S16 cmUnpkKwMngmt(param ,eventType, mBuf)
2049 cmMemset((U8 *) param, (U8) 0, (S16) sizeof(KwMngmt));
2051 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
2052 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
2056 case LKW_EVT_CFG_REQ:
2057 ret1 = cmUnpkKwCfg(param, param->hdr.elmId.elmnt ,mBuf);
2063 case LKW_EVT_CNTRL_REQ:
2064 ret1 = cmUnpkKwCntrl(param, param->hdr.elmId.elmnt ,mBuf);
2071 case LKW_EVT_STA_IND:
2072 ret1 = cmUnpkKwUsta(param, param->hdr.elmId.elmnt ,mBuf);
2079 case LKW_EVT_STA_REQ:
2080 case LKW_EVT_STA_CFM:
2081 ret1 = cmUnpkKwSsta(param, param->hdr.elmId.elmnt, eventType,mBuf);
2088 case LKW_EVT_STS_REQ:
2089 case LKW_EVT_STS_CFM:
2091 ret1 = cmUnpkKwSts(param, param->hdr.elmId.elmnt ,mBuf);
2097 case LKW_EVT_TRC_IND:
2098 ret1 = cmUnpkKwTrc(param, mBuf);
2105 case LKW_EVT_CNTRL_CFM:
2106 case LKW_EVT_CFG_CFM:
2113 } /*end of function cmUnpkKwMngmt*/
2117 Unpack Kw configuration structure
2119 * @param[out] cfg : RLC LM structure
2120 * @param[in] elmnt : element
2121 * @param[in] mBuf : message buffer
2124 * -# Failure : RFAILED
2127 PRIVATE S16 cmUnpkKwCfg
2134 PRIVATE S16 cmUnpkKwCfg(cfg ,elmnt, mBuf)
2146 CMCHKUNPK(cmUnpkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
2147 CMCHKUNPK(SUnpkU32, &cfg->t.cfg.s.gen.maxUe, mBuf);
2148 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
2149 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
2150 CMCHKUNPK(SUnpkU32, &cfg->t.cfg.s.gen.timeRes, mBuf);
2151 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.gen.rlcMode, mBuf);
2152 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.gen.maxRguSaps, mBuf);
2161 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.selector, mBuf);
2162 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.mem.region, mBuf);
2163 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.mem.pool, mBuf);
2164 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.sap.procId, mBuf);
2165 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.ent, mBuf);
2166 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.inst, mBuf);
2167 CMCHKUNPK(SUnpkS16, &cfg->t.cfg.s.sap.sapId, mBuf);
2168 CMCHKUNPK(SUnpkU16, &cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
2169 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.priority,mBuf);
2170 CMCHKUNPK(SUnpkU8, &cfg->t.cfg.s.sap.route,mBuf);
2175 } /* end of switch */
2178 } /* end of cmUnpkKwCfg */
2182 Unpack Control Structure
2184 * @param[in] cfm : RLC LM structure
2185 * @param[in] elmnt : element
2186 * @param[in] mBuf : message buffer
2189 * -# Failure : RFAILED
2192 PRIVATE S16 cmUnpkKwCntrl
2199 PRIVATE S16 cmUnpkKwCntrl(cfm, elmnt, mBuf)
2206 KwDbgCntrl *dbgCntrl;
2207 KwTrcCntrl *trcCntrl;
2209 TRC3(cmUnpkKwCntrl);
2211 /* lkw_c_001.main_2 removed warning */
2214 CMCHKUNPK(cmUnpkDateTime, &cfm->t.cntrl.dt, mBuf);
2215 CMCHKUNPK(SUnpkU8, &cfm->t.cntrl.subAction, mBuf);
2216 CMCHKUNPK(SUnpkU8, &cfm->t.cntrl.action, mBuf);
2218 subAction = cfm->t.cntrl.subAction;
2220 switch(cfm->hdr.elmId.elmnt)
2230 dbgCntrl = &cfm->t.cntrl.s.dbgCntrl;
2231 CMCHKUNPK(SUnpkU32, &dbgCntrl->dbgMask, mBuf);
2236 trcCntrl = &cfm->t.cntrl.s.trcCntrl;
2237 CMCHKUNPK(SUnpkU8, &trcCntrl->trcMask, mBuf);
2238 CMCHKUNPK(SUnpkS16,&trcCntrl->trcLen, mBuf);
2244 CMCHKUNPK(SUnpkU32, &cfm->t.cntrl.s.logMask, mBuf);
2255 CMCHKUNPK(SUnpkS16, &cfm->t.cntrl.s.sapCntrl.suId, mBuf);
2256 CMCHKUNPK(SUnpkS16, &cfm->t.cntrl.s.sapCntrl.spId, mBuf);
2264 } /* end of cmUnpkKwCntrl */
2271 * @param[in] usta : RLC LM Structure
2272 * @param[in] elmnt : element
2273 * @param[out] mBuf : message buffer
2276 * -# Failure : RFAILED
2279 PRIVATE S16 cmUnpkKwUsta
2286 PRIVATE S16 cmUnpkKwUsta(usta ,elmnt, mBuf)
2294 /* lkw_c_001.main_2 removed warning */
2297 CMCHKUNPK(cmUnpkDateTime, &usta->t.usta.dt, mBuf);
2298 CMCHKUNPK(cmUnpkCmAlarm, &usta->t.usta.alarm,mBuf);
2299 CMCHKUNPK(SUnpkS16, &usta->t.usta.suId, mBuf);
2300 CMCHKUNPK(SUnpkU32, &usta->t.usta.ueId, mBuf);
2301 /* lkw_c_001.main_2 added support for L2 Measurement */
2303 CMCHKUNPK(SUnpkU8, &usta->t.usta.qci, mBuf);
2312 * @param[out] ssta: RLC LM structure
2313 * @param[in] elmnt : element
2314 * @param[in] mBuf : message buffer
2317 * -# Failure : RFAILED
2320 PRIVATE S16 cmUnpkKwSsta
2328 PRIVATE S16 cmUnpkKwSsta(ssta ,elmnt, eventType, mBuf)
2335 S16 ret1; /* return value */
2338 CMCHKUNPK(cmUnpkDateTime, &ssta->t.ssta.dt, mBuf);
2343 if(eventType == LKW_EVT_STA_CFM)
2345 cmMemset((U8 *) ptNmb, (U8) 0, LKW_PART_NUM_STR_LEN);
2346 ssta->t.ssta.s.sysId.ptNmb = ptNmb;
2347 CMCHKUNPK(cmUnpkSystemId, &ssta->t.ssta.s.sysId,mBuf);
2351 ret1 = cmUnpkCkwSapSta(&ssta->t.ssta.s.ckwSap, mBuf);
2354 ret1 = cmUnpkKwuSapSta(&ssta->t.ssta.s.kwuSap, mBuf);
2358 ret1 = cmUnpkRguSapSta(&ssta->t.ssta.s.rguSap, mBuf);
2376 Unpack trace Indication
2378 * @param[out] trc : RLC LM Structure
2379 * @param[in] mBuf : message buffer
2382 * -# Failure : RFAILED
2385 PRIVATE S16 cmUnpkKwTrc
2391 PRIVATE S16 cmUnpkKwTrc(trc, mBuf)
2398 CMCHKUNPK(cmUnpkDateTime, &trc->t.trc.dt, mBuf);
2399 CMCHKUNPK(SUnpkU16, &trc->t.trc.event, mBuf);
2402 } /* end of cmUnpkKwTrc */
2409 * @param[out] sts : RLC LM structure
2410 * @param[in] elmnt : element
2411 * @param[in] mBuf : message buffer
2414 * -# Failure : RFAILED
2417 PRIVATE S16 cmUnpkKwSts
2424 PRIVATE S16 cmUnpkKwSts(sts ,elmnt, mBuf)
2430 S16 ret1; /* return value */
2433 CMCHKUNPK(cmUnpkDateTime, &sts->t.sts.dt, mBuf);
2438 ret1 = cmUnpkGenSts(&sts->t.sts.s.gen, mBuf);
2441 ret1 = cmUnpkCkwSapSts(&sts->t.sts.s.ckwSap, mBuf);
2444 ret1 = cmUnpkKwuSapSts(&sts->t.sts.s.kwuSap, mBuf);
2446 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
2447 * in general statstics.
2452 } /* end of switch */
2460 } /* end of cmUnpkKwSts */
2465 Unpack General statistics
2467 * @param[out] gen : KwGenSts structure
2468 * @param[in] mBuf : message buffer
2471 * -# Failure : RFAILED
2474 PRIVATE S16 cmUnpkGenSts
2480 PRIVATE S16 cmUnpkGenSts(gen, mBuf)
2487 CMCHKUNPK(SUnpkU32, &gen->numUe, mBuf);
2488 CMCHKUNPK(SUnpkU32, &gen->pdusRecv, mBuf);
2489 CMCHKUNPK(SUnpkU32, &gen->pdusSent, mBuf);
2490 CMCHKUNPK(SUnpkU32, &gen->pdusRetx, mBuf);
2491 CMCHKUNPK(SUnpkU32, &gen->bytesRecv, mBuf);
2492 CMCHKUNPK(SUnpkU32, &gen->bytesSent, mBuf);
2493 CMCHKUNPK(SUnpkU32, &gen->unexpPdusRecv, mBuf);
2494 CMCHKUNPK(SUnpkU32, &gen->errorPdusRecv, mBuf);
2495 CMCHKUNPK(SUnpkU32, &gen->protTimeOut, mBuf);
2496 CMCHKUNPK(SUnpkU32, &gen->numOfRb, mBuf);
2497 CMCHKUNPK(SUnpkU32, &gen->numSduDisc, mBuf);
2500 } /* end of cmUnpkGenSts */
2504 Unpack Ckw Sap Statistics
2506 * @param[out] rcSap : KwCkwCntSts structure
2507 * @param[in] mBuf : message buffer
2510 * -# Failure : RFAILED
2513 PRIVATE S16 cmUnpkCkwSapSts
2519 PRIVATE S16 cmUnpkCkwSapSts(rcSap ,mBuf)
2525 TRC3(cmUnpkCkwSapSts);
2527 CMCHKUNPK(SUnpkU32, &rcSap->statMsgs, mBuf);
2531 } /* end of cmUnpkCkwSapSts */
2535 Unpack Kwu Sap statistics
2537 * @param[out] : KwKwuSapSts structure
2538 * @param[in] mBuf : message buffer
2541 * -# Failure : RFAILED
2544 PRIVATE S16 cmUnpkKwuSapSts
2550 PRIVATE S16 cmUnpkKwuSapSts(ruSap, mBuf)
2555 TRC3(cmUnpkKwuSapSts)
2557 /* lkw_c_001.main_2 changed from suId to spId */
2558 CMCHKUNPK(cmUnpkSuId, &ruSap->spId, mBuf);
2559 CMCHKUNPK(SUnpkU32, &ruSap->sduRx, mBuf);
2560 CMCHKUNPK(SUnpkU32, &ruSap->sduTx, mBuf);
2564 } /* end of cmUnpkKwuSapSts */
2566 /* lkw_c_001.main_2 added support for L2 Measurement */
2569 PUBLIC S16 cmPkLkwL2MeasReq
2572 KwL2MeasReqEvt *measReqEvt
2575 PUBLIC S16 cmPkLkwL2MeasReq(pst, measReqEvt)
2577 KwL2MeasReqEvt *measReqEvt;
2580 Buffer *mBuf = NULLP;
2581 TRC3(cmPkLkwL2MeasReq)
2583 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2584 #if (ERRCLASS & ERRCLS_ADD_RES)
2585 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2586 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2587 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2589 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2592 if (cmPkKwL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK) {
2593 #if (ERRCLASS & ERRCLS_ADD_RES)
2594 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2595 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2596 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2598 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2602 if (SPkU16(measReqEvt->measPeriod, mBuf) != ROK) {
2603 #if (ERRCLASS & ERRCLS_ADD_RES)
2604 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2605 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2606 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2608 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2612 if (SPkU32(measReqEvt->transId, mBuf) != ROK) {
2613 #if (ERRCLASS & ERRCLS_ADD_RES)
2614 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2615 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2616 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2618 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2623 pst->event = (Event) LKW_EVT_L2MEAS_REQ;
2624 RETVALUE(SPstTsk(pst,mBuf));
2628 PUBLIC S16 cmPkKwL2MeasReqInfo
2630 KwL2MeasReqInfo *param,
2634 PUBLIC S16 cmPkKwL2MeasReqInfo(param, mBuf)
2635 KwL2MeasReqInfo *param;
2642 TRC3(cmPkKwL2MeasReqInfo)
2644 if((param->measType & LKW_L2MEAS_DL_IP) ||
2645 (param->measType & LKW_L2MEAS_UL_IP))
2647 for(idx1 = 0;idx1 < param->val.ipThMeas.numUes;idx1++)
2650 CMCHKPK(cmPkLteCellId, param->val.ipThMeas.ueInfoLst[idx1].cellId, mBuf);
2651 CMCHKPK(cmPkLteRnti, param->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
2652 for(idx = 0; idx < param->val.ipThMeas.ueInfoLst[idx1].numQci; idx++)
2654 CMCHKPK(SPkU8, param->val.ipThMeas.ueInfoLst[idx1].qci[idx], mBuf);
2656 CMCHKPK(SPkU8, param->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
2658 CMCHKPK(SPkU16, param->val.ipThMeas.numUes, mBuf);
2659 CMCHKPK(SPkU8, param->measType, mBuf);
2664 for(idx = 0; idx < param->val.nonIpThMeas.numQci; idx++)
2666 CMCHKPK(SPkU8, param->val.nonIpThMeas.qci[idx], mBuf);
2668 CMCHKPK(SPkU8, param->val.nonIpThMeas.numQci, mBuf);
2669 CMCHKPK(SPkU16, param->val.nonIpThMeas.numSamples, mBuf);
2671 CMCHKPK(SPkU8, param->measType, mBuf);
2676 PUBLIC S16 cmPkLkwL2MeasStopReq
2682 PUBLIC S16 cmPkLkwL2MeasStopReq(pst, measType)
2687 Buffer *mBuf = NULLP;
2689 TRC3(cmPkLkwL2MeasStopReq)
2690 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2691 #if (ERRCLASS & ERRCLS_ADD_RES)
2692 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2693 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2694 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2698 CMCHKPK(SPkU8, measType, mBuf);
2699 pst->event = (Event) LKW_EVT_L2MEAS_STOP_REQ;
2700 RETVALUE(SPstTsk(pst,mBuf));
2704 PUBLIC S16 cmPkLkwL2MeasSendReq
2710 PUBLIC S16 cmPkLkwL2MeasSendReq(pst, measType)
2715 Buffer *mBuf = NULLP;
2717 TRC3(cmPkLkwL2MeasSendReq)
2718 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2719 #if (ERRCLASS & ERRCLS_ADD_RES)
2720 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2721 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2722 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2726 CMCHKPK(SPkU8, measType, mBuf);
2727 pst->event = (Event) LKW_EVT_L2MEAS_SEND_REQ;
2728 RETVALUE(SPstTsk(pst,mBuf));
2730 #ifdef TENB_SPLIT_ARCH
2732 PUBLIC S16 cmUnpkLkwL2MeasReq
2739 PUBLIC S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
2745 KwL2MeasReqEvt measReqEvt;
2747 TRC3(cmUnpkLkwL2MeasReq)
2749 if (SUnpkU32(&measReqEvt.transId, mBuf) != ROK) {
2751 #if (ERRCLASS & ERRCLS_ADD_RES)
2752 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2753 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2754 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2758 if (SUnpkU16(&measReqEvt.measPeriod, mBuf) != ROK) {
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");
2767 if (cmUnpkKwL2MeasReqInfo(&measReqEvt.measReq, mBuf) != ROK)
2769 /*SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));*/
2771 #if (ERRCLASS & ERRCLS_ADD_RES)
2772 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2773 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2774 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2779 RETVALUE((*func)(pst, &measReqEvt));
2783 PUBLIC S16 cmUnpkLkwL2MeasReq
2790 PUBLIC S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
2797 KwL2MeasReqEvt *measReqEvt;
2799 TRC3(cmUnpkLkwL2MeasReq)
2802 if((ret = SGetSBuf(pst->region, pst->pool, (Data **)&measReqEvt,\
2803 sizeof(KwL2MeasReqEvt))) != ROK)
2805 #if (ERRCLASS & ERRCLS_ADD_RES)
2806 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2807 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2808 (ErrVal)ERRLKW, (ErrVal)0, "SGetMsg() failed");
2809 #endif /* ERRCLASS & ERRCLS_ADD_RES */
2813 if (SUnpkU32(&measReqEvt->transId, mBuf) != ROK) {
2815 #if (ERRCLASS & ERRCLS_ADD_RES)
2816 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2817 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2818 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2822 if (SUnpkU16(&measReqEvt->measPeriod, mBuf) != ROK) {
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");
2831 if (cmUnpkKwL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK)
2833 SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(KwL2MeasReqEvt));
2835 #if (ERRCLASS & ERRCLS_ADD_RES)
2836 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2837 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2838 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2843 RETVALUE((*func)(pst, measReqEvt));
2848 PUBLIC S16 cmUnpkKwL2MeasReqInfo
2850 KwL2MeasReqInfo *param,
2854 PUBLIC S16 cmUnpkKwL2MeasReqInfo(param, mBuf)
2855 KwL2MeasReqInfo *param;
2862 TRC3(cmUnpkKwL2MeasReqInfo)
2864 CMCHKUNPK(SUnpkU8, ¶m->measType, mBuf);
2866 if((param->measType & LKW_L2MEAS_DL_IP) ||
2867 (param->measType & LKW_L2MEAS_UL_IP))
2869 CMCHKUNPK(SUnpkU16, ¶m->val.ipThMeas.numUes, mBuf);
2870 for(idx1 = 0;idx1 < param->val.ipThMeas.numUes;idx1++)
2872 CMCHKUNPK(SUnpkU8, ¶m->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
2873 for(idx = param->val.ipThMeas.ueInfoLst[idx1].numQci; idx > 0; idx--)
2875 CMCHKUNPK(SUnpkU8, ¶m->val.ipThMeas.ueInfoLst[idx1].\
2876 qci[idx - 1], mBuf);
2878 CMCHKUNPK(cmUnpkLteRnti, ¶m->val.ipThMeas.ueInfoLst[idx1].\
2880 CMCHKUNPK(cmUnpkLteCellId, ¶m->val.ipThMeas.\
2881 ueInfoLst[idx1].cellId, mBuf);
2887 CMCHKUNPK(SUnpkU16, ¶m->val.nonIpThMeas.numSamples, mBuf);
2888 CMCHKUNPK(SUnpkU8, ¶m->val.nonIpThMeas.numQci, mBuf);
2889 for(idx = param->val.nonIpThMeas.numQci; idx > 0; idx--)
2891 CMCHKUNPK(SUnpkU8, ¶m->val.nonIpThMeas.qci[idx - 1], mBuf);
2898 PUBLIC S16 cmUnpkLkwL2MeasStopReq
2900 LkwL2MeasStopReq func,
2905 PUBLIC S16 cmUnpkLkwL2MeasStopReq(func, pst, mBuf)
2906 LkwL2MeasStopReq func;
2912 TRC3(cmUnpkLkwL2MeasReq)
2914 CMCHKUNPK(SUnpkU8, &measType, mBuf);
2916 RETVALUE((*func)(pst, measType));
2920 PUBLIC S16 cmUnpkLkwL2MeasSendReq
2922 LkwL2MeasSendReq func,
2927 PUBLIC S16 cmUnpkLkwL2MeasSendReq(func, pst, mBuf)
2928 LkwL2MeasSendReq func;
2935 TRC3(cmUnpkLkwL2MeasSendReq)
2937 CMCHKUNPK(SUnpkU8, &measType, mBuf);
2939 RETVALUE((*func)(pst, measType));
2943 PUBLIC S16 cmPkLkwL2MeasCfm
2946 KwL2MeasCfmEvt *measCfmEvt
2949 PUBLIC S16 cmPkLkwL2MeasCfm(pst, measCfmEvt)
2951 KwL2MeasCfmEvt *measCfmEvt;
2954 Buffer *mBuf = NULLP;
2958 TRC3(cmPkLkwL2MeasCfm)
2960 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2961 #if (ERRCLASS & ERRCLS_ADD_RES)
2962 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2963 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2964 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
2966 SPutSBuf(pst->region, pst->pool, (Data *)measCfmEvt, sizeof(KwL2MeasCfmEvt));
2970 if((measCfmEvt->measType & LKW_L2MEAS_ACT_UE) || \
2971 (measCfmEvt->measType & LKW_L2MEAS_UU_LOSS) || \
2972 (measCfmEvt->measType & LKW_L2MEAS_DL_DISC) || \
2973 (measCfmEvt->measType & LKW_L2MEAS_DL_DELAY))
2975 for(idx = 0; idx < measCfmEvt->val.nonIpThMeas.numCfm; idx++)
2977 if (cmPkKwL2MeasCfmInfo(&measCfmEvt->val.nonIpThMeas.measCfm[idx], \
2978 mBuf, measCfmEvt->measType) != 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");
2989 if (SPkU16(measCfmEvt->val.nonIpThMeas.numCfm, mBuf) != ROK) {
2990 #if (ERRCLASS & ERRCLS_ADD_RES)
2991 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2992 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2993 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3001 for(idx1 =0 ;idx1< measCfmEvt->val.ipThMeas.numUes;idx1++)
3004 for(idx = 0; idx < measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm; idx++)
3006 if (cmPkKwL2MeasCfmInfo(&measCfmEvt->val.ipThMeas.ueInfoLst[idx1].\
3007 measCfm[idx], mBuf, measCfmEvt->measType) != 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");
3018 if (SPkU16(measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm, mBuf) != ROK) {
3019 #if (ERRCLASS & ERRCLS_ADD_RES)
3020 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3021 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3022 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3028 CMCHKPK(cmPkLteCellId, measCfmEvt->val.ipThMeas.ueInfoLst[idx1].cellId, mBuf);
3029 CMCHKPK(cmPkLteRnti, measCfmEvt->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
3031 SPkU16(measCfmEvt->val.ipThMeas.numUes, mBuf);
3034 CMCHKPK(SPkU8, measCfmEvt->measType, mBuf);
3035 CMCHKPK(cmPkCmStatus, &measCfmEvt->status, mBuf);
3036 if (SPkU32(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");
3045 pst->event = (Event) LKW_EVT_L2MEAS_CFM;
3046 RETVALUE(SPstTsk(pst,mBuf));
3050 PUBLIC S16 cmPkKwL2MeasCfmInfo
3052 KwL2MeasCfmInfo *param,
3057 PUBLIC S16 cmPkKwL2MeasCfmInfo(param, mBuf, measType)
3058 KwL2MeasCfmInfo *param;
3063 TRC3(cmPkKwL2MeasCfmInfo)
3065 if((measType & LKW_L2MEAS_DL_IP) ||
3066 (measType & LKW_L2MEAS_UL_IP))
3068 CMCHKPK(SPkF32, param->val.ipThrput.ulIpThPut, mBuf);
3069 CMCHKPK(SPkF32, param->val.ipThrput.dlIpThPut, mBuf);
3070 CMCHKPK(SPkU8, param->qci, mBuf);
3075 CMCHKPK(SPkU32, param->val.nonIpThrput.dlDiscRate, mBuf);
3076 CMCHKPK(SPkU32, param->val.nonIpThrput.uuLoss, mBuf);
3077 CMCHKPK(SPkU32, param->val.nonIpThrput.numActUe, mBuf);
3078 CMCHKPK(SPkU32, param->val.nonIpThrput.dlSduDelay, mBuf);
3079 CMCHKPK(SPkU8, param->qci, mBuf);
3085 PUBLIC S16 cmUnpkLkwL2MeasCfm
3092 PUBLIC S16 cmUnpkLkwL2MeasCfm(func, pst, mBuf)
3100 KwL2MeasCfmEvt measCfmEvt;
3102 TRC3(cmUnpkLkwL2MeasCfm)
3104 cmMemset((U8 *)&measCfmEvt, 0 , sizeof(KwL2MeasCfmEvt));
3106 if (SUnpkU32(&measCfmEvt.transId, mBuf) != ROK) {
3108 #if (ERRCLASS & ERRCLS_ADD_RES)
3109 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3110 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3111 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3115 CMCHKUNPK(cmUnpkCmStatus, &measCfmEvt.status, mBuf);
3116 CMCHKUNPK(SUnpkU8, &measCfmEvt.measType, mBuf);
3118 if(measCfmEvt.measType & LKW_L2MEAS_DL_IP || measCfmEvt.measType & LKW_L2MEAS_UL_IP)
3120 CMCHKUNPK(SUnpkU16, &measCfmEvt.val.ipThMeas.numUes, mBuf);
3121 for(idx1 = 0;idx1<measCfmEvt.val.ipThMeas.numUes;idx1++)
3123 CMCHKUNPK(cmUnpkLteRnti, &measCfmEvt.val.ipThMeas.\
3124 ueInfoLst[idx1].ueId, mBuf);
3125 CMCHKUNPK(cmUnpkLteCellId, &measCfmEvt.val.ipThMeas.\
3126 ueInfoLst[idx1].cellId, mBuf);
3127 if (SUnpkU16(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
3128 numCfm, mBuf) != ROK) {
3130 #if (ERRCLASS & ERRCLS_ADD_RES)
3131 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3132 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3133 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3137 for(idx = measCfmEvt.val.ipThMeas.ueInfoLst[idx1].numCfm; idx > 0; idx--)
3139 if (cmUnpkKwL2MeasCfmInfo(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
3140 measCfm[idx - 1], mBuf, measCfmEvt.measType) != ROK) {
3142 #if (ERRCLASS & ERRCLS_ADD_RES)
3143 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3144 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3145 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3154 if (SUnpkU16(&measCfmEvt.val.nonIpThMeas.numCfm, mBuf) != ROK) {
3156 #if (ERRCLASS & ERRCLS_ADD_RES)
3157 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3158 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3159 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3163 for(idx = measCfmEvt.val.nonIpThMeas.numCfm; idx > 0; idx--)
3165 if (cmUnpkKwL2MeasCfmInfo(&measCfmEvt.val.nonIpThMeas.measCfm[idx - 1], \
3166 mBuf, measCfmEvt.measType) != ROK) {
3168 #if (ERRCLASS & ERRCLS_ADD_RES)
3169 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3170 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3171 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3178 RETVALUE((*func)(pst, &measCfmEvt));
3182 PUBLIC S16 cmUnpkKwL2MeasCfmInfo
3184 KwL2MeasCfmInfo *param,
3189 PUBLIC S16 cmUnpkKwL2MeasCfmInfo(param, mBuf, measType)
3190 KwL2MeasCfmInfo *param;
3195 TRC3(cmUnpkKwL2MeasCfmInfo)
3197 if((measType & LKW_L2MEAS_DL_IP) ||
3198 (measType & LKW_L2MEAS_UL_IP))
3200 CMCHKUNPK(SUnpkU8, ¶m->qci, mBuf);
3201 CMCHKUNPK(SUnpkF32, ¶m->val.ipThrput.dlIpThPut, mBuf);
3202 CMCHKUNPK(SUnpkF32, ¶m->val.ipThrput.ulIpThPut, mBuf);
3207 CMCHKUNPK(SUnpkU8, ¶m->qci, mBuf);
3208 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.dlSduDelay, mBuf);
3209 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.numActUe, mBuf);
3210 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.uuLoss, mBuf);
3211 CMCHKUNPK(SUnpkU32, ¶m->val.nonIpThrput.dlDiscRate, mBuf);
3218 PUBLIC S16 cmPkLkwL2MeasStopCfm
3225 PUBLIC S16 cmPkLkwL2MeasStopCfm(pst, measType,status)
3231 Buffer *mBuf = NULLP;
3232 TRC3(cmPkLkwL2MeasStopCfm)
3234 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3235 #if (ERRCLASS & ERRCLS_ADD_RES)
3236 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3237 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3238 (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
3242 CMCHKPK(SPkU8, status, mBuf);
3243 CMCHKPK(SPkU8, measType, mBuf);
3244 pst->event = (Event) LKW_EVT_L2MEAS_STOP_CFM;
3245 RETVALUE(SPstTsk(pst,mBuf));
3249 PUBLIC S16 cmUnpkLkwL2MeasStopCfm
3251 LkwL2MeasStopCfm func,
3256 PUBLIC S16 cmUnpkLkwL2MeasStopCfm(func, pst, mBuf)
3257 LkwL2MeasStopCfm func;
3264 TRC3(cmUnpkLkwL2MeasCfm)
3265 CMCHKUNPK(SUnpkU8, &measType, mBuf);
3266 CMCHKUNPK(SUnpkU8, &status, mBuf);
3268 RETVALUE((*func)(pst, measType,status));
3270 #endif /* LTE_L2_MEAS */
3274 /**********************************************************************
3276 **********************************************************************/