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, EVTLRGSCHCFGREQ, 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 pst->event = (Event) EVTLRGSCHCFGREQ;
209 RETVALUE(SPstTsk(pst,mBuf));
214 * @brief This API is used to send a
215 Configuration Request from LM to SCH.
219 * Function: cmUnpkLrgSchCfgReq
221 * @param[in] Pst * pst
222 * @param[in] RgMngmt * cfg
227 PUBLIC S16 cmUnpkLrgSchCfgReq
234 PUBLIC S16 cmUnpkLrgSchCfgReq(func, pst, mBuf)
240 /* lrg_c_001.main_2: Changed Pointer across Interface */
243 TRC3(cmUnpkLrgSchCfgReq)
245 if (cmUnpkRgMngmt(pst, &cfg, EVTLRGSCHCFGREQ, mBuf) != ROK) {
247 #if (ERRCLASS & ERRCLS_ADD_RES)
248 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
249 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
250 (ErrVal)ELRG006, (ErrVal)0, "Packing failed");
255 RETVALUE((*func)(pst, &cfg));
260 * @brief This API is used to send a
261 Configuration Confirm from MAC to LM.
265 * Function: cmPkLrgCfgCfm
267 * @param[in] Pst * pst
268 * @param[in] RgMngmt * cfm
273 PUBLIC S16 cmPkLrgCfgCfm
279 PUBLIC S16 cmPkLrgCfgCfm(pst, cfm)
284 Buffer *mBuf = NULLP;
287 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
288 #if (ERRCLASS & ERRCLS_ADD_RES)
289 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
290 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
291 (ErrVal)ELRG007, (ErrVal)0, "Packing failed");
295 if (pst->selector == LRG_SEL_LC) {
296 if (cmPkRgMngmt(pst, cfm, EVTLRGCFGCFM, mBuf) != ROK) {
297 #if (ERRCLASS & ERRCLS_ADD_RES)
298 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
299 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
300 (ErrVal)ELRG008, (ErrVal)0, "Packing failed");
307 pst->event = (Event) EVTLRGCFGCFM;
308 RETVALUE(SPstTsk(pst,mBuf));
313 * @brief This API is used to send a
314 Configuration Confirm from MAC to LM.
318 * Function: cmUnpkLrgCfgCfm
320 * @param[in] Pst * pst
321 * @param[in] RgMngmt * cfm
326 PUBLIC S16 cmUnpkLrgCfgCfm
333 PUBLIC S16 cmUnpkLrgCfgCfm(func, pst, mBuf)
341 TRC3(cmUnpkLrgCfgCfm)
343 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCFGCFM, mBuf) != ROK) {
345 #if (ERRCLASS & ERRCLS_ADD_RES)
346 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
347 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
348 (ErrVal)ELRG009, (ErrVal)0, "Packing failed");
353 RETVALUE((*func)(pst, &cfm));
358 * @brief This API is used to send a
359 Configuration Confirm from SCH to LM.
363 * Function: cmPkLrgSchCfgCfm
365 * @param[in] Pst * pst
366 * @param[in] RgMngmt * cfg
371 PUBLIC S16 cmPkLrgSchCfgCfm
377 PUBLIC S16 cmPkLrgSchCfgCfm(pst, cfg)
382 Buffer *mBuf = NULLP;
383 TRC3(cmPkLrgSchCfgCfm)
385 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
386 #if (ERRCLASS & ERRCLS_ADD_RES)
387 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
388 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
389 (ErrVal)ELRG010, (ErrVal)0, "Packing failed");
393 if (pst->selector == LRG_SEL_LC) {
394 if (cmPkRgMngmt(pst, cfg, EVTLRGSCHCFGCFM, mBuf) != ROK) {
395 #if (ERRCLASS & ERRCLS_ADD_RES)
396 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
397 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
398 (ErrVal)ELRG011, (ErrVal)0, "Packing failed");
405 pst->event = (Event) EVTLRGSCHCFGCFM;
406 RETVALUE(SPstTsk(pst,mBuf));
411 * @brief This API is used to send a
412 Configuration Confirm from SCH to LM.
416 * Function: cmUnpkLrgSchCfgCfm
418 * @param[in] Pst * pst
419 * @param[in] RgMngmt * cfg
424 PUBLIC S16 cmUnpkLrgSchCfgCfm
431 PUBLIC S16 cmUnpkLrgSchCfgCfm(func, pst, mBuf)
439 TRC3(cmUnpkLrgSchCfgCfm)
441 if (cmUnpkRgMngmt(pst, &cfg, EVTLRGSCHCFGCFM, mBuf) != ROK) {
443 #if (ERRCLASS & ERRCLS_ADD_RES)
444 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
445 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
446 (ErrVal)ELRG012, (ErrVal)0, "Packing failed");
451 RETVALUE((*func)(pst, &cfg));
456 * @brief This API is used to send a
457 Statistics Request from LM to MAC.
461 * Function: cmPkLrgStsReq
463 * @param[in] Pst * pst
464 * @param[in] RgMngmt * sts
469 PUBLIC S16 cmPkLrgStsReq
475 PUBLIC S16 cmPkLrgStsReq(pst, sts)
480 Buffer *mBuf = NULLP;
483 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
484 #if (ERRCLASS & ERRCLS_ADD_RES)
485 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
486 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
487 (ErrVal)ELRG013, (ErrVal)0, "Packing failed");
491 if (pst->selector == LRG_SEL_LC) {
492 if (cmPkRgMngmt(pst, sts, EVTLRGSTSREQ, mBuf) != ROK) {
493 #if (ERRCLASS & ERRCLS_ADD_RES)
494 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
495 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
496 (ErrVal)ELRG014, (ErrVal)0, "Packing failed");
503 pst->event = (Event) EVTLRGSTSREQ;
504 RETVALUE(SPstTsk(pst,mBuf));
509 * @brief This API is used to send a
510 Statistics Request from LM to MAC.
514 * Function: cmUnpkLrgStsReq
516 * @param[in] Pst * pst
517 * @param[in] RgMngmt * sts
522 PUBLIC S16 cmUnpkLrgStsReq
529 PUBLIC S16 cmUnpkLrgStsReq(func, pst, mBuf)
537 TRC3(cmUnpkLrgStsReq)
539 if (cmUnpkRgMngmt(pst, &sts, EVTLRGSTSREQ, mBuf) != ROK) {
541 #if (ERRCLASS & ERRCLS_ADD_RES)
542 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
543 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
544 (ErrVal)ELRG015, (ErrVal)0, "Packing failed");
549 RETVALUE((*func)(pst, &sts));
554 * @brief This API is used to send a
555 Statistics Confirm from MAC to LM.
559 * Function: cmPkLrgStsCfm
561 * @param[in] Pst * pst
562 * @param[in] RgMngmt * cfm
567 PUBLIC S16 cmPkLrgStsCfm
573 PUBLIC S16 cmPkLrgStsCfm(pst, cfm)
578 Buffer *mBuf = NULLP;
581 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
582 #if (ERRCLASS & ERRCLS_ADD_RES)
583 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
584 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
585 (ErrVal)ELRG016, (ErrVal)0, "Packing failed");
589 if (pst->selector == LRG_SEL_LC) {
590 if (cmPkRgMngmt(pst, cfm, EVTLRGSTSCFM, mBuf) != ROK) {
591 #if (ERRCLASS & ERRCLS_ADD_RES)
592 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
593 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
594 (ErrVal)ELRG017, (ErrVal)0, "Packing failed");
601 pst->event = (Event) EVTLRGSTSCFM;
602 RETVALUE(SPstTsk(pst,mBuf));
607 * @brief This API is used to send a
608 Statistics Confirm from MAC to LM.
612 * Function: cmUnpkLrgStsCfm
614 * @param[in] Pst * pst
615 * @param[in] RgMngmt * cfm
620 PUBLIC S16 cmUnpkLrgStsCfm
627 PUBLIC S16 cmUnpkLrgStsCfm(func, pst, mBuf)
635 TRC3(cmUnpkLrgStsCfm)
637 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSTSCFM, mBuf) != ROK) {
639 #if (ERRCLASS & ERRCLS_ADD_RES)
640 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
641 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
642 (ErrVal)ELRG018, (ErrVal)0, "Packing failed");
647 RETVALUE((*func)(pst, &cfm));
652 * @brief This API is used to send a
653 Status Request from LM to MAC.
657 * Function: cmPkLrgStaReq
659 * @param[in] Pst * pst
660 * @param[in] RgMngmt * sta
665 PUBLIC S16 cmPkLrgStaReq
671 PUBLIC S16 cmPkLrgStaReq(pst, sta)
676 Buffer *mBuf = NULLP;
679 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
680 #if (ERRCLASS & ERRCLS_ADD_RES)
681 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
682 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
683 (ErrVal)ELRG019, (ErrVal)0, "Packing failed");
687 if (cmPkRgMngmt(pst, sta, EVTLRGSSTAREQ, mBuf) != ROK) {
688 #if (ERRCLASS & ERRCLS_ADD_RES)
689 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
690 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
691 (ErrVal)ELRG020, (ErrVal)0, "Packing failed");
697 pst->event = (Event) EVTLRGSSTAREQ;
698 RETVALUE(SPstTsk(pst,mBuf));
703 * @brief This API is used to send a
704 Status Request from LM to MAC.
708 * Function: cmUnpkLrgStaReq
710 * @param[in] Pst * pst
711 * @param[in] RgMngmt * sta
716 PUBLIC S16 cmUnpkLrgStaReq
723 PUBLIC S16 cmUnpkLrgStaReq(func, pst, mBuf)
731 TRC3(cmUnpkLrgStaReq)
733 cmMemset((U8 *)&sta, 0, sizeof(RgMngmt));
734 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSSTAREQ, mBuf) != ROK) {
735 #if (ERRCLASS & ERRCLS_ADD_RES)
736 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
737 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
738 (ErrVal)ELRG021, (ErrVal)0, "Packing failed");
744 RETVALUE((*func)(pst, &sta));
749 * @brief This API is used to send a
750 Status Confirm from MAC to LM.
754 * Function: cmPkLrgStaCfm
756 * @param[in] Pst * pst
757 * @param[in] RgMngmt * cfm
762 PUBLIC S16 cmPkLrgStaCfm
768 PUBLIC S16 cmPkLrgStaCfm(pst, cfm)
773 Buffer *mBuf = NULLP;
776 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
777 #if (ERRCLASS & ERRCLS_ADD_RES)
778 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
779 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
780 (ErrVal)ELRG022, (ErrVal)0, "Packing failed");
784 if (cmPkRgMngmt(pst, cfm, EVTLRGSSTACFM, mBuf) != ROK) {
785 #if (ERRCLASS & ERRCLS_ADD_RES)
786 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
787 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
788 (ErrVal)ELRG023, (ErrVal)0, "Packing failed");
794 pst->event = (Event) EVTLRGSSTACFM;
795 RETVALUE(SPstTsk(pst,mBuf));
800 * @brief This API is used to send a
801 Status Confirm from MAC to LM.
805 * Function: cmUnpkLrgStaCfm
807 * @param[in] Pst * pst
808 * @param[in] RgMngmt * cfm
813 PUBLIC S16 cmUnpkLrgStaCfm
820 PUBLIC S16 cmUnpkLrgStaCfm(func, pst, mBuf)
828 TRC3(cmUnpkLrgStaCfm)
830 cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
831 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSSTACFM, mBuf) != ROK) {
832 #if (ERRCLASS & ERRCLS_ADD_RES)
833 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
834 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
835 (ErrVal)ELRG024, (ErrVal)0, "Packing failed");
841 RETVALUE((*func)(pst, &cfm));
846 * @brief This API is used to send a
847 Status Indication from MAC to LM.
851 * Function: cmPkLrgStaInd
853 * @param[in] Pst * pst
854 * @param[in] RgMngmt * usta
859 PUBLIC S16 cmPkLrgStaInd
865 PUBLIC S16 cmPkLrgStaInd(pst, usta)
870 Buffer *mBuf = NULLP;
873 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
874 #if (ERRCLASS & ERRCLS_ADD_RES)
875 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
876 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
877 (ErrVal)ELRG025, (ErrVal)0, "Packing failed");
881 if (pst->selector == LRG_SEL_LC) {
882 if (cmPkRgMngmt(pst, usta, EVTLRGUSTAIND, mBuf) != ROK) {
883 #if (ERRCLASS & ERRCLS_ADD_RES)
884 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
885 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
886 (ErrVal)ELRG026, (ErrVal)0, "Packing failed");
893 pst->event = (Event) EVTLRGUSTAIND;
894 RETVALUE(SPstTsk(pst,mBuf));
899 * @brief This API is used to send a
900 Status Indication from MAC to LM.
904 * Function: cmUnpkLrgStaInd
906 * @param[in] Pst * pst
907 * @param[in] RgMngmt * usta
912 PUBLIC S16 cmUnpkLrgStaInd
919 PUBLIC S16 cmUnpkLrgStaInd(func, pst, mBuf)
927 TRC3(cmUnpkLrgStaInd)
929 if (cmUnpkRgMngmt(pst, &usta, EVTLRGUSTAIND, mBuf) != ROK) {
931 #if (ERRCLASS & ERRCLS_ADD_RES)
932 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
933 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
934 (ErrVal)ELRG027, (ErrVal)0, "Packing failed");
939 RETVALUE((*func)(pst, &usta));
944 * @brief This API is used to send a
945 Status Indication from SCH to LM.
949 * Function: cmPkLrgSchStaInd
951 * @param[in] Pst * pst
952 * @param[in] RgMngmt * sta
957 PUBLIC S16 cmPkLrgSchStaInd
963 PUBLIC S16 cmPkLrgSchStaInd(pst, sta)
968 Buffer *mBuf = NULLP;
969 TRC3(cmPkLrgSchStaInd)
971 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
972 #if (ERRCLASS & ERRCLS_ADD_RES)
973 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
974 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
975 (ErrVal)ELRG028, (ErrVal)0, "Packing failed");
979 if (pst->selector == LRG_SEL_LC) {
980 if (cmPkRgMngmt(pst, sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
981 #if (ERRCLASS & ERRCLS_ADD_RES)
982 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
983 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
984 (ErrVal)ELRG029, (ErrVal)0, "Packing failed");
991 pst->event = (Event) EVTLRGSCHSTAIND;
992 RETVALUE(SPstTsk(pst,mBuf));
997 * @brief This API is used to send a
998 Status Indication from SCH to LM.
1002 * Function: cmUnpkLrgSchStaInd
1004 * @param[in] Pst * pst
1005 * @param[in] RgMngmt * sta
1010 PUBLIC S16 cmUnpkLrgSchStaInd
1017 PUBLIC S16 cmUnpkLrgSchStaInd(func, pst, mBuf)
1025 TRC3(cmUnpkLrgSchStaInd)
1027 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
1029 #if (ERRCLASS & ERRCLS_ADD_RES)
1030 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1031 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1032 (ErrVal)ELRG030, (ErrVal)0, "Packing failed");
1037 RETVALUE((*func)(pst, &sta));
1042 * @brief This API is used to send a
1043 Control Request from LM to MAC.
1047 * Function: cmPkLrgCntrlReq
1049 * @param[in] Pst * pst
1050 * @param[in] RgMngmt * cntrl
1055 PUBLIC S16 cmPkLrgCntrlReq
1061 PUBLIC S16 cmPkLrgCntrlReq(pst, cntrl)
1066 Buffer *mBuf = NULLP;
1067 TRC3(cmPkLrgCntrlReq)
1069 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1070 #if (ERRCLASS & ERRCLS_ADD_RES)
1071 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1072 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1073 (ErrVal)ELRG031, (ErrVal)0, "Packing failed");
1077 if (pst->selector == LRG_SEL_LC) {
1078 if (cmPkRgMngmt(pst, cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
1079 #if (ERRCLASS & ERRCLS_ADD_RES)
1080 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1081 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1082 (ErrVal)ELRG032, (ErrVal)0, "Packing failed");
1089 pst->event = (Event) EVTLRGCNTRLREQ;
1090 RETVALUE(SPstTsk(pst,mBuf));
1095 * @brief This API is used to send a
1096 Control Request from LM to MAC.
1100 * Function: cmUnpkLrgCntrlReq
1102 * @param[in] Pst * pst
1103 * @param[in] RgMngmt * cntrl
1108 PUBLIC S16 cmUnpkLrgCntrlReq
1115 PUBLIC S16 cmUnpkLrgCntrlReq(func, pst, mBuf)
1123 TRC3(cmUnpkLrgCntrlReq)
1125 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
1127 #if (ERRCLASS & ERRCLS_ADD_RES)
1128 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1129 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1130 (ErrVal)ELRG033, (ErrVal)0, "Packing failed");
1135 RETVALUE((*func)(pst, &cntrl));
1140 * @brief This API is used to send a
1141 Control Request from LM to SCH.
1145 * Function: cmPkLrgSchCntrlReq
1147 * @param[in] Pst * pst
1148 * @param[in] RgMngmt * cntrl
1153 PUBLIC S16 cmPkLrgSchCntrlReq
1159 PUBLIC S16 cmPkLrgSchCntrlReq(pst, cntrl)
1164 Buffer *mBuf = NULLP;
1165 TRC3(cmPkLrgSchCntrlReq)
1167 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1168 #if (ERRCLASS & ERRCLS_ADD_RES)
1169 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1170 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1171 (ErrVal)ELRG034, (ErrVal)0, "Packing failed");
1175 if (pst->selector == LRG_SEL_LC) {
1176 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
1177 #if (ERRCLASS & ERRCLS_ADD_RES)
1178 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1179 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1180 (ErrVal)ELRG035, (ErrVal)0, "Packing failed");
1187 pst->event = (Event) EVTLRGSCHCNTRLREQ;
1188 RETVALUE(SPstTsk(pst,mBuf));
1193 * @brief This API is used to send a
1194 Control Request from LM to SCH.
1198 * Function: cmUnpkLrgSchCntrlReq
1200 * @param[in] Pst * pst
1201 * @param[in] RgMngmt * cntrl
1206 PUBLIC S16 cmUnpkLrgSchCntrlReq
1208 LrgSchCntrlReq func,
1213 PUBLIC S16 cmUnpkLrgSchCntrlReq(func, pst, mBuf)
1214 LrgSchCntrlReq func;
1221 TRC3(cmUnpkLrgSchCntrlReq)
1223 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
1225 #if (ERRCLASS & ERRCLS_ADD_RES)
1226 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1227 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1228 (ErrVal)ELRG036, (ErrVal)0, "Packing failed");
1233 RETVALUE((*func)(pst, &cntrl));
1238 * @brief This API is used to send a
1239 Control Confirm from MAC to LM.
1243 * Function: cmPkLrgCntrlCfm
1245 * @param[in] Pst * pst
1246 * @param[in] RgMngmt * cfm
1251 PUBLIC S16 cmPkLrgCntrlCfm
1257 PUBLIC S16 cmPkLrgCntrlCfm(pst, cfm)
1262 Buffer *mBuf = NULLP;
1263 TRC3(cmPkLrgCntrlCfm)
1265 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1266 #if (ERRCLASS & ERRCLS_ADD_RES)
1267 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1268 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1269 (ErrVal)ELRG037, (ErrVal)0, "Packing failed");
1273 if (pst->selector == LRG_SEL_LC) {
1274 if (cmPkRgMngmt(pst, cfm, EVTLRGCNTRLCFM, mBuf) != ROK) {
1275 #if (ERRCLASS & ERRCLS_ADD_RES)
1276 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1277 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1278 (ErrVal)ELRG038, (ErrVal)0, "Packing failed");
1285 pst->event = (Event) EVTLRGCNTRLCFM;
1286 RETVALUE(SPstTsk(pst,mBuf));
1291 * @brief This API is used to send a
1292 Control Confirm from MAC to LM.
1296 * Function: cmUnpkLrgCntrlCfm
1298 * @param[in] Pst * pst
1299 * @param[in] RgMngmt * cfm
1304 PUBLIC S16 cmUnpkLrgCntrlCfm
1311 PUBLIC S16 cmUnpkLrgCntrlCfm(func, pst, mBuf)
1319 TRC3(cmUnpkLrgCntrlCfm)
1321 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCNTRLCFM, mBuf) != ROK) {
1323 #if (ERRCLASS & ERRCLS_ADD_RES)
1324 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1325 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1326 (ErrVal)ELRG039, (ErrVal)0, "Packing failed");
1331 RETVALUE((*func)(pst, &cfm));
1336 * @brief This API is used to send a
1337 Control Confirm from SCH to LM.
1341 * Function: cmPkLrgSchCntrlCfm
1343 * @param[in] Pst * pst
1344 * @param[in] RgMngmt * cntrl
1349 PUBLIC S16 cmPkLrgSchCntrlCfm
1355 PUBLIC S16 cmPkLrgSchCntrlCfm(pst, cntrl)
1360 Buffer *mBuf = NULLP;
1361 TRC3(cmPkLrgSchCntrlCfm)
1363 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1364 #if (ERRCLASS & ERRCLS_ADD_RES)
1365 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1366 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1367 (ErrVal)ELRG040, (ErrVal)0, "Packing failed");
1371 if (pst->selector == LRG_SEL_LC) {
1372 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1373 #if (ERRCLASS & ERRCLS_ADD_RES)
1374 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1375 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1376 (ErrVal)ELRG041, (ErrVal)0, "Packing failed");
1383 pst->event = (Event) EVTLRGSCHCNTRLCFM;
1384 RETVALUE(SPstTsk(pst,mBuf));
1389 * @brief This API is used to send a
1390 Control Confirm from SCH to LM.
1394 * Function: cmUnpkLrgSchCntrlCfm
1396 * @param[in] Pst * pst
1397 * @param[in] RgMngmt * cntrl
1402 PUBLIC S16 cmUnpkLrgSchCntrlCfm
1404 LrgSchCntrlCfm func,
1409 PUBLIC S16 cmUnpkLrgSchCntrlCfm(func, pst, mBuf)
1410 LrgSchCntrlCfm func;
1417 TRC3(cmUnpkLrgSchCntrlCfm)
1419 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1421 #if (ERRCLASS & ERRCLS_ADD_RES)
1422 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1423 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1424 (ErrVal)ELRG042, (ErrVal)0, "Packing failed");
1429 RETVALUE((*func)(pst, &cntrl));
1434 * @brief This API is used to send a
1435 Trace Indication from MAC to LM.
1439 * Function: cmPkLrgTrcInd
1441 * @param[in] Pst * pst
1442 * @param[in] RgMngmt * trc
1443 * @param[in] Buffer * trcBuf
1448 PUBLIC S16 cmPkLrgTrcInd
1455 PUBLIC S16 cmPkLrgTrcInd(pst, trc, trcBuf)
1461 Buffer *mBuf = NULLP;
1464 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1465 #if (ERRCLASS & ERRCLS_ADD_RES)
1466 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1467 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1468 (ErrVal)ELRG043, (ErrVal)0, "Packing failed");
1473 if (pst->selector == LRG_SEL_LC) {
1475 if (SFndLenMsg(trcBuf, &msgLen) != ROK) {
1476 #if (ERRCLASS & ERRCLS_ADD_RES)
1477 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1478 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1479 (ErrVal)ELRG044, (ErrVal)0, "Packing failed");
1484 if (SCatMsg(mBuf, trcBuf, M1M2) != ROK) {
1485 #if (ERRCLASS & ERRCLS_ADD_RES)
1486 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1487 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1488 (ErrVal)ELRG045, (ErrVal)0, "Packing failed");
1494 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1496 if (cmPkRgMngmt(pst, trc, EVTLRGTRCIND, mBuf) != ROK) {
1497 #if (ERRCLASS & ERRCLS_ADD_RES)
1498 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1499 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1500 (ErrVal)ELRG046, (ErrVal)0, "Packing failed");
1507 pst->event = (Event) EVTLRGTRCIND;
1508 RETVALUE(SPstTsk(pst,mBuf));
1513 * @brief This API is used to send a
1514 Trace Indication from MAC to LM.
1518 * Function: cmUnpkLrgTrcInd
1520 * @param[in] Pst * pst
1521 * @param[in] RgMngmt * trc
1522 * @param[in] Buffer * trcBuf
1527 PUBLIC S16 cmUnpkLrgTrcInd
1534 PUBLIC S16 cmUnpkLrgTrcInd(func, pst, mBuf)
1541 /* lrg_c_001.main_3 - MODIFY - Modified trcBuf to have it initialized to NULLP */
1542 Buffer *trcBuf = NULLP;
1544 TRC3(cmUnpkLrgTrcInd)
1546 if (cmUnpkRgMngmt(pst, &trc, EVTLRGTRCIND, mBuf) != ROK) {
1548 #if (ERRCLASS & ERRCLS_ADD_RES)
1549 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1550 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1551 (ErrVal)ELRG047, (ErrVal)0, "Packing failed");
1555 if (pst->selector == LRG_SEL_LC) {
1556 MsgLen msgLen, totalMsgLen;
1557 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1558 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1560 if (SSegMsg(mBuf, totalMsgLen-msgLen, &trcBuf) != ROK)
1564 RETVALUE((*func)(pst, &trc, trcBuf));
1568 /***********************************************************
1570 * Func : cmPkRgGenCfg
1573 * Desc : This structure holds configuration parameters for MAC General Configuration.
1582 **********************************************************/
1584 PUBLIC S16 cmPkRgGenCfg
1590 PUBLIC S16 cmPkRgGenCfg(param, mBuf)
1599 CMCHKPK(SPkU8, param->isSCellActDeactAlgoEnable, mBuf);
1600 CMCHKPK(SPkU8, param->forceCntrlSrbBoOnPCel, mBuf);
1602 CMCHKPK(SPkU8, param->startCellId, mBuf);
1603 CMCHKPK(SPkU8, param->numRguSaps, mBuf);
1604 CMCHKPK(SPkU8, param->tmrRes, mBuf);
1605 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1606 CMCHKPK(cmPkPst, ¶m->lmPst, mBuf);
1612 /***********************************************************
1614 * Func : cmUnpkRgGenCfg
1617 * Desc : This structure holds configuration parameters for MAC General Configuration.
1626 **********************************************************/
1628 PUBLIC S16 cmUnpkRgGenCfg
1634 PUBLIC S16 cmUnpkRgGenCfg(param, mBuf)
1640 TRC3(cmUnpkRgGenCfg)
1642 CMCHKUNPK(cmUnpkPst, ¶m->lmPst, mBuf);
1643 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1644 CMCHKUNPK(SUnpkU8, ¶m->tmrRes, mBuf);
1645 CMCHKUNPK(SUnpkU8, ¶m->numRguSaps, mBuf);
1646 CMCHKUNPK(SUnpkU8, ¶m->startCellId, mBuf);
1648 CMCHKUNPK(SUnpkU8, ¶m->forceCntrlSrbBoOnPCel, mBuf);
1649 CMCHKUNPK(SUnpkU8, ¶m->isSCellActDeactAlgoEnable, mBuf);
1656 /***********************************************************
1658 * Func : cmPkRgUpSapCfg
1661 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1670 **********************************************************/
1672 PUBLIC S16 cmPkRgUpSapCfg
1678 PUBLIC S16 cmPkRgUpSapCfg(param, mBuf)
1684 TRC3(cmPkRgUpSapCfg)
1686 CMCHKPK(SPkS16, param->suId, mBuf);
1687 CMCHKPK(SPkS16, param->spId, mBuf);
1688 CMCHKPK(SPkU8, param->route, mBuf);
1689 CMCHKPK(SPkU8, param->inst, mBuf);
1690 CMCHKPK(SPkU8, param->ent, mBuf);
1691 CMCHKPK(SPkU16, param->procId, mBuf);
1692 CMCHKPK(SPkU8, param->prior, mBuf);
1693 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1694 CMCHKPK(SPkU8, param->selector, mBuf);
1700 /***********************************************************
1702 * Func : cmUnpkRgUpSapCfg
1705 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1714 **********************************************************/
1716 PUBLIC S16 cmUnpkRgUpSapCfg
1722 PUBLIC S16 cmUnpkRgUpSapCfg(param, mBuf)
1728 TRC3(cmUnpkRgUpSapCfg)
1730 CMCHKUNPK(SUnpkU8, ¶m->selector, mBuf);
1731 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1732 CMCHKUNPK(SUnpkU8, ¶m->prior, mBuf);
1733 CMCHKUNPK(SUnpkU16, ¶m->procId, mBuf);
1734 CMCHKUNPK(SUnpkU8, ¶m->ent, mBuf);
1735 CMCHKUNPK(SUnpkU8, ¶m->inst, mBuf);
1736 CMCHKUNPK(SUnpkU8, ¶m->route, mBuf);
1737 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1738 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1744 /***********************************************************
1746 * Func : cmPkRgLowSapCfg
1749 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1758 **********************************************************/
1760 PUBLIC S16 cmPkRgLowSapCfg
1766 PUBLIC S16 cmPkRgLowSapCfg(param, mBuf)
1772 TRC3(cmPkRgLowSapCfg)
1774 CMCHKPK(cmPkTmrCfg, ¶m->bndTmr, mBuf);
1775 CMCHKPK(SPkS16, param->suId, mBuf);
1776 CMCHKPK(SPkS16, param->spId, mBuf);
1777 CMCHKPK(SPkU8, param->route, mBuf);
1778 CMCHKPK(SPkU8, param->inst, mBuf);
1779 CMCHKPK(SPkU8, param->ent, mBuf);
1780 CMCHKPK(SPkU16, param->procId, mBuf);
1781 CMCHKPK(SPkU8, param->prior, mBuf);
1782 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1783 CMCHKPK(SPkU8, param->selector, mBuf);
1789 /***********************************************************
1791 * Func : cmUnpkRgLowSapCfg
1794 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1803 **********************************************************/
1805 PUBLIC S16 cmUnpkRgLowSapCfg
1811 PUBLIC S16 cmUnpkRgLowSapCfg(param, mBuf)
1817 TRC3(cmUnpkRgLowSapCfg)
1819 CMCHKUNPK(SUnpkU8, ¶m->selector, mBuf);
1820 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1821 CMCHKUNPK(SUnpkU8, ¶m->prior, mBuf);
1822 CMCHKUNPK(SUnpkU16, ¶m->procId, mBuf);
1823 CMCHKUNPK(SUnpkU8, ¶m->ent, mBuf);
1824 CMCHKUNPK(SUnpkU8, ¶m->inst, mBuf);
1825 CMCHKUNPK(SUnpkU8, ¶m->route, mBuf);
1826 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1827 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1828 CMCHKUNPK(cmUnpkTmrCfg, ¶m->bndTmr, mBuf);
1832 #ifdef MAC_SCH_STATS
1835 /***********************************************************
1837 * Func : cmPkRgAckNack
1840 * Desc : Ack and Nack statistics
1849 **********************************************************/
1851 PUBLIC S16 cmPkRgAckNack
1857 PUBLIC S16 cmPkRgAckNack (param, mBuf)
1865 CMCHKPK(SPkU16, param->numOfAcks, mBuf);
1866 CMCHKPK(SPkU16, param->numOfNacks, mBuf);
1867 CMCHKPK(SPkU8, param->mcs, mBuf);
1870 } /* cmPkRgAckNack */
1873 /***********************************************************
1875 * Func : cmPkRgSchNackAckStats
1887 **********************************************************/
1889 PUBLIC S16 cmPkRgSchNackAckStats
1891 RgSchNackAckStats *param,
1895 PUBLIC S16 cmPkRgSchNackAckStats (param, mBuf)
1896 RgSchNackAckStats *param;
1902 TRC3(cmPkRgSchNackAckStats)
1904 for (i=14; i >= 0; i--) {
1905 CMCHKPK(cmPkRgAckNack, ¶m->ulCqiStat[i], mBuf);
1908 for (i=14; i >= 0; i--) {
1909 CMCHKPK(cmPkRgAckNack, ¶m->dlCqiStat[i], mBuf);
1916 /***********************************************************
1918 * Func : cmPkRgHqNumRetx
1921 * Desc : Harq Retransmission statistics
1930 **********************************************************/
1932 PUBLIC S16 cmPkRgHqNumRetx
1934 RgSchHqNumRetx *param,
1938 PUBLIC S16 cmPkRgHqNumRetx (param, mBuf)
1939 RgSchHqNumRetx *param;
1943 TRC3(cmPkRgHqNumRetx)
1945 CMCHKPK(SPkU32, param->totalTx, mBuf);
1946 CMCHKPK(SPkU16, param->numOfHQ_4, mBuf);
1947 CMCHKPK(SPkU16, param->numOfHQ_3, mBuf);
1948 CMCHKPK(SPkU16, param->numOfHQ_2, mBuf);
1949 CMCHKPK(SPkU16, param->numOfHQ_1, mBuf);
1950 CMCHKPK(SPkU8, param->mcs, mBuf);
1953 } /* cmPkRgHqNumRetx */
1956 /***********************************************************
1958 * Func : cmPkRgSchHqRetxStats
1970 **********************************************************/
1972 PUBLIC S16 cmPkRgSchHqRetxStats
1974 RgSchHqRetxStats *param,
1978 PUBLIC S16 cmPkRgSchHqRetxStats (param, mBuf)
1979 RgSchHqRetxStats *param;
1985 TRC3(cmPkRgSchHqRetxStats)
1987 for (i=14; i >= 0; i--) {
1988 CMCHKPK(cmPkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
1991 for (i=14; i >= 0; i--) {
1992 CMCHKPK(cmPkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
1996 } /* cmPkRgSchHqRetxStats */
1998 /* unpcaking functions */
2000 /***********************************************************
2002 * Func : cmUnpkRgAckNack
2005 * Desc : Ack and Nack statistics
2014 **********************************************************/
2016 PUBLIC S16 cmUnpkRgAckNack
2022 PUBLIC S16 cmUnpkRgAckNack (param, mBuf)
2028 TRC3(cmUnpkRgAckNack)
2030 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
2031 CMCHKUNPK(SUnpkU16, ¶m->numOfNacks, mBuf);
2032 CMCHKUNPK(SUnpkU16, ¶m->numOfAcks, mBuf);
2035 } /* cmUnkRgAckNack */
2038 /***********************************************************
2040 * Func : cmUnpkRgSchNackAckStats
2052 **********************************************************/
2054 PUBLIC S16 cmUnpkRgSchNackAckStats
2056 RgSchNackAckStats *param,
2060 PUBLIC S16 cmUnpkRgSchNackAckStats (param, mBuf)
2061 RgSchNackAckStats *param;
2066 TRC3(cmUnpkRgSchNackAckStats)
2068 for (i=0; i <= 14; i++) {
2069 CMCHKUNPK(cmUnpkRgAckNack, ¶m->dlCqiStat[i], mBuf);
2072 for (i=0; i <= 14; i++) {
2073 CMCHKUNPK(cmUnpkRgAckNack, ¶m->ulCqiStat[i], mBuf);
2077 } /* cmUnpkRgSchNackAckStats */
2080 /***********************************************************
2082 * Func : cmUnpkRgHqNumRetx
2085 * Desc : Harq Retransmission statistics
2094 **********************************************************/
2096 PUBLIC S16 cmUnpkRgHqNumRetx
2098 RgSchHqNumRetx *param,
2102 PUBLIC S16 cmUnpkRgHqNumRetx (param, mBuf)
2103 RgSchHqNumRetx *param;
2107 TRC3(cmUnpkRgHqNumRetx)
2109 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
2110 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_1, mBuf);
2111 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_2, mBuf);
2112 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_3, mBuf);
2113 CMCHKUNPK(SUnpkU16, ¶m->numOfHQ_4, mBuf);
2114 CMCHKUNPK(SUnpkU32, ¶m->totalTx, mBuf);
2117 } /* cmUnpkRgHqNumRetx */
2120 /***********************************************************
2122 * Func : cmUnpkRgSchHqRetxStats
2134 **********************************************************/
2136 PUBLIC S16 cmUnpkRgSchHqRetxStats
2138 RgSchHqRetxStats *param,
2142 PUBLIC S16 cmUnpkRgSchHqRetxStats (param, mBuf)
2143 RgSchHqRetxStats *param;
2148 TRC3(cmUnpkRgSchHqRetxStats)
2150 for (i=0; i <= 14; i++) {
2151 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
2154 for (i=0; i <= 14; i++) {
2155 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
2159 } /* cmUnpkRgSchHqRetxStats */
2161 #endif /* MAC_SCH_STATS */
2164 /***********************************************************
2166 * Func : cmPkRgGenSts
2169 * Desc : This structure holds General Statistical information of MAC.
2178 **********************************************************/
2180 PUBLIC S16 cmPkRgGenSts
2186 PUBLIC S16 cmPkRgGenSts(param, mBuf)
2194 #ifdef MAC_SCH_STATS
2195 CMCHKPK(cmPkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
2196 CMCHKPK(cmPkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
2197 #endif /* MAC_SCH_STATS */
2198 CMCHKPK(SPkU16, param->numCellCfg, mBuf);
2199 CMCHKPK(SPkU32, param->numUeCfg, mBuf);
2200 CMCHKPK(SPkU32, param->numHarqFail, mBuf);
2206 /***********************************************************
2208 * Func : cmUnpkRgGenSts
2211 * Desc : This structure holds General Statistical information of MAC.
2220 **********************************************************/
2222 PUBLIC S16 cmUnpkRgGenSts
2228 PUBLIC S16 cmUnpkRgGenSts(param, mBuf)
2234 TRC3(cmUnpkRgGenSts)
2236 CMCHKUNPK(SUnpkU32, ¶m->numHarqFail, mBuf);
2237 CMCHKUNPK(SUnpkU32, ¶m->numUeCfg, mBuf);
2238 CMCHKUNPK(SUnpkU16, ¶m->numCellCfg, mBuf);
2239 #ifdef MAC_SCH_STATS
2240 CMCHKUNPK(cmUnpkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
2241 CMCHKUNPK(cmUnpkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
2242 #endif /* MAC_SCH_STATS */
2248 /***********************************************************
2250 * Func : cmPkRgSapSts
2253 * Desc : This structure holds Statistical information of a SAP in MAC.
2262 **********************************************************/
2264 PUBLIC S16 cmPkRgSapSts
2270 PUBLIC S16 cmPkRgSapSts(param, mBuf)
2278 CMCHKPK(SPkU32, param->numPduDrop, mBuf);
2279 CMCHKPK(SPkU32, param->numPduTxmit, mBuf);
2280 CMCHKPK(SPkU32, param->numPduRcvd, mBuf);
2286 /***********************************************************
2288 * Func : cmUnpkRgSapSts
2291 * Desc : This structure holds Statistical information of a SAP in MAC.
2300 **********************************************************/
2302 PUBLIC S16 cmUnpkRgSapSts
2308 PUBLIC S16 cmUnpkRgSapSts(param, mBuf)
2314 TRC3(cmUnpkRgSapSts)
2316 CMCHKUNPK(SUnpkU32, ¶m->numPduRcvd, mBuf);
2317 CMCHKUNPK(SUnpkU32, ¶m->numPduTxmit, mBuf);
2318 CMCHKUNPK(SUnpkU32, ¶m->numPduDrop, mBuf);
2324 /***********************************************************
2326 * Func : cmPkRgSchInstCfg
2329 * Desc : Scheduler Configuration
2338 **********************************************************/
2340 PUBLIC S16 cmPkRgSchInstCfg
2342 RgSchInstCfg *param,
2346 PUBLIC S16 cmPkRgSchInstCfg(param, mBuf)
2347 RgSchInstCfg *param;
2353 TRC3(cmPkRgSchInstCfg)
2355 for (i=param->numSaps-1; i >= 0; i--) {
2356 CMCHKPK(cmPkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
2358 for (i=param->numSaps-1; i >= 0; i--) {
2359 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
2361 for (i=param->numSaps-1; i >= 0; i--) {
2362 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
2364 CMCHKPK(SPkU8, param->numSaps, mBuf);
2365 CMCHKPK(cmPkRgGenCfg, ¶m->genCfg, mBuf);
2366 CMCHKPK(SPkU8, param->instId, mBuf);
2372 /***********************************************************
2374 * Func : cmUnpkRgSchInstCfg
2377 * Desc : Scheduler Configuration
2386 **********************************************************/
2388 PUBLIC S16 cmUnpkRgSchInstCfg
2390 RgSchInstCfg *param,
2394 PUBLIC S16 cmUnpkRgSchInstCfg(param, mBuf)
2395 RgSchInstCfg *param;
2401 TRC3(cmUnpkRgSchInstCfg)
2403 CMCHKUNPK(SUnpkU8, ¶m->instId, mBuf);
2404 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->genCfg, mBuf);
2405 CMCHKUNPK(SUnpkU8, ¶m->numSaps, mBuf);
2406 for (i=0; i<param->numSaps; i++) {
2407 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
2409 for (i=0; i<param->numSaps; i++) {
2410 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
2412 for (i=0; i<param->numSaps; i++) {
2413 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
2420 /***********************************************************
2425 * Desc : This structure holds Configuration parameters for MAC.
2434 **********************************************************/
2436 PUBLIC S16 cmPkRgCfg
2443 PUBLIC S16 cmPkRgCfg(param, elmnt, mBuf)
2454 CMCHKPK(cmPkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2457 CMCHKPK(cmPkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2460 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2463 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2466 CMCHKPK(cmPkRgGenCfg, ¶m->s.genCfg, mBuf);
2476 /***********************************************************
2478 * Func : cmUnpkRgCfg
2481 * Desc : This structure holds Configuration parameters for MAC.
2490 **********************************************************/
2492 PUBLIC S16 cmUnpkRgCfg
2499 PUBLIC S16 cmUnpkRgCfg(param, elmnt, mBuf)
2510 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->s.genCfg, mBuf);
2513 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2516 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2519 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2522 CMCHKUNPK(cmUnpkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2532 /***********************************************************
2534 * Func : cmPkRgSapSta
2537 * Desc : This structure holds a SAP's status information.
2546 **********************************************************/
2548 PUBLIC S16 cmPkRgSapSta
2554 PUBLIC S16 cmPkRgSapSta(param, mBuf)
2562 CMCHKPK(SPkU8, param->sapState, mBuf);
2568 /***********************************************************
2570 * Func : cmUnpkRgSapSta
2573 * Desc : This structure holds a SAP's status information.
2582 **********************************************************/
2584 PUBLIC S16 cmUnpkRgSapSta
2590 PUBLIC S16 cmUnpkRgSapSta(param, mBuf)
2596 TRC3(cmUnpkRgSapSta)
2598 CMCHKUNPK(SUnpkU8, ¶m->sapState, mBuf);
2604 /***********************************************************
2609 * Desc : This structure holds MAC's Statistical information.
2618 **********************************************************/
2620 PUBLIC S16 cmPkRgSts
2627 PUBLIC S16 cmPkRgSts(param, elmnt, mBuf)
2638 CMCHKPK(cmPkRgSapSts, ¶m->s.tfuSts, mBuf);
2641 CMCHKPK(cmPkRgSapSts, ¶m->s.rgrSts, mBuf);
2644 CMCHKPK(cmPkRgSapSts, ¶m->s.crgSts, mBuf);
2647 CMCHKPK(cmPkRgSapSts, ¶m->s.rguSts, mBuf);
2650 CMCHKPK(cmPkRgGenSts, ¶m->s.genSts, mBuf);
2655 CMCHKPK(cmPkAction, param->action, mBuf);
2656 CMCHKPK(SPkU8, param->sapInst, mBuf);
2657 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2663 /***********************************************************
2665 * Func : cmUnpkRgSts
2668 * Desc : This structure holds MAC's Statistical information.
2677 **********************************************************/
2679 PUBLIC S16 cmUnpkRgSts
2686 PUBLIC S16 cmUnpkRgSts(param, elmnt, mBuf)
2695 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2696 CMCHKUNPK(SUnpkU8, ¶m->sapInst, mBuf);
2697 CMCHKUNPK(cmUnpkAction, ¶m->action, mBuf);
2700 CMCHKUNPK(cmUnpkRgGenSts, ¶m->s.genSts, mBuf);
2703 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rguSts, mBuf);
2706 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.crgSts, mBuf);
2709 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rgrSts, mBuf);
2712 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.tfuSts, mBuf);
2722 /***********************************************************
2727 * Desc : This structure holds MAC's Solicited Status information.
2736 **********************************************************/
2738 PUBLIC S16 cmPkRgSsta
2749 PUBLIC S16 cmPkRgSsta(pst, param, elmnt, eventType, mBuf)
2753 /* lrg_c_001.main_3 - ADD - Added the extra parameter eventType to the function */
2765 CMCHKPK(cmPkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2768 CMCHKPK(cmPkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2771 CMCHKPK(cmPkRgSapSta, ¶m->s.crgSapSta, mBuf);
2774 CMCHKPK(cmPkRgSapSta, ¶m->s.rguSapSta, mBuf);
2776 /*ccpu00118255 - ADD - Check for eventType before Pack */
2779 if (eventType == EVTLRGSSTACFM)
2781 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2782 if (param->s.sysId.ptNmb != NULLP)
2784 SPutSBuf(pst->region, pst->pool,
2785 (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2788 #else /*LRG_V1 not defined */
2789 if (param->s.sysId.ptNmb != NULLP)
2791 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2792 SPutSBuf(pst->region, pst->pool, (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2795 #endif /*end of LRG_V1 */
2800 CMCHKPK(SPkU8, param->sapInst, mBuf);
2801 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2807 /***********************************************************
2809 * Func : cmUnpkRgSsta
2812 * Desc : This structure holds MAC's Solicited Status information.
2821 **********************************************************/
2823 PUBLIC S16 cmUnpkRgSsta
2831 PUBLIC S16 cmUnpkRgSsta(pst, param, elmnt, mBuf)
2841 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2842 CMCHKUNPK(SUnpkU8, ¶m->sapInst, mBuf);
2845 /*ccpu00118255 - ADD - Check for eventType before Unpack */
2846 if (pst->event == EVTLRGSSTACFM)
2849 if((SGetSBuf(pst->region, pst->pool, (Data **)¶m->s.sysId.ptNmb,
2850 LRG_MAX_PT_NUM_SIZE)) != ROK){
2851 #if (ERRCLASS & ERRCLS_ADD_RES)
2852 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2853 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2854 (ErrVal)ELRG048, (ErrVal)0, "Packing failed");
2859 /* KWORK_FIX: Moved the memset under the NULL check */
2860 if (param->s.sysId.ptNmb != NULLP)
2862 cmMemset((U8 *)param->s.sysId.ptNmb, 0, LRG_MAX_PT_NUM_SIZE);
2863 CMCHKUNPK(cmUnpkSystemId, ¶m->s.sysId, mBuf);
2868 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rguSapSta, mBuf);
2871 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.crgSapSta, mBuf);
2874 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2877 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2887 /***********************************************************
2889 * Func : cmPkRgUstaDgn
2892 * Desc : Alarm diagnostics structure.
2901 **********************************************************/
2903 PUBLIC S16 cmPkRgUstaDgn
2909 PUBLIC S16 cmPkRgUstaDgn(param, mBuf)
2917 switch(param->type) {
2918 case LRG_USTA_DGNVAL_MEM:
2919 CMCHKPK(cmPkMemoryId, ¶m->u.mem, mBuf);
2924 CMCHKPK(SPkU8, param->type, mBuf);
2930 /***********************************************************
2932 * Func : cmUnpkRgUstaDgn
2935 * Desc : Alarm diagnostics structure.
2944 **********************************************************/
2946 PUBLIC S16 cmUnpkRgUstaDgn
2952 PUBLIC S16 cmUnpkRgUstaDgn(param, mBuf)
2958 TRC3(cmUnpkRgUstaDgn)
2960 CMCHKUNPK(SUnpkU8, ¶m->type, mBuf);
2961 switch(param->type) {
2962 case LRG_USTA_DGNVAL_MEM:
2963 CMCHKUNPK(cmUnpkMemoryId, ¶m->u.mem, mBuf);
2973 /***********************************************************
2978 * Desc : This structure holds MAC's Unsolicited Status information.
2987 **********************************************************/
2989 PUBLIC S16 cmPkRgUsta
2995 PUBLIC S16 cmPkRgUsta(param, mBuf)
3003 CMCHKPK(cmPkRgUstaDgn, ¶m->dgn, mBuf);
3004 CMCHKPK(cmPkCmAlarm, ¶m->cmAlarm, mBuf);
3010 /***********************************************************
3012 * Func : cmUnpkRgUsta
3015 * Desc : This structure holds MAC's Unsolicited Status information.
3024 **********************************************************/
3026 PUBLIC S16 cmUnpkRgUsta
3032 PUBLIC S16 cmUnpkRgUsta(param, mBuf)
3040 CMCHKUNPK(cmUnpkCmAlarm, ¶m->cmAlarm, mBuf);
3041 CMCHKUNPK(cmUnpkRgUstaDgn, ¶m->dgn, mBuf);
3047 /***********************************************************
3052 * Desc : This structure holds MAC's Trace Indication information.
3061 **********************************************************/
3063 PUBLIC S16 cmPkRgTrc
3069 PUBLIC S16 cmPkRgTrc(param, mBuf)
3077 CMCHKPK(SPkU8, param->evnt, mBuf);
3078 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
3084 /***********************************************************
3086 * Func : cmUnpkRgTrc
3089 * Desc : This structure holds MAC's Trace Indication information.
3098 **********************************************************/
3100 PUBLIC S16 cmUnpkRgTrc
3106 PUBLIC S16 cmUnpkRgTrc(param, mBuf)
3114 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
3115 CMCHKUNPK(SUnpkU8, ¶m->evnt, mBuf);
3121 /***********************************************************
3123 * Func : cmPkRgDbgCntrl
3126 * Desc : This structure holds MAC's Debug Control information.
3135 **********************************************************/
3137 PUBLIC S16 cmPkRgDbgCntrl
3143 PUBLIC S16 cmPkRgDbgCntrl(param, mBuf)
3149 TRC3(cmPkRgDbgCntrl)
3151 CMCHKPK(SPkU32, param->dbgMask, mBuf);
3155 #ifdef PHY_ERROR_LOGING
3156 /***********************************************************
3158 * Func : cmPkRgSchUlAllocCntrl
3161 * Desc : This structure holds MAC's Debug Control information.
3170 **********************************************************/
3172 PUBLIC S16 cmPkRgSchUlAllocCntrl
3174 RgSchUlAllocCntrl *param,
3178 PUBLIC S16 cmPkRgSchUlAllocCntrl(param, mBuf)
3179 RgSchUlAllocCntrl *param;
3183 TRC3(cmPkRgSchUlAllocCntrl)
3185 CMCHKPK(SPkU8, param->mcs, mBuf);
3186 CMCHKPK(SPkU16, param->numOfRb, mBuf);
3187 CMCHKPK(SPkU16, param->rbStart, mBuf);
3188 CMCHKPK(SPkU8, param->testStart, mBuf);
3189 CMCHKPK(SPkU8, param->enaLog, mBuf);
3190 CMCHKPK(SPkU16, param->logTime, mBuf);
3195 /***********************************************************
3197 * Func : cmUnpkRgSchUlAllocCntrl
3200 * Desc : This structure holds MAC's Scheduler Configuration for Ul Allocation.
3209 **********************************************************/
3211 PUBLIC S16 cmUnpkRgSchUlAllocCntrl
3213 RgSchUlAllocCntrl *param,
3217 PUBLIC S16 cmUnpkRgSchUlAllocCntrl(param, mBuf)
3218 RgSchUlAllocCntrl *param;
3222 TRC3(cmUnpkRgSchUlAllocCntrl)
3224 CMCHKUNPK(SUnpkU16, ¶m->logTime, mBuf);
3225 CMCHKUNPK(SUnpkU8, ¶m->enaLog, mBuf);
3226 CMCHKUNPK(SUnpkU8, ¶m->testStart, mBuf);
3227 CMCHKUNPK(SUnpkU16, ¶m->rbStart, mBuf);
3228 CMCHKUNPK(SUnpkU16, ¶m->numOfRb, mBuf);
3229 CMCHKUNPK(SUnpkU8, ¶m->mcs, mBuf);
3237 /***********************************************************
3239 * Func : cmUnpkRgDbgCntrl
3242 * Desc : This structure holds MAC's Debug Control information.
3251 **********************************************************/
3253 PUBLIC S16 cmUnpkRgDbgCntrl
3259 PUBLIC S16 cmUnpkRgDbgCntrl(param, mBuf)
3265 TRC3(cmUnpkRgDbgCntrl)
3267 CMCHKUNPK(SUnpkU32, ¶m->dbgMask, mBuf);
3273 /***********************************************************
3275 * Func : cmPkRgSapCntrl
3278 * Desc : This structure holds MAC's SAP Control information.
3287 **********************************************************/
3289 PUBLIC S16 cmPkRgSapCntrl
3295 PUBLIC S16 cmPkRgSapCntrl(param, mBuf)
3301 TRC3(cmPkRgSapCntrl)
3303 CMCHKPK(SPkS16, param->spId, mBuf);
3304 CMCHKPK(SPkS16, param->suId, mBuf);
3310 /***********************************************************
3312 * Func : cmUnpkRgSapCntrl
3315 * Desc : This structure holds MAC's SAP Control information.
3324 **********************************************************/
3326 PUBLIC S16 cmUnpkRgSapCntrl
3332 PUBLIC S16 cmUnpkRgSapCntrl(param, mBuf)
3338 TRC3(cmUnpkRgSapCntrl)
3340 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
3341 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
3347 /***********************************************************
3349 * Func : cmPkRgCntrl
3352 * Desc : This structure holds MAC's Control information.
3361 **********************************************************/
3363 PUBLIC S16 cmPkRgCntrl
3370 PUBLIC S16 cmPkRgCntrl(param, elmnt, mBuf)
3384 switch(param->subAction) {
3386 CMCHKPK(cmPkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
3391 switch(param->subAction) {
3393 CMCHKPK(SPkS16, param->s.trcLen, mBuf);
3396 CMCHKPK(cmPkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
3402 CMCHKPK(SPkU32, param->s.logMask, mBuf);
3405 #ifdef PHY_ERROR_LOGING
3407 CMCHKPK(cmPkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
3417 CMCHKPK(SPkU8, param->subAction, mBuf);
3418 CMCHKPK(SPkU8, param->action, mBuf);
3419 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
3425 /***********************************************************
3427 * Func : cmUnpkRgCntrl
3430 * Desc : This structure holds MAC's Control information.
3439 **********************************************************/
3441 PUBLIC S16 cmUnpkRgCntrl
3448 PUBLIC S16 cmUnpkRgCntrl(param, elmnt, mBuf)
3457 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
3458 CMCHKUNPK(SUnpkU8, ¶m->action, mBuf);
3459 CMCHKUNPK(SUnpkU8, ¶m->subAction, mBuf);
3462 switch(param->subAction) {
3464 CMCHKUNPK(cmUnpkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
3467 CMCHKUNPK(SUnpkS16, ¶m->s.trcLen, mBuf);
3473 CMCHKUNPK(SUnpkU32, ¶m->s.logMask, mBuf);
3476 #ifdef PHY_ERROR_LOGING
3478 CMCHKUNPK(cmUnpkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
3489 switch(param->subAction) {
3491 CMCHKUNPK(cmUnpkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
3503 /***********************************************************
3505 * Func : cmPkRgMngmt
3508 * Desc : This structure holds MAC's Configuration and Control Management Information.
3517 **********************************************************/
3519 PUBLIC S16 cmPkRgMngmt
3527 PUBLIC S16 cmPkRgMngmt(pst, param, eventType, mBuf)
3538 case EVTLRGCNTRLREQ:
3539 case EVTLRGCNTRLCFM:
3540 case EVTLRGSCHCNTRLREQ:
3541 case EVTLRGSCHCNTRLCFM:
3542 if(cmPkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
3546 CMCHKPK(cmPkRgTrc, ¶m->t.trc, mBuf);
3549 case EVTLRGSCHSTAIND:
3550 CMCHKPK(cmPkRgUsta, ¶m->t.usta, mBuf);
3554 /*ccpu00118255 - ADD - eventType param */
3556 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt,
3557 eventType, mBuf) != ROK)
3559 #else /* LRG_V1 is not defined */
3560 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
3562 #endif /* end of LRG_V1*/
3566 if(cmPkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf)!= ROK)
3571 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3574 case EVTLRGSCHCFGREQ:
3575 case EVTLRGSCHCFGCFM:
3576 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3582 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
3583 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
3589 /***********************************************************
3591 * Func : cmUnpkRgMngmt
3594 * Desc : This structure holds MAC's Configuration and Control Management Information.
3603 **********************************************************/
3605 PUBLIC S16 cmUnpkRgMngmt
3613 PUBLIC S16 cmUnpkRgMngmt(pst, param, eventType, mBuf)
3623 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
3624 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
3628 case EVTLRGSCHCFGREQ:
3629 case EVTLRGSCHCFGCFM:
3630 if(cmUnpkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3635 if(cmUnpkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf) != ROK)
3640 if(cmUnpkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
3644 case EVTLRGSCHSTAIND:
3645 CMCHKUNPK(cmUnpkRgUsta, ¶m->t.usta, mBuf);
3648 CMCHKUNPK(cmUnpkRgTrc, ¶m->t.trc, mBuf);
3650 case EVTLRGCNTRLREQ:
3651 case EVTLRGCNTRLCFM:
3652 case EVTLRGSCHCNTRLREQ:
3653 case EVTLRGSCHCNTRLCFM:
3654 if(cmUnpkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
3663 /* lrg_c_001.main_3 - ADD - Added the functions pertaining to LTE_L2_MEAS */
3667 * @brief This API is used to pack
3668 LrgNmbActvUeQCI elements
3672 * Function: cmPkNmbActvUeQciReq
3674 * @param[in] LrgNmbActvUeQCI
3675 * @param[in] Buffer *mBuf
3680 PRIVATE S16 cmPkNmbActvUeQciReq
3682 LrgNmbActvUeQCI *nmbActvUeQci,
3686 PRIVATE S16 cmPkNmbActvUeQciReq(nmbActvUeQci, mBuf)
3687 LrgNmbActvUeQCI *nmbActvUeQci;
3693 TRC3(cmPkNmbActvUeQciReq)
3695 for(idx = 0; idx < nmbActvUeQci->numQci; idx++)
3697 CMCHKPK(SPkU8, nmbActvUeQci->qci[idx], mBuf);
3699 CMCHKPK(SPkU8, nmbActvUeQci->numQci, mBuf);
3700 CMCHKPK(SPkU8, nmbActvUeQci->sampPrd, mBuf);
3705 * @brief This API is used to pack
3706 LrgAvgPrbQci elements
3710 * Function: cmPkAvgPrbQciReq
3712 * @param[in] LrgNmbActvUeQciReq *avgPrbQciReq
3713 * @param[in] Buffer *mBuf
3718 PRIVATE S16 cmPkAvgPrbQciReq
3720 LrgAvgPrbQCI *avgPrbQciReq,
3724 PRIVATE S16 cmPkAvgPrbQciReq(avgPrbQciReq, mBuf)
3725 LrgAvgPrbQCI *avgPrbQciReq;
3731 TRC3(cmPkAvgPrbQciReq)
3733 for(idx = 0; idx < avgPrbQciReq->numQci; idx++)
3735 CMCHKPK(SPkU8, avgPrbQciReq->qci[idx], mBuf);
3737 CMCHKPK(SPkU8, avgPrbQciReq->numQci, mBuf);
3743 * @brief This API is used to send a
3744 L2 Measurement Request from LM to MAC.
3748 * Function: cmPkLrgSchL2MeasReq
3750 * @param[in] Pst * pst
3751 * @param[in] LrgSchMeasReqInfo * measInfo
3756 PUBLIC S16 cmPkLrgSchL2MeasReq
3759 LrgSchMeasReqInfo *measInfo
3762 PUBLIC S16 cmPkLrgSchL2MeasReq(pst, measInfo)
3764 LrgSchMeasReqInfo *measInfo;
3767 Buffer *mBuf = NULLP;
3768 TRC3(cmPkLrgSchL2MeasReq)
3770 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3771 #if (ERRCLASS & ERRCLS_ADD_RES)
3772 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3773 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3774 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3778 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3780 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciDl, mBuf);
3782 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3784 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciUl, mBuf);
3786 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3788 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciDl, mBuf);
3790 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3792 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciUl, mBuf);
3795 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3796 CMCHKPK(SPkU32, measInfo->timePrd, mBuf);
3797 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3798 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3799 pst->event = (Event) EVTLRGSCHL2MEASREQ;
3800 RETVALUE(SPstTsk(pst,mBuf));
3803 * @brief This API is used to stop a
3804 L2 Measurement Request from LM to MAC.
3808 * Function: cmPkLrgSchL2MeasStopReq
3810 * @param[in] Pst * pst
3811 * @param[in] LrgSchMeasReqInfo * measInfo
3816 PUBLIC S16 cmPkLrgSchL2MeasStopReq
3819 LrgSchMeasStopReqInfo *measInfo
3822 PUBLIC S16 cmPkLrgSchL2MeasStopReq(pst, measInfo)
3824 LrgSchMeasStopReqInfo *measInfo;
3827 Buffer *mBuf = NULLP;
3828 TRC3(cmPkLrgSchL2MeasStopReq)
3830 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3831 #if (ERRCLASS & ERRCLS_ADD_RES)
3832 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3833 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3834 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3838 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3839 /*CMCHKPK(SPkU16, measInfo->timePrd, mBuf);*/
3840 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3841 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3842 pst->event = (Event) EVTLRGSCHL2MEASSTOPREQ;
3843 RETVALUE(SPstTsk(pst,mBuf));
3844 }/*cmPkLrgSchL2MeasStopReq*/
3847 * @brief This API is used to send a
3848 L2 Measurement Request from LM to MAC.
3852 * Function: cmPkLrgSchL2MeasSendReq
3854 * @param[in] Pst * pst
3855 * @param[in] LrgSchMeasReqInfo * measInfo
3860 PUBLIC S16 cmPkLrgSchL2MeasSendReq
3863 LrgSchMeasSndReqInfo *measInfo
3866 PUBLIC S16 cmPkLrgSchL2MeasSendReq(pst, measInfo)
3868 LrgSchMeasSndReqInfo *measInfo;
3871 Buffer *mBuf = NULLP;
3872 TRC3(cmPkLrgSchL2MeasSendReq)
3873 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3874 #if (ERRCLASS & ERRCLS_ADD_RES)
3875 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3876 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3877 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3881 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3882 CMCHKPK(SPkU32, measInfo->timePrd, mBuf);
3883 CMCHKPK(SPkU16, measInfo->measType, mBuf);
3884 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3885 pst->event = (Event) EVTLRGSCHL2MEASSENDREQ;
3886 RETVALUE(SPstTsk(pst,mBuf));
3887 }/*cmPkLrgSchL2MeasSendReq*/
3890 * @brief This API is used to unpack AvgPrbQciReq
3894 * Function: cmUnpkNmbActvUeQciReq
3896 * @param[in] LrgNmbActvUeQCI *param
3897 * @param[in] Buffer * mBuf
3902 PRIVATE S16 cmUnpkNmbActvUeQciReq
3904 LrgNmbActvUeQCI *param,
3908 PRIVATE S16 cmUnpkNmbActvUeQciReq(param, mBuf)
3909 LrgNmbActvUeQCI *param;
3915 TRC3(cmUnpkNmbActvUeQciReq)
3917 CMCHKUNPK(SUnpkU8, ¶m->sampPrd, mBuf);
3918 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
3919 for(idx = param->numQci; idx > 0; idx--)
3921 CMCHKUNPK(SUnpkU8, ¶m->qci[idx - 1], mBuf);
3928 * @brief This API is used to unpack AvgPrbQciReq
3932 * Function: cmUnpkAvgPrbQciReq
3934 * @param[in] LrgAvgPrbQCI *param
3935 * @param[in] Buffer * mBuf
3940 PRIVATE S16 cmUnpkAvgPrbQciReq
3942 LrgAvgPrbQCI *param,
3946 PRIVATE S16 cmUnpkAvgPrbQciReq (param, mBuf)
3947 LrgAvgPrbQCI *param;
3953 TRC3(cmUnpkAvgPrbQciReq)
3955 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
3956 for(idx = param->numQci; idx > 0; idx--)
3958 CMCHKUNPK(SUnpkU8, ¶m->qci[idx - 1], mBuf);
3965 * @brief This API is used to send a
3966 Measurement Request from LM to SCH.
3970 * Function: cmUnpkLrgSchL2MeasReq
3972 * @param[in] LrgSchMeasReq func
3973 * @param[in] Pst * pst
3974 * @param[in] Buffer * mBuf
3979 PUBLIC S16 cmUnpkLrgSchL2MeasReq
3981 LrgSchL2MeasReq func,
3986 PUBLIC S16 cmUnpkLrgSchL2MeasReq(func, pst, mBuf)
3987 LrgSchL2MeasReq func;
3992 LrgSchMeasReqInfo measInfo;
3994 TRC3(cmUnpkLrgSchL2MeasReq)
3996 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3997 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
3998 CMCHKUNPK(SUnpkU32, &measInfo.timePrd, mBuf);
3999 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4000 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4002 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciUl, mBuf);
4004 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4006 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciDl, mBuf);
4008 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4010 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciUl, mBuf);
4012 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4014 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciDl, mBuf);
4017 RETVALUE((*func)(pst, &measInfo));
4021 * @brief This API is used to stop a
4022 Measurement Request from LM to SCH.
4026 * Function: cmUnpkLrgSchL2MeasStopReq
4028 * @param[in] LrgSchMeasStopReq func
4029 * @param[in] Pst * pst
4030 * @param[in] Buffer * mBuf
4035 PUBLIC S16 cmUnpkLrgSchL2MeasStopReq
4037 LrgSchL2MeasStopReq func,
4042 PUBLIC S16 cmUnpkLrgSchL2MeasStopReq(func, pst, mBuf)
4043 LrgSchL2MeasStopReq func;
4048 LrgSchMeasStopReqInfo measInfo;
4050 TRC3(cmUnpkLrgSchL2MeasStopReq)
4052 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4053 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4054 /*CMCHKUNPK(SUnpkU16, &measInfo.timePrd, mBuf);*/
4055 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4057 RETVALUE((*func)(pst, &measInfo));
4058 }/*cmUnpkLrgSchL2MeasStopReq*/
4061 * @brief This API is used to send a
4062 Measurement Request from LM to SCH.
4066 * Function: cmUnpkLrgSchL2MeasSendReq
4068 * @param[in] LrgSchMeasSendReq func
4069 * @param[in] Pst * pst
4070 * @param[in] Buffer * mBuf
4075 PUBLIC S16 cmUnpkLrgSchL2MeasSendReq
4077 LrgSchL2MeasSendReq func,
4082 PUBLIC S16 cmUnpkLrgSchL2MeasSendReq(func, pst, mBuf)
4083 LrgSchL2MeasSendReq func;
4088 LrgSchMeasSndReqInfo measInfo;
4089 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4090 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4091 CMCHKUNPK(SUnpkU32, &measInfo.timePrd, mBuf);
4092 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4094 RETVALUE((*func)(pst, &measInfo));
4095 }/*cmUnpkLrgSchL2MeasSendReq*/
4098 * @brief This API is used to stop a
4099 L2 Measurement confirm from MAC to LM
4103 * Function: cmPkLrgSchL2MeasStopCfm
4105 * @param[in] Pst * pst
4106 * @param[in] LrgSchMeasCfmInfo * measInfo
4111 PUBLIC S16 cmPkLrgSchL2MeasStopCfm
4114 LrgSchMeasCfmInfo *measInfo
4117 PUBLIC S16 cmPkLrgSchL2MeasStopCfm(pst, measInfo)
4119 LrgSchMeasCfmInfo *measInfo;
4122 Buffer *mBuf = NULLP;
4124 TRC3(cmPkLrgSchL2MeasStopCfm)
4125 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
4126 #if (ERRCLASS & ERRCLS_ADD_RES)
4127 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
4128 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
4129 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
4133 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
4134 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
4135 CMCHKPK(SPkU16, measInfo->measType, mBuf);
4136 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
4137 pst->event = (Event) EVTLRGSCHL2MEASSTOPCFM;
4138 RETVALUE(SPstTsk(pst,mBuf));
4139 }/*cmPkLrgSchL2MeasStopCfm*/
4141 * @brief This API is used to Send a
4142 Measurement Confirm from SCH to LM.
4146 * Function: cmUnpkLrgL2SchMeasCfm
4148 * @param[in] Pst * pst
4149 * @param[in] Buffer * mBuf
4154 PUBLIC S16 cmUnpkLrgSchL2MeasStopCfm
4156 LrgSchL2MeasStopCfm func,
4161 PUBLIC S16 cmUnpkLrgSchL2MeasStopCfm(func, pst, mBuf)
4162 LrgSchL2MeasStopCfm func;
4167 LrgSchMeasCfmInfo measInfo;
4169 TRC3(cmUnpkLrgSchL2MeasCfm)
4171 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4172 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4173 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
4174 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4177 RETVALUE((*func)(pst, &measInfo));
4178 }/*cmUnpkLrgSchL2MeasStopCfm*/
4181 * @brief This API is used to unpack LrgNumActvUeQCICfm structure
4185 * Function: cmPkNumUeQciCfm
4187 * @param[in] LrgNumActvUeQCICfm * param
4188 * @param[in] Buffer * mBuf
4193 PRIVATE S16 cmPkNumUeQciCfm
4195 LrgNumActvUeQCICfm *param,
4199 PRIVATE S16 cmPkNumUeQciCfm(param, mBuf)
4200 LrgNumActvUeQCICfm *param;
4206 TRC3(cmPkNumUeQciCfm)
4208 for(idx = 0; idx < param->numQci; idx++)
4210 /*LRG : Review Tag*/
4211 CMCHKPK(SPkU8, param->numActvUeQci[idx].qciValue, mBuf);
4212 CMCHKPK(SPkU8, param->numActvUeQci[idx].numActvUeQci, mBuf);
4213 /*LRG : Review Tag*/
4215 CMCHKPK(SPkU8, param->numQci, mBuf);
4220 * @brief This API is used to unpack LrgAvgPrbQCICfm structure
4224 * Function: cmPkAvgPrbQciCfm
4226 * @param[in] LrgAvgPrbQCICfm * param
4227 * @param[in] Buffer * mBuf
4232 PRIVATE S16 cmPkAvgPrbQciCfm
4234 LrgAvgPrbQCICfm *param,
4238 PRIVATE S16 cmPkAvgPrbQciCfm(param, mBuf)
4239 LrgAvgPrbQCICfm *param;
4245 TRC3(cmPkAvgPrbQciCfm)
4246 for(idx = 0; idx < param->numQci; idx++)
4248 /*LRG : Review Tag*/
4249 CMCHKPK(SPkU8, param->prbPercQci[idx].qciValue, mBuf);
4250 CMCHKPK(SPkU8, param->prbPercQci[idx].prbPercQci, mBuf);
4251 /*LRG : Review Tag*/
4253 CMCHKPK(SPkU8, param->numQci, mBuf);
4258 * @brief This API is used to unpack raPreamblesCfm structure
4262 * Function: cmPkRaPrmbsCfm
4264 * @param[in] LrgRaPreamblesCfm * param
4265 * @param[in] Buffer * mBuf
4270 PRIVATE S16 cmPkRaPrmbsCfm
4272 LrgRaPreamblesCfm *param,
4276 PRIVATE S16 cmPkRaPrmbsCfm(param, mBuf)
4277 LrgRaPreamblesCfm *param;
4282 TRC3(cmPkRaPrmbsCfm)
4283 CMCHKPK(SPkU16, param->randSelPreHighRange, mBuf);
4284 CMCHKPK(SPkU16, param->randSelPreLowRange, mBuf);
4285 CMCHKPK(SPkU16, param->dedPreambles, mBuf);
4290 * @brief This API is used to unpack avgPrbCfm structure
4294 * Function: cmPkAvgPrbCfm
4296 * @param[in] LrgAvgPrbCfm * param
4297 * @param[in] Buffer * mBuf
4302 PRIVATE S16 cmPkAvgPrbCfm
4304 LrgAvgPrbCfm *param,
4308 PRIVATE S16 cmPkAvgPrbCfm(param, mBuf)
4309 LrgAvgPrbCfm *param;
4315 CMCHKPK(SPkU8, param->prbPerc, mBuf);
4320 * @brief This API is used to send a
4321 L2 Measurement confirm from MAC to LM
4325 * Function: cmPkLrgSchL2MeasCfm
4327 * @param[in] Pst * pst
4328 * @param[in] LrgSchMeasCfmInfo * measInfo
4333 PUBLIC S16 cmPkLrgSchL2MeasCfm
4336 LrgSchMeasCfmInfo *measInfo
4339 PUBLIC S16 cmPkLrgSchL2MeasCfm(pst, measInfo)
4341 LrgSchMeasCfmInfo *measInfo;
4344 Buffer *mBuf = NULLP;
4346 TRC3(cmPkLrgSchL2MeasCfm)
4348 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
4349 #if (ERRCLASS & ERRCLS_ADD_RES)
4350 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
4351 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
4352 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
4356 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4358 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciDlCfm, mBuf);
4360 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4362 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciUlCfm, mBuf);
4364 if(measInfo->measType & LRG_L2MEAS_RA_PREAMBLE)
4366 CMCHKPK(cmPkRaPrmbsCfm, &measInfo->raPrmbsCfm, mBuf);
4368 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4370 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciDlCfm, mBuf);
4372 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4374 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciUlCfm, mBuf);
4376 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_DL)
4378 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbDl, mBuf);
4380 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_UL)
4382 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbUl, mBuf);
4384 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
4386 CMCHKPK(SPkU32, measInfo->tbTransDlTotalCnt, mBuf);
4388 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
4390 CMCHKPK(SPkU32, measInfo->tbTransDlFaulty, mBuf);
4392 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
4394 CMCHKPK(SPkU32, measInfo->tbTransUlTotalCnt, mBuf);
4396 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
4398 CMCHKPK(SPkU32, measInfo->tbTransUlFaulty, mBuf);
4400 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
4401 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
4402 CMCHKPK(SPkU16, measInfo->measType, mBuf);
4403 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
4404 pst->event = (Event) EVTLRGSCHL2MEASCFM;
4405 RETVALUE(SPstTsk(pst,mBuf));
4409 * @brief This API is used to unpack LrgNumActvUeQCICfm
4413 * Function: cmUnpkNumUeQciCfm
4415 * @param[in] LrgNumActvUeQCICfm *param
4416 * @param[in] Buffer * mBuf
4421 PRIVATE S16 cmUnpkNumUeQciCfm
4423 LrgNumActvUeQCICfm *param,
4427 PRIVATE S16 cmUnpkNumUeQciCfm(param, mBuf)
4428 LrgNumActvUeQCICfm *param;
4434 TRC3(cmUnpkNumUeQciCfm)
4435 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
4436 for(idx = param->numQci; idx > 0; idx--)
4438 /*LRG : Review Tag*/
4439 CMCHKUNPK(SUnpkU8, ¶m->numActvUeQci[idx - 1].numActvUeQci, mBuf);
4440 CMCHKUNPK(SUnpkU8, ¶m->numActvUeQci[idx - 1].qciValue, mBuf);
4441 /*LRG : Review Tag*/
4447 * @brief This API is used to unpack LrgAvgPrbQCICfm
4451 * Function: cmUnpkAvgPrbQciCfm
4453 * @param[in] LrgAvgPrbQCICfm *param
4454 * @param[in] Buffer * mBuf
4459 PRIVATE S16 cmUnpkAvgPrbQciCfm
4461 LrgAvgPrbQCICfm *param,
4465 PRIVATE S16 cmUnpkAvgPrbQciCfm(param, mBuf)
4466 LrgAvgPrbQCICfm *param;
4472 TRC3(cmUnpkAvgPrbQciCfm)
4474 CMCHKUNPK(SUnpkU8, ¶m->numQci, mBuf);
4475 for(idx = param->numQci; idx > 0; idx--)
4477 /*LRG : Review Tag*/
4478 CMCHKUNPK(SUnpkU8, ¶m->prbPercQci[idx - 1].prbPercQci, mBuf);
4479 CMCHKUNPK(SUnpkU8, ¶m->prbPercQci[idx - 1].qciValue, mBuf);
4480 /*LRG : Review Tag*/
4486 * @brief This API is used to unpack LrgRaPreamblesCfm
4490 * Function: cmUnpkRaPrmbsCfm
4492 * @param[in] LrgRaPreamblesCfm *param
4493 * @param[in] Buffer * mBuf
4498 PRIVATE S16 cmUnpkRaPrmbsCfm
4500 LrgRaPreamblesCfm *param,
4504 PRIVATE S16 cmUnpkRaPrmbsCfm(param, mBuf)
4505 LrgRaPreamblesCfm *param;
4510 TRC3(cmUnpkRaPrmbsCfm)
4512 CMCHKUNPK(SUnpkU16, ¶m->dedPreambles, mBuf);
4513 CMCHKUNPK(SUnpkU16, ¶m->randSelPreLowRange, mBuf);
4514 CMCHKUNPK(SUnpkU16, ¶m->randSelPreHighRange, mBuf);
4519 * @brief This API is used to unpack avgPrbCfm
4523 * Function: cmUnpkAvgPrbCfm
4525 * @param[in] LrgAvgPrbCfm *param
4526 * @param[in] Buffer * mBuf
4531 PRIVATE S16 cmUnpkAvgPrbCfm
4533 LrgAvgPrbCfm *param,
4537 PRIVATE S16 cmUnpkAvgPrbCfm(param, mBuf)
4538 LrgAvgPrbCfm *param;
4543 TRC3(cmUnpkAvgPrbCfm)
4545 CMCHKUNPK(SUnpkU8, ¶m->prbPerc, mBuf);
4550 * @brief This API is used to send a
4551 Measurement Confirm from LM to SCH.
4555 * Function: cmUnpkLrgL2SchMeasCfm
4557 * @param[in] Pst * pst
4558 * @param[in] Buffer * mBuf
4563 PUBLIC S16 cmUnpkLrgSchL2MeasCfm
4565 LrgSchL2MeasCfm func,
4570 PUBLIC S16 cmUnpkLrgSchL2MeasCfm(func, pst, mBuf)
4571 LrgSchL2MeasCfm func;
4576 LrgSchMeasCfmInfo measInfo;
4578 TRC3(cmUnpkLrgSchL2MeasCfm)
4580 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
4581 CMCHKUNPK(SUnpkU16, &measInfo.measType, mBuf);
4582 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
4583 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
4584 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
4586 CMCHKPK(SUnpkU32, &measInfo.tbTransUlFaulty, mBuf);
4588 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
4590 CMCHKPK(SUnpkU32, &measInfo.tbTransUlTotalCnt, mBuf);
4592 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
4594 CMCHKPK(SUnpkU32, &measInfo.tbTransDlFaulty, mBuf);
4596 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
4598 CMCHKPK(SUnpkU32, &measInfo.tbTransDlTotalCnt, mBuf);
4600 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_UL)
4602 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbUl, mBuf);
4604 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_DL)
4606 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbDl, mBuf);
4608 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
4610 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciUlCfm, mBuf);
4612 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
4614 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciDlCfm, mBuf);
4616 if(measInfo.measType & LRG_L2MEAS_RA_PREAMBLE)
4618 CMCHKUNPK(cmUnpkRaPrmbsCfm, &measInfo.raPrmbsCfm, mBuf);
4620 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
4622 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciUlCfm, mBuf);
4624 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
4626 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciDlCfm, mBuf);
4629 RETVALUE((*func)(pst, &measInfo));
4635 /**********************************************************************
4637 **********************************************************************/