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 Indication from MAC to LM.
549 * Function: cmPkLrgStaInd
551 * @param[in] Pst * pst
552 * @param[in] RgMngmt * usta
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)ELRG025, (ErrVal)0, "Packing failed");
572 if (pst->selector == ODU_SELECTOR_LC) {
573 if (cmPkRgMngmt(pst, usta, EVTLRGUSTAIND, mBuf) != ROK) {
574 #if (ERRCLASS & ERRCLS_ADD_RES)
575 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
576 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
577 (ErrVal)ELRG026, (ErrVal)0, "Packing failed");
584 pst->event = (Event) EVTLRGUSTAIND;
585 return (SPstTsk(pst,mBuf));
590 * @brief This API is used to send a
591 Status Indication from MAC to LM.
595 * Function: cmUnpkLrgStaInd
597 * @param[in] Pst * pst
598 * @param[in] RgMngmt * usta
612 if (cmUnpkRgMngmt(pst, &usta, EVTLRGUSTAIND, mBuf) != ROK) {
614 #if (ERRCLASS & ERRCLS_ADD_RES)
615 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
616 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
617 (ErrVal)ELRG027, (ErrVal)0, "Packing failed");
622 return ((*func)(pst, &usta));
627 * @brief This API is used to send a
628 Status Indication from SCH to LM.
632 * Function: cmPkLrgSchStaInd
634 * @param[in] Pst * pst
635 * @param[in] RgMngmt * sta
645 Buffer *mBuf = NULLP;
647 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
648 #if (ERRCLASS & ERRCLS_ADD_RES)
649 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
650 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
651 (ErrVal)ELRG028, (ErrVal)0, "Packing failed");
655 if (pst->selector == ODU_SELECTOR_LC) {
656 if (cmPkRgMngmt(pst, sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
657 #if (ERRCLASS & ERRCLS_ADD_RES)
658 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
659 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
660 (ErrVal)ELRG029, (ErrVal)0, "Packing failed");
667 pst->event = (Event) EVTLRGSCHSTAIND;
668 return (SPstTsk(pst,mBuf));
673 * @brief This API is used to send a
674 Status Indication from SCH to LM.
678 * Function: cmUnpkLrgSchStaInd
680 * @param[in] Pst * pst
681 * @param[in] RgMngmt * sta
685 S16 cmUnpkLrgSchStaInd
695 if (cmUnpkRgMngmt(pst, &sta, EVTLRGSCHSTAIND, mBuf) != ROK) {
697 #if (ERRCLASS & ERRCLS_ADD_RES)
698 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
699 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
700 (ErrVal)ELRG030, (ErrVal)0, "Packing failed");
705 return ((*func)(pst, &sta));
709 /***********************************************************
711 * Func : cmPkRgGenCfg
714 * Desc : This structure holds configuration parameters for MAC General Configuration.
723 **********************************************************/
733 CMCHKPK(oduPackUInt8, param->isSCellActDeactAlgoEnable, mBuf);
734 CMCHKPK(oduPackUInt8, param->forceCntrlSrbBoOnPCel, mBuf);
736 CMCHKPK(oduPackUInt8, param->startCellId, mBuf);
737 CMCHKPK(oduPackUInt8, param->numRguSaps, mBuf);
738 CMCHKPK(oduPackUInt8, param->tmrRes, mBuf);
739 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
740 CMCHKPK(cmPkPst, ¶m->lmPst, mBuf);
746 /***********************************************************
748 * Func : cmUnpkRgGenCfg
751 * Desc : This structure holds configuration parameters for MAC General Configuration.
760 **********************************************************/
769 CMCHKUNPK(cmUnpkPst, ¶m->lmPst, mBuf);
770 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
771 CMCHKUNPK(oduUnpackUInt8, ¶m->tmrRes, mBuf);
772 CMCHKUNPK(oduUnpackUInt8, ¶m->numRguSaps, mBuf);
773 CMCHKUNPK(oduUnpackUInt8, ¶m->startCellId, mBuf);
775 CMCHKUNPK(oduUnpackUInt8, ¶m->forceCntrlSrbBoOnPCel, mBuf);
776 CMCHKUNPK(oduUnpackUInt8, ¶m->isSCellActDeactAlgoEnable, mBuf);
783 /***********************************************************
785 * Func : cmPkRgUpSapCfg
788 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
797 **********************************************************/
806 CMCHKPK(SPkS16, param->suId, mBuf);
807 CMCHKPK(SPkS16, param->spId, mBuf);
808 CMCHKPK(oduPackUInt8, param->route, mBuf);
809 CMCHKPK(oduPackUInt8, param->inst, mBuf);
810 CMCHKPK(oduPackUInt8, param->ent, mBuf);
811 CMCHKPK(oduPackUInt16, param->procId, mBuf);
812 CMCHKPK(oduPackUInt8, param->prior, mBuf);
813 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
814 CMCHKPK(oduPackUInt8, param->selector, mBuf);
820 /***********************************************************
822 * Func : cmUnpkRgUpSapCfg
825 * Desc : This structure holds configuration parameters for MAC Upper SAP Configuration.
834 **********************************************************/
843 CMCHKUNPK(oduUnpackUInt8, ¶m->selector, mBuf);
844 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
845 CMCHKUNPK(oduUnpackUInt8, ¶m->prior, mBuf);
846 CMCHKUNPK(oduUnpackUInt16, ¶m->procId, mBuf);
847 CMCHKUNPK(oduUnpackUInt8, ¶m->ent, mBuf);
848 CMCHKUNPK(oduUnpackUInt8, ¶m->inst, mBuf);
849 CMCHKUNPK(oduUnpackUInt8, ¶m->route, mBuf);
850 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
851 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
857 /***********************************************************
859 * Func : cmPkRgLowSapCfg
862 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
871 **********************************************************/
880 CMCHKPK(cmPkTmrCfg, ¶m->bndTmr, mBuf);
881 CMCHKPK(SPkS16, param->suId, mBuf);
882 CMCHKPK(SPkS16, param->spId, mBuf);
883 CMCHKPK(oduPackUInt8, param->route, mBuf);
884 CMCHKPK(oduPackUInt8, param->inst, mBuf);
885 CMCHKPK(oduPackUInt8, param->ent, mBuf);
886 CMCHKPK(oduPackUInt16, param->procId, mBuf);
887 CMCHKPK(oduPackUInt8, param->prior, mBuf);
888 CMCHKPK(cmPkMemoryId, ¶m->mem, mBuf);
889 CMCHKPK(oduPackUInt8, param->selector, mBuf);
895 /***********************************************************
897 * Func : cmUnpkRgLowSapCfg
900 * Desc : This structure holds configuration parameters for MAC Lower SAP Configuration.
909 **********************************************************/
910 S16 cmUnpkRgLowSapCfg
918 CMCHKUNPK(oduUnpackUInt8, ¶m->selector, mBuf);
919 CMCHKUNPK(cmUnpkMemoryId, ¶m->mem, mBuf);
920 CMCHKUNPK(oduUnpackUInt8, ¶m->prior, mBuf);
921 CMCHKUNPK(oduUnpackUInt16, ¶m->procId, mBuf);
922 CMCHKUNPK(oduUnpackUInt8, ¶m->ent, mBuf);
923 CMCHKUNPK(oduUnpackUInt8, ¶m->inst, mBuf);
924 CMCHKUNPK(oduUnpackUInt8, ¶m->route, mBuf);
925 CMCHKUNPK(SUnpkS16, ¶m->spId, mBuf);
926 CMCHKUNPK(SUnpkS16, ¶m->suId, mBuf);
927 CMCHKUNPK(cmUnpkTmrCfg, ¶m->bndTmr, mBuf);
934 /***********************************************************
936 * Func : cmPkRgAckNack
939 * Desc : Ack and Nack statistics
948 **********************************************************/
957 CMCHKPK(oduPackUInt16, param->numOfAcks, mBuf);
958 CMCHKPK(oduPackUInt16, param->numOfNacks, mBuf);
959 CMCHKPK(oduPackUInt8, param->mcs, mBuf);
962 } /* cmPkRgAckNack */
965 /***********************************************************
967 * Func : cmPkRgSchNackAckStats
979 **********************************************************/
980 S16 cmPkRgSchNackAckStats
982 RgSchNackAckStats *param,
989 for (i=14; i >= 0; i--) {
990 CMCHKPK(cmPkRgAckNack, ¶m->ulCqiStat[i], mBuf);
993 for (i=14; i >= 0; i--) {
994 CMCHKPK(cmPkRgAckNack, ¶m->dlCqiStat[i], mBuf);
1001 /***********************************************************
1003 * Func : cmPkRgHqNumRetx
1006 * Desc : Harq Retransmission statistics
1015 **********************************************************/
1018 RgSchHqNumRetx *param,
1023 CMCHKPK(oduPackUInt32, param->totalTx, mBuf);
1024 CMCHKPK(oduPackUInt16, param->numOfHQ_4, mBuf);
1025 CMCHKPK(oduPackUInt16, param->numOfHQ_3, mBuf);
1026 CMCHKPK(oduPackUInt16, param->numOfHQ_2, mBuf);
1027 CMCHKPK(oduPackUInt16, param->numOfHQ_1, mBuf);
1028 CMCHKPK(oduPackUInt8, param->mcs, mBuf);
1031 } /* cmPkRgHqNumRetx */
1034 /***********************************************************
1036 * Func : cmPkRgSchHqRetxStats
1048 **********************************************************/
1049 S16 cmPkRgSchHqRetxStats
1051 RgSchHqRetxStats *param,
1058 for (i=14; i >= 0; i--) {
1059 CMCHKPK(cmPkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
1062 for (i=14; i >= 0; i--) {
1063 CMCHKPK(cmPkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
1067 } /* cmPkRgSchHqRetxStats */
1069 /* unpcaking functions */
1071 /***********************************************************
1073 * Func : cmUnpkRgAckNack
1076 * Desc : Ack and Nack statistics
1085 **********************************************************/
1094 CMCHKUNPK(oduUnpackUInt8, ¶m->mcs, mBuf);
1095 CMCHKUNPK(oduUnpackUInt16, ¶m->numOfNacks, mBuf);
1096 CMCHKUNPK(oduUnpackUInt16, ¶m->numOfAcks, mBuf);
1099 } /* cmUnkRgAckNack */
1102 /***********************************************************
1104 * Func : cmUnpkRgSchNackAckStats
1116 **********************************************************/
1117 S16 cmUnpkRgSchNackAckStats
1119 RgSchNackAckStats *param,
1125 for (i=0; i <= 14; i++) {
1126 CMCHKUNPK(cmUnpkRgAckNack, ¶m->dlCqiStat[i], mBuf);
1129 for (i=0; i <= 14; i++) {
1130 CMCHKUNPK(cmUnpkRgAckNack, ¶m->ulCqiStat[i], mBuf);
1134 } /* cmUnpkRgSchNackAckStats */
1137 /***********************************************************
1139 * Func : cmUnpkRgHqNumRetx
1142 * Desc : Harq Retransmission statistics
1151 **********************************************************/
1152 S16 cmUnpkRgHqNumRetx
1154 RgSchHqNumRetx *param,
1159 CMCHKUNPK(oduUnpackUInt8, ¶m->mcs, mBuf);
1160 CMCHKUNPK(oduUnpackUInt16, ¶m->numOfHQ_1, mBuf);
1161 CMCHKUNPK(oduUnpackUInt16, ¶m->numOfHQ_2, mBuf);
1162 CMCHKUNPK(oduUnpackUInt16, ¶m->numOfHQ_3, mBuf);
1163 CMCHKUNPK(oduUnpackUInt16, ¶m->numOfHQ_4, mBuf);
1164 CMCHKUNPK(oduUnpackUInt32, ¶m->totalTx, mBuf);
1167 } /* cmUnpkRgHqNumRetx */
1170 /***********************************************************
1172 * Func : cmUnpkRgSchHqRetxStats
1184 **********************************************************/
1185 S16 cmUnpkRgSchHqRetxStats
1187 RgSchHqRetxStats *param,
1193 for (i=0; i <= 14; i++) {
1194 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->dlCqiStat[i], mBuf);
1197 for (i=0; i <= 14; i++) {
1198 CMCHKUNPK(cmUnpkRgHqNumRetx, ¶m->ulCqiStat[i], mBuf);
1202 } /* cmUnpkRgSchHqRetxStats */
1204 #endif /* MAC_SCH_STATS */
1207 /***********************************************************
1209 * Func : cmPkRgGenSts
1212 * Desc : This structure holds General Statistical information of MAC.
1221 **********************************************************/
1229 #ifdef MAC_SCH_STATS
1230 CMCHKPK(cmPkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
1231 CMCHKPK(cmPkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
1232 #endif /* MAC_SCH_STATS */
1233 CMCHKPK(oduPackUInt16, param->numCellCfg, mBuf);
1234 CMCHKPK(oduPackUInt32, param->numUeCfg, mBuf);
1235 CMCHKPK(oduPackUInt32, param->numHarqFail, mBuf);
1241 /***********************************************************
1243 * Func : cmUnpkRgGenSts
1246 * Desc : This structure holds General Statistical information of MAC.
1255 **********************************************************/
1263 CMCHKUNPK(oduUnpackUInt32, ¶m->numHarqFail, mBuf);
1264 CMCHKUNPK(oduUnpackUInt32, ¶m->numUeCfg, mBuf);
1265 CMCHKUNPK(oduUnpackUInt16, ¶m->numCellCfg, mBuf);
1266 #ifdef MAC_SCH_STATS
1267 CMCHKUNPK(cmUnpkRgSchNackAckStats, ¶m->nackAckStats, mBuf);
1268 CMCHKUNPK(cmUnpkRgSchHqRetxStats, ¶m->hqRetxStats, mBuf);
1269 #endif /* MAC_SCH_STATS */
1275 /***********************************************************
1277 * Func : cmPkRgSapSts
1280 * Desc : This structure holds Statistical information of a SAP in MAC.
1289 **********************************************************/
1297 CMCHKPK(oduPackUInt32, param->numPduDrop, mBuf);
1298 CMCHKPK(oduPackUInt32, param->numPduTxmit, mBuf);
1299 CMCHKPK(oduPackUInt32, param->numPduRcvd, mBuf);
1305 /***********************************************************
1307 * Func : cmUnpkRgSapSts
1310 * Desc : This structure holds Statistical information of a SAP in MAC.
1319 **********************************************************/
1327 CMCHKUNPK(oduUnpackUInt32, ¶m->numPduRcvd, mBuf);
1328 CMCHKUNPK(oduUnpackUInt32, ¶m->numPduTxmit, mBuf);
1329 CMCHKUNPK(oduUnpackUInt32, ¶m->numPduDrop, mBuf);
1335 /***********************************************************
1337 * Func : cmPkRgSchInstCfg
1340 * Desc : Scheduler Configuration
1349 **********************************************************/
1350 S16 cmPkRgSchInstCfg
1352 RgSchInstCfg *param,
1359 for (i=param->numSaps-1; i >= 0; i--) {
1360 CMCHKPK(cmPkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
1362 for (i=param->numSaps-1; i >= 0; i--) {
1363 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
1365 for (i=param->numSaps-1; i >= 0; i--) {
1366 CMCHKPK(cmPkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
1368 CMCHKPK(oduPackUInt8, param->numSaps, mBuf);
1369 CMCHKPK(cmPkRgGenCfg, ¶m->genCfg, mBuf);
1370 CMCHKPK(oduPackUInt8, param->instId, mBuf);
1376 /***********************************************************
1378 * Func : cmUnpkRgSchInstCfg
1381 * Desc : Scheduler Configuration
1390 **********************************************************/
1391 S16 cmUnpkRgSchInstCfg
1393 RgSchInstCfg *param,
1400 CMCHKUNPK(oduUnpackUInt8, ¶m->instId, mBuf);
1401 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->genCfg, mBuf);
1402 CMCHKUNPK(oduUnpackUInt8, ¶m->numSaps, mBuf);
1403 for (i=0; i<param->numSaps; i++) {
1404 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgmSap[i], mBuf);
1406 for (i=0; i<param->numSaps; i++) {
1407 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->rgrSap[i], mBuf);
1409 for (i=0; i<param->numSaps; i++) {
1410 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->tfuSap[i], mBuf);
1417 /***********************************************************
1422 * Desc : This structure holds Configuration parameters for MAC.
1431 **********************************************************/
1442 CMCHKPK(cmPkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
1445 CMCHKPK(cmPkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
1448 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.crgSap, mBuf);
1451 CMCHKPK(cmPkRgUpSapCfg, ¶m->s.rguSap, mBuf);
1454 CMCHKPK(cmPkRgGenCfg, ¶m->s.genCfg, mBuf);
1464 /***********************************************************
1466 * Func : cmUnpkRgCfg
1469 * Desc : This structure holds Configuration parameters for MAC.
1478 **********************************************************/
1489 CMCHKUNPK(cmUnpkRgGenCfg, ¶m->s.genCfg, mBuf);
1492 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.rguSap, mBuf);
1495 CMCHKUNPK(cmUnpkRgUpSapCfg, ¶m->s.crgSap, mBuf);
1498 CMCHKUNPK(cmUnpkRgLowSapCfg, ¶m->s.tfuSap, mBuf);
1501 CMCHKUNPK(cmUnpkRgSchInstCfg, ¶m->s.schInstCfg, mBuf);
1511 /***********************************************************
1513 * Func : cmPkRgSapSta
1516 * Desc : This structure holds a SAP's status information.
1525 **********************************************************/
1533 CMCHKPK(oduPackUInt8, param->sapState, mBuf);
1539 /***********************************************************
1541 * Func : cmUnpkRgSapSta
1544 * Desc : This structure holds a SAP's status information.
1553 **********************************************************/
1561 CMCHKUNPK(oduUnpackUInt8, ¶m->sapState, mBuf);
1567 /***********************************************************
1572 * Desc : This structure holds MAC's Statistical information.
1581 **********************************************************/
1592 CMCHKPK(cmPkRgSapSts, ¶m->s.tfuSts, mBuf);
1595 CMCHKPK(cmPkRgSapSts, ¶m->s.rgrSts, mBuf);
1598 CMCHKPK(cmPkRgSapSts, ¶m->s.crgSts, mBuf);
1601 CMCHKPK(cmPkRgSapSts, ¶m->s.rguSts, mBuf);
1604 CMCHKPK(cmPkRgGenSts, ¶m->s.genSts, mBuf);
1609 CMCHKPK(cmPkAction, param->action, mBuf);
1610 CMCHKPK(oduPackUInt8, param->sapInst, mBuf);
1611 CMCHKPK(cmPkDateTime, ¶m->dt, mBuf);
1617 /***********************************************************
1619 * Func : cmUnpkRgSts
1622 * Desc : This structure holds MAC's Statistical information.
1631 **********************************************************/
1640 CMCHKUNPK(cmUnpkDateTime, ¶m->dt, mBuf);
1641 CMCHKUNPK(oduUnpackUInt8, ¶m->sapInst, mBuf);
1642 CMCHKUNPK(cmUnpkAction, ¶m->action, mBuf);
1645 CMCHKUNPK(cmUnpkRgGenSts, ¶m->s.genSts, mBuf);
1648 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rguSts, mBuf);
1651 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.crgSts, mBuf);
1654 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.rgrSts, mBuf);
1657 CMCHKUNPK(cmUnpkRgSapSts, ¶m->s.tfuSts, mBuf);
1666 /***********************************************************
1668 * Func : cmPkRgUstaDgn
1671 * Desc : Alarm diagnostics structure.
1680 **********************************************************/
1688 switch(param->type) {
1689 case LRG_USTA_DGNVAL_MEM:
1690 CMCHKPK(cmPkMemoryId, ¶m->u.mem, mBuf);
1695 CMCHKPK(oduPackUInt8, param->type, mBuf);
1701 /***********************************************************
1703 * Func : cmUnpkRgUstaDgn
1706 * Desc : Alarm diagnostics structure.
1715 **********************************************************/
1724 CMCHKUNPK(oduUnpackUInt8, ¶m->type, mBuf);
1727 case LRG_USTA_DGNVAL_MEM:
1728 CMCHKUNPK(cmUnpkMemoryId, ¶m->u.mem, mBuf);
1738 /***********************************************************
1743 * Desc : This structure holds MAC's Unsolicited Status information.
1752 **********************************************************/
1760 CMCHKPK(cmPkRgUstaDgn, ¶m->dgn, mBuf);
1761 CMCHKPK(cmPkCmAlarm, ¶m->cmAlarm, mBuf);
1767 /***********************************************************
1769 * Func : cmUnpkRgUsta
1772 * Desc : This structure holds MAC's Unsolicited Status information.
1781 **********************************************************/
1789 CMCHKUNPK(cmUnpkCmAlarm, ¶m->cmAlarm, mBuf);
1790 CMCHKUNPK(cmUnpkRgUstaDgn, ¶m->dgn, mBuf);
1795 /***********************************************************
1797 * Func : cmPkRgMngmt
1800 * Desc : This structure holds MAC's Configuration and Control Management Information.
1809 **********************************************************/
1822 case EVTLRGSCHSTAIND:
1823 CMCHKPK(cmPkRgUsta, ¶m->t.usta, mBuf);
1827 if(cmPkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf)!= ROK)
1832 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
1835 case EVTMACSCHGENCFGREQ:
1836 case EVTMACSCHGENCFGCFM:
1837 if(cmPkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
1843 CMCHKPK(cmPkCmStatus, ¶m->cfm, mBuf);
1844 CMCHKPK(cmPkHeader, ¶m->hdr, mBuf);
1850 /***********************************************************
1852 * Func : cmUnpkRgMngmt
1855 * Desc : This structure holds MAC's Configuration and Control Management Information.
1864 **********************************************************/
1875 CMCHKUNPK(cmUnpkHeader, ¶m->hdr, mBuf);
1876 CMCHKUNPK(cmUnpkCmStatus, ¶m->cfm, mBuf);
1880 case EVTMACSCHGENCFGREQ:
1881 case EVTMACSCHGENCFGCFM:
1882 if(cmUnpkRgCfg(¶m->t.cfg, param->hdr.elmId.elmnt, mBuf) != ROK)
1887 if(cmUnpkRgSts(¶m->t.sts, param->hdr.elmId.elmnt, mBuf) != ROK)
1891 case EVTLRGSCHSTAIND:
1892 CMCHKUNPK(cmUnpkRgUsta, ¶m->t.usta, mBuf);
1900 /* lrg_c_001.main_3 - ADD - Added the functions pertaining to LTE_L2_MEAS */
1904 * @brief This API is used to pack
1905 LrgNmbActvUeQCI elements
1909 * Function: cmPkNmbActvUeQciReq
1911 * @param[in] LrgNmbActvUeQCI
1912 * @param[in] Buffer *mBuf
1916 static S16 cmPkNmbActvUeQciReq
1918 LrgNmbActvUeQCI *nmbActvUeQci,
1925 for(idx = 0; idx < nmbActvUeQci->numQci; idx++)
1927 CMCHKPK(oduPackUInt8, nmbActvUeQci->qci[idx], mBuf);
1929 CMCHKPK(oduPackUInt8, nmbActvUeQci->numQci, mBuf);
1930 CMCHKPK(oduPackUInt8, nmbActvUeQci->sampPrd, mBuf);
1935 * @brief This API is used to pack
1936 LrgAvgPrbQci elements
1940 * Function: cmPkAvgPrbQciReq
1942 * @param[in] LrgNmbActvUeQciReq *avgPrbQciReq
1943 * @param[in] Buffer *mBuf
1947 static S16 cmPkAvgPrbQciReq
1949 LrgAvgPrbQCI *avgPrbQciReq,
1955 for(idx = 0; idx < avgPrbQciReq->numQci; idx++)
1957 CMCHKPK(oduPackUInt8, avgPrbQciReq->qci[idx], mBuf);
1959 CMCHKPK(oduPackUInt8, avgPrbQciReq->numQci, mBuf);
1965 * @brief This API is used to send a
1966 L2 Measurement Request from LM to MAC.
1970 * Function: cmPkLrgSchL2MeasReq
1972 * @param[in] Pst * pst
1973 * @param[in] LrgSchMeasReqInfo * measInfo
1977 S16 cmPkLrgSchL2MeasReq
1980 LrgSchMeasReqInfo *measInfo
1983 Buffer *mBuf = NULLP;
1985 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1986 #if (ERRCLASS & ERRCLS_ADD_RES)
1987 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1988 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1989 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
1993 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
1995 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciDl, mBuf);
1997 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
1999 CMCHKPK(cmPkNmbActvUeQciReq, &measInfo->nmbActvUeQciUl, mBuf);
2001 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
2003 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciDl, mBuf);
2005 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
2007 CMCHKPK(cmPkAvgPrbQciReq, &measInfo->avgPrbQciUl, mBuf);
2010 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
2011 CMCHKPK(oduPackUInt32, measInfo->timePrd, mBuf);
2012 CMCHKPK(oduPackUInt16, measInfo->measType, mBuf);
2013 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
2014 pst->event = (Event) EVTLRGSCHL2MEASREQ;
2015 return (SPstTsk(pst,mBuf));
2018 * @brief This API is used to stop a
2019 L2 Measurement Request from LM to MAC.
2023 * Function: cmPkLrgSchL2MeasStopReq
2025 * @param[in] Pst * pst
2026 * @param[in] LrgSchMeasReqInfo * measInfo
2030 S16 cmPkLrgSchL2MeasStopReq
2033 LrgSchMeasStopReqInfo *measInfo
2036 Buffer *mBuf = NULLP;
2038 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2039 #if (ERRCLASS & ERRCLS_ADD_RES)
2040 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2041 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2042 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
2046 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
2047 /*CMCHKPK(oduPackUInt16, measInfo->timePrd, mBuf);*/
2048 CMCHKPK(oduPackUInt16, measInfo->measType, mBuf);
2049 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
2050 pst->event = (Event) EVTLRGSCHL2MEASSTOPREQ;
2051 return (SPstTsk(pst,mBuf));
2052 }/*cmPkLrgSchL2MeasStopReq*/
2055 * @brief This API is used to send a
2056 L2 Measurement Request from LM to MAC.
2060 * Function: cmPkLrgSchL2MeasSendReq
2062 * @param[in] Pst * pst
2063 * @param[in] LrgSchMeasReqInfo * measInfo
2067 S16 cmPkLrgSchL2MeasSendReq
2070 LrgSchMeasSndReqInfo *measInfo
2073 Buffer *mBuf = NULLP;
2074 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2075 #if (ERRCLASS & ERRCLS_ADD_RES)
2076 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2077 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2078 (ErrVal)ELRG049, (ErrVal)0, "SGetMsg failed");
2082 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
2083 CMCHKPK(oduPackUInt32, measInfo->timePrd, mBuf);
2084 CMCHKPK(oduPackUInt16, measInfo->measType, mBuf);
2085 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
2086 pst->event = (Event) EVTLRGSCHL2MEASSENDREQ;
2087 return (SPstTsk(pst,mBuf));
2088 }/*cmPkLrgSchL2MeasSendReq*/
2091 * @brief This API is used to unpack AvgPrbQciReq
2095 * Function: cmUnpkNmbActvUeQciReq
2097 * @param[in] LrgNmbActvUeQCI *param
2098 * @param[in] Buffer * mBuf
2102 static S16 cmUnpkNmbActvUeQciReq
2104 LrgNmbActvUeQCI *param,
2110 CMCHKUNPK(oduUnpackUInt8, ¶m->sampPrd, mBuf);
2111 CMCHKUNPK(oduUnpackUInt8, ¶m->numQci, mBuf);
2112 for(idx = param->numQci; idx > 0; idx--)
2114 CMCHKUNPK(oduUnpackUInt8, ¶m->qci[idx - 1], mBuf);
2121 * @brief This API is used to unpack AvgPrbQciReq
2125 * Function: cmUnpkAvgPrbQciReq
2127 * @param[in] LrgAvgPrbQCI *param
2128 * @param[in] Buffer * mBuf
2132 static S16 cmUnpkAvgPrbQciReq
2134 LrgAvgPrbQCI *param,
2141 CMCHKUNPK(oduUnpackUInt8, ¶m->numQci, mBuf);
2142 for(idx = param->numQci; idx > 0; idx--)
2144 CMCHKUNPK(oduUnpackUInt8, ¶m->qci[idx - 1], mBuf);
2151 * @brief This API is used to send a
2152 Measurement Request from LM to SCH.
2156 * Function: cmUnpkLrgSchL2MeasReq
2158 * @param[in] LrgSchMeasReq func
2159 * @param[in] Pst * pst
2160 * @param[in] Buffer * mBuf
2164 S16 cmUnpkLrgSchL2MeasReq
2166 LrgSchL2MeasReq func,
2171 LrgSchMeasReqInfo measInfo;
2174 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
2175 CMCHKUNPK(oduUnpackUInt16, &measInfo.measType, mBuf);
2176 CMCHKUNPK(oduUnpackUInt32, &measInfo.timePrd, mBuf);
2177 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
2178 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
2180 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciUl, mBuf);
2182 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
2184 CMCHKUNPK(cmUnpkAvgPrbQciReq, &measInfo.avgPrbQciDl, mBuf);
2186 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
2188 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciUl, mBuf);
2190 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
2192 CMCHKUNPK(cmUnpkNmbActvUeQciReq, &measInfo.nmbActvUeQciDl, mBuf);
2195 return ((*func)(pst, &measInfo));
2199 * @brief This API is used to stop a
2200 Measurement Request from LM to SCH.
2204 * Function: cmUnpkLrgSchL2MeasStopReq
2206 * @param[in] LrgSchMeasStopReq func
2207 * @param[in] Pst * pst
2208 * @param[in] Buffer * mBuf
2212 S16 cmUnpkLrgSchL2MeasStopReq
2214 LrgSchL2MeasStopReq func,
2219 LrgSchMeasStopReqInfo measInfo;
2221 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
2222 CMCHKUNPK(oduUnpackUInt16, &measInfo.measType, mBuf);
2223 /*CMCHKUNPK(oduUnpackUInt16, &measInfo.timePrd, mBuf);*/
2224 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
2226 return ((*func)(pst, &measInfo));
2227 }/*cmUnpkLrgSchL2MeasStopReq*/
2230 * @brief This API is used to send a
2231 Measurement Request from LM to SCH.
2235 * Function: cmUnpkLrgSchL2MeasSendReq
2237 * @param[in] LrgSchMeasSendReq func
2238 * @param[in] Pst * pst
2239 * @param[in] Buffer * mBuf
2243 S16 cmUnpkLrgSchL2MeasSendReq
2245 LrgSchL2MeasSendReq func,
2250 LrgSchMeasSndReqInfo measInfo;
2251 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
2252 CMCHKUNPK(oduUnpackUInt16, &measInfo.measType, mBuf);
2253 CMCHKUNPK(oduUnpackUInt32, &measInfo.timePrd, mBuf);
2254 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
2256 return ((*func)(pst, &measInfo));
2257 }/*cmUnpkLrgSchL2MeasSendReq*/
2260 * @brief This API is used to stop a
2261 L2 Measurement confirm from MAC to LM
2265 * Function: cmPkLrgSchL2MeasStopCfm
2267 * @param[in] Pst * pst
2268 * @param[in] LrgSchMeasCfmInfo * measInfo
2272 S16 cmPkLrgSchL2MeasStopCfm
2275 LrgSchMeasCfmInfo *measInfo
2278 Buffer *mBuf = NULLP;
2280 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2281 #if (ERRCLASS & ERRCLS_ADD_RES)
2282 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2283 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2284 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
2288 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
2289 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
2290 CMCHKPK(oduPackUInt16, measInfo->measType, mBuf);
2291 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
2292 pst->event = (Event) EVTLRGSCHL2MEASSTOPCFM;
2293 return (SPstTsk(pst,mBuf));
2294 }/*cmPkLrgSchL2MeasStopCfm*/
2296 * @brief This API is used to Send a
2297 Measurement Confirm from SCH to LM.
2301 * Function: cmUnpkLrgL2SchMeasCfm
2303 * @param[in] Pst * pst
2304 * @param[in] Buffer * mBuf
2308 S16 cmUnpkLrgSchL2MeasStopCfm
2310 LrgSchL2MeasStopCfm func,
2315 LrgSchMeasCfmInfo measInfo;
2318 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
2319 CMCHKUNPK(oduUnpackUInt16, &measInfo.measType, mBuf);
2320 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
2321 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
2324 return ((*func)(pst, &measInfo));
2325 }/*cmUnpkLrgSchL2MeasStopCfm*/
2328 * @brief This API is used to unpack LrgNumActvUeQCICfm structure
2332 * Function: cmPkNumUeQciCfm
2334 * @param[in] LrgNumActvUeQCICfm * param
2335 * @param[in] Buffer * mBuf
2339 static S16 cmPkNumUeQciCfm
2341 LrgNumActvUeQCICfm *param,
2348 for(idx = 0; idx < param->numQci; idx++)
2350 /*LRG : Review Tag*/
2351 CMCHKPK(oduPackUInt8, param->numActvUeQci[idx].qciValue, mBuf);
2352 CMCHKPK(oduPackUInt8, param->numActvUeQci[idx].numActvUeQci, mBuf);
2353 /*LRG : Review Tag*/
2355 CMCHKPK(oduPackUInt8, param->numQci, mBuf);
2360 * @brief This API is used to unpack LrgAvgPrbQCICfm structure
2364 * Function: cmPkAvgPrbQciCfm
2366 * @param[in] LrgAvgPrbQCICfm * param
2367 * @param[in] Buffer * mBuf
2371 static S16 cmPkAvgPrbQciCfm
2373 LrgAvgPrbQCICfm *param,
2379 for(idx = 0; idx < param->numQci; idx++)
2381 /*LRG : Review Tag*/
2382 CMCHKPK(oduPackUInt8, param->prbPercQci[idx].qciValue, mBuf);
2383 CMCHKPK(oduPackUInt8, param->prbPercQci[idx].prbPercQci, mBuf);
2384 /*LRG : Review Tag*/
2386 CMCHKPK(oduPackUInt8, param->numQci, mBuf);
2391 * @brief This API is used to unpack raPreamblesCfm structure
2395 * Function: cmPkRaPrmbsCfm
2397 * @param[in] LrgRaPreamblesCfm * param
2398 * @param[in] Buffer * mBuf
2402 static S16 cmPkRaPrmbsCfm
2404 LrgRaPreamblesCfm *param,
2409 CMCHKPK(oduPackUInt16, param->randSelPreHighRange, mBuf);
2410 CMCHKPK(oduPackUInt16, param->randSelPreLowRange, mBuf);
2411 CMCHKPK(oduPackUInt16, param->dedPreambles, mBuf);
2416 * @brief This API is used to unpack avgPrbCfm structure
2420 * Function: cmPkAvgPrbCfm
2422 * @param[in] LrgAvgPrbCfm * param
2423 * @param[in] Buffer * mBuf
2427 static S16 cmPkAvgPrbCfm
2429 LrgAvgPrbCfm *param,
2434 CMCHKPK(oduPackUInt8, param->prbPerc, mBuf);
2439 * @brief This API is used to send a
2440 L2 Measurement confirm from MAC to LM
2444 * Function: cmPkLrgSchL2MeasCfm
2446 * @param[in] Pst * pst
2447 * @param[in] LrgSchMeasCfmInfo * measInfo
2451 S16 cmPkLrgSchL2MeasCfm
2454 LrgSchMeasCfmInfo *measInfo
2457 Buffer *mBuf = NULLP;
2460 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
2461 #if (ERRCLASS & ERRCLS_ADD_RES)
2462 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
2463 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
2464 (ErrVal)ELRG050, (ErrVal)0, "SGetMsg failed");
2468 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
2470 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciDlCfm, mBuf);
2472 if(measInfo->measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
2474 CMCHKPK(cmPkNumUeQciCfm, &measInfo->numUeQciUlCfm, mBuf);
2476 if(measInfo->measType & LRG_L2MEAS_RA_PREAMBLE)
2478 CMCHKPK(cmPkRaPrmbsCfm, &measInfo->raPrmbsCfm, mBuf);
2480 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
2482 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciDlCfm, mBuf);
2484 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
2486 CMCHKPK(cmPkAvgPrbQciCfm, &measInfo->avgPrbQciUlCfm, mBuf);
2488 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_DL)
2490 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbDl, mBuf);
2492 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_UL)
2494 CMCHKPK(cmPkAvgPrbCfm, &measInfo->avgPrbUl, mBuf);
2496 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
2498 CMCHKPK(oduPackUInt32, measInfo->tbTransDlTotalCnt, mBuf);
2500 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
2502 CMCHKPK(oduPackUInt32, measInfo->tbTransDlFaulty, mBuf);
2504 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
2506 CMCHKPK(oduPackUInt32, measInfo->tbTransUlTotalCnt, mBuf);
2508 if(measInfo->measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
2510 CMCHKPK(oduPackUInt32, measInfo->tbTransUlFaulty, mBuf);
2512 CMCHKPK(cmPkLteCellId, measInfo->cellId, mBuf);
2513 CMCHKPK(cmPkCmStatus, &measInfo->cfm, mBuf);
2514 CMCHKPK(oduPackUInt16, measInfo->measType, mBuf);
2515 CMCHKPK(cmPkHeader, &measInfo->hdr, mBuf);
2516 pst->event = (Event) EVTLRGSCHL2MEASCFM;
2517 return (SPstTsk(pst,mBuf));
2521 * @brief This API is used to unpack LrgNumActvUeQCICfm
2525 * Function: cmUnpkNumUeQciCfm
2527 * @param[in] LrgNumActvUeQCICfm *param
2528 * @param[in] Buffer * mBuf
2532 static S16 cmUnpkNumUeQciCfm
2534 LrgNumActvUeQCICfm *param,
2540 CMCHKUNPK(oduUnpackUInt8, ¶m->numQci, mBuf);
2541 for(idx = param->numQci; idx > 0; idx--)
2543 /*LRG : Review Tag*/
2544 CMCHKUNPK(oduUnpackUInt8, ¶m->numActvUeQci[idx - 1].numActvUeQci, mBuf);
2545 CMCHKUNPK(oduUnpackUInt8, ¶m->numActvUeQci[idx - 1].qciValue, mBuf);
2546 /*LRG : Review Tag*/
2552 * @brief This API is used to unpack LrgAvgPrbQCICfm
2556 * Function: cmUnpkAvgPrbQciCfm
2558 * @param[in] LrgAvgPrbQCICfm *param
2559 * @param[in] Buffer * mBuf
2563 static S16 cmUnpkAvgPrbQciCfm
2565 LrgAvgPrbQCICfm *param,
2572 CMCHKUNPK(oduUnpackUInt8, ¶m->numQci, mBuf);
2573 for(idx = param->numQci; idx > 0; idx--)
2575 /*LRG : Review Tag*/
2576 CMCHKUNPK(oduUnpackUInt8, ¶m->prbPercQci[idx - 1].prbPercQci, mBuf);
2577 CMCHKUNPK(oduUnpackUInt8, ¶m->prbPercQci[idx - 1].qciValue, mBuf);
2578 /*LRG : Review Tag*/
2584 * @brief This API is used to unpack LrgRaPreamblesCfm
2588 * Function: cmUnpkRaPrmbsCfm
2590 * @param[in] LrgRaPreamblesCfm *param
2591 * @param[in] Buffer * mBuf
2595 static S16 cmUnpkRaPrmbsCfm
2597 LrgRaPreamblesCfm *param,
2603 CMCHKUNPK(oduUnpackUInt16, ¶m->dedPreambles, mBuf);
2604 CMCHKUNPK(oduUnpackUInt16, ¶m->randSelPreLowRange, mBuf);
2605 CMCHKUNPK(oduUnpackUInt16, ¶m->randSelPreHighRange, mBuf);
2610 * @brief This API is used to unpack avgPrbCfm
2614 * Function: cmUnpkAvgPrbCfm
2616 * @param[in] LrgAvgPrbCfm *param
2617 * @param[in] Buffer * mBuf
2621 static S16 cmUnpkAvgPrbCfm
2623 LrgAvgPrbCfm *param,
2629 CMCHKUNPK(oduUnpackUInt8, ¶m->prbPerc, mBuf);
2634 * @brief This API is used to send a
2635 Measurement Confirm from LM to SCH.
2639 * Function: cmUnpkLrgL2SchMeasCfm
2641 * @param[in] Pst * pst
2642 * @param[in] Buffer * mBuf
2646 S16 cmUnpkLrgSchL2MeasCfm
2648 LrgSchL2MeasCfm func,
2653 LrgSchMeasCfmInfo measInfo;
2656 CMCHKUNPK(cmUnpkHeader, &measInfo.hdr, mBuf);
2657 CMCHKUNPK(oduUnpackUInt16, &measInfo.measType, mBuf);
2658 CMCHKUNPK(cmUnpkCmStatus, &measInfo.cfm, mBuf);
2659 CMCHKUNPK(cmUnpkLteCellId, &measInfo.cellId, mBuf);
2660 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_FAULTY_COUNT)
2662 CMCHKPK(oduUnpackUInt32, &measInfo.tbTransUlFaulty, mBuf);
2664 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_UL_COUNT)
2666 CMCHKPK(oduUnpackUInt32, &measInfo.tbTransUlTotalCnt, mBuf);
2668 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_FAULTY_COUNT)
2670 CMCHKPK(oduUnpackUInt32, &measInfo.tbTransDlFaulty, mBuf);
2672 if(measInfo.measType & LRG_L2MEAS_TB_TRANS_DL_COUNT)
2674 CMCHKPK(oduUnpackUInt32, &measInfo.tbTransDlTotalCnt, mBuf);
2676 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_UL)
2678 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbUl, mBuf);
2680 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_DL)
2682 CMCHKUNPK(cmUnpkAvgPrbCfm, &measInfo.avgPrbDl, mBuf);
2684 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
2686 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciUlCfm, mBuf);
2688 if(measInfo.measType & LRG_L2MEAS_AVG_PRB_PER_QCI_DL)
2690 CMCHKUNPK(cmUnpkAvgPrbQciCfm, &measInfo.avgPrbQciDlCfm, mBuf);
2692 if(measInfo.measType & LRG_L2MEAS_RA_PREAMBLE)
2694 CMCHKUNPK(cmUnpkRaPrmbsCfm, &measInfo.raPrmbsCfm, mBuf);
2696 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_UL)
2698 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciUlCfm, mBuf);
2700 if(measInfo.measType & LRG_L2MEAS_NMB_ACTV_UE_PER_QCI_DL)
2702 CMCHKUNPK(cmUnpkNumUeQciCfm, &measInfo.numUeQciDlCfm, mBuf);
2705 return ((*func)(pst, &measInfo));
2711 /**********************************************************************
2713 **********************************************************************/