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 *******************************************************************************/
20 /************************************************************************
26 Desc: C source code for pack/unpack of LRG interface primitives.
30 **********************************************************************/
33 @brief This file contains the packing/unpacking code for the LRG interface
37 /* header include files (.h) */
38 #include "envopt.h" /* Environment options */
39 #include "envdep.h" /* Environment dependent */
40 #include "envind.h" /* Environment independent */
41 #include "gen.h" /* General */
42 #include "ssi.h" /* System Services */
43 #include "cm_tkns.h" /* Common Token Defines */
44 #include "cm_llist.h" /* Common Link List Defines */
45 #include "cm_hash.h" /* Common Hash List Defines */
46 #include "cm_lte.h" /* Common LTE Defines */
47 #include "lrg.h" /* LRG Interface Defines */
49 /* header/extern include files (.x) */
50 #include "gen.x" /* General */
51 #include "ssi.x" /* System Services */
52 #include "cm_tkns.x" /* Common Token Definitions */
53 #include "cm_llist.x" /* Common Link List Definitions */
54 #include "cm_lib.x" /* Common Library Definitions */
55 #include "cm_hash.x" /* Common Hash List Definitions */
56 #include "cm_lte.x" /* Common LTE Defines */
57 #include "lrg.x" /* LRG Interface includes */
63 * @brief This API is used to send a
64 Configuration Request from LM to MAC.
68 * Function: cmPkLrgCfgReq
70 * @param[in] Pst * pst
71 * @param[in] RgMngmt * cfg
76 PUBLIC S16 cmPkLrgCfgReq
82 PUBLIC S16 cmPkLrgCfgReq(pst, cfg)
90 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
91 #if (ERRCLASS & ERRCLS_ADD_RES)
92 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
93 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
94 (ErrVal)ELRG001, (ErrVal)0, "Packing failed");
98 if (pst->selector == LRG_SEL_LC) {
99 if (cmPkRgMngmt(pst, cfg, EVTLRGCFGREQ, mBuf) != ROK) {
100 #if (ERRCLASS & ERRCLS_ADD_RES)
101 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
102 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
103 (ErrVal)ELRG002, (ErrVal)0, "Packing failed");
109 pst->event = (Event) EVTLRGCFGREQ;
110 RETVALUE(SPstTsk(pst,mBuf));
115 * @brief This API is used to send a
116 Configuration Request from LM to MAC.
120 * Function: cmUnpkLrgCfgReq
122 * @param[in] Pst * pst
123 * @param[in] RgMngmt * cfg
128 PUBLIC S16 cmUnpkLrgCfgReq
135 PUBLIC S16 cmUnpkLrgCfgReq(func, pst, mBuf)
141 /* lrg_c_001.main_2: Changed Pointer across Interface */
144 TRC3(cmUnpkLrgCfgReq)
146 if (cmUnpkRgMngmt(pst, &cfg, EVTLRGCFGREQ, mBuf) != ROK) {
148 #if (ERRCLASS & ERRCLS_ADD_RES)
149 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
150 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
151 (ErrVal)ELRG003, (ErrVal)0, "Packing failed");
156 RETVALUE((*func)(pst, &cfg));
161 * @brief This API is used to send a
162 Configuration Request from LM to SCH.
166 * Function: cmPkLrgSchCfgReq
168 * @param[in] Pst * pst
169 * @param[in] RgMngmt * cfg
174 PUBLIC S16 cmPkLrgSchCfgReq
180 PUBLIC S16 cmPkLrgSchCfgReq(pst, cfg)
185 Buffer *mBuf = NULLP;
186 TRC3(cmPkLrgSchCfgReq)
188 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
189 #if (ERRCLASS & ERRCLS_ADD_RES)
190 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
191 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
192 (ErrVal)ELRG004, (ErrVal)0, "Packing failed");
196 if (pst->selector == LRG_SEL_LC) {
197 if (cmPkRgMngmt(pst, cfg, EVTMACSCHGENCFGREQ, mBuf) != ROK) {
198 #if (ERRCLASS & ERRCLS_ADD_RES)
199 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
200 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
201 (ErrVal)ELRG005, (ErrVal)0, "Packing failed");
208 RETVALUE(SPstTsk(pst,mBuf));
213 * @brief This API is used to send a
214 Configuration Request from LM to SCH.
218 * Function: cmUnpkLrgSchCfgReq
220 * @param[in] Pst * pst
221 * @param[in] RgMngmt * cfg
226 PUBLIC S16 cmUnpkLrgSchCfgReq
233 PUBLIC S16 cmUnpkLrgSchCfgReq(func, pst, mBuf)
239 /* lrg_c_001.main_2: Changed Pointer across Interface */
242 TRC3(cmUnpkLrgSchCfgReq)
244 if (cmUnpkRgMngmt(pst, &cfg, EVTMACSCHGENCFGREQ, mBuf) != ROK) {
246 #if (ERRCLASS & ERRCLS_ADD_RES)
247 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
248 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
249 (ErrVal)ELRG006, (ErrVal)0, "Packing failed");
254 RETVALUE((*func)(pst, &cfg));
259 * @brief This API is used to send a
260 Configuration Confirm from MAC to LM.
264 * Function: cmPkLrgCfgCfm
266 * @param[in] Pst * pst
267 * @param[in] RgMngmt * cfm
272 PUBLIC S16 cmPkLrgCfgCfm
278 PUBLIC S16 cmPkLrgCfgCfm(pst, cfm)
283 Buffer *mBuf = NULLP;
286 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
287 #if (ERRCLASS & ERRCLS_ADD_RES)
288 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
289 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
290 (ErrVal)ELRG007, (ErrVal)0, "Packing failed");
294 if (pst->selector == LRG_SEL_LC) {
295 if (cmPkRgMngmt(pst, cfm, EVTLRGCFGCFM, mBuf) != ROK) {
296 #if (ERRCLASS & ERRCLS_ADD_RES)
297 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
298 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
299 (ErrVal)ELRG008, (ErrVal)0, "Packing failed");
306 pst->event = (Event) EVTLRGCFGCFM;
307 RETVALUE(SPstTsk(pst,mBuf));
312 * @brief This API is used to send a
313 Configuration Confirm from MAC to LM.
317 * Function: cmUnpkLrgCfgCfm
319 * @param[in] Pst * pst
320 * @param[in] RgMngmt * cfm
325 PUBLIC S16 cmUnpkLrgCfgCfm
332 PUBLIC S16 cmUnpkLrgCfgCfm(func, pst, mBuf)
340 TRC3(cmUnpkLrgCfgCfm)
342 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCFGCFM, mBuf) != ROK) {
344 #if (ERRCLASS & ERRCLS_ADD_RES)
345 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
346 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
347 (ErrVal)ELRG009, (ErrVal)0, "Packing failed");
352 RETVALUE((*func)(pst, &cfm));
357 * @brief This API is used to send a
358 Configuration Confirm from SCH to LM.
362 * Function: cmPkLrgSchCfgCfm
364 * @param[in] Pst * pst
365 * @param[in] RgMngmt * cfg
370 PUBLIC S16 cmPkLrgSchCfgCfm
376 PUBLIC S16 cmPkLrgSchCfgCfm(pst, cfg)
381 Buffer *mBuf = NULLP;
382 TRC3(cmPkLrgSchCfgCfm)
384 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
385 #if (ERRCLASS & ERRCLS_ADD_RES)
386 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
387 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
388 (ErrVal)ELRG010, (ErrVal)0, "Packing failed");
392 if (pst->selector == LRG_SEL_LC) {
393 if (cmPkRgMngmt(pst, cfg, EVTMACSCHGENCFGCFM, mBuf) != ROK) {
394 #if (ERRCLASS & ERRCLS_ADD_RES)
395 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
396 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
397 (ErrVal)ELRG011, (ErrVal)0, "Packing failed");
404 pst->event = (Event) EVTMACSCHGENCFGCFM;
405 RETVALUE(SPstTsk(pst,mBuf));
410 * @brief This API is used to send a
411 Configuration Confirm from SCH to LM.
415 * Function: cmUnpkLrgSchCfgCfm
417 * @param[in] Pst * pst
418 * @param[in] RgMngmt * cfg
423 PUBLIC S16 cmUnpkLrgSchCfgCfm
430 PUBLIC S16 cmUnpkLrgSchCfgCfm(func, pst, mBuf)
438 TRC3(cmUnpkLrgSchCfgCfm)
440 if (cmUnpkRgMngmt(pst, &cfg, EVTMACSCHGENCFGCFM, mBuf) != ROK) {
442 #if (ERRCLASS & ERRCLS_ADD_RES)
443 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
444 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
445 (ErrVal)ELRG012, (ErrVal)0, "Packing failed");
450 RETVALUE((*func)(pst, &cfg));
455 * @brief This API is used to send a
456 Statistics Request from LM to MAC.
460 * Function: cmPkLrgStsReq
462 * @param[in] Pst * pst
463 * @param[in] RgMngmt * sts
468 PUBLIC S16 cmPkLrgStsReq
474 PUBLIC S16 cmPkLrgStsReq(pst, sts)
479 Buffer *mBuf = NULLP;
482 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
483 #if (ERRCLASS & ERRCLS_ADD_RES)
484 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
485 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
486 (ErrVal)ELRG013, (ErrVal)0, "Packing failed");
490 if (pst->selector == LRG_SEL_LC) {
491 if (cmPkRgMngmt(pst, sts, EVTLRGSTSREQ, mBuf) != ROK) {
492 #if (ERRCLASS & ERRCLS_ADD_RES)
493 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
494 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
495 (ErrVal)ELRG014, (ErrVal)0, "Packing failed");
502 pst->event = (Event) EVTLRGSTSREQ;
503 RETVALUE(SPstTsk(pst,mBuf));
508 * @brief This API is used to send a
509 Statistics Request from LM to MAC.
513 * Function: cmUnpkLrgStsReq
515 * @param[in] Pst * pst
516 * @param[in] RgMngmt * sts
521 PUBLIC S16 cmUnpkLrgStsReq
528 PUBLIC S16 cmUnpkLrgStsReq(func, pst, mBuf)
536 TRC3(cmUnpkLrgStsReq)
538 if (cmUnpkRgMngmt(pst, &sts, EVTLRGSTSREQ, mBuf) != ROK) {
540 #if (ERRCLASS & ERRCLS_ADD_RES)
541 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
542 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
543 (ErrVal)ELRG015, (ErrVal)0, "Packing failed");
548 RETVALUE((*func)(pst, &sts));
553 * @brief This API is used to send a
554 Statistics Confirm from MAC to LM.
558 * Function: cmPkLrgStsCfm
560 * @param[in] Pst * pst
561 * @param[in] RgMngmt * cfm
566 PUBLIC S16 cmPkLrgStsCfm
572 PUBLIC S16 cmPkLrgStsCfm(pst, cfm)
577 Buffer *mBuf = NULLP;
580 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
581 #if (ERRCLASS & ERRCLS_ADD_RES)
582 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
583 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
584 (ErrVal)ELRG016, (ErrVal)0, "Packing failed");
588 if (pst->selector == LRG_SEL_LC) {
589 if (cmPkRgMngmt(pst, cfm, EVTLRGSTSCFM, mBuf) != ROK) {
590 #if (ERRCLASS & ERRCLS_ADD_RES)
591 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
592 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
593 (ErrVal)ELRG017, (ErrVal)0, "Packing failed");
600 pst->event = (Event) EVTLRGSTSCFM;
601 RETVALUE(SPstTsk(pst,mBuf));
606 * @brief This API is used to send a
607 Statistics Confirm from MAC to LM.
611 * Function: cmUnpkLrgStsCfm
613 * @param[in] Pst * pst
614 * @param[in] RgMngmt * cfm
619 PUBLIC S16 cmUnpkLrgStsCfm
626 PUBLIC S16 cmUnpkLrgStsCfm(func, pst, mBuf)
634 TRC3(cmUnpkLrgStsCfm)
636 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSTSCFM, mBuf) != ROK) {
638 #if (ERRCLASS & ERRCLS_ADD_RES)
639 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
640 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
641 (ErrVal)ELRG018, (ErrVal)0, "Packing failed");
646 RETVALUE((*func)(pst, &cfm));
651 * @brief This API is used to send a
652 Status Request from LM to MAC.
656 * Function: cmPkLrgStaReq
658 * @param[in] Pst * pst
659 * @param[in] RgMngmt * sta
664 PUBLIC S16 cmPkLrgStaReq
670 PUBLIC S16 cmPkLrgStaReq(pst, sta)
675 Buffer *mBuf = NULLP;
678 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
679 #if (ERRCLASS & ERRCLS_ADD_RES)
680 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
681 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
682 (ErrVal)ELRG019, (ErrVal)0, "Packing failed");
686 if (cmPkRgMngmt(pst, sta, EVTLRGSSTAREQ, mBuf) != ROK) {
687 #if (ERRCLASS & ERRCLS_ADD_RES)
688 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
689 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
690 (ErrVal)ELRG020, (ErrVal)0, "Packing failed");
696 pst->event = (Event) EVTLRGSSTAREQ;
697 RETVALUE(SPstTsk(pst,mBuf));
702 * @brief This API is used to send a
703 Status Request from LM to MAC.
707 * Function: cmUnpkLrgStaReq
709 * @param[in] Pst * pst
710 * @param[in] RgMngmt * sta
715 PUBLIC S16 cmUnpkLrgStaReq
722 PUBLIC S16 cmUnpkLrgStaReq(func, pst, mBuf)
730 TRC3(cmUnpkLrgStaReq)
732 cmMemset((U8 *)&sta, 0, sizeof(RgMngmt));
733 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSSTAREQ, mBuf) != ROK) {
734 #if (ERRCLASS & ERRCLS_ADD_RES)
735 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
736 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
737 (ErrVal)ELRG021, (ErrVal)0, "Packing failed");
743 RETVALUE((*func)(pst, &sta));
748 * @brief This API is used to send a
749 Status Confirm from MAC to LM.
753 * Function: cmPkLrgStaCfm
755 * @param[in] Pst * pst
756 * @param[in] RgMngmt * cfm
761 PUBLIC S16 cmPkLrgStaCfm
767 PUBLIC S16 cmPkLrgStaCfm(pst, cfm)
772 Buffer *mBuf = NULLP;
775 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
776 #if (ERRCLASS & ERRCLS_ADD_RES)
777 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
778 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
779 (ErrVal)ELRG022, (ErrVal)0, "Packing failed");
783 if (cmPkRgMngmt(pst, cfm, EVTLRGSSTACFM, mBuf) != ROK) {
784 #if (ERRCLASS & ERRCLS_ADD_RES)
785 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
786 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
787 (ErrVal)ELRG023, (ErrVal)0, "Packing failed");
793 pst->event = (Event) EVTLRGSSTACFM;
794 RETVALUE(SPstTsk(pst,mBuf));
799 * @brief This API is used to send a
800 Status Confirm from MAC to LM.
804 * Function: cmUnpkLrgStaCfm
806 * @param[in] Pst * pst
807 * @param[in] RgMngmt * cfm
812 PUBLIC S16 cmUnpkLrgStaCfm
819 PUBLIC S16 cmUnpkLrgStaCfm(func, pst, mBuf)
827 TRC3(cmUnpkLrgStaCfm)
829 cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
830 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSSTACFM, mBuf) != ROK) {
831 #if (ERRCLASS & ERRCLS_ADD_RES)
832 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
833 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
834 (ErrVal)ELRG024, (ErrVal)0, "Packing failed");
840 RETVALUE((*func)(pst, &cfm));
845 * @brief This API is used to send a
846 Status Indication from MAC to LM.
850 * Function: cmPkLrgStaInd
852 * @param[in] Pst * pst
853 * @param[in] RgMngmt * usta
858 PUBLIC S16 cmPkLrgStaInd
864 PUBLIC S16 cmPkLrgStaInd(pst, usta)
869 Buffer *mBuf = NULLP;
872 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
873 #if (ERRCLASS & ERRCLS_ADD_RES)
874 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
875 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
876 (ErrVal)ELRG025, (ErrVal)0, "Packing failed");
880 if (pst->selector == LRG_SEL_LC) {
881 if (cmPkRgMngmt(pst, usta, EVTLRGUSTAIND, mBuf) != ROK) {
882 #if (ERRCLASS & ERRCLS_ADD_RES)
883 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
884 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
885 (ErrVal)ELRG026, (ErrVal)0, "Packing failed");
892 pst->event = (Event) EVTLRGUSTAIND;
893 RETVALUE(SPstTsk(pst,mBuf));
898 * @brief This API is used to send a
899 Status Indication from MAC to LM.
903 * Function: cmUnpkLrgStaInd
905 * @param[in] Pst * pst
906 * @param[in] RgMngmt * usta
911 PUBLIC S16 cmUnpkLrgStaInd
918 PUBLIC S16 cmUnpkLrgStaInd(func, pst, mBuf)
926 TRC3(cmUnpkLrgStaInd)
928 if (cmUnpkRgMngmt(pst, &usta, EVTLRGUSTAIND, mBuf) != ROK) {
930 #if (ERRCLASS & ERRCLS_ADD_RES)
931 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
932 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
933 (ErrVal)ELRG027, (ErrVal)0, "Packing failed");
938 RETVALUE((*func)(pst, &usta));
943 * @brief This API is used to send a
944 Status Indication from SCH to LM.
948 * Function: cmPkLrgSchStaInd
950 * @param[in] Pst * pst
951 * @param[in] RgMngmt * sta
956 PUBLIC S16 cmPkLrgSchStaInd
962 PUBLIC S16 cmPkLrgSchStaInd(pst, sta)
967 Buffer *mBuf = NULLP;
968 TRC3(cmPkLrgSchStaInd)
970 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
971 #if (ERRCLASS & ERRCLS_ADD_RES)
972 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
973 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
974 (ErrVal)ELRG028, (ErrVal)0, "Packing failed");
978 if (pst->selector == LRG_SEL_LC) {
979 if (cmPkRgMngmt(pst, sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
980 #if (ERRCLASS & ERRCLS_ADD_RES)
981 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
982 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
983 (ErrVal)ELRG029, (ErrVal)0, "Packing failed");
990 pst->event = (Event) EVTLRGSCHSTAIND;
991 RETVALUE(SPstTsk(pst,mBuf));
996 * @brief This API is used to send a
997 Status Indication from SCH to LM.
1001 * Function: cmUnpkLrgSchStaInd
1003 * @param[in] Pst * pst
1004 * @param[in] RgMngmt * sta
1009 PUBLIC S16 cmUnpkLrgSchStaInd
1016 PUBLIC S16 cmUnpkLrgSchStaInd(func, pst, mBuf)
1024 TRC3(cmUnpkLrgSchStaInd)
1026 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
1028 #if (ERRCLASS & ERRCLS_ADD_RES)
1029 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1030 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1031 (ErrVal)ELRG030, (ErrVal)0, "Packing failed");
1036 RETVALUE((*func)(pst, &sta));
1041 * @brief This API is used to send a
1042 Control Request from LM to MAC.
1046 * Function: cmPkLrgCntrlReq
1048 * @param[in] Pst * pst
1049 * @param[in] RgMngmt * cntrl
1054 PUBLIC S16 cmPkLrgCntrlReq
1060 PUBLIC S16 cmPkLrgCntrlReq(pst, cntrl)
1065 Buffer *mBuf = NULLP;
1066 TRC3(cmPkLrgCntrlReq)
1068 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1069 #if (ERRCLASS & ERRCLS_ADD_RES)
1070 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1071 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1072 (ErrVal)ELRG031, (ErrVal)0, "Packing failed");
1076 if (pst->selector == LRG_SEL_LC) {
1077 if (cmPkRgMngmt(pst, cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
1078 #if (ERRCLASS & ERRCLS_ADD_RES)
1079 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1080 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1081 (ErrVal)ELRG032, (ErrVal)0, "Packing failed");
1088 pst->event = (Event) EVTLRGCNTRLREQ;
1089 RETVALUE(SPstTsk(pst,mBuf));
1094 * @brief This API is used to send a
1095 Control Request from LM to MAC.
1099 * Function: cmUnpkLrgCntrlReq
1101 * @param[in] Pst * pst
1102 * @param[in] RgMngmt * cntrl
1107 PUBLIC S16 cmUnpkLrgCntrlReq
1114 PUBLIC S16 cmUnpkLrgCntrlReq(func, pst, mBuf)
1122 TRC3(cmUnpkLrgCntrlReq)
1124 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
1126 #if (ERRCLASS & ERRCLS_ADD_RES)
1127 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1128 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1129 (ErrVal)ELRG033, (ErrVal)0, "Packing failed");
1134 RETVALUE((*func)(pst, &cntrl));
1139 * @brief This API is used to send a
1140 Control Request from LM to SCH.
1144 * Function: cmPkLrgSchCntrlReq
1146 * @param[in] Pst * pst
1147 * @param[in] RgMngmt * cntrl
1152 PUBLIC S16 cmPkLrgSchCntrlReq
1158 PUBLIC S16 cmPkLrgSchCntrlReq(pst, cntrl)
1163 Buffer *mBuf = NULLP;
1164 TRC3(cmPkLrgSchCntrlReq)
1166 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1167 #if (ERRCLASS & ERRCLS_ADD_RES)
1168 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1169 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1170 (ErrVal)ELRG034, (ErrVal)0, "Packing failed");
1174 if (pst->selector == LRG_SEL_LC) {
1175 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
1176 #if (ERRCLASS & ERRCLS_ADD_RES)
1177 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1178 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1179 (ErrVal)ELRG035, (ErrVal)0, "Packing failed");
1186 pst->event = (Event) EVTLRGSCHCNTRLREQ;
1187 RETVALUE(SPstTsk(pst,mBuf));
1192 * @brief This API is used to send a
1193 Control Request from LM to SCH.
1197 * Function: cmUnpkLrgSchCntrlReq
1199 * @param[in] Pst * pst
1200 * @param[in] RgMngmt * cntrl
1205 PUBLIC S16 cmUnpkLrgSchCntrlReq
1207 LrgSchCntrlReq func,
1212 PUBLIC S16 cmUnpkLrgSchCntrlReq(func, pst, mBuf)
1213 LrgSchCntrlReq func;
1220 TRC3(cmUnpkLrgSchCntrlReq)
1222 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
1224 #if (ERRCLASS & ERRCLS_ADD_RES)
1225 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1226 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1227 (ErrVal)ELRG036, (ErrVal)0, "Packing failed");
1232 RETVALUE((*func)(pst, &cntrl));
1237 * @brief This API is used to send a
1238 Control Confirm from MAC to LM.
1242 * Function: cmPkLrgCntrlCfm
1244 * @param[in] Pst * pst
1245 * @param[in] RgMngmt * cfm
1250 PUBLIC S16 cmPkLrgCntrlCfm
1256 PUBLIC S16 cmPkLrgCntrlCfm(pst, cfm)
1261 Buffer *mBuf = NULLP;
1262 TRC3(cmPkLrgCntrlCfm)
1264 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1265 #if (ERRCLASS & ERRCLS_ADD_RES)
1266 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1267 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1268 (ErrVal)ELRG037, (ErrVal)0, "Packing failed");
1272 if (pst->selector == LRG_SEL_LC) {
1273 if (cmPkRgMngmt(pst, cfm, EVTLRGCNTRLCFM, mBuf) != ROK) {
1274 #if (ERRCLASS & ERRCLS_ADD_RES)
1275 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1276 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1277 (ErrVal)ELRG038, (ErrVal)0, "Packing failed");
1284 pst->event = (Event) EVTLRGCNTRLCFM;
1285 RETVALUE(SPstTsk(pst,mBuf));
1290 * @brief This API is used to send a
1291 Control Confirm from MAC to LM.
1295 * Function: cmUnpkLrgCntrlCfm
1297 * @param[in] Pst * pst
1298 * @param[in] RgMngmt * cfm
1303 PUBLIC S16 cmUnpkLrgCntrlCfm
1310 PUBLIC S16 cmUnpkLrgCntrlCfm(func, pst, mBuf)
1318 TRC3(cmUnpkLrgCntrlCfm)
1320 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCNTRLCFM, mBuf) != ROK) {
1322 #if (ERRCLASS & ERRCLS_ADD_RES)
1323 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1324 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1325 (ErrVal)ELRG039, (ErrVal)0, "Packing failed");
1330 RETVALUE((*func)(pst, &cfm));
1335 * @brief This API is used to send a
1336 Control Confirm from SCH to LM.
1340 * Function: cmPkLrgSchCntrlCfm
1342 * @param[in] Pst * pst
1343 * @param[in] RgMngmt * cntrl
1348 PUBLIC S16 cmPkLrgSchCntrlCfm
1354 PUBLIC S16 cmPkLrgSchCntrlCfm(pst, cntrl)
1359 Buffer *mBuf = NULLP;
1360 TRC3(cmPkLrgSchCntrlCfm)
1362 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1363 #if (ERRCLASS & ERRCLS_ADD_RES)
1364 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1365 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1366 (ErrVal)ELRG040, (ErrVal)0, "Packing failed");
1370 if (pst->selector == LRG_SEL_LC) {
1371 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1372 #if (ERRCLASS & ERRCLS_ADD_RES)
1373 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1374 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1375 (ErrVal)ELRG041, (ErrVal)0, "Packing failed");
1382 pst->event = (Event) EVTLRGSCHCNTRLCFM;
1383 RETVALUE(SPstTsk(pst,mBuf));
1388 * @brief This API is used to send a
1389 Control Confirm from SCH to LM.
1393 * Function: cmUnpkLrgSchCntrlCfm
1395 * @param[in] Pst * pst
1396 * @param[in] RgMngmt * cntrl
1401 PUBLIC S16 cmUnpkLrgSchCntrlCfm
1403 LrgSchCntrlCfm func,
1408 PUBLIC S16 cmUnpkLrgSchCntrlCfm(func, pst, mBuf)
1409 LrgSchCntrlCfm func;
1416 TRC3(cmUnpkLrgSchCntrlCfm)
1418 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1420 #if (ERRCLASS & ERRCLS_ADD_RES)
1421 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1422 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1423 (ErrVal)ELRG042, (ErrVal)0, "Packing failed");
1428 RETVALUE((*func)(pst, &cntrl));
1433 * @brief This API is used to send a
1434 Trace Indication from MAC to LM.
1438 * Function: cmPkLrgTrcInd
1440 * @param[in] Pst * pst
1441 * @param[in] RgMngmt * trc
1442 * @param[in] Buffer * trcBuf
1447 PUBLIC S16 cmPkLrgTrcInd
1454 PUBLIC S16 cmPkLrgTrcInd(pst, trc, trcBuf)
1460 Buffer *mBuf = NULLP;
1463 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1464 #if (ERRCLASS & ERRCLS_ADD_RES)
1465 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1466 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1467 (ErrVal)ELRG043, (ErrVal)0, "Packing failed");
1472 if (pst->selector == LRG_SEL_LC) {
1474 if (SFndLenMsg(trcBuf, &msgLen) != ROK) {
1475 #if (ERRCLASS & ERRCLS_ADD_RES)
1476 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1477 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1478 (ErrVal)ELRG044, (ErrVal)0, "Packing failed");
1483 if (SCatMsg(mBuf, trcBuf, M1M2) != ROK) {
1484 #if (ERRCLASS & ERRCLS_ADD_RES)
1485 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1486 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1487 (ErrVal)ELRG045, (ErrVal)0, "Packing failed");
1493 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1495 if (cmPkRgMngmt(pst, trc, EVTLRGTRCIND, mBuf) != ROK) {
1496 #if (ERRCLASS & ERRCLS_ADD_RES)
1497 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1498 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1499 (ErrVal)ELRG046, (ErrVal)0, "Packing failed");
1506 pst->event = (Event) EVTLRGTRCIND;
1507 RETVALUE(SPstTsk(pst,mBuf));
1512 * @brief This API is used to send a
1513 Trace Indication from MAC to LM.
1517 * Function: cmUnpkLrgTrcInd
1519 * @param[in] Pst * pst
1520 * @param[in] RgMngmt * trc
1521 * @param[in] Buffer * trcBuf
1526 PUBLIC S16 cmUnpkLrgTrcInd
1533 PUBLIC S16 cmUnpkLrgTrcInd(func, pst, mBuf)
1540 /* lrg_c_001.main_3 - MODIFY - Modified trcBuf to have it initialized to NULLP */
1541 Buffer *trcBuf = NULLP;
1543 TRC3(cmUnpkLrgTrcInd)
1545 if (cmUnpkRgMngmt(pst, &trc, EVTLRGTRCIND, mBuf) != ROK) {
1547 #if (ERRCLASS & ERRCLS_ADD_RES)
1548 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1549 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1550 (ErrVal)ELRG047, (ErrVal)0, "Packing failed");
1554 if (pst->selector == LRG_SEL_LC) {
1555 MsgLen msgLen, totalMsgLen;
1556 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1557 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1559 if (SSegMsg(mBuf, totalMsgLen-msgLen, &trcBuf) != ROK)
1563 RETVALUE((*func)(pst, &trc, trcBuf));
1567 /***********************************************************
1569 * Func : cmPkRgGenCfg
1572 * Desc : This structure holds configuration parameters for MAC General Configuration.
1581 **********************************************************/
1583 PUBLIC S16 cmPkRgGenCfg
1589 PUBLIC S16 cmPkRgGenCfg(param, mBuf)
1598 CMCHKPK(SPkU8, param->isSCellActDeactAlgoEnable, mBuf);
1599 CMCHKPK(SPkU8, param->forceCntrlSrbBoOnPCel, mBuf);
1601 CMCHKPK(SPkU8, param->startCellId, mBuf);
1602 CMCHKPK(SPkU8, param->numRguSaps, mBuf);
1603 CMCHKPK(SPkU8, param->tmrRes, mBuf);
1604 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1605 CMCHKPK(cmPkPst, ¶m->lmPst, mBuf);
1611 /***********************************************************
1613 * Func : cmUnpkRgGenCfg
1616 * Desc : This structure holds configuration parameters for MAC General Configuration.
1625 **********************************************************/
1627 PUBLIC S16 cmUnpkRgGenCfg
1633 PUBLIC S16 cmUnpkRgGenCfg(param, mBuf)
1639 TRC3(cmUnpkRgGenCfg)
1641 CMCHKUNPK(cmUnpkPst, ¶m->lmPst, mBuf);
1642 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1643 CMCHKUNPK(SUnpkU8, ¶m->tmrRes, mBuf);
1644 CMCHKUNPK(SUnpkU8, ¶m->numRguSaps, mBuf);
1645 CMCHKUNPK(SUnpkU8, ¶m->startCellId, mBuf);
1647 CMCHKUNPK(SUnpkU8, ¶m->forceCntrlSrbBoOnPCel, mBuf);
1648 CMCHKUNPK(SUnpkU8, ¶m->isSCellActDeactAlgoEnable, mBuf);
1655 /***********************************************************
1657 * Func : cmPkRgUpSapCfg
1660 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1669 **********************************************************/
1671 PUBLIC S16 cmPkRgUpSapCfg
1677 PUBLIC S16 cmPkRgUpSapCfg(param, mBuf)
1683 TRC3(cmPkRgUpSapCfg)
1685 CMCHKPK(SPkS16, param->suId, mBuf);
1686 CMCHKPK(SPkS16, param->spId, mBuf);
1687 CMCHKPK(SPkU8, param->route, mBuf);
1688 CMCHKPK(SPkU8, param->inst, mBuf);
1689 CMCHKPK(SPkU8, param->ent, mBuf);
1690 CMCHKPK(SPkU16, param->procId, mBuf);
1691 CMCHKPK(SPkU8, param->prior, mBuf);
1692 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1693 CMCHKPK(SPkU8, param->selector, mBuf);
1699 /***********************************************************
1701 * Func : cmUnpkRgUpSapCfg
1704 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1713 **********************************************************/
1715 PUBLIC S16 cmUnpkRgUpSapCfg
1721 PUBLIC S16 cmUnpkRgUpSapCfg(param, mBuf)
1727 TRC3(cmUnpkRgUpSapCfg)
1729 CMCHKUNPK(SUnpkU8, ¶m->selector, mBuf);
1730 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1731 CMCHKUNPK(SUnpkU8, ¶m->prior, mBuf);
1732 CMCHKUNPK(SUnpkU16, ¶m->procId, mBuf);
1733 CMCHKUNPK(SUnpkU8, ¶m->ent, mBuf);
1734 CMCHKUNPK(SUnpkU8, ¶m->inst, mBuf);
1735 CMCHKUNPK(SUnpkU8, ¶m->route, mBuf);
1736 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1737 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1743 /***********************************************************
1745 * Func : cmPkRgLowSapCfg
1748 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1757 **********************************************************/
1759 PUBLIC S16 cmPkRgLowSapCfg
1765 PUBLIC S16 cmPkRgLowSapCfg(param, mBuf)
1771 TRC3(cmPkRgLowSapCfg)
1773 CMCHKPK(cmPkTmrCfg, ¶m->bndTmr, mBuf);
1774 CMCHKPK(SPkS16, param->suId, mBuf);
1775 CMCHKPK(SPkS16, param->spId, mBuf);
1776 CMCHKPK(SPkU8, param->route, mBuf);
1777 CMCHKPK(SPkU8, param->inst, mBuf);
1778 CMCHKPK(SPkU8, param->ent, mBuf);
1779 CMCHKPK(SPkU16, param->procId, mBuf);
1780 CMCHKPK(SPkU8, param->prior, mBuf);
1781 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1782 CMCHKPK(SPkU8, param->selector, mBuf);
1788 /***********************************************************
1790 * Func : cmUnpkRgLowSapCfg
1793 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1802 **********************************************************/
1804 PUBLIC S16 cmUnpkRgLowSapCfg
1810 PUBLIC S16 cmUnpkRgLowSapCfg(param, mBuf)
1816 TRC3(cmUnpkRgLowSapCfg)
1818 CMCHKUNPK(SUnpkU8, ¶m->selector, mBuf);
1819 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1820 CMCHKUNPK(SUnpkU8, ¶m->prior, mBuf);
1821 CMCHKUNPK(SUnpkU16, ¶m->procId, mBuf);
1822 CMCHKUNPK(SUnpkU8, ¶m->ent, mBuf);
1823 CMCHKUNPK(SUnpkU8, ¶m->inst, mBuf);
1824 CMCHKUNPK(SUnpkU8, ¶m->route, mBuf);
1825 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1826 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1827 CMCHKUNPK(cmUnpkTmrCfg, ¶m->bndTmr, mBuf);
1831 #ifdef MAC_SCH_STATS
1834 /***********************************************************
1836 * Func : cmPkRgAckNack
1839 * Desc : Ack and Nack statistics
1848 **********************************************************/
1850 PUBLIC S16 cmPkRgAckNack
1856 PUBLIC S16 cmPkRgAckNack (param, mBuf)
1864 CMCHKPK(SPkU16, param->numOfAcks, mBuf);
1865 CMCHKPK(SPkU16, param->numOfNacks, mBuf);
1866 CMCHKPK(SPkU8, param->mcs, mBuf);
1869 } /* cmPkRgAckNack */
1872 /***********************************************************
1874 * Func : cmPkRgSchNackAckStats
1886 **********************************************************/
1888 PUBLIC S16 cmPkRgSchNackAckStats
1890 RgSchNackAckStats *param,
1894 PUBLIC S16 cmPkRgSchNackAckStats (param, mBuf)
1895 RgSchNackAckStats *param;
1901 TRC3(cmPkRgSchNackAckStats)
1903 for (i=14; i >= 0; i--) {
1904 CMCHKPK(cmPkRgAckNack, ¶m->ulCqiStat[i], mBuf);
1907 for (i=14; i >= 0; i--) {
1908 CMCHKPK(cmPkRgAckNack, ¶m->dlCqiStat[i], mBuf);
1915 /***********************************************************
1917 * Func : cmPkRgHqNumRetx
1920 * Desc : Harq Retransmission statistics
1929 **********************************************************/
1931 PUBLIC S16 cmPkRgHqNumRetx
1933 RgSchHqNumRetx *param,
1937 PUBLIC S16 cmPkRgHqNumRetx (param, mBuf)
1938 RgSchHqNumRetx *param;
1942 TRC3(cmPkRgHqNumRetx)
1944 CMCHKPK(SPkU32, param->totalTx, mBuf);
1945 CMCHKPK(SPkU16, param->numOfHQ_4, mBuf);
1946 CMCHKPK(SPkU16, param->numOfHQ_3, mBuf);
1947 CMCHKPK(SPkU16, param->numOfHQ_2, mBuf);
1948 CMCHKPK(SPkU16, param->numOfHQ_1, mBuf);
1949 CMCHKPK(SPkU8, param->mcs, mBuf);
1952 } /* cmPkRgHqNumRetx */
1955 /***********************************************************
1957 * Func : cmPkRgSchHqRetxStats
1969 **********************************************************/
1971 PUBLIC S16 cmPkRgSchHqRetxStats
1973 RgSchHqRetxStats *param,
1977 PUBLIC S16 cmPkRgSchHqRetxStats (param, mBuf)
1978 RgSchHqRetxStats *param;
1984 TRC3(cmPkRgSchHqRetxStats)
1986 for (i=14; i >= 0; i--) {
1987 CMCHKPK(cmPkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
1990 for (i=14; i >= 0; i--) {
1991 CMCHKPK(cmPkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
1995 } /* cmPkRgSchHqRetxStats */
1997 /* unpcaking functions */
1999 /***********************************************************
2001 * Func : cmUnpkRgAckNack
2004 * Desc : Ack and Nack statistics
2013 **********************************************************/
2015 PUBLIC S16 cmUnpkRgAckNack
2021 PUBLIC S16 cmUnpkRgAckNack (param, mBuf)
2027 TRC3(cmUnpkRgAckNack)
2029 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
2030 CMCHKUNPK(SUnpkU16, ¶m->numOfNacks, mBuf);
2031 CMCHKUNPK(SUnpkU16, ¶m->numOfAcks, mBuf);
2034 } /* cmUnkRgAckNack */
2037 /***********************************************************
2039 * Func : cmUnpkRgSchNackAckStats
2051 **********************************************************/
2053 PUBLIC S16 cmUnpkRgSchNackAckStats
2055 RgSchNackAckStats *param,
2059 PUBLIC S16 cmUnpkRgSchNackAckStats (param, mBuf)
2060 RgSchNackAckStats *param;
2065 TRC3(cmUnpkRgSchNackAckStats)
2067 for (i=0; i <= 14; i++) {
2068 CMCHKUNPK(cmUnpkRgAckNack, ¶m->dlCqiStat[i], mBuf);
2071 for (i=0; i <= 14; i++) {
2072 CMCHKUNPK(cmUnpkRgAckNack, ¶m->ulCqiStat[i], mBuf);
2076 } /* cmUnpkRgSchNackAckStats */
2079 /***********************************************************
2081 * Func : cmUnpkRgHqNumRetx
2084 * Desc : Harq Retransmission statistics
2093 **********************************************************/
2095 PUBLIC S16 cmUnpkRgHqNumRetx
2097 RgSchHqNumRetx *param,
2101 PUBLIC S16 cmUnpkRgHqNumRetx (param, mBuf)
2102 RgSchHqNumRetx *param;
2106 TRC3(cmUnpkRgHqNumRetx)
2108 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
2109 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_1, mBuf);
2110 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_2, mBuf);
2111 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_3, mBuf);
2112 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_4, mBuf);
2113 CMCHKUNPK(SUnpkU32, ¶m->totalTx, mBuf);
2116 } /* cmUnpkRgHqNumRetx */
2119 /***********************************************************
2121 * Func : cmUnpkRgSchHqRetxStats
2133 **********************************************************/
2135 PUBLIC S16 cmUnpkRgSchHqRetxStats
2137 RgSchHqRetxStats *param,
2141 PUBLIC S16 cmUnpkRgSchHqRetxStats (param, mBuf)
2142 RgSchHqRetxStats *param;
2147 TRC3(cmUnpkRgSchHqRetxStats)
2149 for (i=0; i <= 14; i++) {
2150 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
2153 for (i=0; i <= 14; i++) {
2154 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
2158 } /* cmUnpkRgSchHqRetxStats */
2160 #endif /* MAC_SCH_STATS */
2163 /***********************************************************
2165 * Func : cmPkRgGenSts
2168 * Desc : This structure holds General Statistical information of MAC.
2177 **********************************************************/
2179 PUBLIC S16 cmPkRgGenSts
2185 PUBLIC S16 cmPkRgGenSts(param, mBuf)
2193 #ifdef MAC_SCH_STATS
2194 CMCHKPK(cmPkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
2195 CMCHKPK(cmPkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
2196 #endif /* MAC_SCH_STATS */
2197 CMCHKPK(SPkU16, param->numCellCfg, mBuf);
2198 CMCHKPK(SPkU32, param->numUeCfg, mBuf);
2199 CMCHKPK(SPkU32, param->numHarqFail, mBuf);
2205 /***********************************************************
2207 * Func : cmUnpkRgGenSts
2210 * Desc : This structure holds General Statistical information of MAC.
2219 **********************************************************/
2221 PUBLIC S16 cmUnpkRgGenSts
2227 PUBLIC S16 cmUnpkRgGenSts(param, mBuf)
2233 TRC3(cmUnpkRgGenSts)
2235 CMCHKUNPK(SUnpkU32, ¶m->numHarqFail, mBuf);
2236 CMCHKUNPK(SUnpkU32, ¶m->numUeCfg, mBuf);
2237 CMCHKUNPK(SUnpkU16, ¶m->numCellCfg, mBuf);
2238 #ifdef MAC_SCH_STATS
2239 CMCHKUNPK(cmUnpkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
2240 CMCHKUNPK(cmUnpkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
2241 #endif /* MAC_SCH_STATS */
2247 /***********************************************************
2249 * Func : cmPkRgSapSts
2252 * Desc : This structure holds Statistical information of a SAP in MAC.
2261 **********************************************************/
2263 PUBLIC S16 cmPkRgSapSts
2269 PUBLIC S16 cmPkRgSapSts(param, mBuf)
2277 CMCHKPK(SPkU32, param->numPduDrop, mBuf);
2278 CMCHKPK(SPkU32, param->numPduTxmit, mBuf);
2279 CMCHKPK(SPkU32, param->numPduRcvd, mBuf);
2285 /***********************************************************
2287 * Func : cmUnpkRgSapSts
2290 * Desc : This structure holds Statistical information of a SAP in MAC.
2299 **********************************************************/
2301 PUBLIC S16 cmUnpkRgSapSts
2307 PUBLIC S16 cmUnpkRgSapSts(param, mBuf)
2313 TRC3(cmUnpkRgSapSts)
2315 CMCHKUNPK(SUnpkU32, ¶m->numPduRcvd, mBuf);
2316 CMCHKUNPK(SUnpkU32, ¶m->numPduTxmit, mBuf);
2317 CMCHKUNPK(SUnpkU32, ¶m->numPduDrop, mBuf);
2323 /***********************************************************
2325 * Func : cmPkRgSchInstCfg
2328 * Desc : Scheduler Configuration
2337 **********************************************************/
2339 PUBLIC S16 cmPkRgSchInstCfg
2341 RgSchInstCfg *param,
2345 PUBLIC S16 cmPkRgSchInstCfg(param, mBuf)
2346 RgSchInstCfg *param;
2352 TRC3(cmPkRgSchInstCfg)
2354 for (i=param->numSaps-1; i >= 0; i--) {
2355 CMCHKPK(cmPkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
2357 for (i=param->numSaps-1; i >= 0; i--) {
2358 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
2360 for (i=param->numSaps-1; i >= 0; i--) {
2361 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
2363 CMCHKPK(SPkU8, param->numSaps, mBuf);
2364 CMCHKPK(cmPkRgGenCfg, ¶m->genCfg, mBuf);
2365 CMCHKPK(SPkU8, param->instId, mBuf);
2371 /***********************************************************
2373 * Func : cmUnpkRgSchInstCfg
2376 * Desc : Scheduler Configuration
2385 **********************************************************/
2387 PUBLIC S16 cmUnpkRgSchInstCfg
2389 RgSchInstCfg *param,
2393 PUBLIC S16 cmUnpkRgSchInstCfg(param, mBuf)
2394 RgSchInstCfg *param;
2400 TRC3(cmUnpkRgSchInstCfg)
2402 CMCHKUNPK(SUnpkU8, ¶m->instId, mBuf);
2403 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->genCfg, mBuf);
2404 CMCHKUNPK(SUnpkU8, ¶m->numSaps, mBuf);
2405 for (i=0; i<param->numSaps; i++) {
2406 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
2408 for (i=0; i<param->numSaps; i++) {
2409 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
2411 for (i=0; i<param->numSaps; i++) {
2412 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
2419 /***********************************************************
2424 * Desc : This structure holds Configuration parameters for MAC.
2433 **********************************************************/
2435 PUBLIC S16 cmPkRgCfg
2442 PUBLIC S16 cmPkRgCfg(param, elmnt, mBuf)
2453 CMCHKPK(cmPkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2456 CMCHKPK(cmPkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2459 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2462 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2465 CMCHKPK(cmPkRgGenCfg, ¶m->s.genCfg, mBuf);
2475 /***********************************************************
2477 * Func : cmUnpkRgCfg
2480 * Desc : This structure holds Configuration parameters for MAC.
2489 **********************************************************/
2491 PUBLIC S16 cmUnpkRgCfg
2498 PUBLIC S16 cmUnpkRgCfg(param, elmnt, mBuf)
2509 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->s.genCfg, mBuf);
2512 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2515 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2518 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2521 CMCHKUNPK(cmUnpkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2531 /***********************************************************
2533 * Func : cmPkRgSapSta
2536 * Desc : This structure holds a SAP's status information.
2545 **********************************************************/
2547 PUBLIC S16 cmPkRgSapSta
2553 PUBLIC S16 cmPkRgSapSta(param, mBuf)
2561 CMCHKPK(SPkU8, param->sapState, mBuf);
2567 /***********************************************************
2569 * Func : cmUnpkRgSapSta
2572 * Desc : This structure holds a SAP's status information.
2581 **********************************************************/
2583 PUBLIC S16 cmUnpkRgSapSta
2589 PUBLIC S16 cmUnpkRgSapSta(param, mBuf)
2595 TRC3(cmUnpkRgSapSta)
2597 CMCHKUNPK(SUnpkU8, ¶m->sapState, mBuf);
2603 /***********************************************************
2608 * Desc : This structure holds MAC's Statistical information.
2617 **********************************************************/
2619 PUBLIC S16 cmPkRgSts
2626 PUBLIC S16 cmPkRgSts(param, elmnt, mBuf)
2637 CMCHKPK(cmPkRgSapSts, ¶m->s.tfuSts, mBuf);
2640 CMCHKPK(cmPkRgSapSts, ¶m->s.rgrSts, mBuf);
2643 CMCHKPK(cmPkRgSapSts, ¶m->s.crgSts, mBuf);
2646 CMCHKPK(cmPkRgSapSts, ¶m->s.rguSts, mBuf);
2649 CMCHKPK(cmPkRgGenSts, ¶m->s.genSts, mBuf);
2654 CMCHKPK(cmPkAction, param->action, mBuf);
2655 CMCHKPK(SPkU8, param->sapInst, mBuf);
2656 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2662 /***********************************************************
2664 * Func : cmUnpkRgSts
2667 * Desc : This structure holds MAC's Statistical information.
2676 **********************************************************/
2678 PUBLIC S16 cmUnpkRgSts
2685 PUBLIC S16 cmUnpkRgSts(param, elmnt, mBuf)
2694 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2695 CMCHKUNPK(SUnpkU8, ¶m->sapInst, mBuf);
2696 CMCHKUNPK(cmUnpkAction, ¶m->action, mBuf);
2699 CMCHKUNPK(cmUnpkRgGenSts, ¶m->s.genSts, mBuf);
2702 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rguSts, mBuf);
2705 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.crgSts, mBuf);
2708 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rgrSts, mBuf);
2711 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.tfuSts, mBuf);
2721 /***********************************************************
2726 * Desc : This structure holds MAC's Solicited Status information.
2735 **********************************************************/
2737 PUBLIC S16 cmPkRgSsta
2748 PUBLIC S16 cmPkRgSsta(pst, param, elmnt, eventType, mBuf)
2752 /* lrg_c_001.main_3 - ADD - Added the extra parameter eventType to the function */
2764 CMCHKPK(cmPkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2767 CMCHKPK(cmPkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2770 CMCHKPK(cmPkRgSapSta, ¶m->s.crgSapSta, mBuf);
2773 CMCHKPK(cmPkRgSapSta, ¶m->s.rguSapSta, mBuf);
2775 /*ccpu00118255 - ADD - Check for eventType before Pack */
2778 if (eventType == EVTLRGSSTACFM)
2780 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2781 if (param->s.sysId.ptNmb != NULLP)
2783 SPutSBuf(pst->region, pst->pool,
2784 (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2787 #else /*LRG_V1 not defined */
2788 if (param->s.sysId.ptNmb != NULLP)
2790 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2791 SPutSBuf(pst->region, pst->pool, (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2794 #endif /*end of LRG_V1 */
2799 CMCHKPK(SPkU8, param->sapInst, mBuf);
2800 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2806 /***********************************************************
2808 * Func : cmUnpkRgSsta
2811 * Desc : This structure holds MAC's Solicited Status information.
2820 **********************************************************/
2822 PUBLIC S16 cmUnpkRgSsta
2830 PUBLIC S16 cmUnpkRgSsta(pst, param, elmnt, mBuf)
2840 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2841 CMCHKUNPK(SUnpkU8, ¶m->sapInst, mBuf);
2844 /*ccpu00118255 - ADD - Check for eventType before Unpack */
2845 if (pst->event == EVTLRGSSTACFM)
2848 if((SGetSBuf(pst->region, pst->pool, (Data **)¶m->s.sysId.ptNmb,
2849 LRG_MAX_PT_NUM_SIZE)) != ROK){
2850 #if (ERRCLASS & ERRCLS_ADD_RES)
2851 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2852 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2853 (ErrVal)ELRG048, (ErrVal)0, "Packing failed");
2858 /* KWORK_FIX: Moved the memset under the NULL check */
2859 if (param->s.sysId.ptNmb != NULLP)
2861 cmMemset((U8 *)param->s.sysId.ptNmb, 0, LRG_MAX_PT_NUM_SIZE);
2862 CMCHKUNPK(cmUnpkSystemId, ¶m->s.sysId, mBuf);
2867 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rguSapSta, mBuf);
2870 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.crgSapSta, mBuf);
2873 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2876 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2886 /***********************************************************
2888 * Func : cmPkRgUstaDgn
2891 * Desc : Alarm diagnostics structure.
2900 **********************************************************/
2902 PUBLIC S16 cmPkRgUstaDgn
2908 PUBLIC S16 cmPkRgUstaDgn(param, mBuf)
2916 switch(param->type) {
2917 case LRG_USTA_DGNVAL_MEM:
2918 CMCHKPK(cmPkMemoryId, ¶m->u.mem, mBuf);
2923 CMCHKPK(SPkU8, param->type, mBuf);
2929 /***********************************************************
2931 * Func : cmUnpkRgUstaDgn
2934 * Desc : Alarm diagnostics structure.
2943 **********************************************************/
2945 PUBLIC S16 cmUnpkRgUstaDgn
2951 PUBLIC S16 cmUnpkRgUstaDgn(param, mBuf)
2957 TRC3(cmUnpkRgUstaDgn)
2959 CMCHKUNPK(SUnpkU8, ¶m->type, mBuf);
2960 switch(param->type) {
2961 case LRG_USTA_DGNVAL_MEM:
2962 CMCHKUNPK(cmUnpkMemoryId, ¶m->u.mem, mBuf);
2972 /***********************************************************
2977 * Desc : This structure holds MAC's Unsolicited Status information.
2986 **********************************************************/
2988 PUBLIC S16 cmPkRgUsta
2994 PUBLIC S16 cmPkRgUsta(param, mBuf)
3002 CMCHKPK(cmPkRgUstaDgn, ¶m->dgn, mBuf);
3003 CMCHKPK(cmPkCmAlarm, ¶m->cmAlarm, mBuf);
3009 /***********************************************************
3011 * Func : cmUnpkRgUsta
3014 * Desc : This structure holds MAC's Unsolicited Status information.
3023 **********************************************************/
3025 PUBLIC S16 cmUnpkRgUsta
3031 PUBLIC S16 cmUnpkRgUsta(param, mBuf)
3039 CMCHKUNPK(cmUnpkCmAlarm, ¶m->cmAlarm, mBuf);
3040 CMCHKUNPK(cmUnpkRgUstaDgn, ¶m->dgn, mBuf);
3046 /***********************************************************
3051 * Desc : This structure holds MAC's Trace Indication information.
3060 **********************************************************/
3062 PUBLIC S16 cmPkRgTrc
3068 PUBLIC S16 cmPkRgTrc(param, mBuf)
3076 CMCHKPK(SPkU8, param->evnt, mBuf);
3077 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
3083 /***********************************************************
3085 * Func : cmUnpkRgTrc
3088 * Desc : This structure holds MAC's Trace Indication information.
3097 **********************************************************/
3099 PUBLIC S16 cmUnpkRgTrc
3105 PUBLIC S16 cmUnpkRgTrc(param, mBuf)
3113 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
3114 CMCHKUNPK(SUnpkU8, ¶m->evnt, mBuf);
3120 /***********************************************************
3122 * Func : cmPkRgDbgCntrl
3125 * Desc : This structure holds MAC's Debug Control information.
3134 **********************************************************/
3136 PUBLIC S16 cmPkRgDbgCntrl
3142 PUBLIC S16 cmPkRgDbgCntrl(param, mBuf)
3148 TRC3(cmPkRgDbgCntrl)
3150 CMCHKPK(SPkU32, param->dbgMask, mBuf);
3154 #ifdef PHY_ERROR_LOGING
3155 /***********************************************************
3157 * Func : cmPkRgSchUlAllocCntrl
3160 * Desc : This structure holds MAC's Debug Control information.
3169 **********************************************************/
3171 PUBLIC S16 cmPkRgSchUlAllocCntrl
3173 RgSchUlAllocCntrl *param,
3177 PUBLIC S16 cmPkRgSchUlAllocCntrl(param, mBuf)
3178 RgSchUlAllocCntrl *param;
3182 TRC3(cmPkRgSchUlAllocCntrl)
3184 CMCHKPK(SPkU8, param->mcs, mBuf);
3185 CMCHKPK(SPkU16, param->numOfRb, mBuf);
3186 CMCHKPK(SPkU16, param->rbStart, mBuf);
3187 CMCHKPK(SPkU8, param->testStart, mBuf);
3188 CMCHKPK(SPkU8, param->enaLog, mBuf);
3189 CMCHKPK(SPkU16, param->logTime, mBuf);
3194 /***********************************************************
3196 * Func : cmUnpkRgSchUlAllocCntrl
3199 * Desc : This structure holds MAC's Scheduler Configuration for Ul Allocation.
3208 **********************************************************/
3210 PUBLIC S16 cmUnpkRgSchUlAllocCntrl
3212 RgSchUlAllocCntrl *param,
3216 PUBLIC S16 cmUnpkRgSchUlAllocCntrl(param, mBuf)
3217 RgSchUlAllocCntrl *param;
3221 TRC3(cmUnpkRgSchUlAllocCntrl)
3223 CMCHKUNPK(SUnpkU16, ¶m->logTime, mBuf);
3224 CMCHKUNPK(SUnpkU8, ¶m->enaLog, mBuf);
3225 CMCHKUNPK(SUnpkU8, ¶m->testStart, mBuf);
3226 CMCHKUNPK(SUnpkU16, ¶m->rbStart, mBuf);
3227 CMCHKUNPK(SUnpkU16, ¶m->numOfRb, mBuf);
3228 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
3236 /***********************************************************
3238 * Func : cmUnpkRgDbgCntrl
3241 * Desc : This structure holds MAC's Debug Control information.
3250 **********************************************************/
3252 PUBLIC S16 cmUnpkRgDbgCntrl
3258 PUBLIC S16 cmUnpkRgDbgCntrl(param, mBuf)
3264 TRC3(cmUnpkRgDbgCntrl)
3266 CMCHKUNPK(SUnpkU32, ¶m->dbgMask, mBuf);
3272 /***********************************************************
3274 * Func : cmPkRgSapCntrl
3277 * Desc : This structure holds MAC's SAP Control information.
3286 **********************************************************/
3288 PUBLIC S16 cmPkRgSapCntrl
3294 PUBLIC S16 cmPkRgSapCntrl(param, mBuf)
3300 TRC3(cmPkRgSapCntrl)
3302 CMCHKPK(SPkS16, param->spId, mBuf);
3303 CMCHKPK(SPkS16, param->suId, mBuf);
3309 /***********************************************************
3311 * Func : cmUnpkRgSapCntrl
3314 * Desc : This structure holds MAC's SAP Control information.
3323 **********************************************************/
3325 PUBLIC S16 cmUnpkRgSapCntrl
3331 PUBLIC S16 cmUnpkRgSapCntrl(param, mBuf)
3337 TRC3(cmUnpkRgSapCntrl)
3339 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
3340 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
3346 /***********************************************************
3348 * Func : cmPkRgCntrl
3351 * Desc : This structure holds MAC's Control information.
3360 **********************************************************/
3362 PUBLIC S16 cmPkRgCntrl
3369 PUBLIC S16 cmPkRgCntrl(param, elmnt, mBuf)
3383 switch(param->subAction) {
3385 CMCHKPK(cmPkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
3390 switch(param->subAction) {
3392 CMCHKPK(SPkS16, param->s.trcLen, mBuf);
3395 CMCHKPK(cmPkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
3401 CMCHKPK(SPkU32, param->s.logMask, mBuf);
3404 #ifdef PHY_ERROR_LOGING
3406 CMCHKPK(cmPkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
3416 CMCHKPK(SPkU8, param->subAction, mBuf);
3417 CMCHKPK(SPkU8, param->action, mBuf);
3418 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
3424 /***********************************************************
3426 * Func : cmUnpkRgCntrl
3429 * Desc : This structure holds MAC's Control information.
3438 **********************************************************/
3440 PUBLIC S16 cmUnpkRgCntrl
3447 PUBLIC S16 cmUnpkRgCntrl(param, elmnt, mBuf)
3456 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
3457 CMCHKUNPK(SUnpkU8, ¶m->action, mBuf);
3458 CMCHKUNPK(SUnpkU8, ¶m->subAction, mBuf);
3461 switch(param->subAction) {
3463 CMCHKUNPK(cmUnpkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
3466 CMCHKUNPK(SUnpkS16, ¶m->s.trcLen, mBuf);
3472 CMCHKUNPK(SUnpkU32, ¶m->s.logMask, mBuf);
3475 #ifdef PHY_ERROR_LOGING
3477 CMCHKUNPK(cmUnpkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
3488 switch(param->subAction) {
3490 CMCHKUNPK(cmUnpkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
3502 /***********************************************************
3504 * Func : cmPkRgMngmt
3507 * Desc : This structure holds MAC's Configuration and Control Management Information.
3516 **********************************************************/
3518 PUBLIC S16 cmPkRgMngmt
3526 PUBLIC S16 cmPkRgMngmt(pst, param, eventType, mBuf)
3537 case EVTLRGCNTRLREQ:
3538 case EVTLRGCNTRLCFM:
3539 case EVTLRGSCHCNTRLREQ:
3540 case EVTLRGSCHCNTRLCFM:
3541 if(cmPkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
3545 CMCHKPK(cmPkRgTrc, ¶m->t.trc, mBuf);
3548 case EVTLRGSCHSTAIND:
3549 CMCHKPK(cmPkRgUsta, ¶m->t.usta, mBuf);
3553 /*ccpu00118255 - ADD - eventType param */
3555 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt,
3556 eventType, mBuf) != ROK)
3558 #else /* LRG_V1 is not defined */
3559 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
3561 #endif /* end of LRG_V1*/
3565 if(cmPkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf)!= ROK)
3570 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3573 case EVTMACSCHGENCFGREQ:
3574 case EVTMACSCHGENCFGCFM:
3575 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3581 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
3582 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
3588 /***********************************************************
3590 * Func : cmUnpkRgMngmt
3593 * Desc : This structure holds MAC's Configuration and Control Management Information.
3602 **********************************************************/
3604 PUBLIC S16 cmUnpkRgMngmt
3612 PUBLIC S16 cmUnpkRgMngmt(pst, param, eventType, mBuf)
3622 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
3623 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
3627 case EVTMACSCHGENCFGREQ:
3628 case EVTMACSCHGENCFGCFM:
3629 if(cmUnpkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3634 if(cmUnpkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf) != ROK)
3639 if(cmUnpkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
3643 case EVTLRGSCHSTAIND:
3644 CMCHKUNPK(cmUnpkRgUsta, ¶m->t.usta, mBuf);
3647 CMCHKUNPK(cmUnpkRgTrc, ¶m->t.trc, mBuf);
3649 case EVTLRGCNTRLREQ:
3650 case EVTLRGCNTRLCFM:
3651 case EVTLRGSCHCNTRLREQ:
3652 case EVTLRGSCHCNTRLCFM:
3653 if(cmUnpkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
3662 /* lrg_c_001.main_3 - ADD - Added the functions pertaining to LTE_L2_MEAS */
3666 * @brief This API is used to pack
3667 LrgNmbActvUeQCI elements
3671 * Function: cmPkNmbActvUeQciReq
3673 * @param[in] LrgNmbActvUeQCI
3674 * @param[in] Buffer *mBuf
3679 PRIVATE S16 cmPkNmbActvUeQciReq
3681 LrgNmbActvUeQCI *nmbActvUeQci,
3685 PRIVATE S16 cmPkNmbActvUeQciReq(nmbActvUeQci, mBuf)
3686 LrgNmbActvUeQCI *nmbActvUeQci;
3692 TRC3(cmPkNmbActvUeQciReq)
3694 for(idx = 0; idx < nmbActvUeQci->numQci; idx++)
3696 CMCHKPK(SPkU8, nmbActvUeQci->qci[idx], mBuf);
3698 CMCHKPK(SPkU8, nmbActvUeQci->numQci, mBuf);
3699 CMCHKPK(SPkU8, nmbActvUeQci->sampPrd, mBuf);
3704 * @brief This API is used to pack
3705 LrgAvgPrbQci elements
3709 * Function: cmPkAvgPrbQciReq
3711 * @param[in] LrgNmbActvUeQciReq *avgPrbQciReq
3712 * @param[in] Buffer *mBuf
3717 PRIVATE S16 cmPkAvgPrbQciReq
3719 LrgAvgPrbQCI *avgPrbQciReq,
3723 PRIVATE S16 cmPkAvgPrbQciReq(avgPrbQciReq, mBuf)
3724 LrgAvgPrbQCI *avgPrbQciReq;
3730 TRC3(cmPkAvgPrbQciReq)
3732 for(idx = 0; idx < avgPrbQciReq->numQci; idx++)
3734 CMCHKPK(SPkU8, avgPrbQciReq->qci[idx], mBuf);
3736 CMCHKPK(SPkU8, avgPrbQciReq->numQci, mBuf);
3742 * @brief This API is used to send a
3743 L2 Measurement Request from LM to MAC.
3747 * Function: cmPkLrgSchL2MeasReq
3749 * @param[in] Pst * pst
3750 * @param[in] LrgSchMeasReqInfo * measInfo
3755 PUBLIC S16 cmPkLrgSchL2MeasReq
3758 LrgSchMeasReqInfo *measInfo
3761 PUBLIC S16 cmPkLrgSchL2MeasReq(pst, measInfo)
3763 LrgSchMeasReqInfo *measInfo;
3766 Buffer *mBuf = NULLP;
3767 TRC3(cmPkLrgSchL2MeasReq)
3769 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3770 #if (ERRCLASS & ERRCLS_ADD_RES)
3771 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3772 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3773 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3777 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3779 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciDl, mBuf);
3781 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3783 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciUl, mBuf);
3785 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3787 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciDl, mBuf);
3789 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3791 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciUl, mBuf);
3794 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3795 CMCHKPK(SPkU32, measInfo->timePrd, mBuf);
3796 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3797 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3798 pst->event = (Event) EVTLRGSCHL2MEASREQ;
3799 RETVALUE(SPstTsk(pst,mBuf));
3802 * @brief This API is used to stop a
3803 L2 Measurement Request from LM to MAC.
3807 * Function: cmPkLrgSchL2MeasStopReq
3809 * @param[in] Pst * pst
3810 * @param[in] LrgSchMeasReqInfo * measInfo
3815 PUBLIC S16 cmPkLrgSchL2MeasStopReq
3818 LrgSchMeasStopReqInfo *measInfo
3821 PUBLIC S16 cmPkLrgSchL2MeasStopReq(pst, measInfo)
3823 LrgSchMeasStopReqInfo *measInfo;
3826 Buffer *mBuf = NULLP;
3827 TRC3(cmPkLrgSchL2MeasStopReq)
3829 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3830 #if (ERRCLASS & ERRCLS_ADD_RES)
3831 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3832 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3833 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3837 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3838 /*CMCHKPK(SPkU16, measInfo->timePrd, mBuf);*/
3839 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3840 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3841 pst->event = (Event) EVTLRGSCHL2MEASSTOPREQ;
3842 RETVALUE(SPstTsk(pst,mBuf));
3843 }/*cmPkLrgSchL2MeasStopReq*/
3846 * @brief This API is used to send a
3847 L2 Measurement Request from LM to MAC.
3851 * Function: cmPkLrgSchL2MeasSendReq
3853 * @param[in] Pst * pst
3854 * @param[in] LrgSchMeasReqInfo * measInfo
3859 PUBLIC S16 cmPkLrgSchL2MeasSendReq
3862 LrgSchMeasSndReqInfo *measInfo
3865 PUBLIC S16 cmPkLrgSchL2MeasSendReq(pst, measInfo)
3867 LrgSchMeasSndReqInfo *measInfo;
3870 Buffer *mBuf = NULLP;
3871 TRC3(cmPkLrgSchL2MeasSendReq)
3872 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3873 #if (ERRCLASS & ERRCLS_ADD_RES)
3874 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3875 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3876 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3880 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3881 CMCHKPK(SPkU32, measInfo->timePrd, mBuf);
3882 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3883 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3884 pst->event = (Event) EVTLRGSCHL2MEASSENDREQ;
3885 RETVALUE(SPstTsk(pst,mBuf));
3886 }/*cmPkLrgSchL2MeasSendReq*/
3889 * @brief This API is used to unpack AvgPrbQciReq
3893 * Function: cmUnpkNmbActvUeQciReq
3895 * @param[in] LrgNmbActvUeQCI *param
3896 * @param[in] Buffer * mBuf
3901 PRIVATE S16 cmUnpkNmbActvUeQciReq
3903 LrgNmbActvUeQCI *param,
3907 PRIVATE S16 cmUnpkNmbActvUeQciReq(param, mBuf)
3908 LrgNmbActvUeQCI *param;
3914 TRC3(cmUnpkNmbActvUeQciReq)
3916 CMCHKUNPK(SUnpkU8, ¶m->sampPrd, mBuf);
3917 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
3918 for(idx = param->numQci; idx > 0; idx--)
3920 CMCHKUNPK(SUnpkU8, ¶m->qci[idx - 1], mBuf);
3927 * @brief This API is used to unpack AvgPrbQciReq
3931 * Function: cmUnpkAvgPrbQciReq
3933 * @param[in] LrgAvgPrbQCI *param
3934 * @param[in] Buffer * mBuf
3939 PRIVATE S16 cmUnpkAvgPrbQciReq
3941 LrgAvgPrbQCI *param,
3945 PRIVATE S16 cmUnpkAvgPrbQciReq (param, mBuf)
3946 LrgAvgPrbQCI *param;
3952 TRC3(cmUnpkAvgPrbQciReq)
3954 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
3955 for(idx = param->numQci; idx > 0; idx--)
3957 CMCHKUNPK(SUnpkU8, ¶m->qci[idx - 1], mBuf);
3964 * @brief This API is used to send a
3965 Measurement Request from LM to SCH.
3969 * Function: cmUnpkLrgSchL2MeasReq
3971 * @param[in] LrgSchMeasReq func
3972 * @param[in] Pst * pst
3973 * @param[in] Buffer * mBuf
3978 PUBLIC S16 cmUnpkLrgSchL2MeasReq
3980 LrgSchL2MeasReq func,
3985 PUBLIC S16 cmUnpkLrgSchL2MeasReq(func, pst, mBuf)
3986 LrgSchL2MeasReq func;
3991 LrgSchMeasReqInfo measInfo;
3993 TRC3(cmUnpkLrgSchL2MeasReq)
3995 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3996 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
3997 CMCHKUNPK(SUnpkU32, &measInfo.timePrd, mBuf);
3998 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
3999 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4001 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciUl, mBuf);
4003 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4005 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciDl, mBuf);
4007 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4009 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciUl, mBuf);
4011 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4013 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciDl, mBuf);
4016 RETVALUE((*func)(pst, &measInfo));
4020 * @brief This API is used to stop a
4021 Measurement Request from LM to SCH.
4025 * Function: cmUnpkLrgSchL2MeasStopReq
4027 * @param[in] LrgSchMeasStopReq func
4028 * @param[in] Pst * pst
4029 * @param[in] Buffer * mBuf
4034 PUBLIC S16 cmUnpkLrgSchL2MeasStopReq
4036 LrgSchL2MeasStopReq func,
4041 PUBLIC S16 cmUnpkLrgSchL2MeasStopReq(func, pst, mBuf)
4042 LrgSchL2MeasStopReq func;
4047 LrgSchMeasStopReqInfo measInfo;
4049 TRC3(cmUnpkLrgSchL2MeasStopReq)
4051 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4052 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4053 /*CMCHKUNPK(SUnpkU16, &measInfo.timePrd, mBuf);*/
4054 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4056 RETVALUE((*func)(pst, &measInfo));
4057 }/*cmUnpkLrgSchL2MeasStopReq*/
4060 * @brief This API is used to send a
4061 Measurement Request from LM to SCH.
4065 * Function: cmUnpkLrgSchL2MeasSendReq
4067 * @param[in] LrgSchMeasSendReq func
4068 * @param[in] Pst * pst
4069 * @param[in] Buffer * mBuf
4074 PUBLIC S16 cmUnpkLrgSchL2MeasSendReq
4076 LrgSchL2MeasSendReq func,
4081 PUBLIC S16 cmUnpkLrgSchL2MeasSendReq(func, pst, mBuf)
4082 LrgSchL2MeasSendReq func;
4087 LrgSchMeasSndReqInfo measInfo;
4088 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4089 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4090 CMCHKUNPK(SUnpkU32, &measInfo.timePrd, mBuf);
4091 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4093 RETVALUE((*func)(pst, &measInfo));
4094 }/*cmUnpkLrgSchL2MeasSendReq*/
4097 * @brief This API is used to stop a
4098 L2 Measurement confirm from MAC to LM
4102 * Function: cmPkLrgSchL2MeasStopCfm
4104 * @param[in] Pst * pst
4105 * @param[in] LrgSchMeasCfmInfo * measInfo
4110 PUBLIC S16 cmPkLrgSchL2MeasStopCfm
4113 LrgSchMeasCfmInfo *measInfo
4116 PUBLIC S16 cmPkLrgSchL2MeasStopCfm(pst, measInfo)
4118 LrgSchMeasCfmInfo *measInfo;
4121 Buffer *mBuf = NULLP;
4123 TRC3(cmPkLrgSchL2MeasStopCfm)
4124 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
4125 #if (ERRCLASS & ERRCLS_ADD_RES)
4126 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
4127 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
4128 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
4132 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
4133 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
4134 CMCHKPK(SPkU16, measInfo->measType, mBuf);
4135 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
4136 pst->event = (Event) EVTLRGSCHL2MEASSTOPCFM;
4137 RETVALUE(SPstTsk(pst,mBuf));
4138 }/*cmPkLrgSchL2MeasStopCfm*/
4140 * @brief This API is used to Send a
4141 Measurement Confirm from SCH to LM.
4145 * Function: cmUnpkLrgL2SchMeasCfm
4147 * @param[in] Pst * pst
4148 * @param[in] Buffer * mBuf
4153 PUBLIC S16 cmUnpkLrgSchL2MeasStopCfm
4155 LrgSchL2MeasStopCfm func,
4160 PUBLIC S16 cmUnpkLrgSchL2MeasStopCfm(func, pst, mBuf)
4161 LrgSchL2MeasStopCfm func;
4166 LrgSchMeasCfmInfo measInfo;
4168 TRC3(cmUnpkLrgSchL2MeasCfm)
4170 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4171 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4172 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
4173 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4176 RETVALUE((*func)(pst, &measInfo));
4177 }/*cmUnpkLrgSchL2MeasStopCfm*/
4180 * @brief This API is used to unpack LrgNumActvUeQCICfm structure
4184 * Function: cmPkNumUeQciCfm
4186 * @param[in] LrgNumActvUeQCICfm * param
4187 * @param[in] Buffer * mBuf
4192 PRIVATE S16 cmPkNumUeQciCfm
4194 LrgNumActvUeQCICfm *param,
4198 PRIVATE S16 cmPkNumUeQciCfm(param, mBuf)
4199 LrgNumActvUeQCICfm *param;
4205 TRC3(cmPkNumUeQciCfm)
4207 for(idx = 0; idx < param->numQci; idx++)
4209 /*LRG : Review Tag*/
4210 CMCHKPK(SPkU8, param->numActvUeQci[idx].qciValue, mBuf);
4211 CMCHKPK(SPkU8, param->numActvUeQci[idx].numActvUeQci, mBuf);
4212 /*LRG : Review Tag*/
4214 CMCHKPK(SPkU8, param->numQci, mBuf);
4219 * @brief This API is used to unpack LrgAvgPrbQCICfm structure
4223 * Function: cmPkAvgPrbQciCfm
4225 * @param[in] LrgAvgPrbQCICfm * param
4226 * @param[in] Buffer * mBuf
4231 PRIVATE S16 cmPkAvgPrbQciCfm
4233 LrgAvgPrbQCICfm *param,
4237 PRIVATE S16 cmPkAvgPrbQciCfm(param, mBuf)
4238 LrgAvgPrbQCICfm *param;
4244 TRC3(cmPkAvgPrbQciCfm)
4245 for(idx = 0; idx < param->numQci; idx++)
4247 /*LRG : Review Tag*/
4248 CMCHKPK(SPkU8, param->prbPercQci[idx].qciValue, mBuf);
4249 CMCHKPK(SPkU8, param->prbPercQci[idx].prbPercQci, mBuf);
4250 /*LRG : Review Tag*/
4252 CMCHKPK(SPkU8, param->numQci, mBuf);
4257 * @brief This API is used to unpack raPreamblesCfm structure
4261 * Function: cmPkRaPrmbsCfm
4263 * @param[in] LrgRaPreamblesCfm * param
4264 * @param[in] Buffer * mBuf
4269 PRIVATE S16 cmPkRaPrmbsCfm
4271 LrgRaPreamblesCfm *param,
4275 PRIVATE S16 cmPkRaPrmbsCfm(param, mBuf)
4276 LrgRaPreamblesCfm *param;
4281 TRC3(cmPkRaPrmbsCfm)
4282 CMCHKPK(SPkU16, param->randSelPreHighRange, mBuf);
4283 CMCHKPK(SPkU16, param->randSelPreLowRange, mBuf);
4284 CMCHKPK(SPkU16, param->dedPreambles, mBuf);
4289 * @brief This API is used to unpack avgPrbCfm structure
4293 * Function: cmPkAvgPrbCfm
4295 * @param[in] LrgAvgPrbCfm * param
4296 * @param[in] Buffer * mBuf
4301 PRIVATE S16 cmPkAvgPrbCfm
4303 LrgAvgPrbCfm *param,
4307 PRIVATE S16 cmPkAvgPrbCfm(param, mBuf)
4308 LrgAvgPrbCfm *param;
4314 CMCHKPK(SPkU8, param->prbPerc, mBuf);
4319 * @brief This API is used to send a
4320 L2 Measurement confirm from MAC to LM
4324 * Function: cmPkLrgSchL2MeasCfm
4326 * @param[in] Pst * pst
4327 * @param[in] LrgSchMeasCfmInfo * measInfo
4332 PUBLIC S16 cmPkLrgSchL2MeasCfm
4335 LrgSchMeasCfmInfo *measInfo
4338 PUBLIC S16 cmPkLrgSchL2MeasCfm(pst, measInfo)
4340 LrgSchMeasCfmInfo *measInfo;
4343 Buffer *mBuf = NULLP;
4345 TRC3(cmPkLrgSchL2MeasCfm)
4347 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
4348 #if (ERRCLASS & ERRCLS_ADD_RES)
4349 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
4350 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
4351 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
4355 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4357 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciDlCfm, mBuf);
4359 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4361 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciUlCfm, mBuf);
4363 if(measInfo->measType & LRG_L2MEAS_RA_PREAMBLE)
4365 CMCHKPK(cmPkRaPrmbsCfm, &measInfo->raPrmbsCfm, mBuf);
4367 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4369 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciDlCfm, mBuf);
4371 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4373 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciUlCfm, mBuf);
4375 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_DL)
4377 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbDl, mBuf);
4379 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_UL)
4381 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbUl, mBuf);
4383 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
4385 CMCHKPK(SPkU32, measInfo->tbTransDlTotalCnt, mBuf);
4387 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
4389 CMCHKPK(SPkU32, measInfo->tbTransDlFaulty, mBuf);
4391 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
4393 CMCHKPK(SPkU32, measInfo->tbTransUlTotalCnt, mBuf);
4395 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
4397 CMCHKPK(SPkU32, measInfo->tbTransUlFaulty, mBuf);
4399 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
4400 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
4401 CMCHKPK(SPkU16, measInfo->measType, mBuf);
4402 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
4403 pst->event = (Event) EVTLRGSCHL2MEASCFM;
4404 RETVALUE(SPstTsk(pst,mBuf));
4408 * @brief This API is used to unpack LrgNumActvUeQCICfm
4412 * Function: cmUnpkNumUeQciCfm
4414 * @param[in] LrgNumActvUeQCICfm *param
4415 * @param[in] Buffer * mBuf
4420 PRIVATE S16 cmUnpkNumUeQciCfm
4422 LrgNumActvUeQCICfm *param,
4426 PRIVATE S16 cmUnpkNumUeQciCfm(param, mBuf)
4427 LrgNumActvUeQCICfm *param;
4433 TRC3(cmUnpkNumUeQciCfm)
4434 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
4435 for(idx = param->numQci; idx > 0; idx--)
4437 /*LRG : Review Tag*/
4438 CMCHKUNPK(SUnpkU8, ¶m->numActvUeQci[idx - 1].numActvUeQci, mBuf);
4439 CMCHKUNPK(SUnpkU8, ¶m->numActvUeQci[idx - 1].qciValue, mBuf);
4440 /*LRG : Review Tag*/
4446 * @brief This API is used to unpack LrgAvgPrbQCICfm
4450 * Function: cmUnpkAvgPrbQciCfm
4452 * @param[in] LrgAvgPrbQCICfm *param
4453 * @param[in] Buffer * mBuf
4458 PRIVATE S16 cmUnpkAvgPrbQciCfm
4460 LrgAvgPrbQCICfm *param,
4464 PRIVATE S16 cmUnpkAvgPrbQciCfm(param, mBuf)
4465 LrgAvgPrbQCICfm *param;
4471 TRC3(cmUnpkAvgPrbQciCfm)
4473 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
4474 for(idx = param->numQci; idx > 0; idx--)
4476 /*LRG : Review Tag*/
4477 CMCHKUNPK(SUnpkU8, ¶m->prbPercQci[idx - 1].prbPercQci, mBuf);
4478 CMCHKUNPK(SUnpkU8, ¶m->prbPercQci[idx - 1].qciValue, mBuf);
4479 /*LRG : Review Tag*/
4485 * @brief This API is used to unpack LrgRaPreamblesCfm
4489 * Function: cmUnpkRaPrmbsCfm
4491 * @param[in] LrgRaPreamblesCfm *param
4492 * @param[in] Buffer * mBuf
4497 PRIVATE S16 cmUnpkRaPrmbsCfm
4499 LrgRaPreamblesCfm *param,
4503 PRIVATE S16 cmUnpkRaPrmbsCfm(param, mBuf)
4504 LrgRaPreamblesCfm *param;
4509 TRC3(cmUnpkRaPrmbsCfm)
4511 CMCHKUNPK(SUnpkU16, ¶m->dedPreambles, mBuf);
4512 CMCHKUNPK(SUnpkU16, ¶m->randSelPreLowRange, mBuf);
4513 CMCHKUNPK(SUnpkU16, ¶m->randSelPreHighRange, mBuf);
4518 * @brief This API is used to unpack avgPrbCfm
4522 * Function: cmUnpkAvgPrbCfm
4524 * @param[in] LrgAvgPrbCfm *param
4525 * @param[in] Buffer * mBuf
4530 PRIVATE S16 cmUnpkAvgPrbCfm
4532 LrgAvgPrbCfm *param,
4536 PRIVATE S16 cmUnpkAvgPrbCfm(param, mBuf)
4537 LrgAvgPrbCfm *param;
4542 TRC3(cmUnpkAvgPrbCfm)
4544 CMCHKUNPK(SUnpkU8, ¶m->prbPerc, mBuf);
4549 * @brief This API is used to send a
4550 Measurement Confirm from LM to SCH.
4554 * Function: cmUnpkLrgL2SchMeasCfm
4556 * @param[in] Pst * pst
4557 * @param[in] Buffer * mBuf
4562 PUBLIC S16 cmUnpkLrgSchL2MeasCfm
4564 LrgSchL2MeasCfm func,
4569 PUBLIC S16 cmUnpkLrgSchL2MeasCfm(func, pst, mBuf)
4570 LrgSchL2MeasCfm func;
4575 LrgSchMeasCfmInfo measInfo;
4577 TRC3(cmUnpkLrgSchL2MeasCfm)
4579 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4580 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4581 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
4582 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4583 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
4585 CMCHKPK(SUnpkU32, &measInfo.tbTransUlFaulty, mBuf);
4587 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
4589 CMCHKPK(SUnpkU32, &measInfo.tbTransUlTotalCnt, mBuf);
4591 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
4593 CMCHKPK(SUnpkU32, &measInfo.tbTransDlFaulty, mBuf);
4595 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
4597 CMCHKPK(SUnpkU32, &measInfo.tbTransDlTotalCnt, mBuf);
4599 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_UL)
4601 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbUl, mBuf);
4603 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_DL)
4605 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbDl, mBuf);
4607 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4609 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciUlCfm, mBuf);
4611 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4613 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciDlCfm, mBuf);
4615 if(measInfo.measType & LRG_L2MEAS_RA_PREAMBLE)
4617 CMCHKUNPK(cmUnpkRaPrmbsCfm, &measInfo.raPrmbsCfm, mBuf);
4619 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4621 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciUlCfm, mBuf);
4623 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4625 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciDlCfm, mBuf);
4628 RETVALUE((*func)(pst, &measInfo));
4634 /**********************************************************************
4636 **********************************************************************/