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 "common_def.h"
39 #include "lrg.h" /* LRG Interface Defines */
40 /* header/extern include files (.x) */
41 #include "lrg.x" /* LRG Interface includes */
47 * @brief This API is used to send a
48 Configuration Request from LM to MAC.
52 * Function: cmPkLrgCfgReq
54 * @param[in] Pst * pst
55 * @param[in] RgMngmt * cfg
60 PUBLIC S16 cmPkLrgCfgReq
66 PUBLIC S16 cmPkLrgCfgReq(pst, cfg)
74 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
75 #if (ERRCLASS & ERRCLS_ADD_RES)
76 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
77 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
78 (ErrVal)ELRG001, (ErrVal)0, "Packing failed");
82 if (pst->selector == ODU_SELECTOR_LC) {
83 if (cmPkRgMngmt(pst, cfg, EVTLRGCFGREQ, mBuf) != ROK) {
84 #if (ERRCLASS & ERRCLS_ADD_RES)
85 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
86 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
87 (ErrVal)ELRG002, (ErrVal)0, "Packing failed");
93 pst->event = (Event) EVTLRGCFGREQ;
94 RETVALUE(SPstTsk(pst,mBuf));
99 * @brief This API is used to send a
100 Configuration Request from LM to MAC.
104 * Function: cmUnpkLrgCfgReq
106 * @param[in] Pst * pst
107 * @param[in] RgMngmt * cfg
112 PUBLIC S16 cmUnpkLrgCfgReq
119 PUBLIC S16 cmUnpkLrgCfgReq(func, pst, mBuf)
125 /* lrg_c_001.main_2: Changed Pointer across Interface */
128 TRC3(cmUnpkLrgCfgReq)
130 if (cmUnpkRgMngmt(pst, &cfg, EVTLRGCFGREQ, mBuf) != ROK) {
132 #if (ERRCLASS & ERRCLS_ADD_RES)
133 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
134 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
135 (ErrVal)ELRG003, (ErrVal)0, "Packing failed");
140 RETVALUE((*func)(pst, &cfg));
145 * @brief This API is used to send a
146 Configuration Request from LM to SCH.
150 * Function: cmPkLrgSchCfgReq
152 * @param[in] Pst * pst
153 * @param[in] RgMngmt * cfg
158 PUBLIC S16 cmPkLrgSchCfgReq
164 PUBLIC S16 cmPkLrgSchCfgReq(pst, cfg)
169 Buffer *mBuf = NULLP;
170 TRC3(cmPkLrgSchCfgReq)
172 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
173 #if (ERRCLASS & ERRCLS_ADD_RES)
174 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
175 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
176 (ErrVal)ELRG004, (ErrVal)0, "Packing failed");
180 if (pst->selector == ODU_SELECTOR_LC) {
181 if (cmPkRgMngmt(pst, cfg, EVTMACSCHGENCFGREQ, mBuf) != ROK) {
182 #if (ERRCLASS & ERRCLS_ADD_RES)
183 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
184 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
185 (ErrVal)ELRG005, (ErrVal)0, "Packing failed");
192 RETVALUE(SPstTsk(pst,mBuf));
197 * @brief This API is used to send a
198 Configuration Request from LM to SCH.
202 * Function: cmUnpkLrgSchCfgReq
204 * @param[in] Pst * pst
205 * @param[in] RgMngmt * cfg
210 PUBLIC S16 cmUnpkLrgSchCfgReq
217 PUBLIC S16 cmUnpkLrgSchCfgReq(func, pst, mBuf)
223 /* lrg_c_001.main_2: Changed Pointer across Interface */
226 TRC3(cmUnpkLrgSchCfgReq)
228 if (cmUnpkRgMngmt(pst, &cfg, EVTMACSCHGENCFGREQ, mBuf) != ROK) {
230 #if (ERRCLASS & ERRCLS_ADD_RES)
231 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
232 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
233 (ErrVal)ELRG006, (ErrVal)0, "Packing failed");
238 RETVALUE((*func)(pst, &cfg));
243 * @brief This API is used to send a
244 Configuration Confirm from MAC to LM.
248 * Function: cmPkLrgCfgCfm
250 * @param[in] Pst * pst
251 * @param[in] RgMngmt * cfm
256 PUBLIC S16 cmPkLrgCfgCfm
262 PUBLIC S16 cmPkLrgCfgCfm(pst, cfm)
267 Buffer *mBuf = NULLP;
270 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
271 #if (ERRCLASS & ERRCLS_ADD_RES)
272 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
273 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
274 (ErrVal)ELRG007, (ErrVal)0, "Packing failed");
278 if (pst->selector == ODU_SELECTOR_LC) {
279 if (cmPkRgMngmt(pst, cfm, EVTLRGCFGCFM, mBuf) != ROK) {
280 #if (ERRCLASS & ERRCLS_ADD_RES)
281 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
282 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
283 (ErrVal)ELRG008, (ErrVal)0, "Packing failed");
290 pst->event = (Event) EVTLRGCFGCFM;
291 RETVALUE(SPstTsk(pst,mBuf));
296 * @brief This API is used to send a
297 Configuration Confirm from MAC to LM.
301 * Function: cmUnpkLrgCfgCfm
303 * @param[in] Pst * pst
304 * @param[in] RgMngmt * cfm
309 PUBLIC S16 cmUnpkLrgCfgCfm
316 PUBLIC S16 cmUnpkLrgCfgCfm(func, pst, mBuf)
324 TRC3(cmUnpkLrgCfgCfm)
326 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCFGCFM, mBuf) != ROK) {
328 #if (ERRCLASS & ERRCLS_ADD_RES)
329 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
330 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
331 (ErrVal)ELRG009, (ErrVal)0, "Packing failed");
336 RETVALUE((*func)(pst, &cfm));
341 * @brief This API is used to send a
342 Configuration Confirm from SCH to LM.
346 * Function: cmPkLrgSchCfgCfm
348 * @param[in] Pst * pst
349 * @param[in] RgMngmt * cfg
354 PUBLIC S16 cmPkLrgSchCfgCfm
360 PUBLIC S16 cmPkLrgSchCfgCfm(pst, cfg)
365 Buffer *mBuf = NULLP;
366 TRC3(cmPkLrgSchCfgCfm)
368 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
369 #if (ERRCLASS & ERRCLS_ADD_RES)
370 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
371 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
372 (ErrVal)ELRG010, (ErrVal)0, "Packing failed");
376 if (pst->selector == ODU_SELECTOR_LC) {
377 if (cmPkRgMngmt(pst, cfg, EVTMACSCHGENCFGCFM, mBuf) != ROK) {
378 #if (ERRCLASS & ERRCLS_ADD_RES)
379 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
380 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
381 (ErrVal)ELRG011, (ErrVal)0, "Packing failed");
388 pst->event = (Event) EVTMACSCHGENCFGCFM;
389 RETVALUE(SPstTsk(pst,mBuf));
394 * @brief This API is used to send a
395 Configuration Confirm from SCH to LM.
399 * Function: cmUnpkLrgSchCfgCfm
401 * @param[in] Pst * pst
402 * @param[in] RgMngmt * cfg
407 PUBLIC S16 cmUnpkLrgSchCfgCfm
414 PUBLIC S16 cmUnpkLrgSchCfgCfm(func, pst, mBuf)
422 TRC3(cmUnpkLrgSchCfgCfm)
424 if (cmUnpkRgMngmt(pst, &cfg, EVTMACSCHGENCFGCFM, mBuf) != ROK) {
426 #if (ERRCLASS & ERRCLS_ADD_RES)
427 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
428 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
429 (ErrVal)ELRG012, (ErrVal)0, "Packing failed");
434 RETVALUE((*func)(pst, &cfg));
439 * @brief This API is used to send a
440 Statistics Request from LM to MAC.
444 * Function: cmPkLrgStsReq
446 * @param[in] Pst * pst
447 * @param[in] RgMngmt * sts
452 PUBLIC S16 cmPkLrgStsReq
458 PUBLIC S16 cmPkLrgStsReq(pst, sts)
463 Buffer *mBuf = NULLP;
466 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
467 #if (ERRCLASS & ERRCLS_ADD_RES)
468 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
469 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
470 (ErrVal)ELRG013, (ErrVal)0, "Packing failed");
474 if (pst->selector == ODU_SELECTOR_LC) {
475 if (cmPkRgMngmt(pst, sts, EVTLRGSTSREQ, mBuf) != ROK) {
476 #if (ERRCLASS & ERRCLS_ADD_RES)
477 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
478 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
479 (ErrVal)ELRG014, (ErrVal)0, "Packing failed");
486 pst->event = (Event) EVTLRGSTSREQ;
487 RETVALUE(SPstTsk(pst,mBuf));
492 * @brief This API is used to send a
493 Statistics Request from LM to MAC.
497 * Function: cmUnpkLrgStsReq
499 * @param[in] Pst * pst
500 * @param[in] RgMngmt * sts
505 PUBLIC S16 cmUnpkLrgStsReq
512 PUBLIC S16 cmUnpkLrgStsReq(func, pst, mBuf)
520 TRC3(cmUnpkLrgStsReq)
522 if (cmUnpkRgMngmt(pst, &sts, EVTLRGSTSREQ, mBuf) != ROK) {
524 #if (ERRCLASS & ERRCLS_ADD_RES)
525 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
526 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
527 (ErrVal)ELRG015, (ErrVal)0, "Packing failed");
532 RETVALUE((*func)(pst, &sts));
537 * @brief This API is used to send a
538 Statistics Confirm from MAC to LM.
542 * Function: cmPkLrgStsCfm
544 * @param[in] Pst * pst
545 * @param[in] RgMngmt * cfm
550 PUBLIC S16 cmPkLrgStsCfm
556 PUBLIC S16 cmPkLrgStsCfm(pst, cfm)
561 Buffer *mBuf = NULLP;
564 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
565 #if (ERRCLASS & ERRCLS_ADD_RES)
566 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
567 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
568 (ErrVal)ELRG016, (ErrVal)0, "Packing failed");
572 if (pst->selector == ODU_SELECTOR_LC) {
573 if (cmPkRgMngmt(pst, cfm, EVTLRGSTSCFM, mBuf) != ROK) {
574 #if (ERRCLASS & ERRCLS_ADD_RES)
575 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
576 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
577 (ErrVal)ELRG017, (ErrVal)0, "Packing failed");
584 pst->event = (Event) EVTLRGSTSCFM;
585 RETVALUE(SPstTsk(pst,mBuf));
590 * @brief This API is used to send a
591 Statistics Confirm from MAC to LM.
595 * Function: cmUnpkLrgStsCfm
597 * @param[in] Pst * pst
598 * @param[in] RgMngmt * cfm
603 PUBLIC S16 cmUnpkLrgStsCfm
610 PUBLIC S16 cmUnpkLrgStsCfm(func, pst, mBuf)
618 TRC3(cmUnpkLrgStsCfm)
620 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSTSCFM, mBuf) != ROK) {
622 #if (ERRCLASS & ERRCLS_ADD_RES)
623 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
624 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
625 (ErrVal)ELRG018, (ErrVal)0, "Packing failed");
630 RETVALUE((*func)(pst, &cfm));
635 * @brief This API is used to send a
636 Status Request from LM to MAC.
640 * Function: cmPkLrgStaReq
642 * @param[in] Pst * pst
643 * @param[in] RgMngmt * sta
648 PUBLIC S16 cmPkLrgStaReq
654 PUBLIC S16 cmPkLrgStaReq(pst, sta)
659 Buffer *mBuf = NULLP;
662 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
663 #if (ERRCLASS & ERRCLS_ADD_RES)
664 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
665 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
666 (ErrVal)ELRG019, (ErrVal)0, "Packing failed");
670 if (cmPkRgMngmt(pst, sta, EVTLRGSSTAREQ, mBuf) != ROK) {
671 #if (ERRCLASS & ERRCLS_ADD_RES)
672 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
673 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
674 (ErrVal)ELRG020, (ErrVal)0, "Packing failed");
680 pst->event = (Event) EVTLRGSSTAREQ;
681 RETVALUE(SPstTsk(pst,mBuf));
686 * @brief This API is used to send a
687 Status Request from LM to MAC.
691 * Function: cmUnpkLrgStaReq
693 * @param[in] Pst * pst
694 * @param[in] RgMngmt * sta
699 PUBLIC S16 cmUnpkLrgStaReq
706 PUBLIC S16 cmUnpkLrgStaReq(func, pst, mBuf)
714 TRC3(cmUnpkLrgStaReq)
716 cmMemset((U8 *)&sta, 0, sizeof(RgMngmt));
717 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSSTAREQ, mBuf) != ROK) {
718 #if (ERRCLASS & ERRCLS_ADD_RES)
719 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
720 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
721 (ErrVal)ELRG021, (ErrVal)0, "Packing failed");
727 RETVALUE((*func)(pst, &sta));
732 * @brief This API is used to send a
733 Status Confirm from MAC to LM.
737 * Function: cmPkLrgStaCfm
739 * @param[in] Pst * pst
740 * @param[in] RgMngmt * cfm
745 PUBLIC S16 cmPkLrgStaCfm
751 PUBLIC S16 cmPkLrgStaCfm(pst, cfm)
756 Buffer *mBuf = NULLP;
759 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
760 #if (ERRCLASS & ERRCLS_ADD_RES)
761 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
762 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
763 (ErrVal)ELRG022, (ErrVal)0, "Packing failed");
767 if (cmPkRgMngmt(pst, cfm, EVTLRGSSTACFM, mBuf) != ROK) {
768 #if (ERRCLASS & ERRCLS_ADD_RES)
769 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
770 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
771 (ErrVal)ELRG023, (ErrVal)0, "Packing failed");
777 pst->event = (Event) EVTLRGSSTACFM;
778 RETVALUE(SPstTsk(pst,mBuf));
783 * @brief This API is used to send a
784 Status Confirm from MAC to LM.
788 * Function: cmUnpkLrgStaCfm
790 * @param[in] Pst * pst
791 * @param[in] RgMngmt * cfm
796 PUBLIC S16 cmUnpkLrgStaCfm
803 PUBLIC S16 cmUnpkLrgStaCfm(func, pst, mBuf)
811 TRC3(cmUnpkLrgStaCfm)
813 cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
814 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSSTACFM, mBuf) != ROK) {
815 #if (ERRCLASS & ERRCLS_ADD_RES)
816 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
817 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
818 (ErrVal)ELRG024, (ErrVal)0, "Packing failed");
824 RETVALUE((*func)(pst, &cfm));
829 * @brief This API is used to send a
830 Status Indication from MAC to LM.
834 * Function: cmPkLrgStaInd
836 * @param[in] Pst * pst
837 * @param[in] RgMngmt * usta
842 PUBLIC S16 cmPkLrgStaInd
848 PUBLIC S16 cmPkLrgStaInd(pst, usta)
853 Buffer *mBuf = NULLP;
856 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
857 #if (ERRCLASS & ERRCLS_ADD_RES)
858 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
859 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
860 (ErrVal)ELRG025, (ErrVal)0, "Packing failed");
864 if (pst->selector == ODU_SELECTOR_LC) {
865 if (cmPkRgMngmt(pst, usta, EVTLRGUSTAIND, mBuf) != ROK) {
866 #if (ERRCLASS & ERRCLS_ADD_RES)
867 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
868 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
869 (ErrVal)ELRG026, (ErrVal)0, "Packing failed");
876 pst->event = (Event) EVTLRGUSTAIND;
877 RETVALUE(SPstTsk(pst,mBuf));
882 * @brief This API is used to send a
883 Status Indication from MAC to LM.
887 * Function: cmUnpkLrgStaInd
889 * @param[in] Pst * pst
890 * @param[in] RgMngmt * usta
895 PUBLIC S16 cmUnpkLrgStaInd
902 PUBLIC S16 cmUnpkLrgStaInd(func, pst, mBuf)
910 TRC3(cmUnpkLrgStaInd)
912 if (cmUnpkRgMngmt(pst, &usta, EVTLRGUSTAIND, mBuf) != ROK) {
914 #if (ERRCLASS & ERRCLS_ADD_RES)
915 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
916 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
917 (ErrVal)ELRG027, (ErrVal)0, "Packing failed");
922 RETVALUE((*func)(pst, &usta));
927 * @brief This API is used to send a
928 Status Indication from SCH to LM.
932 * Function: cmPkLrgSchStaInd
934 * @param[in] Pst * pst
935 * @param[in] RgMngmt * sta
940 PUBLIC S16 cmPkLrgSchStaInd
946 PUBLIC S16 cmPkLrgSchStaInd(pst, sta)
951 Buffer *mBuf = NULLP;
952 TRC3(cmPkLrgSchStaInd)
954 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
955 #if (ERRCLASS & ERRCLS_ADD_RES)
956 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
957 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
958 (ErrVal)ELRG028, (ErrVal)0, "Packing failed");
962 if (pst->selector == ODU_SELECTOR_LC) {
963 if (cmPkRgMngmt(pst, sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
964 #if (ERRCLASS & ERRCLS_ADD_RES)
965 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
966 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
967 (ErrVal)ELRG029, (ErrVal)0, "Packing failed");
974 pst->event = (Event) EVTLRGSCHSTAIND;
975 RETVALUE(SPstTsk(pst,mBuf));
980 * @brief This API is used to send a
981 Status Indication from SCH to LM.
985 * Function: cmUnpkLrgSchStaInd
987 * @param[in] Pst * pst
988 * @param[in] RgMngmt * sta
993 PUBLIC S16 cmUnpkLrgSchStaInd
1000 PUBLIC S16 cmUnpkLrgSchStaInd(func, pst, mBuf)
1008 TRC3(cmUnpkLrgSchStaInd)
1010 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
1012 #if (ERRCLASS & ERRCLS_ADD_RES)
1013 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1014 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1015 (ErrVal)ELRG030, (ErrVal)0, "Packing failed");
1020 RETVALUE((*func)(pst, &sta));
1025 * @brief This API is used to send a
1026 Control Request from LM to MAC.
1030 * Function: cmPkLrgCntrlReq
1032 * @param[in] Pst * pst
1033 * @param[in] RgMngmt * cntrl
1038 PUBLIC S16 cmPkLrgCntrlReq
1044 PUBLIC S16 cmPkLrgCntrlReq(pst, cntrl)
1049 Buffer *mBuf = NULLP;
1050 TRC3(cmPkLrgCntrlReq)
1052 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1053 #if (ERRCLASS & ERRCLS_ADD_RES)
1054 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1055 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1056 (ErrVal)ELRG031, (ErrVal)0, "Packing failed");
1060 if (pst->selector == ODU_SELECTOR_LC) {
1061 if (cmPkRgMngmt(pst, cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
1062 #if (ERRCLASS & ERRCLS_ADD_RES)
1063 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1064 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1065 (ErrVal)ELRG032, (ErrVal)0, "Packing failed");
1072 pst->event = (Event) EVTLRGCNTRLREQ;
1073 RETVALUE(SPstTsk(pst,mBuf));
1078 * @brief This API is used to send a
1079 Control Request from LM to MAC.
1083 * Function: cmUnpkLrgCntrlReq
1085 * @param[in] Pst * pst
1086 * @param[in] RgMngmt * cntrl
1091 PUBLIC S16 cmUnpkLrgCntrlReq
1098 PUBLIC S16 cmUnpkLrgCntrlReq(func, pst, mBuf)
1106 TRC3(cmUnpkLrgCntrlReq)
1108 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
1110 #if (ERRCLASS & ERRCLS_ADD_RES)
1111 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1112 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1113 (ErrVal)ELRG033, (ErrVal)0, "Packing failed");
1118 RETVALUE((*func)(pst, &cntrl));
1123 * @brief This API is used to send a
1124 Control Request from LM to SCH.
1128 * Function: cmPkLrgSchCntrlReq
1130 * @param[in] Pst * pst
1131 * @param[in] RgMngmt * cntrl
1136 PUBLIC S16 cmPkLrgSchCntrlReq
1142 PUBLIC S16 cmPkLrgSchCntrlReq(pst, cntrl)
1147 Buffer *mBuf = NULLP;
1148 TRC3(cmPkLrgSchCntrlReq)
1150 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1151 #if (ERRCLASS & ERRCLS_ADD_RES)
1152 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1153 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1154 (ErrVal)ELRG034, (ErrVal)0, "Packing failed");
1158 if (pst->selector == ODU_SELECTOR_LC) {
1159 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
1160 #if (ERRCLASS & ERRCLS_ADD_RES)
1161 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1162 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1163 (ErrVal)ELRG035, (ErrVal)0, "Packing failed");
1170 pst->event = (Event) EVTLRGSCHCNTRLREQ;
1171 RETVALUE(SPstTsk(pst,mBuf));
1176 * @brief This API is used to send a
1177 Control Request from LM to SCH.
1181 * Function: cmUnpkLrgSchCntrlReq
1183 * @param[in] Pst * pst
1184 * @param[in] RgMngmt * cntrl
1189 PUBLIC S16 cmUnpkLrgSchCntrlReq
1191 LrgSchCntrlReq func,
1196 PUBLIC S16 cmUnpkLrgSchCntrlReq(func, pst, mBuf)
1197 LrgSchCntrlReq func;
1204 TRC3(cmUnpkLrgSchCntrlReq)
1206 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
1208 #if (ERRCLASS & ERRCLS_ADD_RES)
1209 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1210 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1211 (ErrVal)ELRG036, (ErrVal)0, "Packing failed");
1216 RETVALUE((*func)(pst, &cntrl));
1221 * @brief This API is used to send a
1222 Control Confirm from MAC to LM.
1226 * Function: cmPkLrgCntrlCfm
1228 * @param[in] Pst * pst
1229 * @param[in] RgMngmt * cfm
1234 PUBLIC S16 cmPkLrgCntrlCfm
1240 PUBLIC S16 cmPkLrgCntrlCfm(pst, cfm)
1245 Buffer *mBuf = NULLP;
1246 TRC3(cmPkLrgCntrlCfm)
1248 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1249 #if (ERRCLASS & ERRCLS_ADD_RES)
1250 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1251 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1252 (ErrVal)ELRG037, (ErrVal)0, "Packing failed");
1256 if (pst->selector == ODU_SELECTOR_LC) {
1257 if (cmPkRgMngmt(pst, cfm, EVTLRGCNTRLCFM, mBuf) != ROK) {
1258 #if (ERRCLASS & ERRCLS_ADD_RES)
1259 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1260 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1261 (ErrVal)ELRG038, (ErrVal)0, "Packing failed");
1268 pst->event = (Event) EVTLRGCNTRLCFM;
1269 RETVALUE(SPstTsk(pst,mBuf));
1274 * @brief This API is used to send a
1275 Control Confirm from MAC to LM.
1279 * Function: cmUnpkLrgCntrlCfm
1281 * @param[in] Pst * pst
1282 * @param[in] RgMngmt * cfm
1287 PUBLIC S16 cmUnpkLrgCntrlCfm
1294 PUBLIC S16 cmUnpkLrgCntrlCfm(func, pst, mBuf)
1302 TRC3(cmUnpkLrgCntrlCfm)
1304 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCNTRLCFM, mBuf) != ROK) {
1306 #if (ERRCLASS & ERRCLS_ADD_RES)
1307 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1308 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1309 (ErrVal)ELRG039, (ErrVal)0, "Packing failed");
1314 RETVALUE((*func)(pst, &cfm));
1319 * @brief This API is used to send a
1320 Control Confirm from SCH to LM.
1324 * Function: cmPkLrgSchCntrlCfm
1326 * @param[in] Pst * pst
1327 * @param[in] RgMngmt * cntrl
1332 PUBLIC S16 cmPkLrgSchCntrlCfm
1338 PUBLIC S16 cmPkLrgSchCntrlCfm(pst, cntrl)
1343 Buffer *mBuf = NULLP;
1344 TRC3(cmPkLrgSchCntrlCfm)
1346 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1347 #if (ERRCLASS & ERRCLS_ADD_RES)
1348 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1349 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1350 (ErrVal)ELRG040, (ErrVal)0, "Packing failed");
1354 if (pst->selector == ODU_SELECTOR_LC) {
1355 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1356 #if (ERRCLASS & ERRCLS_ADD_RES)
1357 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1358 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1359 (ErrVal)ELRG041, (ErrVal)0, "Packing failed");
1366 pst->event = (Event) EVTLRGSCHCNTRLCFM;
1367 RETVALUE(SPstTsk(pst,mBuf));
1372 * @brief This API is used to send a
1373 Control Confirm from SCH to LM.
1377 * Function: cmUnpkLrgSchCntrlCfm
1379 * @param[in] Pst * pst
1380 * @param[in] RgMngmt * cntrl
1385 PUBLIC S16 cmUnpkLrgSchCntrlCfm
1387 LrgSchCntrlCfm func,
1392 PUBLIC S16 cmUnpkLrgSchCntrlCfm(func, pst, mBuf)
1393 LrgSchCntrlCfm func;
1400 TRC3(cmUnpkLrgSchCntrlCfm)
1402 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1404 #if (ERRCLASS & ERRCLS_ADD_RES)
1405 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1406 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1407 (ErrVal)ELRG042, (ErrVal)0, "Packing failed");
1412 RETVALUE((*func)(pst, &cntrl));
1417 * @brief This API is used to send a
1418 Trace Indication from MAC to LM.
1422 * Function: cmPkLrgTrcInd
1424 * @param[in] Pst * pst
1425 * @param[in] RgMngmt * trc
1426 * @param[in] Buffer * trcBuf
1431 PUBLIC S16 cmPkLrgTrcInd
1438 PUBLIC S16 cmPkLrgTrcInd(pst, trc, trcBuf)
1444 Buffer *mBuf = NULLP;
1447 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1448 #if (ERRCLASS & ERRCLS_ADD_RES)
1449 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1450 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1451 (ErrVal)ELRG043, (ErrVal)0, "Packing failed");
1456 if (pst->selector == ODU_SELECTOR_LC) {
1458 if (SFndLenMsg(trcBuf, &msgLen) != ROK) {
1459 #if (ERRCLASS & ERRCLS_ADD_RES)
1460 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1461 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1462 (ErrVal)ELRG044, (ErrVal)0, "Packing failed");
1467 if (SCatMsg(mBuf, trcBuf, M1M2) != ROK) {
1468 #if (ERRCLASS & ERRCLS_ADD_RES)
1469 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1470 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1471 (ErrVal)ELRG045, (ErrVal)0, "Packing failed");
1477 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1479 if (cmPkRgMngmt(pst, trc, EVTLRGTRCIND, mBuf) != ROK) {
1480 #if (ERRCLASS & ERRCLS_ADD_RES)
1481 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1482 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1483 (ErrVal)ELRG046, (ErrVal)0, "Packing failed");
1490 pst->event = (Event) EVTLRGTRCIND;
1491 RETVALUE(SPstTsk(pst,mBuf));
1496 * @brief This API is used to send a
1497 Trace Indication from MAC to LM.
1501 * Function: cmUnpkLrgTrcInd
1503 * @param[in] Pst * pst
1504 * @param[in] RgMngmt * trc
1505 * @param[in] Buffer * trcBuf
1510 PUBLIC S16 cmUnpkLrgTrcInd
1517 PUBLIC S16 cmUnpkLrgTrcInd(func, pst, mBuf)
1524 /* lrg_c_001.main_3 - MODIFY - Modified trcBuf to have it initialized to NULLP */
1525 Buffer *trcBuf = NULLP;
1527 TRC3(cmUnpkLrgTrcInd)
1529 if (cmUnpkRgMngmt(pst, &trc, EVTLRGTRCIND, mBuf) != ROK) {
1531 #if (ERRCLASS & ERRCLS_ADD_RES)
1532 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1533 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1534 (ErrVal)ELRG047, (ErrVal)0, "Packing failed");
1538 if (pst->selector == ODU_SELECTOR_LC) {
1539 MsgLen msgLen, totalMsgLen;
1540 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1541 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1543 if (SSegMsg(mBuf, totalMsgLen-msgLen, &trcBuf) != ROK)
1547 RETVALUE((*func)(pst, &trc, trcBuf));
1551 /***********************************************************
1553 * Func : cmPkRgGenCfg
1556 * Desc : This structure holds configuration parameters for MAC General Configuration.
1565 **********************************************************/
1567 PUBLIC S16 cmPkRgGenCfg
1573 PUBLIC S16 cmPkRgGenCfg(param, mBuf)
1582 CMCHKPK(SPkU8, param->isSCellActDeactAlgoEnable, mBuf);
1583 CMCHKPK(SPkU8, param->forceCntrlSrbBoOnPCel, mBuf);
1585 CMCHKPK(SPkU8, param->startCellId, mBuf);
1586 CMCHKPK(SPkU8, param->numRguSaps, mBuf);
1587 CMCHKPK(SPkU8, param->tmrRes, mBuf);
1588 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1589 CMCHKPK(cmPkPst, ¶m->lmPst, mBuf);
1595 /***********************************************************
1597 * Func : cmUnpkRgGenCfg
1600 * Desc : This structure holds configuration parameters for MAC General Configuration.
1609 **********************************************************/
1611 PUBLIC S16 cmUnpkRgGenCfg
1617 PUBLIC S16 cmUnpkRgGenCfg(param, mBuf)
1623 TRC3(cmUnpkRgGenCfg)
1625 CMCHKUNPK(cmUnpkPst, ¶m->lmPst, mBuf);
1626 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1627 CMCHKUNPK(SUnpkU8, ¶m->tmrRes, mBuf);
1628 CMCHKUNPK(SUnpkU8, ¶m->numRguSaps, mBuf);
1629 CMCHKUNPK(SUnpkU8, ¶m->startCellId, mBuf);
1631 CMCHKUNPK(SUnpkU8, ¶m->forceCntrlSrbBoOnPCel, mBuf);
1632 CMCHKUNPK(SUnpkU8, ¶m->isSCellActDeactAlgoEnable, mBuf);
1639 /***********************************************************
1641 * Func : cmPkRgUpSapCfg
1644 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1653 **********************************************************/
1655 PUBLIC S16 cmPkRgUpSapCfg
1661 PUBLIC S16 cmPkRgUpSapCfg(param, mBuf)
1667 TRC3(cmPkRgUpSapCfg)
1669 CMCHKPK(SPkS16, param->suId, mBuf);
1670 CMCHKPK(SPkS16, param->spId, mBuf);
1671 CMCHKPK(SPkU8, param->route, mBuf);
1672 CMCHKPK(SPkU8, param->inst, mBuf);
1673 CMCHKPK(SPkU8, param->ent, mBuf);
1674 CMCHKPK(SPkU16, param->procId, mBuf);
1675 CMCHKPK(SPkU8, param->prior, mBuf);
1676 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1677 CMCHKPK(SPkU8, param->selector, mBuf);
1683 /***********************************************************
1685 * Func : cmUnpkRgUpSapCfg
1688 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1697 **********************************************************/
1699 PUBLIC S16 cmUnpkRgUpSapCfg
1705 PUBLIC S16 cmUnpkRgUpSapCfg(param, mBuf)
1711 TRC3(cmUnpkRgUpSapCfg)
1713 CMCHKUNPK(SUnpkU8, ¶m->selector, mBuf);
1714 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1715 CMCHKUNPK(SUnpkU8, ¶m->prior, mBuf);
1716 CMCHKUNPK(SUnpkU16, ¶m->procId, mBuf);
1717 CMCHKUNPK(SUnpkU8, ¶m->ent, mBuf);
1718 CMCHKUNPK(SUnpkU8, ¶m->inst, mBuf);
1719 CMCHKUNPK(SUnpkU8, ¶m->route, mBuf);
1720 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1721 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1727 /***********************************************************
1729 * Func : cmPkRgLowSapCfg
1732 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1741 **********************************************************/
1743 PUBLIC S16 cmPkRgLowSapCfg
1749 PUBLIC S16 cmPkRgLowSapCfg(param, mBuf)
1755 TRC3(cmPkRgLowSapCfg)
1757 CMCHKPK(cmPkTmrCfg, ¶m->bndTmr, mBuf);
1758 CMCHKPK(SPkS16, param->suId, mBuf);
1759 CMCHKPK(SPkS16, param->spId, mBuf);
1760 CMCHKPK(SPkU8, param->route, mBuf);
1761 CMCHKPK(SPkU8, param->inst, mBuf);
1762 CMCHKPK(SPkU8, param->ent, mBuf);
1763 CMCHKPK(SPkU16, param->procId, mBuf);
1764 CMCHKPK(SPkU8, param->prior, mBuf);
1765 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1766 CMCHKPK(SPkU8, param->selector, mBuf);
1772 /***********************************************************
1774 * Func : cmUnpkRgLowSapCfg
1777 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1786 **********************************************************/
1788 PUBLIC S16 cmUnpkRgLowSapCfg
1794 PUBLIC S16 cmUnpkRgLowSapCfg(param, mBuf)
1800 TRC3(cmUnpkRgLowSapCfg)
1802 CMCHKUNPK(SUnpkU8, ¶m->selector, mBuf);
1803 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1804 CMCHKUNPK(SUnpkU8, ¶m->prior, mBuf);
1805 CMCHKUNPK(SUnpkU16, ¶m->procId, mBuf);
1806 CMCHKUNPK(SUnpkU8, ¶m->ent, mBuf);
1807 CMCHKUNPK(SUnpkU8, ¶m->inst, mBuf);
1808 CMCHKUNPK(SUnpkU8, ¶m->route, mBuf);
1809 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1810 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1811 CMCHKUNPK(cmUnpkTmrCfg, ¶m->bndTmr, mBuf);
1815 #ifdef MAC_SCH_STATS
1818 /***********************************************************
1820 * Func : cmPkRgAckNack
1823 * Desc : Ack and Nack statistics
1832 **********************************************************/
1834 PUBLIC S16 cmPkRgAckNack
1840 PUBLIC S16 cmPkRgAckNack (param, mBuf)
1848 CMCHKPK(SPkU16, param->numOfAcks, mBuf);
1849 CMCHKPK(SPkU16, param->numOfNacks, mBuf);
1850 CMCHKPK(SPkU8, param->mcs, mBuf);
1853 } /* cmPkRgAckNack */
1856 /***********************************************************
1858 * Func : cmPkRgSchNackAckStats
1870 **********************************************************/
1872 PUBLIC S16 cmPkRgSchNackAckStats
1874 RgSchNackAckStats *param,
1878 PUBLIC S16 cmPkRgSchNackAckStats (param, mBuf)
1879 RgSchNackAckStats *param;
1885 TRC3(cmPkRgSchNackAckStats)
1887 for (i=14; i >= 0; i--) {
1888 CMCHKPK(cmPkRgAckNack, ¶m->ulCqiStat[i], mBuf);
1891 for (i=14; i >= 0; i--) {
1892 CMCHKPK(cmPkRgAckNack, ¶m->dlCqiStat[i], mBuf);
1899 /***********************************************************
1901 * Func : cmPkRgHqNumRetx
1904 * Desc : Harq Retransmission statistics
1913 **********************************************************/
1915 PUBLIC S16 cmPkRgHqNumRetx
1917 RgSchHqNumRetx *param,
1921 PUBLIC S16 cmPkRgHqNumRetx (param, mBuf)
1922 RgSchHqNumRetx *param;
1926 TRC3(cmPkRgHqNumRetx)
1928 CMCHKPK(SPkU32, param->totalTx, mBuf);
1929 CMCHKPK(SPkU16, param->numOfHQ_4, mBuf);
1930 CMCHKPK(SPkU16, param->numOfHQ_3, mBuf);
1931 CMCHKPK(SPkU16, param->numOfHQ_2, mBuf);
1932 CMCHKPK(SPkU16, param->numOfHQ_1, mBuf);
1933 CMCHKPK(SPkU8, param->mcs, mBuf);
1936 } /* cmPkRgHqNumRetx */
1939 /***********************************************************
1941 * Func : cmPkRgSchHqRetxStats
1953 **********************************************************/
1955 PUBLIC S16 cmPkRgSchHqRetxStats
1957 RgSchHqRetxStats *param,
1961 PUBLIC S16 cmPkRgSchHqRetxStats (param, mBuf)
1962 RgSchHqRetxStats *param;
1968 TRC3(cmPkRgSchHqRetxStats)
1970 for (i=14; i >= 0; i--) {
1971 CMCHKPK(cmPkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
1974 for (i=14; i >= 0; i--) {
1975 CMCHKPK(cmPkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
1979 } /* cmPkRgSchHqRetxStats */
1981 /* unpcaking functions */
1983 /***********************************************************
1985 * Func : cmUnpkRgAckNack
1988 * Desc : Ack and Nack statistics
1997 **********************************************************/
1999 PUBLIC S16 cmUnpkRgAckNack
2005 PUBLIC S16 cmUnpkRgAckNack (param, mBuf)
2011 TRC3(cmUnpkRgAckNack)
2013 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
2014 CMCHKUNPK(SUnpkU16, ¶m->numOfNacks, mBuf);
2015 CMCHKUNPK(SUnpkU16, ¶m->numOfAcks, mBuf);
2018 } /* cmUnkRgAckNack */
2021 /***********************************************************
2023 * Func : cmUnpkRgSchNackAckStats
2035 **********************************************************/
2037 PUBLIC S16 cmUnpkRgSchNackAckStats
2039 RgSchNackAckStats *param,
2043 PUBLIC S16 cmUnpkRgSchNackAckStats (param, mBuf)
2044 RgSchNackAckStats *param;
2049 TRC3(cmUnpkRgSchNackAckStats)
2051 for (i=0; i <= 14; i++) {
2052 CMCHKUNPK(cmUnpkRgAckNack, ¶m->dlCqiStat[i], mBuf);
2055 for (i=0; i <= 14; i++) {
2056 CMCHKUNPK(cmUnpkRgAckNack, ¶m->ulCqiStat[i], mBuf);
2060 } /* cmUnpkRgSchNackAckStats */
2063 /***********************************************************
2065 * Func : cmUnpkRgHqNumRetx
2068 * Desc : Harq Retransmission statistics
2077 **********************************************************/
2079 PUBLIC S16 cmUnpkRgHqNumRetx
2081 RgSchHqNumRetx *param,
2085 PUBLIC S16 cmUnpkRgHqNumRetx (param, mBuf)
2086 RgSchHqNumRetx *param;
2090 TRC3(cmUnpkRgHqNumRetx)
2092 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
2093 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_1, mBuf);
2094 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_2, mBuf);
2095 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_3, mBuf);
2096 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_4, mBuf);
2097 CMCHKUNPK(SUnpkU32, ¶m->totalTx, mBuf);
2100 } /* cmUnpkRgHqNumRetx */
2103 /***********************************************************
2105 * Func : cmUnpkRgSchHqRetxStats
2117 **********************************************************/
2119 PUBLIC S16 cmUnpkRgSchHqRetxStats
2121 RgSchHqRetxStats *param,
2125 PUBLIC S16 cmUnpkRgSchHqRetxStats (param, mBuf)
2126 RgSchHqRetxStats *param;
2131 TRC3(cmUnpkRgSchHqRetxStats)
2133 for (i=0; i <= 14; i++) {
2134 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
2137 for (i=0; i <= 14; i++) {
2138 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
2142 } /* cmUnpkRgSchHqRetxStats */
2144 #endif /* MAC_SCH_STATS */
2147 /***********************************************************
2149 * Func : cmPkRgGenSts
2152 * Desc : This structure holds General Statistical information of MAC.
2161 **********************************************************/
2163 PUBLIC S16 cmPkRgGenSts
2169 PUBLIC S16 cmPkRgGenSts(param, mBuf)
2177 #ifdef MAC_SCH_STATS
2178 CMCHKPK(cmPkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
2179 CMCHKPK(cmPkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
2180 #endif /* MAC_SCH_STATS */
2181 CMCHKPK(SPkU16, param->numCellCfg, mBuf);
2182 CMCHKPK(SPkU32, param->numUeCfg, mBuf);
2183 CMCHKPK(SPkU32, param->numHarqFail, mBuf);
2189 /***********************************************************
2191 * Func : cmUnpkRgGenSts
2194 * Desc : This structure holds General Statistical information of MAC.
2203 **********************************************************/
2205 PUBLIC S16 cmUnpkRgGenSts
2211 PUBLIC S16 cmUnpkRgGenSts(param, mBuf)
2217 TRC3(cmUnpkRgGenSts)
2219 CMCHKUNPK(SUnpkU32, ¶m->numHarqFail, mBuf);
2220 CMCHKUNPK(SUnpkU32, ¶m->numUeCfg, mBuf);
2221 CMCHKUNPK(SUnpkU16, ¶m->numCellCfg, mBuf);
2222 #ifdef MAC_SCH_STATS
2223 CMCHKUNPK(cmUnpkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
2224 CMCHKUNPK(cmUnpkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
2225 #endif /* MAC_SCH_STATS */
2231 /***********************************************************
2233 * Func : cmPkRgSapSts
2236 * Desc : This structure holds Statistical information of a SAP in MAC.
2245 **********************************************************/
2247 PUBLIC S16 cmPkRgSapSts
2253 PUBLIC S16 cmPkRgSapSts(param, mBuf)
2261 CMCHKPK(SPkU32, param->numPduDrop, mBuf);
2262 CMCHKPK(SPkU32, param->numPduTxmit, mBuf);
2263 CMCHKPK(SPkU32, param->numPduRcvd, mBuf);
2269 /***********************************************************
2271 * Func : cmUnpkRgSapSts
2274 * Desc : This structure holds Statistical information of a SAP in MAC.
2283 **********************************************************/
2285 PUBLIC S16 cmUnpkRgSapSts
2291 PUBLIC S16 cmUnpkRgSapSts(param, mBuf)
2297 TRC3(cmUnpkRgSapSts)
2299 CMCHKUNPK(SUnpkU32, ¶m->numPduRcvd, mBuf);
2300 CMCHKUNPK(SUnpkU32, ¶m->numPduTxmit, mBuf);
2301 CMCHKUNPK(SUnpkU32, ¶m->numPduDrop, mBuf);
2307 /***********************************************************
2309 * Func : cmPkRgSchInstCfg
2312 * Desc : Scheduler Configuration
2321 **********************************************************/
2323 PUBLIC S16 cmPkRgSchInstCfg
2325 RgSchInstCfg *param,
2329 PUBLIC S16 cmPkRgSchInstCfg(param, mBuf)
2330 RgSchInstCfg *param;
2336 TRC3(cmPkRgSchInstCfg)
2338 for (i=param->numSaps-1; i >= 0; i--) {
2339 CMCHKPK(cmPkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
2341 for (i=param->numSaps-1; i >= 0; i--) {
2342 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
2344 for (i=param->numSaps-1; i >= 0; i--) {
2345 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
2347 CMCHKPK(SPkU8, param->numSaps, mBuf);
2348 CMCHKPK(cmPkRgGenCfg, ¶m->genCfg, mBuf);
2349 CMCHKPK(SPkU8, param->instId, mBuf);
2355 /***********************************************************
2357 * Func : cmUnpkRgSchInstCfg
2360 * Desc : Scheduler Configuration
2369 **********************************************************/
2371 PUBLIC S16 cmUnpkRgSchInstCfg
2373 RgSchInstCfg *param,
2377 PUBLIC S16 cmUnpkRgSchInstCfg(param, mBuf)
2378 RgSchInstCfg *param;
2384 TRC3(cmUnpkRgSchInstCfg)
2386 CMCHKUNPK(SUnpkU8, ¶m->instId, mBuf);
2387 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->genCfg, mBuf);
2388 CMCHKUNPK(SUnpkU8, ¶m->numSaps, mBuf);
2389 for (i=0; i<param->numSaps; i++) {
2390 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
2392 for (i=0; i<param->numSaps; i++) {
2393 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
2395 for (i=0; i<param->numSaps; i++) {
2396 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
2403 /***********************************************************
2408 * Desc : This structure holds Configuration parameters for MAC.
2417 **********************************************************/
2419 PUBLIC S16 cmPkRgCfg
2426 PUBLIC S16 cmPkRgCfg(param, elmnt, mBuf)
2437 CMCHKPK(cmPkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2440 CMCHKPK(cmPkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2443 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2446 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2449 CMCHKPK(cmPkRgGenCfg, ¶m->s.genCfg, mBuf);
2459 /***********************************************************
2461 * Func : cmUnpkRgCfg
2464 * Desc : This structure holds Configuration parameters for MAC.
2473 **********************************************************/
2475 PUBLIC S16 cmUnpkRgCfg
2482 PUBLIC S16 cmUnpkRgCfg(param, elmnt, mBuf)
2493 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->s.genCfg, mBuf);
2496 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2499 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2502 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2505 CMCHKUNPK(cmUnpkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2515 /***********************************************************
2517 * Func : cmPkRgSapSta
2520 * Desc : This structure holds a SAP's status information.
2529 **********************************************************/
2531 PUBLIC S16 cmPkRgSapSta
2537 PUBLIC S16 cmPkRgSapSta(param, mBuf)
2545 CMCHKPK(SPkU8, param->sapState, mBuf);
2551 /***********************************************************
2553 * Func : cmUnpkRgSapSta
2556 * Desc : This structure holds a SAP's status information.
2565 **********************************************************/
2567 PUBLIC S16 cmUnpkRgSapSta
2573 PUBLIC S16 cmUnpkRgSapSta(param, mBuf)
2579 TRC3(cmUnpkRgSapSta)
2581 CMCHKUNPK(SUnpkU8, ¶m->sapState, mBuf);
2587 /***********************************************************
2592 * Desc : This structure holds MAC's Statistical information.
2601 **********************************************************/
2603 PUBLIC S16 cmPkRgSts
2610 PUBLIC S16 cmPkRgSts(param, elmnt, mBuf)
2621 CMCHKPK(cmPkRgSapSts, ¶m->s.tfuSts, mBuf);
2624 CMCHKPK(cmPkRgSapSts, ¶m->s.rgrSts, mBuf);
2627 CMCHKPK(cmPkRgSapSts, ¶m->s.crgSts, mBuf);
2630 CMCHKPK(cmPkRgSapSts, ¶m->s.rguSts, mBuf);
2633 CMCHKPK(cmPkRgGenSts, ¶m->s.genSts, mBuf);
2638 CMCHKPK(cmPkAction, param->action, mBuf);
2639 CMCHKPK(SPkU8, param->sapInst, mBuf);
2640 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2646 /***********************************************************
2648 * Func : cmUnpkRgSts
2651 * Desc : This structure holds MAC's Statistical information.
2660 **********************************************************/
2662 PUBLIC S16 cmUnpkRgSts
2669 PUBLIC S16 cmUnpkRgSts(param, elmnt, mBuf)
2678 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2679 CMCHKUNPK(SUnpkU8, ¶m->sapInst, mBuf);
2680 CMCHKUNPK(cmUnpkAction, ¶m->action, mBuf);
2683 CMCHKUNPK(cmUnpkRgGenSts, ¶m->s.genSts, mBuf);
2686 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rguSts, mBuf);
2689 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.crgSts, mBuf);
2692 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rgrSts, mBuf);
2695 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.tfuSts, mBuf);
2705 /***********************************************************
2710 * Desc : This structure holds MAC's Solicited Status information.
2719 **********************************************************/
2721 PUBLIC S16 cmPkRgSsta
2732 PUBLIC S16 cmPkRgSsta(pst, param, elmnt, eventType, mBuf)
2736 /* lrg_c_001.main_3 - ADD - Added the extra parameter eventType to the function */
2748 CMCHKPK(cmPkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2751 CMCHKPK(cmPkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2754 CMCHKPK(cmPkRgSapSta, ¶m->s.crgSapSta, mBuf);
2757 CMCHKPK(cmPkRgSapSta, ¶m->s.rguSapSta, mBuf);
2759 /*ccpu00118255 - ADD - Check for eventType before Pack */
2762 if (eventType == EVTLRGSSTACFM)
2764 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2765 if (param->s.sysId.ptNmb != NULLP)
2767 SPutSBuf(pst->region, pst->pool,
2768 (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2771 #else /*LRG_V1 not defined */
2772 if (param->s.sysId.ptNmb != NULLP)
2774 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2775 SPutSBuf(pst->region, pst->pool, (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2778 #endif /*end of LRG_V1 */
2783 CMCHKPK(SPkU8, param->sapInst, mBuf);
2784 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2790 /***********************************************************
2792 * Func : cmUnpkRgSsta
2795 * Desc : This structure holds MAC's Solicited Status information.
2804 **********************************************************/
2806 PUBLIC S16 cmUnpkRgSsta
2814 PUBLIC S16 cmUnpkRgSsta(pst, param, elmnt, mBuf)
2824 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2825 CMCHKUNPK(SUnpkU8, ¶m->sapInst, mBuf);
2828 /*ccpu00118255 - ADD - Check for eventType before Unpack */
2829 if (pst->event == EVTLRGSSTACFM)
2832 if((SGetSBuf(pst->region, pst->pool, (Data **)¶m->s.sysId.ptNmb,
2833 LRG_MAX_PT_NUM_SIZE)) != ROK){
2834 #if (ERRCLASS & ERRCLS_ADD_RES)
2835 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2836 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2837 (ErrVal)ELRG048, (ErrVal)0, "Packing failed");
2842 /* KWORK_FIX: Moved the memset under the NULL check */
2843 if (param->s.sysId.ptNmb != NULLP)
2845 cmMemset((U8 *)param->s.sysId.ptNmb, 0, LRG_MAX_PT_NUM_SIZE);
2846 CMCHKUNPK(cmUnpkSystemId, ¶m->s.sysId, mBuf);
2851 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rguSapSta, mBuf);
2854 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.crgSapSta, mBuf);
2857 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2860 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2870 /***********************************************************
2872 * Func : cmPkRgUstaDgn
2875 * Desc : Alarm diagnostics structure.
2884 **********************************************************/
2886 PUBLIC S16 cmPkRgUstaDgn
2892 PUBLIC S16 cmPkRgUstaDgn(param, mBuf)
2900 switch(param->type) {
2901 case LRG_USTA_DGNVAL_MEM:
2902 CMCHKPK(cmPkMemoryId, ¶m->u.mem, mBuf);
2907 CMCHKPK(SPkU8, param->type, mBuf);
2913 /***********************************************************
2915 * Func : cmUnpkRgUstaDgn
2918 * Desc : Alarm diagnostics structure.
2927 **********************************************************/
2929 PUBLIC S16 cmUnpkRgUstaDgn
2935 PUBLIC S16 cmUnpkRgUstaDgn(param, mBuf)
2941 TRC3(cmUnpkRgUstaDgn)
2943 CMCHKUNPK(SUnpkU8, ¶m->type, mBuf);
2944 switch(param->type) {
2945 case LRG_USTA_DGNVAL_MEM:
2946 CMCHKUNPK(cmUnpkMemoryId, ¶m->u.mem, mBuf);
2956 /***********************************************************
2961 * Desc : This structure holds MAC's Unsolicited Status information.
2970 **********************************************************/
2972 PUBLIC S16 cmPkRgUsta
2978 PUBLIC S16 cmPkRgUsta(param, mBuf)
2986 CMCHKPK(cmPkRgUstaDgn, ¶m->dgn, mBuf);
2987 CMCHKPK(cmPkCmAlarm, ¶m->cmAlarm, mBuf);
2993 /***********************************************************
2995 * Func : cmUnpkRgUsta
2998 * Desc : This structure holds MAC's Unsolicited Status information.
3007 **********************************************************/
3009 PUBLIC S16 cmUnpkRgUsta
3015 PUBLIC S16 cmUnpkRgUsta(param, mBuf)
3023 CMCHKUNPK(cmUnpkCmAlarm, ¶m->cmAlarm, mBuf);
3024 CMCHKUNPK(cmUnpkRgUstaDgn, ¶m->dgn, mBuf);
3030 /***********************************************************
3035 * Desc : This structure holds MAC's Trace Indication information.
3044 **********************************************************/
3046 PUBLIC S16 cmPkRgTrc
3052 PUBLIC S16 cmPkRgTrc(param, mBuf)
3060 CMCHKPK(SPkU8, param->evnt, mBuf);
3061 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
3067 /***********************************************************
3069 * Func : cmUnpkRgTrc
3072 * Desc : This structure holds MAC's Trace Indication information.
3081 **********************************************************/
3083 PUBLIC S16 cmUnpkRgTrc
3089 PUBLIC S16 cmUnpkRgTrc(param, mBuf)
3097 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
3098 CMCHKUNPK(SUnpkU8, ¶m->evnt, mBuf);
3104 /***********************************************************
3106 * Func : cmPkRgDbgCntrl
3109 * Desc : This structure holds MAC's Debug Control information.
3118 **********************************************************/
3120 PUBLIC S16 cmPkRgDbgCntrl
3126 PUBLIC S16 cmPkRgDbgCntrl(param, mBuf)
3132 TRC3(cmPkRgDbgCntrl)
3134 CMCHKPK(SPkU32, param->dbgMask, mBuf);
3138 #ifdef PHY_ERROR_LOGING
3139 /***********************************************************
3141 * Func : cmPkRgSchUlAllocCntrl
3144 * Desc : This structure holds MAC's Debug Control information.
3153 **********************************************************/
3155 PUBLIC S16 cmPkRgSchUlAllocCntrl
3157 RgSchUlAllocCntrl *param,
3161 PUBLIC S16 cmPkRgSchUlAllocCntrl(param, mBuf)
3162 RgSchUlAllocCntrl *param;
3166 TRC3(cmPkRgSchUlAllocCntrl)
3168 CMCHKPK(SPkU8, param->mcs, mBuf);
3169 CMCHKPK(SPkU16, param->numOfRb, mBuf);
3170 CMCHKPK(SPkU16, param->rbStart, mBuf);
3171 CMCHKPK(SPkU8, param->testStart, mBuf);
3172 CMCHKPK(SPkU8, param->enaLog, mBuf);
3173 CMCHKPK(SPkU16, param->logTime, mBuf);
3178 /***********************************************************
3180 * Func : cmUnpkRgSchUlAllocCntrl
3183 * Desc : This structure holds MAC's Scheduler Configuration for Ul Allocation.
3192 **********************************************************/
3194 PUBLIC S16 cmUnpkRgSchUlAllocCntrl
3196 RgSchUlAllocCntrl *param,
3200 PUBLIC S16 cmUnpkRgSchUlAllocCntrl(param, mBuf)
3201 RgSchUlAllocCntrl *param;
3205 TRC3(cmUnpkRgSchUlAllocCntrl)
3207 CMCHKUNPK(SUnpkU16, ¶m->logTime, mBuf);
3208 CMCHKUNPK(SUnpkU8, ¶m->enaLog, mBuf);
3209 CMCHKUNPK(SUnpkU8, ¶m->testStart, mBuf);
3210 CMCHKUNPK(SUnpkU16, ¶m->rbStart, mBuf);
3211 CMCHKUNPK(SUnpkU16, ¶m->numOfRb, mBuf);
3212 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
3220 /***********************************************************
3222 * Func : cmUnpkRgDbgCntrl
3225 * Desc : This structure holds MAC's Debug Control information.
3234 **********************************************************/
3236 PUBLIC S16 cmUnpkRgDbgCntrl
3242 PUBLIC S16 cmUnpkRgDbgCntrl(param, mBuf)
3248 TRC3(cmUnpkRgDbgCntrl)
3250 CMCHKUNPK(SUnpkU32, ¶m->dbgMask, mBuf);
3256 /***********************************************************
3258 * Func : cmPkRgSapCntrl
3261 * Desc : This structure holds MAC's SAP Control information.
3270 **********************************************************/
3272 PUBLIC S16 cmPkRgSapCntrl
3278 PUBLIC S16 cmPkRgSapCntrl(param, mBuf)
3284 TRC3(cmPkRgSapCntrl)
3286 CMCHKPK(SPkS16, param->spId, mBuf);
3287 CMCHKPK(SPkS16, param->suId, mBuf);
3293 /***********************************************************
3295 * Func : cmUnpkRgSapCntrl
3298 * Desc : This structure holds MAC's SAP Control information.
3307 **********************************************************/
3309 PUBLIC S16 cmUnpkRgSapCntrl
3315 PUBLIC S16 cmUnpkRgSapCntrl(param, mBuf)
3321 TRC3(cmUnpkRgSapCntrl)
3323 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
3324 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
3330 /***********************************************************
3332 * Func : cmPkRgCntrl
3335 * Desc : This structure holds MAC's Control information.
3344 **********************************************************/
3346 PUBLIC S16 cmPkRgCntrl
3353 PUBLIC S16 cmPkRgCntrl(param, elmnt, mBuf)
3367 switch(param->subAction) {
3369 CMCHKPK(cmPkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
3374 switch(param->subAction) {
3376 CMCHKPK(SPkS16, param->s.trcLen, mBuf);
3379 CMCHKPK(cmPkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
3385 CMCHKPK(SPkU32, param->s.logMask, mBuf);
3388 #ifdef PHY_ERROR_LOGING
3390 CMCHKPK(cmPkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
3400 CMCHKPK(SPkU8, param->subAction, mBuf);
3401 CMCHKPK(SPkU8, param->action, mBuf);
3402 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
3408 /***********************************************************
3410 * Func : cmUnpkRgCntrl
3413 * Desc : This structure holds MAC's Control information.
3422 **********************************************************/
3424 PUBLIC S16 cmUnpkRgCntrl
3431 PUBLIC S16 cmUnpkRgCntrl(param, elmnt, mBuf)
3440 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
3441 CMCHKUNPK(SUnpkU8, ¶m->action, mBuf);
3442 CMCHKUNPK(SUnpkU8, ¶m->subAction, mBuf);
3445 switch(param->subAction) {
3447 CMCHKUNPK(cmUnpkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
3450 CMCHKUNPK(SUnpkS16, ¶m->s.trcLen, mBuf);
3456 CMCHKUNPK(SUnpkU32, ¶m->s.logMask, mBuf);
3459 #ifdef PHY_ERROR_LOGING
3461 CMCHKUNPK(cmUnpkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
3472 switch(param->subAction) {
3474 CMCHKUNPK(cmUnpkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
3486 /***********************************************************
3488 * Func : cmPkRgMngmt
3491 * Desc : This structure holds MAC's Configuration and Control Management Information.
3500 **********************************************************/
3502 PUBLIC S16 cmPkRgMngmt
3510 PUBLIC S16 cmPkRgMngmt(pst, param, eventType, mBuf)
3521 case EVTLRGCNTRLREQ:
3522 case EVTLRGCNTRLCFM:
3523 case EVTLRGSCHCNTRLREQ:
3524 case EVTLRGSCHCNTRLCFM:
3525 if(cmPkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
3529 CMCHKPK(cmPkRgTrc, ¶m->t.trc, mBuf);
3532 case EVTLRGSCHSTAIND:
3533 CMCHKPK(cmPkRgUsta, ¶m->t.usta, mBuf);
3537 /*ccpu00118255 - ADD - eventType param */
3539 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt,
3540 eventType, mBuf) != ROK)
3542 #else /* LRG_V1 is not defined */
3543 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
3545 #endif /* end of LRG_V1*/
3549 if(cmPkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf)!= ROK)
3554 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3557 case EVTMACSCHGENCFGREQ:
3558 case EVTMACSCHGENCFGCFM:
3559 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3565 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
3566 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
3572 /***********************************************************
3574 * Func : cmUnpkRgMngmt
3577 * Desc : This structure holds MAC's Configuration and Control Management Information.
3586 **********************************************************/
3588 PUBLIC S16 cmUnpkRgMngmt
3596 PUBLIC S16 cmUnpkRgMngmt(pst, param, eventType, mBuf)
3606 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
3607 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
3611 case EVTMACSCHGENCFGREQ:
3612 case EVTMACSCHGENCFGCFM:
3613 if(cmUnpkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3618 if(cmUnpkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf) != ROK)
3623 if(cmUnpkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
3627 case EVTLRGSCHSTAIND:
3628 CMCHKUNPK(cmUnpkRgUsta, ¶m->t.usta, mBuf);
3631 CMCHKUNPK(cmUnpkRgTrc, ¶m->t.trc, mBuf);
3633 case EVTLRGCNTRLREQ:
3634 case EVTLRGCNTRLCFM:
3635 case EVTLRGSCHCNTRLREQ:
3636 case EVTLRGSCHCNTRLCFM:
3637 if(cmUnpkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
3646 /* lrg_c_001.main_3 - ADD - Added the functions pertaining to LTE_L2_MEAS */
3650 * @brief This API is used to pack
3651 LrgNmbActvUeQCI elements
3655 * Function: cmPkNmbActvUeQciReq
3657 * @param[in] LrgNmbActvUeQCI
3658 * @param[in] Buffer *mBuf
3663 PRIVATE S16 cmPkNmbActvUeQciReq
3665 LrgNmbActvUeQCI *nmbActvUeQci,
3669 PRIVATE S16 cmPkNmbActvUeQciReq(nmbActvUeQci, mBuf)
3670 LrgNmbActvUeQCI *nmbActvUeQci;
3676 TRC3(cmPkNmbActvUeQciReq)
3678 for(idx = 0; idx < nmbActvUeQci->numQci; idx++)
3680 CMCHKPK(SPkU8, nmbActvUeQci->qci[idx], mBuf);
3682 CMCHKPK(SPkU8, nmbActvUeQci->numQci, mBuf);
3683 CMCHKPK(SPkU8, nmbActvUeQci->sampPrd, mBuf);
3688 * @brief This API is used to pack
3689 LrgAvgPrbQci elements
3693 * Function: cmPkAvgPrbQciReq
3695 * @param[in] LrgNmbActvUeQciReq *avgPrbQciReq
3696 * @param[in] Buffer *mBuf
3701 PRIVATE S16 cmPkAvgPrbQciReq
3703 LrgAvgPrbQCI *avgPrbQciReq,
3707 PRIVATE S16 cmPkAvgPrbQciReq(avgPrbQciReq, mBuf)
3708 LrgAvgPrbQCI *avgPrbQciReq;
3714 TRC3(cmPkAvgPrbQciReq)
3716 for(idx = 0; idx < avgPrbQciReq->numQci; idx++)
3718 CMCHKPK(SPkU8, avgPrbQciReq->qci[idx], mBuf);
3720 CMCHKPK(SPkU8, avgPrbQciReq->numQci, mBuf);
3726 * @brief This API is used to send a
3727 L2 Measurement Request from LM to MAC.
3731 * Function: cmPkLrgSchL2MeasReq
3733 * @param[in] Pst * pst
3734 * @param[in] LrgSchMeasReqInfo * measInfo
3739 PUBLIC S16 cmPkLrgSchL2MeasReq
3742 LrgSchMeasReqInfo *measInfo
3745 PUBLIC S16 cmPkLrgSchL2MeasReq(pst, measInfo)
3747 LrgSchMeasReqInfo *measInfo;
3750 Buffer *mBuf = NULLP;
3751 TRC3(cmPkLrgSchL2MeasReq)
3753 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3754 #if (ERRCLASS & ERRCLS_ADD_RES)
3755 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3756 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3757 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3761 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3763 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciDl, mBuf);
3765 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3767 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciUl, mBuf);
3769 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3771 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciDl, mBuf);
3773 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3775 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciUl, mBuf);
3778 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3779 CMCHKPK(SPkU32, measInfo->timePrd, mBuf);
3780 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3781 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3782 pst->event = (Event) EVTLRGSCHL2MEASREQ;
3783 RETVALUE(SPstTsk(pst,mBuf));
3786 * @brief This API is used to stop a
3787 L2 Measurement Request from LM to MAC.
3791 * Function: cmPkLrgSchL2MeasStopReq
3793 * @param[in] Pst * pst
3794 * @param[in] LrgSchMeasReqInfo * measInfo
3799 PUBLIC S16 cmPkLrgSchL2MeasStopReq
3802 LrgSchMeasStopReqInfo *measInfo
3805 PUBLIC S16 cmPkLrgSchL2MeasStopReq(pst, measInfo)
3807 LrgSchMeasStopReqInfo *measInfo;
3810 Buffer *mBuf = NULLP;
3811 TRC3(cmPkLrgSchL2MeasStopReq)
3813 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3814 #if (ERRCLASS & ERRCLS_ADD_RES)
3815 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3816 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3817 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3821 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3822 /*CMCHKPK(SPkU16, measInfo->timePrd, mBuf);*/
3823 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3824 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3825 pst->event = (Event) EVTLRGSCHL2MEASSTOPREQ;
3826 RETVALUE(SPstTsk(pst,mBuf));
3827 }/*cmPkLrgSchL2MeasStopReq*/
3830 * @brief This API is used to send a
3831 L2 Measurement Request from LM to MAC.
3835 * Function: cmPkLrgSchL2MeasSendReq
3837 * @param[in] Pst * pst
3838 * @param[in] LrgSchMeasReqInfo * measInfo
3843 PUBLIC S16 cmPkLrgSchL2MeasSendReq
3846 LrgSchMeasSndReqInfo *measInfo
3849 PUBLIC S16 cmPkLrgSchL2MeasSendReq(pst, measInfo)
3851 LrgSchMeasSndReqInfo *measInfo;
3854 Buffer *mBuf = NULLP;
3855 TRC3(cmPkLrgSchL2MeasSendReq)
3856 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3857 #if (ERRCLASS & ERRCLS_ADD_RES)
3858 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3859 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3860 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3864 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3865 CMCHKPK(SPkU32, measInfo->timePrd, mBuf);
3866 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3867 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3868 pst->event = (Event) EVTLRGSCHL2MEASSENDREQ;
3869 RETVALUE(SPstTsk(pst,mBuf));
3870 }/*cmPkLrgSchL2MeasSendReq*/
3873 * @brief This API is used to unpack AvgPrbQciReq
3877 * Function: cmUnpkNmbActvUeQciReq
3879 * @param[in] LrgNmbActvUeQCI *param
3880 * @param[in] Buffer * mBuf
3885 PRIVATE S16 cmUnpkNmbActvUeQciReq
3887 LrgNmbActvUeQCI *param,
3891 PRIVATE S16 cmUnpkNmbActvUeQciReq(param, mBuf)
3892 LrgNmbActvUeQCI *param;
3898 TRC3(cmUnpkNmbActvUeQciReq)
3900 CMCHKUNPK(SUnpkU8, ¶m->sampPrd, mBuf);
3901 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
3902 for(idx = param->numQci; idx > 0; idx--)
3904 CMCHKUNPK(SUnpkU8, ¶m->qci[idx - 1], mBuf);
3911 * @brief This API is used to unpack AvgPrbQciReq
3915 * Function: cmUnpkAvgPrbQciReq
3917 * @param[in] LrgAvgPrbQCI *param
3918 * @param[in] Buffer * mBuf
3923 PRIVATE S16 cmUnpkAvgPrbQciReq
3925 LrgAvgPrbQCI *param,
3929 PRIVATE S16 cmUnpkAvgPrbQciReq (param, mBuf)
3930 LrgAvgPrbQCI *param;
3936 TRC3(cmUnpkAvgPrbQciReq)
3938 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
3939 for(idx = param->numQci; idx > 0; idx--)
3941 CMCHKUNPK(SUnpkU8, ¶m->qci[idx - 1], mBuf);
3948 * @brief This API is used to send a
3949 Measurement Request from LM to SCH.
3953 * Function: cmUnpkLrgSchL2MeasReq
3955 * @param[in] LrgSchMeasReq func
3956 * @param[in] Pst * pst
3957 * @param[in] Buffer * mBuf
3962 PUBLIC S16 cmUnpkLrgSchL2MeasReq
3964 LrgSchL2MeasReq func,
3969 PUBLIC S16 cmUnpkLrgSchL2MeasReq(func, pst, mBuf)
3970 LrgSchL2MeasReq func;
3975 LrgSchMeasReqInfo measInfo;
3977 TRC3(cmUnpkLrgSchL2MeasReq)
3979 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3980 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
3981 CMCHKUNPK(SUnpkU32, &measInfo.timePrd, mBuf);
3982 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
3983 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3985 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciUl, mBuf);
3987 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3989 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciDl, mBuf);
3991 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3993 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciUl, mBuf);
3995 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3997 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciDl, mBuf);
4000 RETVALUE((*func)(pst, &measInfo));
4004 * @brief This API is used to stop a
4005 Measurement Request from LM to SCH.
4009 * Function: cmUnpkLrgSchL2MeasStopReq
4011 * @param[in] LrgSchMeasStopReq func
4012 * @param[in] Pst * pst
4013 * @param[in] Buffer * mBuf
4018 PUBLIC S16 cmUnpkLrgSchL2MeasStopReq
4020 LrgSchL2MeasStopReq func,
4025 PUBLIC S16 cmUnpkLrgSchL2MeasStopReq(func, pst, mBuf)
4026 LrgSchL2MeasStopReq func;
4031 LrgSchMeasStopReqInfo measInfo;
4033 TRC3(cmUnpkLrgSchL2MeasStopReq)
4035 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4036 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4037 /*CMCHKUNPK(SUnpkU16, &measInfo.timePrd, mBuf);*/
4038 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4040 RETVALUE((*func)(pst, &measInfo));
4041 }/*cmUnpkLrgSchL2MeasStopReq*/
4044 * @brief This API is used to send a
4045 Measurement Request from LM to SCH.
4049 * Function: cmUnpkLrgSchL2MeasSendReq
4051 * @param[in] LrgSchMeasSendReq func
4052 * @param[in] Pst * pst
4053 * @param[in] Buffer * mBuf
4058 PUBLIC S16 cmUnpkLrgSchL2MeasSendReq
4060 LrgSchL2MeasSendReq func,
4065 PUBLIC S16 cmUnpkLrgSchL2MeasSendReq(func, pst, mBuf)
4066 LrgSchL2MeasSendReq func;
4071 LrgSchMeasSndReqInfo measInfo;
4072 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4073 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4074 CMCHKUNPK(SUnpkU32, &measInfo.timePrd, mBuf);
4075 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4077 RETVALUE((*func)(pst, &measInfo));
4078 }/*cmUnpkLrgSchL2MeasSendReq*/
4081 * @brief This API is used to stop a
4082 L2 Measurement confirm from MAC to LM
4086 * Function: cmPkLrgSchL2MeasStopCfm
4088 * @param[in] Pst * pst
4089 * @param[in] LrgSchMeasCfmInfo * measInfo
4094 PUBLIC S16 cmPkLrgSchL2MeasStopCfm
4097 LrgSchMeasCfmInfo *measInfo
4100 PUBLIC S16 cmPkLrgSchL2MeasStopCfm(pst, measInfo)
4102 LrgSchMeasCfmInfo *measInfo;
4105 Buffer *mBuf = NULLP;
4107 TRC3(cmPkLrgSchL2MeasStopCfm)
4108 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
4109 #if (ERRCLASS & ERRCLS_ADD_RES)
4110 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
4111 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
4112 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
4116 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
4117 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
4118 CMCHKPK(SPkU16, measInfo->measType, mBuf);
4119 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
4120 pst->event = (Event) EVTLRGSCHL2MEASSTOPCFM;
4121 RETVALUE(SPstTsk(pst,mBuf));
4122 }/*cmPkLrgSchL2MeasStopCfm*/
4124 * @brief This API is used to Send a
4125 Measurement Confirm from SCH to LM.
4129 * Function: cmUnpkLrgL2SchMeasCfm
4131 * @param[in] Pst * pst
4132 * @param[in] Buffer * mBuf
4137 PUBLIC S16 cmUnpkLrgSchL2MeasStopCfm
4139 LrgSchL2MeasStopCfm func,
4144 PUBLIC S16 cmUnpkLrgSchL2MeasStopCfm(func, pst, mBuf)
4145 LrgSchL2MeasStopCfm func;
4150 LrgSchMeasCfmInfo measInfo;
4152 TRC3(cmUnpkLrgSchL2MeasCfm)
4154 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4155 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4156 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
4157 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4160 RETVALUE((*func)(pst, &measInfo));
4161 }/*cmUnpkLrgSchL2MeasStopCfm*/
4164 * @brief This API is used to unpack LrgNumActvUeQCICfm structure
4168 * Function: cmPkNumUeQciCfm
4170 * @param[in] LrgNumActvUeQCICfm * param
4171 * @param[in] Buffer * mBuf
4176 PRIVATE S16 cmPkNumUeQciCfm
4178 LrgNumActvUeQCICfm *param,
4182 PRIVATE S16 cmPkNumUeQciCfm(param, mBuf)
4183 LrgNumActvUeQCICfm *param;
4189 TRC3(cmPkNumUeQciCfm)
4191 for(idx = 0; idx < param->numQci; idx++)
4193 /*LRG : Review Tag*/
4194 CMCHKPK(SPkU8, param->numActvUeQci[idx].qciValue, mBuf);
4195 CMCHKPK(SPkU8, param->numActvUeQci[idx].numActvUeQci, mBuf);
4196 /*LRG : Review Tag*/
4198 CMCHKPK(SPkU8, param->numQci, mBuf);
4203 * @brief This API is used to unpack LrgAvgPrbQCICfm structure
4207 * Function: cmPkAvgPrbQciCfm
4209 * @param[in] LrgAvgPrbQCICfm * param
4210 * @param[in] Buffer * mBuf
4215 PRIVATE S16 cmPkAvgPrbQciCfm
4217 LrgAvgPrbQCICfm *param,
4221 PRIVATE S16 cmPkAvgPrbQciCfm(param, mBuf)
4222 LrgAvgPrbQCICfm *param;
4228 TRC3(cmPkAvgPrbQciCfm)
4229 for(idx = 0; idx < param->numQci; idx++)
4231 /*LRG : Review Tag*/
4232 CMCHKPK(SPkU8, param->prbPercQci[idx].qciValue, mBuf);
4233 CMCHKPK(SPkU8, param->prbPercQci[idx].prbPercQci, mBuf);
4234 /*LRG : Review Tag*/
4236 CMCHKPK(SPkU8, param->numQci, mBuf);
4241 * @brief This API is used to unpack raPreamblesCfm structure
4245 * Function: cmPkRaPrmbsCfm
4247 * @param[in] LrgRaPreamblesCfm * param
4248 * @param[in] Buffer * mBuf
4253 PRIVATE S16 cmPkRaPrmbsCfm
4255 LrgRaPreamblesCfm *param,
4259 PRIVATE S16 cmPkRaPrmbsCfm(param, mBuf)
4260 LrgRaPreamblesCfm *param;
4265 TRC3(cmPkRaPrmbsCfm)
4266 CMCHKPK(SPkU16, param->randSelPreHighRange, mBuf);
4267 CMCHKPK(SPkU16, param->randSelPreLowRange, mBuf);
4268 CMCHKPK(SPkU16, param->dedPreambles, mBuf);
4273 * @brief This API is used to unpack avgPrbCfm structure
4277 * Function: cmPkAvgPrbCfm
4279 * @param[in] LrgAvgPrbCfm * param
4280 * @param[in] Buffer * mBuf
4285 PRIVATE S16 cmPkAvgPrbCfm
4287 LrgAvgPrbCfm *param,
4291 PRIVATE S16 cmPkAvgPrbCfm(param, mBuf)
4292 LrgAvgPrbCfm *param;
4298 CMCHKPK(SPkU8, param->prbPerc, mBuf);
4303 * @brief This API is used to send a
4304 L2 Measurement confirm from MAC to LM
4308 * Function: cmPkLrgSchL2MeasCfm
4310 * @param[in] Pst * pst
4311 * @param[in] LrgSchMeasCfmInfo * measInfo
4316 PUBLIC S16 cmPkLrgSchL2MeasCfm
4319 LrgSchMeasCfmInfo *measInfo
4322 PUBLIC S16 cmPkLrgSchL2MeasCfm(pst, measInfo)
4324 LrgSchMeasCfmInfo *measInfo;
4327 Buffer *mBuf = NULLP;
4329 TRC3(cmPkLrgSchL2MeasCfm)
4331 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
4332 #if (ERRCLASS & ERRCLS_ADD_RES)
4333 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
4334 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
4335 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
4339 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4341 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciDlCfm, mBuf);
4343 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4345 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciUlCfm, mBuf);
4347 if(measInfo->measType & LRG_L2MEAS_RA_PREAMBLE)
4349 CMCHKPK(cmPkRaPrmbsCfm, &measInfo->raPrmbsCfm, mBuf);
4351 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4353 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciDlCfm, mBuf);
4355 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4357 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciUlCfm, mBuf);
4359 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_DL)
4361 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbDl, mBuf);
4363 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_UL)
4365 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbUl, mBuf);
4367 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
4369 CMCHKPK(SPkU32, measInfo->tbTransDlTotalCnt, mBuf);
4371 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
4373 CMCHKPK(SPkU32, measInfo->tbTransDlFaulty, mBuf);
4375 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
4377 CMCHKPK(SPkU32, measInfo->tbTransUlTotalCnt, mBuf);
4379 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
4381 CMCHKPK(SPkU32, measInfo->tbTransUlFaulty, mBuf);
4383 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
4384 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
4385 CMCHKPK(SPkU16, measInfo->measType, mBuf);
4386 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
4387 pst->event = (Event) EVTLRGSCHL2MEASCFM;
4388 RETVALUE(SPstTsk(pst,mBuf));
4392 * @brief This API is used to unpack LrgNumActvUeQCICfm
4396 * Function: cmUnpkNumUeQciCfm
4398 * @param[in] LrgNumActvUeQCICfm *param
4399 * @param[in] Buffer * mBuf
4404 PRIVATE S16 cmUnpkNumUeQciCfm
4406 LrgNumActvUeQCICfm *param,
4410 PRIVATE S16 cmUnpkNumUeQciCfm(param, mBuf)
4411 LrgNumActvUeQCICfm *param;
4417 TRC3(cmUnpkNumUeQciCfm)
4418 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
4419 for(idx = param->numQci; idx > 0; idx--)
4421 /*LRG : Review Tag*/
4422 CMCHKUNPK(SUnpkU8, ¶m->numActvUeQci[idx - 1].numActvUeQci, mBuf);
4423 CMCHKUNPK(SUnpkU8, ¶m->numActvUeQci[idx - 1].qciValue, mBuf);
4424 /*LRG : Review Tag*/
4430 * @brief This API is used to unpack LrgAvgPrbQCICfm
4434 * Function: cmUnpkAvgPrbQciCfm
4436 * @param[in] LrgAvgPrbQCICfm *param
4437 * @param[in] Buffer * mBuf
4442 PRIVATE S16 cmUnpkAvgPrbQciCfm
4444 LrgAvgPrbQCICfm *param,
4448 PRIVATE S16 cmUnpkAvgPrbQciCfm(param, mBuf)
4449 LrgAvgPrbQCICfm *param;
4455 TRC3(cmUnpkAvgPrbQciCfm)
4457 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
4458 for(idx = param->numQci; idx > 0; idx--)
4460 /*LRG : Review Tag*/
4461 CMCHKUNPK(SUnpkU8, ¶m->prbPercQci[idx - 1].prbPercQci, mBuf);
4462 CMCHKUNPK(SUnpkU8, ¶m->prbPercQci[idx - 1].qciValue, mBuf);
4463 /*LRG : Review Tag*/
4469 * @brief This API is used to unpack LrgRaPreamblesCfm
4473 * Function: cmUnpkRaPrmbsCfm
4475 * @param[in] LrgRaPreamblesCfm *param
4476 * @param[in] Buffer * mBuf
4481 PRIVATE S16 cmUnpkRaPrmbsCfm
4483 LrgRaPreamblesCfm *param,
4487 PRIVATE S16 cmUnpkRaPrmbsCfm(param, mBuf)
4488 LrgRaPreamblesCfm *param;
4493 TRC3(cmUnpkRaPrmbsCfm)
4495 CMCHKUNPK(SUnpkU16, ¶m->dedPreambles, mBuf);
4496 CMCHKUNPK(SUnpkU16, ¶m->randSelPreLowRange, mBuf);
4497 CMCHKUNPK(SUnpkU16, ¶m->randSelPreHighRange, mBuf);
4502 * @brief This API is used to unpack avgPrbCfm
4506 * Function: cmUnpkAvgPrbCfm
4508 * @param[in] LrgAvgPrbCfm *param
4509 * @param[in] Buffer * mBuf
4514 PRIVATE S16 cmUnpkAvgPrbCfm
4516 LrgAvgPrbCfm *param,
4520 PRIVATE S16 cmUnpkAvgPrbCfm(param, mBuf)
4521 LrgAvgPrbCfm *param;
4526 TRC3(cmUnpkAvgPrbCfm)
4528 CMCHKUNPK(SUnpkU8, ¶m->prbPerc, mBuf);
4533 * @brief This API is used to send a
4534 Measurement Confirm from LM to SCH.
4538 * Function: cmUnpkLrgL2SchMeasCfm
4540 * @param[in] Pst * pst
4541 * @param[in] Buffer * mBuf
4546 PUBLIC S16 cmUnpkLrgSchL2MeasCfm
4548 LrgSchL2MeasCfm func,
4553 PUBLIC S16 cmUnpkLrgSchL2MeasCfm(func, pst, mBuf)
4554 LrgSchL2MeasCfm func;
4559 LrgSchMeasCfmInfo measInfo;
4561 TRC3(cmUnpkLrgSchL2MeasCfm)
4563 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4564 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4565 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
4566 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4567 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
4569 CMCHKPK(SUnpkU32, &measInfo.tbTransUlFaulty, mBuf);
4571 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
4573 CMCHKPK(SUnpkU32, &measInfo.tbTransUlTotalCnt, mBuf);
4575 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
4577 CMCHKPK(SUnpkU32, &measInfo.tbTransDlFaulty, mBuf);
4579 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
4581 CMCHKPK(SUnpkU32, &measInfo.tbTransDlTotalCnt, mBuf);
4583 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_UL)
4585 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbUl, mBuf);
4587 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_DL)
4589 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbDl, mBuf);
4591 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4593 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciUlCfm, mBuf);
4595 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4597 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciDlCfm, mBuf);
4599 if(measInfo.measType & LRG_L2MEAS_RA_PREAMBLE)
4601 CMCHKUNPK(cmUnpkRaPrmbsCfm, &measInfo.raPrmbsCfm, mBuf);
4603 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4605 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciUlCfm, mBuf);
4607 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4609 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciDlCfm, mBuf);
4612 RETVALUE((*func)(pst, &measInfo));
4618 /**********************************************************************
4620 **********************************************************************/