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
67 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
68 #if (ERRCLASS & ERRCLS_ADD_RES)
69 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
70 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
71 (ErrVal)ELRG001, (ErrVal)0, "Packing failed");
75 if (pst->selector == ODU_SELECTOR_LC) {
76 if (cmPkRgMngmt(pst, cfg, EVTLRGCFGREQ, mBuf) != ROK) {
77 #if (ERRCLASS & ERRCLS_ADD_RES)
78 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
79 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
80 (ErrVal)ELRG002, (ErrVal)0, "Packing failed");
86 pst->event = (Event) EVTLRGCFGREQ;
87 return (SPstTsk(pst,mBuf));
92 * @brief This API is used to send a
93 Configuration Request from LM to MAC.
97 * Function: cmUnpkLrgCfgReq
99 * @param[in] Pst * pst
100 * @param[in] RgMngmt * cfg
111 /* lrg_c_001.main_2: Changed Pointer across Interface */
115 if (cmUnpkRgMngmt(pst, &cfg, EVTLRGCFGREQ, mBuf) != ROK) {
117 #if (ERRCLASS & ERRCLS_ADD_RES)
118 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
119 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
120 (ErrVal)ELRG003, (ErrVal)0, "Packing failed");
125 return ((*func)(pst, &cfg));
130 * @brief This API is used to send a
131 Configuration Request from LM to SCH.
135 * Function: cmPkLrgSchCfgReq
137 * @param[in] Pst * pst
138 * @param[in] RgMngmt * cfg
148 Buffer *mBuf = NULLP;
150 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
151 #if (ERRCLASS & ERRCLS_ADD_RES)
152 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
153 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
154 (ErrVal)ELRG004, (ErrVal)0, "Packing failed");
158 if (pst->selector == ODU_SELECTOR_LC) {
159 if (cmPkRgMngmt(pst, cfg, EVTMACSCHGENCFGREQ, mBuf) != ROK) {
160 #if (ERRCLASS & ERRCLS_ADD_RES)
161 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
162 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
163 (ErrVal)ELRG005, (ErrVal)0, "Packing failed");
170 return (SPstTsk(pst,mBuf));
175 * @brief This API is used to send a
176 Configuration Request from LM to SCH.
180 * Function: cmUnpkLrgSchCfgReq
182 * @param[in] Pst * pst
183 * @param[in] RgMngmt * cfg
187 S16 cmUnpkLrgSchCfgReq
194 /* lrg_c_001.main_2: Changed Pointer across Interface */
198 if (cmUnpkRgMngmt(pst, &cfg, EVTMACSCHGENCFGREQ, mBuf) != ROK) {
200 #if (ERRCLASS & ERRCLS_ADD_RES)
201 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
202 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
203 (ErrVal)ELRG006, (ErrVal)0, "Packing failed");
208 return ((*func)(pst, &cfg));
213 * @brief This API is used to send a
214 Configuration Confirm from MAC to LM.
218 * Function: cmPkLrgCfgCfm
220 * @param[in] Pst * pst
221 * @param[in] RgMngmt * cfm
225 uint8_t cmPkLrgCfgCfm
231 Buffer *mBuf = NULLP;
233 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
234 #if (ERRCLASS & ERRCLS_ADD_RES)
235 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
236 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
237 (ErrVal)ELRG007, (ErrVal)0, "Packing failed");
241 if (pst->selector == ODU_SELECTOR_LC) {
242 if (cmPkRgMngmt(pst, cfm, EVTLRGCFGCFM, mBuf) != ROK) {
243 #if (ERRCLASS & ERRCLS_ADD_RES)
244 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
245 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
246 (ErrVal)ELRG008, (ErrVal)0, "Packing failed");
253 pst->event = (Event) EVTLRGCFGCFM;
254 return (SPstTsk(pst,mBuf));
259 * @brief This API is used to send a
260 Configuration Confirm from MAC to LM.
264 * Function: cmUnpkLrgCfgCfm
266 * @param[in] Pst * pst
267 * @param[in] RgMngmt * cfm
281 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCFGCFM, mBuf) != ROK) {
283 #if (ERRCLASS & ERRCLS_ADD_RES)
284 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
285 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
286 (ErrVal)ELRG009, (ErrVal)0, "Packing failed");
291 return ((*func)(pst, &cfm));
296 * @brief This API is used to send a
297 Configuration Confirm from SCH to LM.
301 * Function: cmPkLrgSchCfgCfm
303 * @param[in] Pst * pst
304 * @param[in] RgMngmt * cfg
308 uint8_t cmPkLrgSchCfgCfm
314 Buffer *mBuf = NULLP;
316 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
317 #if (ERRCLASS & ERRCLS_ADD_RES)
318 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
319 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
320 (ErrVal)ELRG010, (ErrVal)0, "Packing failed");
324 if (pst->selector == ODU_SELECTOR_LC) {
325 if (cmPkRgMngmt(pst, cfg, EVTMACSCHGENCFGCFM, mBuf) != ROK) {
326 #if (ERRCLASS & ERRCLS_ADD_RES)
327 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
328 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
329 (ErrVal)ELRG011, (ErrVal)0, "Packing failed");
336 pst->event = (Event) EVTMACSCHGENCFGCFM;
337 return (SPstTsk(pst,mBuf));
342 * @brief This API is used to send a
343 Configuration Confirm from SCH to LM.
347 * Function: cmUnpkLrgSchCfgCfm
349 * @param[in] Pst * pst
350 * @param[in] RgMngmt * cfg
354 S16 cmUnpkLrgSchCfgCfm
363 if (cmUnpkRgMngmt(pst, &cfg, EVTMACSCHGENCFGCFM, mBuf) != ROK) {
365 #if (ERRCLASS & ERRCLS_ADD_RES)
366 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
367 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
368 (ErrVal)ELRG012, (ErrVal)0, "Packing failed");
373 return ((*func)(pst, &cfg));
378 * @brief This API is used to send a
379 Statistics Request from LM to MAC.
383 * Function: cmPkLrgStsReq
385 * @param[in] Pst * pst
386 * @param[in] RgMngmt * sts
396 Buffer *mBuf = NULLP;
398 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
399 #if (ERRCLASS & ERRCLS_ADD_RES)
400 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
401 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
402 (ErrVal)ELRG013, (ErrVal)0, "Packing failed");
406 if (pst->selector == ODU_SELECTOR_LC) {
407 if (cmPkRgMngmt(pst, sts, EVTLRGSTSREQ, mBuf) != ROK) {
408 #if (ERRCLASS & ERRCLS_ADD_RES)
409 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
410 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
411 (ErrVal)ELRG014, (ErrVal)0, "Packing failed");
418 pst->event = (Event) EVTLRGSTSREQ;
419 return (SPstTsk(pst,mBuf));
424 * @brief This API is used to send a
425 Statistics Request from LM to MAC.
429 * Function: cmUnpkLrgStsReq
431 * @param[in] Pst * pst
432 * @param[in] RgMngmt * sts
446 if (cmUnpkRgMngmt(pst, &sts, EVTLRGSTSREQ, mBuf) != ROK) {
448 #if (ERRCLASS & ERRCLS_ADD_RES)
449 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
450 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
451 (ErrVal)ELRG015, (ErrVal)0, "Packing failed");
456 return ((*func)(pst, &sts));
461 * @brief This API is used to send a
462 Statistics Confirm from MAC to LM.
466 * Function: cmPkLrgStsCfm
468 * @param[in] Pst * pst
469 * @param[in] RgMngmt * cfm
479 Buffer *mBuf = NULLP;
481 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
482 #if (ERRCLASS & ERRCLS_ADD_RES)
483 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
484 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
485 (ErrVal)ELRG016, (ErrVal)0, "Packing failed");
489 if (pst->selector == ODU_SELECTOR_LC) {
490 if (cmPkRgMngmt(pst, cfm, EVTLRGSTSCFM, mBuf) != ROK) {
491 #if (ERRCLASS & ERRCLS_ADD_RES)
492 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
493 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
494 (ErrVal)ELRG017, (ErrVal)0, "Packing failed");
501 pst->event = (Event) EVTLRGSTSCFM;
502 return (SPstTsk(pst,mBuf));
507 * @brief This API is used to send a
508 Statistics Confirm from MAC to LM.
512 * Function: cmUnpkLrgStsCfm
514 * @param[in] Pst * pst
515 * @param[in] RgMngmt * cfm
529 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSTSCFM, mBuf) != ROK) {
531 #if (ERRCLASS & ERRCLS_ADD_RES)
532 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
533 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
534 (ErrVal)ELRG018, (ErrVal)0, "Packing failed");
539 return ((*func)(pst, &cfm));
544 * @brief This API is used to send a
545 Status Request from LM to MAC.
549 * Function: cmPkLrgStaReq
551 * @param[in] Pst * pst
552 * @param[in] RgMngmt * sta
562 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)ELRG019, (ErrVal)0, "Packing failed");
572 if (cmPkRgMngmt(pst, sta, EVTLRGSSTAREQ, mBuf) != ROK) {
573 #if (ERRCLASS & ERRCLS_ADD_RES)
574 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
575 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
576 (ErrVal)ELRG020, (ErrVal)0, "Packing failed");
582 pst->event = (Event) EVTLRGSSTAREQ;
583 return (SPstTsk(pst,mBuf));
588 * @brief This API is used to send a
589 Status Request from LM to MAC.
593 * Function: cmUnpkLrgStaReq
595 * @param[in] Pst * pst
596 * @param[in] RgMngmt * sta
610 memset(&sta, 0, sizeof(RgMngmt));
611 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSSTAREQ, mBuf) != ROK) {
612 #if (ERRCLASS & ERRCLS_ADD_RES)
613 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
614 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
615 (ErrVal)ELRG021, (ErrVal)0, "Packing failed");
621 return ((*func)(pst, &sta));
626 * @brief This API is used to send a
627 Status Confirm from MAC to LM.
631 * Function: cmPkLrgStaCfm
633 * @param[in] Pst * pst
634 * @param[in] RgMngmt * cfm
644 Buffer *mBuf = NULLP;
646 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
647 #if (ERRCLASS & ERRCLS_ADD_RES)
648 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
649 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
650 (ErrVal)ELRG022, (ErrVal)0, "Packing failed");
654 if (cmPkRgMngmt(pst, cfm, EVTLRGSSTACFM, mBuf) != ROK) {
655 #if (ERRCLASS & ERRCLS_ADD_RES)
656 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
657 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
658 (ErrVal)ELRG023, (ErrVal)0, "Packing failed");
664 pst->event = (Event) EVTLRGSSTACFM;
665 return (SPstTsk(pst,mBuf));
670 * @brief This API is used to send a
671 Status Confirm from MAC to LM.
675 * Function: cmUnpkLrgStaCfm
677 * @param[in] Pst * pst
678 * @param[in] RgMngmt * cfm
692 memset(&cfm, 0, sizeof(RgMngmt));
693 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGSSTACFM, mBuf) != ROK) {
694 #if (ERRCLASS & ERRCLS_ADD_RES)
695 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
696 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
697 (ErrVal)ELRG024, (ErrVal)0, "Packing failed");
703 return ((*func)(pst, &cfm));
708 * @brief This API is used to send a
709 Status Indication from MAC to LM.
713 * Function: cmPkLrgStaInd
715 * @param[in] Pst * pst
716 * @param[in] RgMngmt * usta
726 Buffer *mBuf = NULLP;
728 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
729 #if (ERRCLASS & ERRCLS_ADD_RES)
730 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
731 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
732 (ErrVal)ELRG025, (ErrVal)0, "Packing failed");
736 if (pst->selector == ODU_SELECTOR_LC) {
737 if (cmPkRgMngmt(pst, usta, EVTLRGUSTAIND, mBuf) != ROK) {
738 #if (ERRCLASS & ERRCLS_ADD_RES)
739 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
740 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
741 (ErrVal)ELRG026, (ErrVal)0, "Packing failed");
748 pst->event = (Event) EVTLRGUSTAIND;
749 return (SPstTsk(pst,mBuf));
754 * @brief This API is used to send a
755 Status Indication from MAC to LM.
759 * Function: cmUnpkLrgStaInd
761 * @param[in] Pst * pst
762 * @param[in] RgMngmt * usta
776 if (cmUnpkRgMngmt(pst, &usta, EVTLRGUSTAIND, mBuf) != ROK) {
778 #if (ERRCLASS & ERRCLS_ADD_RES)
779 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
780 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
781 (ErrVal)ELRG027, (ErrVal)0, "Packing failed");
786 return ((*func)(pst, &usta));
791 * @brief This API is used to send a
792 Status Indication from SCH to LM.
796 * Function: cmPkLrgSchStaInd
798 * @param[in] Pst * pst
799 * @param[in] RgMngmt * sta
809 Buffer *mBuf = NULLP;
811 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
812 #if (ERRCLASS & ERRCLS_ADD_RES)
813 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
814 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
815 (ErrVal)ELRG028, (ErrVal)0, "Packing failed");
819 if (pst->selector == ODU_SELECTOR_LC) {
820 if (cmPkRgMngmt(pst, sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
821 #if (ERRCLASS & ERRCLS_ADD_RES)
822 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
823 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
824 (ErrVal)ELRG029, (ErrVal)0, "Packing failed");
831 pst->event = (Event) EVTLRGSCHSTAIND;
832 return (SPstTsk(pst,mBuf));
837 * @brief This API is used to send a
838 Status Indication from SCH to LM.
842 * Function: cmUnpkLrgSchStaInd
844 * @param[in] Pst * pst
845 * @param[in] RgMngmt * sta
849 S16 cmUnpkLrgSchStaInd
859 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
861 #if (ERRCLASS & ERRCLS_ADD_RES)
862 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
863 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
864 (ErrVal)ELRG030, (ErrVal)0, "Packing failed");
869 return ((*func)(pst, &sta));
874 * @brief This API is used to send a
875 Control Request from LM to MAC.
879 * Function: cmPkLrgCntrlReq
881 * @param[in] Pst * pst
882 * @param[in] RgMngmt * cntrl
892 Buffer *mBuf = NULLP;
894 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
895 #if (ERRCLASS & ERRCLS_ADD_RES)
896 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
897 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
898 (ErrVal)ELRG031, (ErrVal)0, "Packing failed");
902 if (pst->selector == ODU_SELECTOR_LC) {
903 if (cmPkRgMngmt(pst, cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
904 #if (ERRCLASS & ERRCLS_ADD_RES)
905 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
906 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
907 (ErrVal)ELRG032, (ErrVal)0, "Packing failed");
914 pst->event = (Event) EVTLRGCNTRLREQ;
915 return (SPstTsk(pst,mBuf));
920 * @brief This API is used to send a
921 Control Request from LM to MAC.
925 * Function: cmUnpkLrgCntrlReq
927 * @param[in] Pst * pst
928 * @param[in] RgMngmt * cntrl
932 S16 cmUnpkLrgCntrlReq
942 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGCNTRLREQ, mBuf) != ROK) {
944 #if (ERRCLASS & ERRCLS_ADD_RES)
945 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
946 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
947 (ErrVal)ELRG033, (ErrVal)0, "Packing failed");
952 return ((*func)(pst, &cntrl));
957 * @brief This API is used to send a
958 Control Request from LM to SCH.
962 * Function: cmPkLrgSchCntrlReq
964 * @param[in] Pst * pst
965 * @param[in] RgMngmt * cntrl
969 S16 cmPkLrgSchCntrlReq
975 Buffer *mBuf = NULLP;
977 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
978 #if (ERRCLASS & ERRCLS_ADD_RES)
979 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
980 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
981 (ErrVal)ELRG034, (ErrVal)0, "Packing failed");
985 if (pst->selector == ODU_SELECTOR_LC) {
986 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
987 #if (ERRCLASS & ERRCLS_ADD_RES)
988 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
989 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
990 (ErrVal)ELRG035, (ErrVal)0, "Packing failed");
997 pst->event = (Event) EVTLRGSCHCNTRLREQ;
998 return (SPstTsk(pst,mBuf));
1003 * @brief This API is used to send a
1004 Control Request from LM to SCH.
1008 * Function: cmUnpkLrgSchCntrlReq
1010 * @param[in] Pst * pst
1011 * @param[in] RgMngmt * cntrl
1015 S16 cmUnpkLrgSchCntrlReq
1017 LrgSchCntrlReq func,
1025 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLREQ, mBuf) != ROK) {
1027 #if (ERRCLASS & ERRCLS_ADD_RES)
1028 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1029 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1030 (ErrVal)ELRG036, (ErrVal)0, "Packing failed");
1035 return ((*func)(pst, &cntrl));
1040 * @brief This API is used to send a
1041 Control Confirm from MAC to LM.
1045 * Function: cmPkLrgCntrlCfm
1047 * @param[in] Pst * pst
1048 * @param[in] RgMngmt * cfm
1058 Buffer *mBuf = NULLP;
1060 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1061 #if (ERRCLASS & ERRCLS_ADD_RES)
1062 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1063 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1064 (ErrVal)ELRG037, (ErrVal)0, "Packing failed");
1068 if (pst->selector == ODU_SELECTOR_LC) {
1069 if (cmPkRgMngmt(pst, cfm, EVTLRGCNTRLCFM, 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)ELRG038, (ErrVal)0, "Packing failed");
1080 pst->event = (Event) EVTLRGCNTRLCFM;
1081 return (SPstTsk(pst,mBuf));
1086 * @brief This API is used to send a
1087 Control Confirm from MAC to LM.
1091 * Function: cmUnpkLrgCntrlCfm
1093 * @param[in] Pst * pst
1094 * @param[in] RgMngmt * cfm
1098 S16 cmUnpkLrgCntrlCfm
1108 if (cmUnpkRgMngmt(pst, &cfm, EVTLRGCNTRLCFM, 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)ELRG039, (ErrVal)0, "Packing failed");
1118 return ((*func)(pst, &cfm));
1123 * @brief This API is used to send a
1124 Control Confirm from SCH to LM.
1128 * Function: cmPkLrgSchCntrlCfm
1130 * @param[in] Pst * pst
1131 * @param[in] RgMngmt * cntrl
1135 S16 cmPkLrgSchCntrlCfm
1141 Buffer *mBuf = NULLP;
1143 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1144 #if (ERRCLASS & ERRCLS_ADD_RES)
1145 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1146 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1147 (ErrVal)ELRG040, (ErrVal)0, "Packing failed");
1151 if (pst->selector == ODU_SELECTOR_LC) {
1152 if (cmPkRgMngmt(pst, cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1153 #if (ERRCLASS & ERRCLS_ADD_RES)
1154 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1155 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1156 (ErrVal)ELRG041, (ErrVal)0, "Packing failed");
1163 pst->event = (Event) EVTLRGSCHCNTRLCFM;
1164 return (SPstTsk(pst,mBuf));
1169 * @brief This API is used to send a
1170 Control Confirm from SCH to LM.
1174 * Function: cmUnpkLrgSchCntrlCfm
1176 * @param[in] Pst * pst
1177 * @param[in] RgMngmt * cntrl
1181 S16 cmUnpkLrgSchCntrlCfm
1183 LrgSchCntrlCfm func,
1191 if (cmUnpkRgMngmt(pst, &cntrl, EVTLRGSCHCNTRLCFM, mBuf) != ROK) {
1193 #if (ERRCLASS & ERRCLS_ADD_RES)
1194 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1195 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1196 (ErrVal)ELRG042, (ErrVal)0, "Packing failed");
1201 return ((*func)(pst, &cntrl));
1206 * @brief This API is used to send a
1207 Trace Indication from MAC to LM.
1211 * Function: cmPkLrgTrcInd
1213 * @param[in] Pst * pst
1214 * @param[in] RgMngmt * trc
1215 * @param[in] Buffer * trcBuf
1226 Buffer *mBuf = NULLP;
1228 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1229 #if (ERRCLASS & ERRCLS_ADD_RES)
1230 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1231 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1232 (ErrVal)ELRG043, (ErrVal)0, "Packing failed");
1237 if (pst->selector == ODU_SELECTOR_LC) {
1239 if (SFndLenMsg(trcBuf, &msgLen) != ROK) {
1240 #if (ERRCLASS & ERRCLS_ADD_RES)
1241 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1242 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1243 (ErrVal)ELRG044, (ErrVal)0, "Packing failed");
1248 if (SCatMsg(mBuf, trcBuf, M1M2) != ROK) {
1249 #if (ERRCLASS & ERRCLS_ADD_RES)
1250 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1251 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1252 (ErrVal)ELRG045, (ErrVal)0, "Packing failed");
1258 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1260 if (cmPkRgMngmt(pst, trc, EVTLRGTRCIND, mBuf) != ROK) {
1261 #if (ERRCLASS & ERRCLS_ADD_RES)
1262 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1263 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1264 (ErrVal)ELRG046, (ErrVal)0, "Packing failed");
1271 pst->event = (Event) EVTLRGTRCIND;
1272 return (SPstTsk(pst,mBuf));
1277 * @brief This API is used to send a
1278 Trace Indication from MAC to LM.
1282 * Function: cmUnpkLrgTrcInd
1284 * @param[in] Pst * pst
1285 * @param[in] RgMngmt * trc
1286 * @param[in] Buffer * trcBuf
1298 /* lrg_c_001.main_3 - MODIFY - Modified trcBuf to have it initialized to NULLP */
1299 Buffer *trcBuf = NULLP;
1302 if (cmUnpkRgMngmt(pst, &trc, EVTLRGTRCIND, mBuf) != ROK) {
1304 #if (ERRCLASS & ERRCLS_ADD_RES)
1305 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1306 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1307 (ErrVal)ELRG047, (ErrVal)0, "Packing failed");
1311 if (pst->selector == ODU_SELECTOR_LC) {
1312 MsgLen msgLen, totalMsgLen;
1313 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1314 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1316 if (SSegMsg(mBuf, totalMsgLen-msgLen, &trcBuf) != ROK)
1320 return ((*func)(pst, &trc, trcBuf));
1324 /***********************************************************
1326 * Func : cmPkRgGenCfg
1329 * Desc : This structure holds configuration parameters for MAC General Configuration.
1338 **********************************************************/
1348 CMCHKPK(oduUnpackUInt8, param->isSCellActDeactAlgoEnable, mBuf);
1349 CMCHKPK(oduUnpackUInt8, param->forceCntrlSrbBoOnPCel, mBuf);
1351 CMCHKPK(oduUnpackUInt8, param->startCellId, mBuf);
1352 CMCHKPK(oduUnpackUInt8, param->numRguSaps, mBuf);
1353 CMCHKPK(oduUnpackUInt8, param->tmrRes, mBuf);
1354 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1355 CMCHKPK(cmPkPst, ¶m->lmPst, mBuf);
1361 /***********************************************************
1363 * Func : cmUnpkRgGenCfg
1366 * Desc : This structure holds configuration parameters for MAC General Configuration.
1375 **********************************************************/
1384 CMCHKUNPK(cmUnpkPst, ¶m->lmPst, mBuf);
1385 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1386 CMCHKUNPK(oduPackUInt8, ¶m->tmrRes, mBuf);
1387 CMCHKUNPK(oduPackUInt8, ¶m->numRguSaps, mBuf);
1388 CMCHKUNPK(oduPackUInt8, ¶m->startCellId, mBuf);
1390 CMCHKUNPK(oduPackUInt8, ¶m->forceCntrlSrbBoOnPCel, mBuf);
1391 CMCHKUNPK(oduPackUInt8, ¶m->isSCellActDeactAlgoEnable, mBuf);
1398 /***********************************************************
1400 * Func : cmPkRgUpSapCfg
1403 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1412 **********************************************************/
1421 CMCHKPK(SPkS16, param->suId, mBuf);
1422 CMCHKPK(SPkS16, param->spId, mBuf);
1423 CMCHKPK(oduUnpackUInt8, param->route, mBuf);
1424 CMCHKPK(oduUnpackUInt8, param->inst, mBuf);
1425 CMCHKPK(oduUnpackUInt8, param->ent, mBuf);
1426 CMCHKPK(oduUnpackUInt16, param->procId, mBuf);
1427 CMCHKPK(oduUnpackUInt8, param->prior, mBuf);
1428 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1429 CMCHKPK(oduUnpackUInt8, param->selector, mBuf);
1435 /***********************************************************
1437 * Func : cmUnpkRgUpSapCfg
1440 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
1449 **********************************************************/
1450 S16 cmUnpkRgUpSapCfg
1458 CMCHKUNPK(oduPackUInt8, ¶m->selector, mBuf);
1459 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1460 CMCHKUNPK(oduPackUInt8, ¶m->prior, mBuf);
1461 CMCHKUNPK(oduPackUInt16, ¶m->procId, mBuf);
1462 CMCHKUNPK(oduPackUInt8, ¶m->ent, mBuf);
1463 CMCHKUNPK(oduPackUInt8, ¶m->inst, mBuf);
1464 CMCHKUNPK(oduPackUInt8, ¶m->route, mBuf);
1465 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1466 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1472 /***********************************************************
1474 * Func : cmPkRgLowSapCfg
1477 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1486 **********************************************************/
1495 CMCHKPK(cmPkTmrCfg, ¶m->bndTmr, mBuf);
1496 CMCHKPK(SPkS16, param->suId, mBuf);
1497 CMCHKPK(SPkS16, param->spId, mBuf);
1498 CMCHKPK(oduUnpackUInt8, param->route, mBuf);
1499 CMCHKPK(oduUnpackUInt8, param->inst, mBuf);
1500 CMCHKPK(oduUnpackUInt8, param->ent, mBuf);
1501 CMCHKPK(oduUnpackUInt16, param->procId, mBuf);
1502 CMCHKPK(oduUnpackUInt8, param->prior, mBuf);
1503 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
1504 CMCHKPK(oduUnpackUInt8, param->selector, mBuf);
1510 /***********************************************************
1512 * Func : cmUnpkRgLowSapCfg
1515 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
1524 **********************************************************/
1525 S16 cmUnpkRgLowSapCfg
1533 CMCHKUNPK(oduPackUInt8, ¶m->selector, mBuf);
1534 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
1535 CMCHKUNPK(oduPackUInt8, ¶m->prior, mBuf);
1536 CMCHKUNPK(oduPackUInt16, ¶m->procId, mBuf);
1537 CMCHKUNPK(oduPackUInt8, ¶m->ent, mBuf);
1538 CMCHKUNPK(oduPackUInt8, ¶m->inst, mBuf);
1539 CMCHKUNPK(oduPackUInt8, ¶m->route, mBuf);
1540 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
1541 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
1542 CMCHKUNPK(cmUnpkTmrCfg, ¶m->bndTmr, mBuf);
1546 #ifdef MAC_SCH_STATS
1549 /***********************************************************
1551 * Func : cmPkRgAckNack
1554 * Desc : Ack and Nack statistics
1563 **********************************************************/
1572 CMCHKPK(oduUnpackUInt16, param->numOfAcks, mBuf);
1573 CMCHKPK(oduUnpackUInt16, param->numOfNacks, mBuf);
1574 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
1577 } /* cmPkRgAckNack */
1580 /***********************************************************
1582 * Func : cmPkRgSchNackAckStats
1594 **********************************************************/
1595 S16 cmPkRgSchNackAckStats
1597 RgSchNackAckStats *param,
1604 for (i=14; i >= 0; i--) {
1605 CMCHKPK(cmPkRgAckNack, ¶m->ulCqiStat[i], mBuf);
1608 for (i=14; i >= 0; i--) {
1609 CMCHKPK(cmPkRgAckNack, ¶m->dlCqiStat[i], mBuf);
1616 /***********************************************************
1618 * Func : cmPkRgHqNumRetx
1621 * Desc : Harq Retransmission statistics
1630 **********************************************************/
1633 RgSchHqNumRetx *param,
1638 CMCHKPK(oduUnpackUInt32, param->totalTx, mBuf);
1639 CMCHKPK(oduUnpackUInt16, param->numOfHQ_4, mBuf);
1640 CMCHKPK(oduUnpackUInt16, param->numOfHQ_3, mBuf);
1641 CMCHKPK(oduUnpackUInt16, param->numOfHQ_2, mBuf);
1642 CMCHKPK(oduUnpackUInt16, param->numOfHQ_1, mBuf);
1643 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
1646 } /* cmPkRgHqNumRetx */
1649 /***********************************************************
1651 * Func : cmPkRgSchHqRetxStats
1663 **********************************************************/
1664 S16 cmPkRgSchHqRetxStats
1666 RgSchHqRetxStats *param,
1673 for (i=14; i >= 0; i--) {
1674 CMCHKPK(cmPkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
1677 for (i=14; i >= 0; i--) {
1678 CMCHKPK(cmPkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
1682 } /* cmPkRgSchHqRetxStats */
1684 /* unpcaking functions */
1686 /***********************************************************
1688 * Func : cmUnpkRgAckNack
1691 * Desc : Ack and Nack statistics
1700 **********************************************************/
1709 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
1710 CMCHKUNPK(oduPackUInt16, ¶m->numOfNacks, mBuf);
1711 CMCHKUNPK(oduPackUInt16, ¶m->numOfAcks, mBuf);
1714 } /* cmUnkRgAckNack */
1717 /***********************************************************
1719 * Func : cmUnpkRgSchNackAckStats
1731 **********************************************************/
1732 S16 cmUnpkRgSchNackAckStats
1734 RgSchNackAckStats *param,
1740 for (i=0; i <= 14; i++) {
1741 CMCHKUNPK(cmUnpkRgAckNack, ¶m->dlCqiStat[i], mBuf);
1744 for (i=0; i <= 14; i++) {
1745 CMCHKUNPK(cmUnpkRgAckNack, ¶m->ulCqiStat[i], mBuf);
1749 } /* cmUnpkRgSchNackAckStats */
1752 /***********************************************************
1754 * Func : cmUnpkRgHqNumRetx
1757 * Desc : Harq Retransmission statistics
1766 **********************************************************/
1767 S16 cmUnpkRgHqNumRetx
1769 RgSchHqNumRetx *param,
1774 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
1775 CMCHKUNPK(oduPackUInt16, ¶m->numOfHQ_1, mBuf);
1776 CMCHKUNPK(oduPackUInt16, ¶m->numOfHQ_2, mBuf);
1777 CMCHKUNPK(oduPackUInt16, ¶m->numOfHQ_3, mBuf);
1778 CMCHKUNPK(oduPackUInt16, ¶m->numOfHQ_4, mBuf);
1779 CMCHKUNPK(oduPackUInt32, ¶m->totalTx, mBuf);
1782 } /* cmUnpkRgHqNumRetx */
1785 /***********************************************************
1787 * Func : cmUnpkRgSchHqRetxStats
1799 **********************************************************/
1800 S16 cmUnpkRgSchHqRetxStats
1802 RgSchHqRetxStats *param,
1808 for (i=0; i <= 14; i++) {
1809 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
1812 for (i=0; i <= 14; i++) {
1813 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
1817 } /* cmUnpkRgSchHqRetxStats */
1819 #endif /* MAC_SCH_STATS */
1822 /***********************************************************
1824 * Func : cmPkRgGenSts
1827 * Desc : This structure holds General Statistical information of MAC.
1836 **********************************************************/
1844 #ifdef MAC_SCH_STATS
1845 CMCHKPK(cmPkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
1846 CMCHKPK(cmPkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
1847 #endif /* MAC_SCH_STATS */
1848 CMCHKPK(oduUnpackUInt16, param->numCellCfg, mBuf);
1849 CMCHKPK(oduUnpackUInt32, param->numUeCfg, mBuf);
1850 CMCHKPK(oduUnpackUInt32, param->numHarqFail, mBuf);
1856 /***********************************************************
1858 * Func : cmUnpkRgGenSts
1861 * Desc : This structure holds General Statistical information of MAC.
1870 **********************************************************/
1878 CMCHKUNPK(oduPackUInt32, ¶m->numHarqFail, mBuf);
1879 CMCHKUNPK(oduPackUInt32, ¶m->numUeCfg, mBuf);
1880 CMCHKUNPK(oduPackUInt16, ¶m->numCellCfg, mBuf);
1881 #ifdef MAC_SCH_STATS
1882 CMCHKUNPK(cmUnpkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
1883 CMCHKUNPK(cmUnpkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
1884 #endif /* MAC_SCH_STATS */
1890 /***********************************************************
1892 * Func : cmPkRgSapSts
1895 * Desc : This structure holds Statistical information of a SAP in MAC.
1904 **********************************************************/
1912 CMCHKPK(oduUnpackUInt32, param->numPduDrop, mBuf);
1913 CMCHKPK(oduUnpackUInt32, param->numPduTxmit, mBuf);
1914 CMCHKPK(oduUnpackUInt32, param->numPduRcvd, mBuf);
1920 /***********************************************************
1922 * Func : cmUnpkRgSapSts
1925 * Desc : This structure holds Statistical information of a SAP in MAC.
1934 **********************************************************/
1942 CMCHKUNPK(oduPackUInt32, ¶m->numPduRcvd, mBuf);
1943 CMCHKUNPK(oduPackUInt32, ¶m->numPduTxmit, mBuf);
1944 CMCHKUNPK(oduPackUInt32, ¶m->numPduDrop, mBuf);
1950 /***********************************************************
1952 * Func : cmPkRgSchInstCfg
1955 * Desc : Scheduler Configuration
1964 **********************************************************/
1965 S16 cmPkRgSchInstCfg
1967 RgSchInstCfg *param,
1974 for (i=param->numSaps-1; i >= 0; i--) {
1975 CMCHKPK(cmPkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
1977 for (i=param->numSaps-1; i >= 0; i--) {
1978 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
1980 for (i=param->numSaps-1; i >= 0; i--) {
1981 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
1983 CMCHKPK(oduUnpackUInt8, param->numSaps, mBuf);
1984 CMCHKPK(cmPkRgGenCfg, ¶m->genCfg, mBuf);
1985 CMCHKPK(oduUnpackUInt8, param->instId, mBuf);
1991 /***********************************************************
1993 * Func : cmUnpkRgSchInstCfg
1996 * Desc : Scheduler Configuration
2005 **********************************************************/
2006 S16 cmUnpkRgSchInstCfg
2008 RgSchInstCfg *param,
2015 CMCHKUNPK(oduPackUInt8, ¶m->instId, mBuf);
2016 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->genCfg, mBuf);
2017 CMCHKUNPK(oduPackUInt8, ¶m->numSaps, mBuf);
2018 for (i=0; i<param->numSaps; i++) {
2019 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
2021 for (i=0; i<param->numSaps; i++) {
2022 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
2024 for (i=0; i<param->numSaps; i++) {
2025 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
2032 /***********************************************************
2037 * Desc : This structure holds Configuration parameters for MAC.
2046 **********************************************************/
2057 CMCHKPK(cmPkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2060 CMCHKPK(cmPkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2063 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2066 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2069 CMCHKPK(cmPkRgGenCfg, ¶m->s.genCfg, mBuf);
2079 /***********************************************************
2081 * Func : cmUnpkRgCfg
2084 * Desc : This structure holds Configuration parameters for MAC.
2093 **********************************************************/
2104 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->s.genCfg, mBuf);
2107 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.rguSap, mBuf);
2110 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.crgSap, mBuf);
2113 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
2116 CMCHKUNPK(cmUnpkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
2126 /***********************************************************
2128 * Func : cmPkRgSapSta
2131 * Desc : This structure holds a SAP's status information.
2140 **********************************************************/
2148 CMCHKPK(oduUnpackUInt8, param->sapState, mBuf);
2154 /***********************************************************
2156 * Func : cmUnpkRgSapSta
2159 * Desc : This structure holds a SAP's status information.
2168 **********************************************************/
2176 CMCHKUNPK(oduPackUInt8, ¶m->sapState, mBuf);
2182 /***********************************************************
2187 * Desc : This structure holds MAC's Statistical information.
2196 **********************************************************/
2207 CMCHKPK(cmPkRgSapSts, ¶m->s.tfuSts, mBuf);
2210 CMCHKPK(cmPkRgSapSts, ¶m->s.rgrSts, mBuf);
2213 CMCHKPK(cmPkRgSapSts, ¶m->s.crgSts, mBuf);
2216 CMCHKPK(cmPkRgSapSts, ¶m->s.rguSts, mBuf);
2219 CMCHKPK(cmPkRgGenSts, ¶m->s.genSts, mBuf);
2224 CMCHKPK(cmPkAction, param->action, mBuf);
2225 CMCHKPK(oduUnpackUInt8, param->sapInst, mBuf);
2226 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2232 /***********************************************************
2234 * Func : cmUnpkRgSts
2237 * Desc : This structure holds MAC's Statistical information.
2246 **********************************************************/
2255 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2256 CMCHKUNPK(oduPackUInt8, ¶m->sapInst, mBuf);
2257 CMCHKUNPK(cmUnpkAction, ¶m->action, mBuf);
2260 CMCHKUNPK(cmUnpkRgGenSts, ¶m->s.genSts, mBuf);
2263 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rguSts, mBuf);
2266 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.crgSts, mBuf);
2269 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rgrSts, mBuf);
2272 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.tfuSts, mBuf);
2282 /***********************************************************
2287 * Desc : This structure holds MAC's Solicited Status information.
2296 **********************************************************/
2311 CMCHKPK(cmPkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2314 CMCHKPK(cmPkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2317 CMCHKPK(cmPkRgSapSta, ¶m->s.crgSapSta, mBuf);
2320 CMCHKPK(cmPkRgSapSta, ¶m->s.rguSapSta, mBuf);
2322 /*ccpu00118255 - ADD - Check for eventType before Pack */
2325 if (eventType == EVTLRGSSTACFM)
2327 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2328 if (param->s.sysId.ptNmb != NULLP)
2330 SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool,
2331 (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2334 #else /*LRG_V1 not defined */
2335 if (param->s.sysId.ptNmb != NULLP)
2337 CMCHKPK(cmPkSystemId, ¶m->s.sysId, mBuf);
2338 SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)param->s.sysId.ptNmb, LRG_MAX_PT_NUM_SIZE);
2341 #endif /*end of LRG_V1 */
2346 CMCHKPK(oduUnpackUInt8, param->sapInst, mBuf);
2347 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2353 /***********************************************************
2355 * Func : cmUnpkRgSsta
2358 * Desc : This structure holds MAC's Solicited Status information.
2367 **********************************************************/
2378 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2379 CMCHKUNPK(oduPackUInt8, ¶m->sapInst, mBuf);
2382 /*ccpu00118255 - ADD - Check for eventType before Unpack */
2383 if (pst->event == EVTLRGSSTACFM)
2386 if((SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)¶m->s.sysId.ptNmb,
2387 LRG_MAX_PT_NUM_SIZE)) != ROK){
2388 #if (ERRCLASS & ERRCLS_ADD_RES)
2389 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2390 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2391 (ErrVal)ELRG048, (ErrVal)0, "Packing failed");
2396 /* KWORK_FIX: Moved the memset under the NULL check */
2397 if (param->s.sysId.ptNmb != NULLP)
2399 memset(param->s.sysId.ptNmb, 0, LRG_MAX_PT_NUM_SIZE);
2400 CMCHKUNPK(cmUnpkSystemId, ¶m->s.sysId, mBuf);
2405 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rguSapSta, mBuf);
2408 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.crgSapSta, mBuf);
2411 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.rgrSapSta, mBuf);
2414 CMCHKUNPK(cmUnpkRgSapSta, ¶m->s.tfuSapSta, mBuf);
2424 /***********************************************************
2426 * Func : cmPkRgUstaDgn
2429 * Desc : Alarm diagnostics structure.
2438 **********************************************************/
2446 switch(param->type) {
2447 case LRG_USTA_DGNVAL_MEM:
2448 CMCHKPK(cmPkMemoryId, ¶m->u.mem, mBuf);
2453 CMCHKPK(oduUnpackUInt8, param->type, mBuf);
2459 /***********************************************************
2461 * Func : cmUnpkRgUstaDgn
2464 * Desc : Alarm diagnostics structure.
2473 **********************************************************/
2482 CMCHKUNPK(oduPackUInt8, ¶m->type, mBuf);
2485 case LRG_USTA_DGNVAL_MEM:
2486 CMCHKUNPK(cmUnpkMemoryId, ¶m->u.mem, mBuf);
2496 /***********************************************************
2501 * Desc : This structure holds MAC's Unsolicited Status information.
2510 **********************************************************/
2518 CMCHKPK(cmPkRgUstaDgn, ¶m->dgn, mBuf);
2519 CMCHKPK(cmPkCmAlarm, ¶m->cmAlarm, mBuf);
2525 /***********************************************************
2527 * Func : cmUnpkRgUsta
2530 * Desc : This structure holds MAC's Unsolicited Status information.
2539 **********************************************************/
2547 CMCHKUNPK(cmUnpkCmAlarm, ¶m->cmAlarm, mBuf);
2548 CMCHKUNPK(cmUnpkRgUstaDgn, ¶m->dgn, mBuf);
2554 /***********************************************************
2559 * Desc : This structure holds MAC's Trace Indication information.
2568 **********************************************************/
2576 CMCHKPK(oduUnpackUInt8, param->evnt, mBuf);
2577 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2583 /***********************************************************
2585 * Func : cmUnpkRgTrc
2588 * Desc : This structure holds MAC's Trace Indication information.
2597 **********************************************************/
2605 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2606 CMCHKUNPK(oduPackUInt8, ¶m->evnt, mBuf);
2612 /***********************************************************
2614 * Func : cmPkRgDbgCntrl
2617 * Desc : This structure holds MAC's Debug Control information.
2626 **********************************************************/
2634 CMCHKPK(oduUnpackUInt32, param->dbgMask, mBuf);
2638 #ifdef PHY_ERROR_LOGING
2639 /***********************************************************
2641 * Func : cmPkRgSchUlAllocCntrl
2644 * Desc : This structure holds MAC's Debug Control information.
2653 **********************************************************/
2654 S16 cmPkRgSchUlAllocCntrl
2656 RgSchUlAllocCntrl *param,
2661 CMCHKPK(oduUnpackUInt8, param->mcs, mBuf);
2662 CMCHKPK(oduUnpackUInt16, param->numOfRb, mBuf);
2663 CMCHKPK(oduUnpackUInt16, param->rbStart, mBuf);
2664 CMCHKPK(oduUnpackUInt8, param->testStart, mBuf);
2665 CMCHKPK(oduUnpackUInt8, param->enaLog, mBuf);
2666 CMCHKPK(oduUnpackUInt16, param->logTime, mBuf);
2671 /***********************************************************
2673 * Func : cmUnpkRgSchUlAllocCntrl
2676 * Desc : This structure holds MAC's Scheduler Configuration for Ul Allocation.
2685 **********************************************************/
2686 S16 cmUnpkRgSchUlAllocCntrl
2688 RgSchUlAllocCntrl *param,
2693 CMCHKUNPK(oduPackUInt16, ¶m->logTime, mBuf);
2694 CMCHKUNPK(oduPackUInt8, ¶m->enaLog, mBuf);
2695 CMCHKUNPK(oduPackUInt8, ¶m->testStart, mBuf);
2696 CMCHKUNPK(oduPackUInt16, ¶m->rbStart, mBuf);
2697 CMCHKUNPK(oduPackUInt16, ¶m->numOfRb, mBuf);
2698 CMCHKUNPK(oduPackUInt8, ¶m->mcs, mBuf);
2706 /***********************************************************
2708 * Func : cmUnpkRgDbgCntrl
2711 * Desc : This structure holds MAC's Debug Control information.
2720 **********************************************************/
2721 S16 cmUnpkRgDbgCntrl
2728 CMCHKUNPK(oduPackUInt32, ¶m->dbgMask, mBuf);
2734 /***********************************************************
2736 * Func : cmPkRgSapCntrl
2739 * Desc : This structure holds MAC's SAP Control information.
2748 **********************************************************/
2756 CMCHKPK(SPkS16, param->spId, mBuf);
2757 CMCHKPK(SPkS16, param->suId, mBuf);
2763 /***********************************************************
2765 * Func : cmUnpkRgSapCntrl
2768 * Desc : This structure holds MAC's SAP Control information.
2777 **********************************************************/
2778 S16 cmUnpkRgSapCntrl
2785 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
2786 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
2792 /***********************************************************
2794 * Func : cmPkRgCntrl
2797 * Desc : This structure holds MAC's Control information.
2806 **********************************************************/
2821 switch(param->subAction) {
2823 CMCHKPK(cmPkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
2828 switch(param->subAction) {
2830 CMCHKPK(SPkS16, param->s.trcLen, mBuf);
2833 CMCHKPK(cmPkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
2839 CMCHKPK(oduUnpackUInt32, param->s.logMask, mBuf);
2842 #ifdef PHY_ERROR_LOGING
2844 CMCHKPK(cmPkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
2854 CMCHKPK(oduUnpackUInt8, param->subAction, mBuf);
2855 CMCHKPK(oduUnpackUInt8, param->action, mBuf);
2856 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
2862 /***********************************************************
2864 * Func : cmUnpkRgCntrl
2867 * Desc : This structure holds MAC's Control information.
2876 **********************************************************/
2886 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
2887 CMCHKUNPK(oduPackUInt8, ¶m->action, mBuf);
2888 CMCHKUNPK(oduPackUInt8, ¶m->subAction, mBuf);
2891 switch(param->subAction) {
2893 CMCHKUNPK(cmUnpkRgDbgCntrl, ¶m->s.rgDbgCntrl, mBuf);
2896 CMCHKUNPK(SUnpkS16, ¶m->s.trcLen, mBuf);
2902 CMCHKUNPK(oduPackUInt32, ¶m->s.logMask, mBuf);
2905 #ifdef PHY_ERROR_LOGING
2907 CMCHKUNPK(cmUnpkRgSchUlAllocCntrl, ¶m->s.rgSchUlAllocCntrl, mBuf);
2918 switch(param->subAction) {
2920 CMCHKUNPK(cmUnpkRgSapCntrl, ¶m->s.rgSapCntrl, mBuf);
2932 /***********************************************************
2934 * Func : cmPkRgMngmt
2937 * Desc : This structure holds MAC's Configuration and Control Management Information.
2946 **********************************************************/
2958 case EVTLRGCNTRLREQ:
2959 case EVTLRGCNTRLCFM:
2960 case EVTLRGSCHCNTRLREQ:
2961 case EVTLRGSCHCNTRLCFM:
2962 if(cmPkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
2966 CMCHKPK(cmPkRgTrc, ¶m->t.trc, mBuf);
2969 case EVTLRGSCHSTAIND:
2970 CMCHKPK(cmPkRgUsta, ¶m->t.usta, mBuf);
2974 /*ccpu00118255 - ADD - eventType param */
2976 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt,
2977 eventType, mBuf) != ROK)
2979 #else /* LRG_V1 is not defined */
2980 if(cmPkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
2982 #endif /* end of LRG_V1*/
2986 if(cmPkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf)!= ROK)
2991 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
2994 case EVTMACSCHGENCFGREQ:
2995 case EVTMACSCHGENCFGCFM:
2996 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3002 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
3003 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
3009 /***********************************************************
3011 * Func : cmUnpkRgMngmt
3014 * Desc : This structure holds MAC's Configuration and Control Management Information.
3023 **********************************************************/
3034 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
3035 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
3039 case EVTMACSCHGENCFGREQ:
3040 case EVTMACSCHGENCFGCFM:
3041 if(cmUnpkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
3046 if(cmUnpkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf) != ROK)
3051 if(cmUnpkRgSsta(pst, ¶m->t.ssta, param->hdr.elmId.elmnt, mBuf) != ROK)
3055 case EVTLRGSCHSTAIND:
3056 CMCHKUNPK(cmUnpkRgUsta, ¶m->t.usta, mBuf);
3059 CMCHKUNPK(cmUnpkRgTrc, ¶m->t.trc, mBuf);
3061 case EVTLRGCNTRLREQ:
3062 case EVTLRGCNTRLCFM:
3063 case EVTLRGSCHCNTRLREQ:
3064 case EVTLRGSCHCNTRLCFM:
3065 if(cmUnpkRgCntrl(¶m->t.cntrl, param->hdr.elmId.elmnt, mBuf) != ROK)
3074 /* lrg_c_001.main_3 - ADD - Added the functions pertaining to LTE_L2_MEAS */
3078 * @brief This API is used to pack
3079 LrgNmbActvUeQCI elements
3083 * Function: cmPkNmbActvUeQciReq
3085 * @param[in] LrgNmbActvUeQCI
3086 * @param[in] Buffer *mBuf
3090 static S16 cmPkNmbActvUeQciReq
3092 LrgNmbActvUeQCI *nmbActvUeQci,
3099 for(idx = 0; idx < nmbActvUeQci->numQci; idx++)
3101 CMCHKPK(oduUnpackUInt8, nmbActvUeQci->qci[idx], mBuf);
3103 CMCHKPK(oduUnpackUInt8, nmbActvUeQci->numQci, mBuf);
3104 CMCHKPK(oduUnpackUInt8, nmbActvUeQci->sampPrd, mBuf);
3109 * @brief This API is used to pack
3110 LrgAvgPrbQci elements
3114 * Function: cmPkAvgPrbQciReq
3116 * @param[in] LrgNmbActvUeQciReq *avgPrbQciReq
3117 * @param[in] Buffer *mBuf
3121 static S16 cmPkAvgPrbQciReq
3123 LrgAvgPrbQCI *avgPrbQciReq,
3129 for(idx = 0; idx < avgPrbQciReq->numQci; idx++)
3131 CMCHKPK(oduUnpackUInt8, avgPrbQciReq->qci[idx], mBuf);
3133 CMCHKPK(oduUnpackUInt8, avgPrbQciReq->numQci, mBuf);
3139 * @brief This API is used to send a
3140 L2 Measurement Request from LM to MAC.
3144 * Function: cmPkLrgSchL2MeasReq
3146 * @param[in] Pst * pst
3147 * @param[in] LrgSchMeasReqInfo * measInfo
3151 S16 cmPkLrgSchL2MeasReq
3154 LrgSchMeasReqInfo *measInfo
3157 Buffer *mBuf = NULLP;
3159 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3160 #if (ERRCLASS & ERRCLS_ADD_RES)
3161 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3162 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3163 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3167 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3169 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciDl, mBuf);
3171 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3173 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciUl, mBuf);
3175 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3177 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciDl, mBuf);
3179 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3181 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciUl, mBuf);
3184 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3185 CMCHKPK(oduUnpackUInt32, measInfo->timePrd, mBuf);
3186 CMCHKPK(oduUnpackUInt16, measInfo->measType, mBuf);
3187 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3188 pst->event = (Event) EVTLRGSCHL2MEASREQ;
3189 return (SPstTsk(pst,mBuf));
3192 * @brief This API is used to stop a
3193 L2 Measurement Request from LM to MAC.
3197 * Function: cmPkLrgSchL2MeasStopReq
3199 * @param[in] Pst * pst
3200 * @param[in] LrgSchMeasReqInfo * measInfo
3204 S16 cmPkLrgSchL2MeasStopReq
3207 LrgSchMeasStopReqInfo *measInfo
3210 Buffer *mBuf = NULLP;
3212 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3213 #if (ERRCLASS & ERRCLS_ADD_RES)
3214 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3215 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3216 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3220 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3221 /*CMCHKPK(oduUnpackUInt16, measInfo->timePrd, mBuf);*/
3222 CMCHKPK(oduUnpackUInt16, measInfo->measType, mBuf);
3223 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3224 pst->event = (Event) EVTLRGSCHL2MEASSTOPREQ;
3225 return (SPstTsk(pst,mBuf));
3226 }/*cmPkLrgSchL2MeasStopReq*/
3229 * @brief This API is used to send a
3230 L2 Measurement Request from LM to MAC.
3234 * Function: cmPkLrgSchL2MeasSendReq
3236 * @param[in] Pst * pst
3237 * @param[in] LrgSchMeasReqInfo * measInfo
3241 S16 cmPkLrgSchL2MeasSendReq
3244 LrgSchMeasSndReqInfo *measInfo
3247 Buffer *mBuf = NULLP;
3248 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3249 #if (ERRCLASS & ERRCLS_ADD_RES)
3250 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3251 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3252 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
3256 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3257 CMCHKPK(oduUnpackUInt32, measInfo->timePrd, mBuf);
3258 CMCHKPK(oduUnpackUInt16, measInfo->measType, mBuf);
3259 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3260 pst->event = (Event) EVTLRGSCHL2MEASSENDREQ;
3261 return (SPstTsk(pst,mBuf));
3262 }/*cmPkLrgSchL2MeasSendReq*/
3265 * @brief This API is used to unpack AvgPrbQciReq
3269 * Function: cmUnpkNmbActvUeQciReq
3271 * @param[in] LrgNmbActvUeQCI *param
3272 * @param[in] Buffer * mBuf
3276 static S16 cmUnpkNmbActvUeQciReq
3278 LrgNmbActvUeQCI *param,
3284 CMCHKUNPK(oduPackUInt8, ¶m->sampPrd, mBuf);
3285 CMCHKUNPK(oduPackUInt8, ¶m->numQci, mBuf);
3286 for(idx = param->numQci; idx > 0; idx--)
3288 CMCHKUNPK(oduPackUInt8, ¶m->qci[idx - 1], mBuf);
3295 * @brief This API is used to unpack AvgPrbQciReq
3299 * Function: cmUnpkAvgPrbQciReq
3301 * @param[in] LrgAvgPrbQCI *param
3302 * @param[in] Buffer * mBuf
3306 static S16 cmUnpkAvgPrbQciReq
3308 LrgAvgPrbQCI *param,
3315 CMCHKUNPK(oduPackUInt8, ¶m->numQci, mBuf);
3316 for(idx = param->numQci; idx > 0; idx--)
3318 CMCHKUNPK(oduPackUInt8, ¶m->qci[idx - 1], mBuf);
3325 * @brief This API is used to send a
3326 Measurement Request from LM to SCH.
3330 * Function: cmUnpkLrgSchL2MeasReq
3332 * @param[in] LrgSchMeasReq func
3333 * @param[in] Pst * pst
3334 * @param[in] Buffer * mBuf
3338 S16 cmUnpkLrgSchL2MeasReq
3340 LrgSchL2MeasReq func,
3345 LrgSchMeasReqInfo measInfo;
3348 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3349 CMCHKUNPK(oduPackUInt16, &measInfo.measType, mBuf);
3350 CMCHKUNPK(oduPackUInt32, &measInfo.timePrd, mBuf);
3351 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
3352 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3354 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciUl, mBuf);
3356 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3358 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciDl, mBuf);
3360 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3362 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciUl, mBuf);
3364 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3366 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciDl, mBuf);
3369 return ((*func)(pst, &measInfo));
3373 * @brief This API is used to stop a
3374 Measurement Request from LM to SCH.
3378 * Function: cmUnpkLrgSchL2MeasStopReq
3380 * @param[in] LrgSchMeasStopReq func
3381 * @param[in] Pst * pst
3382 * @param[in] Buffer * mBuf
3386 S16 cmUnpkLrgSchL2MeasStopReq
3388 LrgSchL2MeasStopReq func,
3393 LrgSchMeasStopReqInfo measInfo;
3395 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3396 CMCHKUNPK(oduPackUInt16, &measInfo.measType, mBuf);
3397 /*CMCHKUNPK(oduPackUInt16, &measInfo.timePrd, mBuf);*/
3398 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
3400 return ((*func)(pst, &measInfo));
3401 }/*cmUnpkLrgSchL2MeasStopReq*/
3404 * @brief This API is used to send a
3405 Measurement Request from LM to SCH.
3409 * Function: cmUnpkLrgSchL2MeasSendReq
3411 * @param[in] LrgSchMeasSendReq func
3412 * @param[in] Pst * pst
3413 * @param[in] Buffer * mBuf
3417 S16 cmUnpkLrgSchL2MeasSendReq
3419 LrgSchL2MeasSendReq func,
3424 LrgSchMeasSndReqInfo measInfo;
3425 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3426 CMCHKUNPK(oduPackUInt16, &measInfo.measType, mBuf);
3427 CMCHKUNPK(oduPackUInt32, &measInfo.timePrd, mBuf);
3428 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
3430 return ((*func)(pst, &measInfo));
3431 }/*cmUnpkLrgSchL2MeasSendReq*/
3434 * @brief This API is used to stop a
3435 L2 Measurement confirm from MAC to LM
3439 * Function: cmPkLrgSchL2MeasStopCfm
3441 * @param[in] Pst * pst
3442 * @param[in] LrgSchMeasCfmInfo * measInfo
3446 S16 cmPkLrgSchL2MeasStopCfm
3449 LrgSchMeasCfmInfo *measInfo
3452 Buffer *mBuf = NULLP;
3454 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3455 #if (ERRCLASS & ERRCLS_ADD_RES)
3456 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3457 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3458 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
3462 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3463 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
3464 CMCHKPK(oduUnpackUInt16, measInfo->measType, mBuf);
3465 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3466 pst->event = (Event) EVTLRGSCHL2MEASSTOPCFM;
3467 return (SPstTsk(pst,mBuf));
3468 }/*cmPkLrgSchL2MeasStopCfm*/
3470 * @brief This API is used to Send a
3471 Measurement Confirm from SCH to LM.
3475 * Function: cmUnpkLrgL2SchMeasCfm
3477 * @param[in] Pst * pst
3478 * @param[in] Buffer * mBuf
3482 S16 cmUnpkLrgSchL2MeasStopCfm
3484 LrgSchL2MeasStopCfm func,
3489 LrgSchMeasCfmInfo measInfo;
3492 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3493 CMCHKUNPK(oduPackUInt16, &measInfo.measType, mBuf);
3494 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
3495 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
3498 return ((*func)(pst, &measInfo));
3499 }/*cmUnpkLrgSchL2MeasStopCfm*/
3502 * @brief This API is used to unpack LrgNumActvUeQCICfm structure
3506 * Function: cmPkNumUeQciCfm
3508 * @param[in] LrgNumActvUeQCICfm * param
3509 * @param[in] Buffer * mBuf
3513 static S16 cmPkNumUeQciCfm
3515 LrgNumActvUeQCICfm *param,
3522 for(idx = 0; idx < param->numQci; idx++)
3524 /*LRG : Review Tag*/
3525 CMCHKPK(oduUnpackUInt8, param->numActvUeQci[idx].qciValue, mBuf);
3526 CMCHKPK(oduUnpackUInt8, param->numActvUeQci[idx].numActvUeQci, mBuf);
3527 /*LRG : Review Tag*/
3529 CMCHKPK(oduUnpackUInt8, param->numQci, mBuf);
3534 * @brief This API is used to unpack LrgAvgPrbQCICfm structure
3538 * Function: cmPkAvgPrbQciCfm
3540 * @param[in] LrgAvgPrbQCICfm * param
3541 * @param[in] Buffer * mBuf
3545 static S16 cmPkAvgPrbQciCfm
3547 LrgAvgPrbQCICfm *param,
3553 for(idx = 0; idx < param->numQci; idx++)
3555 /*LRG : Review Tag*/
3556 CMCHKPK(oduUnpackUInt8, param->prbPercQci[idx].qciValue, mBuf);
3557 CMCHKPK(oduUnpackUInt8, param->prbPercQci[idx].prbPercQci, mBuf);
3558 /*LRG : Review Tag*/
3560 CMCHKPK(oduUnpackUInt8, param->numQci, mBuf);
3565 * @brief This API is used to unpack raPreamblesCfm structure
3569 * Function: cmPkRaPrmbsCfm
3571 * @param[in] LrgRaPreamblesCfm * param
3572 * @param[in] Buffer * mBuf
3576 static S16 cmPkRaPrmbsCfm
3578 LrgRaPreamblesCfm *param,
3583 CMCHKPK(oduUnpackUInt16, param->randSelPreHighRange, mBuf);
3584 CMCHKPK(oduUnpackUInt16, param->randSelPreLowRange, mBuf);
3585 CMCHKPK(oduUnpackUInt16, param->dedPreambles, mBuf);
3590 * @brief This API is used to unpack avgPrbCfm structure
3594 * Function: cmPkAvgPrbCfm
3596 * @param[in] LrgAvgPrbCfm * param
3597 * @param[in] Buffer * mBuf
3601 static S16 cmPkAvgPrbCfm
3603 LrgAvgPrbCfm *param,
3608 CMCHKPK(oduUnpackUInt8, param->prbPerc, mBuf);
3613 * @brief This API is used to send a
3614 L2 Measurement confirm from MAC to LM
3618 * Function: cmPkLrgSchL2MeasCfm
3620 * @param[in] Pst * pst
3621 * @param[in] LrgSchMeasCfmInfo * measInfo
3625 S16 cmPkLrgSchL2MeasCfm
3628 LrgSchMeasCfmInfo *measInfo
3631 Buffer *mBuf = NULLP;
3634 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
3635 #if (ERRCLASS & ERRCLS_ADD_RES)
3636 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
3637 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
3638 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
3642 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3644 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciDlCfm, mBuf);
3646 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3648 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciUlCfm, mBuf);
3650 if(measInfo->measType & LRG_L2MEAS_RA_PREAMBLE)
3652 CMCHKPK(cmPkRaPrmbsCfm, &measInfo->raPrmbsCfm, mBuf);
3654 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3656 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciDlCfm, mBuf);
3658 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3660 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciUlCfm, mBuf);
3662 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_DL)
3664 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbDl, mBuf);
3666 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_UL)
3668 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbUl, mBuf);
3670 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
3672 CMCHKPK(oduUnpackUInt32, measInfo->tbTransDlTotalCnt, mBuf);
3674 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
3676 CMCHKPK(oduUnpackUInt32, measInfo->tbTransDlFaulty, mBuf);
3678 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
3680 CMCHKPK(oduUnpackUInt32, measInfo->tbTransUlTotalCnt, mBuf);
3682 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
3684 CMCHKPK(oduUnpackUInt32, measInfo->tbTransUlFaulty, mBuf);
3686 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
3687 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
3688 CMCHKPK(oduUnpackUInt16, measInfo->measType, mBuf);
3689 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
3690 pst->event = (Event) EVTLRGSCHL2MEASCFM;
3691 return (SPstTsk(pst,mBuf));
3695 * @brief This API is used to unpack LrgNumActvUeQCICfm
3699 * Function: cmUnpkNumUeQciCfm
3701 * @param[in] LrgNumActvUeQCICfm *param
3702 * @param[in] Buffer * mBuf
3706 static S16 cmUnpkNumUeQciCfm
3708 LrgNumActvUeQCICfm *param,
3714 CMCHKUNPK(oduPackUInt8, ¶m->numQci, mBuf);
3715 for(idx = param->numQci; idx > 0; idx--)
3717 /*LRG : Review Tag*/
3718 CMCHKUNPK(oduPackUInt8, ¶m->numActvUeQci[idx - 1].numActvUeQci, mBuf);
3719 CMCHKUNPK(oduPackUInt8, ¶m->numActvUeQci[idx - 1].qciValue, mBuf);
3720 /*LRG : Review Tag*/
3726 * @brief This API is used to unpack LrgAvgPrbQCICfm
3730 * Function: cmUnpkAvgPrbQciCfm
3732 * @param[in] LrgAvgPrbQCICfm *param
3733 * @param[in] Buffer * mBuf
3737 static S16 cmUnpkAvgPrbQciCfm
3739 LrgAvgPrbQCICfm *param,
3746 CMCHKUNPK(oduPackUInt8, ¶m->numQci, mBuf);
3747 for(idx = param->numQci; idx > 0; idx--)
3749 /*LRG : Review Tag*/
3750 CMCHKUNPK(oduPackUInt8, ¶m->prbPercQci[idx - 1].prbPercQci, mBuf);
3751 CMCHKUNPK(oduPackUInt8, ¶m->prbPercQci[idx - 1].qciValue, mBuf);
3752 /*LRG : Review Tag*/
3758 * @brief This API is used to unpack LrgRaPreamblesCfm
3762 * Function: cmUnpkRaPrmbsCfm
3764 * @param[in] LrgRaPreamblesCfm *param
3765 * @param[in] Buffer * mBuf
3769 static S16 cmUnpkRaPrmbsCfm
3771 LrgRaPreamblesCfm *param,
3777 CMCHKUNPK(oduPackUInt16, ¶m->dedPreambles, mBuf);
3778 CMCHKUNPK(oduPackUInt16, ¶m->randSelPreLowRange, mBuf);
3779 CMCHKUNPK(oduPackUInt16, ¶m->randSelPreHighRange, mBuf);
3784 * @brief This API is used to unpack avgPrbCfm
3788 * Function: cmUnpkAvgPrbCfm
3790 * @param[in] LrgAvgPrbCfm *param
3791 * @param[in] Buffer * mBuf
3795 static S16 cmUnpkAvgPrbCfm
3797 LrgAvgPrbCfm *param,
3803 CMCHKUNPK(oduPackUInt8, ¶m->prbPerc, mBuf);
3808 * @brief This API is used to send a
3809 Measurement Confirm from LM to SCH.
3813 * Function: cmUnpkLrgL2SchMeasCfm
3815 * @param[in] Pst * pst
3816 * @param[in] Buffer * mBuf
3820 S16 cmUnpkLrgSchL2MeasCfm
3822 LrgSchL2MeasCfm func,
3827 LrgSchMeasCfmInfo measInfo;
3830 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
3831 CMCHKUNPK(oduPackUInt16, &measInfo.measType, mBuf);
3832 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
3833 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
3834 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
3836 CMCHKPK(oduPackUInt32, &measInfo.tbTransUlFaulty, mBuf);
3838 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
3840 CMCHKPK(oduPackUInt32, &measInfo.tbTransUlTotalCnt, mBuf);
3842 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
3844 CMCHKPK(oduPackUInt32, &measInfo.tbTransDlFaulty, mBuf);
3846 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
3848 CMCHKPK(oduPackUInt32, &measInfo.tbTransDlTotalCnt, mBuf);
3850 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_UL)
3852 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbUl, mBuf);
3854 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_DL)
3856 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbDl, mBuf);
3858 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
3860 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciUlCfm, mBuf);
3862 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
3864 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciDlCfm, mBuf);
3866 if(measInfo.measType & LRG_L2MEAS_RA_PREAMBLE)
3868 CMCHKUNPK(cmUnpkRaPrmbsCfm, &measInfo.raPrmbsCfm, mBuf);
3870 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
3872 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciUlCfm, mBuf);
3874 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
3876 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciDlCfm, mBuf);
3879 return ((*func)(pst, &measInfo));
3885 /**********************************************************************
3887 **********************************************************************/