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 packing/unpacking of RGM interface
31 **********************************************************************/
34 @brief This file contains the packing/unpacking code for the RGM interface
38 /* header include files (.h) */
39 #include "envopt.h" /* environment options */
40 #include "envdep.h" /* environment dependent */
41 #include "envind.h" /* environment independent */
42 #include "gen.h" /* general */
43 #include "ssi.h" /* system services */
44 #include "cm_tkns.h" /* Common Token Defines */
45 #include "cm_llist.h" /* Common Link List Defines */
46 #include "cm_hash.h" /* Common Hash List Defines */
47 #include "cm_lte.h" /* Common LTE Defines */
48 #include "rgm.h" /* RGM Interface defines */
50 /* header/extern include files (.x) */
51 #include "gen.x" /* general */
52 #include "ssi.x" /* system services */
53 #include "cm_tkns.x" /* Common Token Definitions */
54 #include "cm_llist.x" /* Common Link List Definitions */
55 #include "cm_lib.x" /* Common Library Definitions */
56 #include "cm_hash.x" /* Common Hash List Definitions */
57 #include "cm_lte.x" /* Common LTE Defines */
58 #include "rgm.x" /* RGM Interface includes */
64 * @brief Request from RRM to MAC to bind the interface saps
68 * Function : cmPkLwLcRgmBndReq
71 * @param[in] SuId suId
72 * @param[in] SpId spId
77 PUBLIC S16 cmPkLwLcRgmBndReq
84 PUBLIC S16 cmPkLwLcRgmBndReq(pst, suId, spId)
91 TRC3(cmPkLwLcRgmBndReq)
93 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
98 if (SPkS16(spId, mBuf) != ROK)
104 if (SPkS16(suId, mBuf) != ROK)
110 pst->event = (Event) EVTRGMBNDREQ;
111 RETVALUE(SPstTsk(pst,mBuf));
116 * @brief Request from RRM to MAC to bind the interface saps
120 * Function : cmUnpkLwLcRgmBndReq
122 * @param[in] Pst* pst
123 * @param[in] SuId suId
124 * @param[in] SpId spId
129 PUBLIC S16 cmUnpkLwLcRgmBndReq
136 PUBLIC S16 cmUnpkLwLcRgmBndReq(func, pst, mBuf)
146 TRC3(cmUnpkLwLcRgmBndReq)
148 if (SUnpkS16(&suId, mBuf) != ROK)
154 if (SUnpkS16(&spId, mBuf) != ROK)
160 ret = ((*func)(pst, suId, spId));
168 * @brief Request from RRM to MAC to Unbind the interface saps
172 * Function : cmPkLwLcRgmUbndReq
174 * @param[in] Pst* pst
175 * @param[in] SpId spId
176 * @param[in] Reason reason
181 PUBLIC S16 cmPkLwLcRgmUbndReq
188 PUBLIC S16 cmPkLwLcRgmUbndReq(pst, spId, reason)
194 Buffer *mBuf = NULLP;
195 TRC3(cmPkLwLcRgmUbndReq)
197 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
201 if (SPkS16(reason, mBuf) != ROK)
206 if (SPkS16(spId, mBuf) != ROK)
212 pst->event = (Event) EVTRGMUBNDREQ;
213 RETVALUE(SPstTsk(pst,mBuf));
217 * @brief Confirmation from MAC to RRM for the bind/Unbind
218 * request for the interface saps
222 * Function : cmPkLwLcRgmBndCfm
224 * @param[in] Pst* pst
225 * @param[in] SuId suId
226 * @param[in] U8 status
231 PUBLIC S16 cmPkLwLcRgmBndCfm
238 PUBLIC S16 cmPkLwLcRgmBndCfm(pst, suId, status)
244 Buffer *mBuf = NULLP;
245 TRC3(cmPkLwLcRgmBndCfm)
247 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
252 if (SPkS16(suId, mBuf) != ROK)
258 if (SPkU8(status, mBuf) != ROK)
264 pst->event = (Event) EVTRGMBNDCFM;
265 RETVALUE(SPstTsk(pst,mBuf));
270 * @brief Confirmation from MAC to RRM for the bind/Unbind
271 * request for the interface saps
275 * Function : cmUnpkLwLcRgmBndCfm
277 * @param[in] Pst* pst
278 * @param[in] SuId suId
279 * @param[in] U8 status
284 PUBLIC S16 cmUnpkLwLcRgmBndCfm
291 PUBLIC S16 cmUnpkLwLcRgmBndCfm(func, pst, mBuf)
300 TRC3(cmUnpkLwLcRgmBndCfm)
302 if (SUnpkU8(&status, mBuf) != ROK)
308 if (SUnpkS16(&suId, mBuf) != ROK)
314 RETVALUE((*func)(pst, suId, status));
319 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
323 * Function : cmPkLwLcRgmCfgPrbRprt
325 * @param[in] Pst* pst
326 * @param[in] SpId spId
327 * @param[in] RgmPrbRprtCfg * prbRprtCfg
332 PUBLIC S16 cmPkLwLcRgmCfgPrbRprt
336 RgmPrbRprtCfg * prbRprtCfg
339 PUBLIC S16 cmPkLwLcRgmCfgPrbRprt(pst, spId, prbRprtCfg)
342 RgmPrbRprtCfg * prbRprtCfg;
345 Buffer *mBuf = NULLP;
346 U32 len = sizeof(RgmPrbRprtCfg);
347 TRC3(cmPkLwLcRgmCfgPrbRprt)
349 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
351 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
355 if(cmPkPtr((PTR)prbRprtCfg, mBuf) != ROK)
358 SPutSBuf(pst->region, pst->pool, (Data*)prbRprtCfg, len);
362 if (SPkS16(spId, mBuf) != ROK)
364 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
369 pst->event = (Event) EVTRGMCFGPRBRPRT;
370 RETVALUE(SPstTsk(pst,mBuf));
375 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
379 * Function : cmUnpkLwLcRgmCfgPrbRprt
381 * @param[in] Pst* pst
382 * @param[in] SpId spId
383 * @param[in] RgmPrbRprtCfg * prbRprtCfg
388 PUBLIC S16 cmUnpkLwLcRgmCfgPrbRprt
390 RgmCfgPrbRprtFptr func,
395 PUBLIC S16 cmUnpkLwLcRgmCfgPrbRprt(func, pst, mBuf)
396 RgmCfgPrbRprtFptr func;
403 RgmPrbRprtCfg *prbRprtCfg;
405 TRC3(cmUnpkLwLcRgmCfgPrbRprt)
407 if (SUnpkS16(&spId, mBuf) != ROK)
413 if (cmUnpkPtr((PTR *)&prbRprtCfg, mBuf) != ROK)
416 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
420 ret = ((*func)(pst, spId, prbRprtCfg));
428 * @brief PRB Usage Report Indication from MAC to RRM
432 * Function : cmPkLwLcRgmPrbRprtInd
434 * @param[in] Pst* pst
435 * @param[in] SuId suId
436 * @param[in] RgmPrbRprtInd * prbRprtInd
441 PUBLIC S16 cmPkLwLcRgmPrbRprtInd
445 RgmPrbRprtInd * prbRprtInd
448 PUBLIC S16 cmPkLwLcRgmPrbRprtInd(pst, suId, prbRprtInd)
451 RgmPrbRprtInd * prbRprtInd;
454 Buffer *mBuf = NULLP;
456 TRC3(cmPkLwLcRgmPrbRprtInd)
458 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
459 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
463 if(cmPkPtr((PTR)prbRprtInd, mBuf) != ROK)
465 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
470 if (SPkS16(suId, mBuf) != ROK)
472 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
477 pst->event = (Event) EVTRGMCFGPRBRPRT;
478 RETVALUE(SPstTsk(pst,mBuf));
483 * @brief PRB Usage Report Indication from MAC to RRM
487 * Function : cmUnpkLwLcRgmPrbRprtInd
489 * @param[in] Pst* pst
490 * @param[in] SuId suId
491 * @param[in] RgmPrbRprtInd * prbRprtInd
496 PUBLIC S16 cmUnpkLwLcRgmPrbRprtInd
498 RgmPrbRprtIndFptr func,
503 PUBLIC S16 cmUnpkLwLcRgmPrbRprtInd(func, pst, mBuf)
504 RgmPrbRprtIndFptr func;
510 RgmPrbRprtInd *prbRprtInd;
513 TRC3(cmUnpkLwLcRgmPrbRprtInd)
515 if (SUnpkS16(&suId, mBuf) != ROK)
521 if (cmUnpkPtr((PTR *)&prbRprtInd, mBuf) != ROK)
524 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
529 ret = ((*func)(pst, suId, prbRprtInd));
539 * @brief Request from RRM to MAC to bind the interface saps
543 * Function : cmPkRgmBndReq
545 * @param[in] Pst* pst
546 * @param[in] SuId suId
547 * @param[in] SpId spId
552 PUBLIC S16 cmPkRgmBndReq
559 PUBLIC S16 cmPkRgmBndReq(pst, suId, spId)
565 Buffer *mBuf = NULLP;
568 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
573 if (SPkS16(spId, mBuf) != ROK)
579 if (SPkS16(suId, mBuf) != ROK)
585 pst->event = (Event) EVTRGMBNDREQ;
586 RETVALUE(SPstTsk(pst,mBuf));
591 * @brief Request from RRM to MAC to bind the interface saps
595 * Function : cmUnpkRgmBndReq
597 * @param[in] Pst* pst
598 * @param[in] SuId suId
599 * @param[in] SpId spId
604 PUBLIC S16 cmUnpkRgmBndReq
611 PUBLIC S16 cmUnpkRgmBndReq(func, pst, mBuf)
621 TRC3(cmUnpkRgmBndReq)
623 if (SUnpkS16(&suId, mBuf) != ROK)
629 if (SUnpkS16(&spId, mBuf) != ROK)
635 ret = ((*func)(pst, suId, spId));
643 * @brief Request from RRM to MAC to Unbind the interface saps
647 * Function : cmPkRgmUbndReq
649 * @param[in] Pst* pst
650 * @param[in] SpId spId
651 * @param[in] Reason reason
656 PUBLIC S16 cmPkRgmUbndReq
663 PUBLIC S16 cmPkRgmUbndReq(pst, spId, reason)
669 Buffer *mBuf = NULLP;
672 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
676 if (SPkS16(reason, mBuf) != ROK)
681 if (SPkS16(spId, mBuf) != ROK)
687 pst->event = (Event) EVTRGMUBNDREQ;
688 RETVALUE(SPstTsk(pst,mBuf));
694 * @brief Request from RRM to MAC to Unbind the interface saps
698 * Function : cmUnpkRgmUbndReq
700 * @param[in] Pst* pst
701 * @param[in] SpId spId
702 * @param[in] Reason reason
707 PUBLIC S16 cmUnpkRgmUbndReq
714 PUBLIC S16 cmUnpkRgmUbndReq(func, pst, mBuf)
723 TRC3(cmUnpkRgmUbndReq)
725 if (SUnpkS16(&spId, mBuf) != ROK)
730 if (SUnpkS16(&reason, mBuf) != ROK)
736 RETVALUE((*func)(pst, spId, reason));
741 * @brief Confirmation from MAC to RRM for the bind/Unbind
742 * request for the interface saps
746 * Function : cmPkRgmBndCfm
748 * @param[in] Pst* pst
749 * @param[in] SuId suId
750 * @param[in] U8 status
755 PUBLIC S16 cmPkRgmBndCfm
762 PUBLIC S16 cmPkRgmBndCfm(pst, suId, status)
768 Buffer *mBuf = NULLP;
771 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
776 if (SPkS16(suId, mBuf) != ROK)
782 if (SPkU8(status, mBuf) != ROK)
788 pst->event = (Event) EVTRGMBNDCFM;
789 RETVALUE(SPstTsk(pst,mBuf));
794 * @brief Confirmation from MAC to RRM for the bind/Unbind
795 * request for the interface saps
799 * Function : cmUnpkRgmBndCfm
801 * @param[in] Pst* pst
802 * @param[in] SuId suId
803 * @param[in] U8 status
808 PUBLIC S16 cmUnpkRgmBndCfm
815 PUBLIC S16 cmUnpkRgmBndCfm(func, pst, mBuf)
824 TRC3(cmUnpkRgmBndCfm)
826 if (SUnpkU8(&status, mBuf) != ROK)
832 if (SUnpkS16(&suId, mBuf) != ROK)
838 RETVALUE((*func)(pst, suId, status));
845 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
849 * Function : cmPkCfgPrbRprt
851 * @param[in] RgmPrbRprtCfg *prbRprtCfg
852 * @param[in] Buffer *mBuf
857 PUBLIC S16 cmPkCfgPrbRprt
859 RgmPrbRprtCfg * prbRprtCfg,
863 PUBLIC S16 cmPkCfgPrbRprt(prbRprtCfg, mBuf)
864 RgmPrbRprtCfg * prbRprtCfg;
868 TRC3(cmPkCfgPrbRprt);
869 CMCHKPK(SPkU16, prbRprtCfg->usPrbAvgPeriodicty, mBuf);
870 CMCHKPK(SPkU8, prbRprtCfg->bConfigType, mBuf);
871 CMCHKPK(SPkU8, prbRprtCfg->bCellId, mBuf);
875 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
879 * Function : cmUnPkCfgPrbRprt
881 * @param[in] RgmPrbRprtCfg *prbRprtCfg
882 * @param[in] Buffer *mBuf
887 PUBLIC S16 cmUnPkCfgPrbRprt
889 RgmPrbRprtCfg * prbRprtCfg,
893 PUBLIC S16 cmUnPkCfgPrbRprt(prbRprtCfg, mBuf)
894 RgmPrbRprtCfg * prbRprtCfg;
898 TRC3(cmUnPkCfgPrbRprt);
899 CMCHKUNPK(SUnpkU8, &prbRprtCfg->bCellId, mBuf);
900 CMCHKUNPK(SUnpkU8, &prbRprtCfg->bConfigType, mBuf);
901 CMCHKUNPK(SUnpkU16, &prbRprtCfg->usPrbAvgPeriodicty, mBuf);
909 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
913 * Function : cmPkRgmCfgPrbRprt
915 * @param[in] Pst* pst
916 * @param[in] SpId spId
917 * @param[in] RgmPrbRprtCfg *prbRprtCfg
922 PUBLIC S16 cmPkRgmCfgPrbRprt
926 RgmPrbRprtCfg * prbRprtCfg
929 PUBLIC S16 cmPkRgmCfgPrbRprt(pst, spId, prbRprtCfg)
932 RgmPrbRprtCfg * prbRprtCfg;
935 Buffer *mBuf = NULLP;
936 U32 len = sizeof(RgmPrbRprtCfg);
937 TRC3(cmPkRgmCfgPrbRprt)
939 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
941 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
945 if(cmPkCfgPrbRprt(prbRprtCfg, mBuf) != ROK)
948 SPutSBuf(pst->region, pst->pool, (Data*)prbRprtCfg, len);
952 if (SPkS16(spId, mBuf) != ROK)
954 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
959 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
961 pst->event = (Event) EVTRGMCFGPRBRPRT;
962 RETVALUE(SPstTsk(pst,mBuf));
968 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
972 * Function : cmUnpkRgmCfgPrbRprt
974 * @param[in] Pst* pst
975 * @param[in] SpId spId
976 * @param[in] RgmPrbRprtCfg * prbRprtCfg
981 PUBLIC S16 cmUnpkRgmCfgPrbRprt
983 RgmCfgPrbRprtFptr func,
988 PUBLIC S16 cmUnpkRgmCfgPrbRprt(func, pst, mBuf)
989 RgmCfgPrbRprtFptr func;
995 RgmPrbRprtCfg *prbRprtCfg;
997 TRC3(cmUnpkRgmCfgPrbRprt)
998 if ((SGetSBuf(pst->region, pst->pool, (Data **)&prbRprtCfg, sizeof(RgmPrbRprtCfg))) != ROK)
1004 if (SUnpkS16(&spId, mBuf) != ROK)
1010 if (cmUnPkCfgPrbRprt(prbRprtCfg, mBuf) != ROK)
1017 RETVALUE((*func)(pst, spId, prbRprtCfg));
1022 * @brief Packing of PRB Usage Report for qci for sending
1027 * Function : cmPkRgmPrbQciRpt
1029 * @param[in] RgmPrbRptPerQci * qciPrbRprt
1030 * @param[out] Buffer *mBuf
1035 PUBLIC S16 cmPkRgmPrbQciRpt
1037 RgmPrbRptPerQci *qciPrbRprt,
1041 PUBLIC S16 cmPkRgmPrbQciRpt(qciPrbRprt, mBuf)
1042 RgmPrbRptPerQci *qciPrbRprt;
1043 Buffer *mBuf = NULLP;
1046 CMCHKPK(SPkU8, qciPrbRprt->bQci, mBuf);
1047 CMCHKPK(SPkU8, qciPrbRprt->bAvgPrbUlUsage, mBuf);
1048 CMCHKPK(SPkU8, qciPrbRprt->bAvgPrbDlUsage, mBuf);
1054 * @brief Unpacking of PRB Usage Report for qci received from MAC
1058 * Function : cmUnpkRgmPrbQciRpt
1060 * @param[out] RgmPrbRptPerQci * qciPrbRprt
1061 * @param[in] Buffer *mBuf
1066 PUBLIC S16 cmUnpkRgmPrbQciRpt
1068 RgmPrbRptPerQci *qciPrbRprt,
1072 PUBLIC S16 cmUnpkRgmPrbQciRpt(qciPrbRprt, mBuf)
1073 RgmPrbRptPerQci *qciPrbRprt;
1074 Buffer *mBuf = NULLP;
1077 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bAvgPrbDlUsage, mBuf);
1078 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bAvgPrbUlUsage, mBuf);
1079 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bQci, mBuf);
1086 * @brief PRB Usage Report Indication from MAC to RRM
1090 * Function : cmPkPrbRprtInd
1092 * @param[in] RgmPrbRprtInd * prbRprtInd
1093 * @param[in] Buffer *mBuf
1098 PUBLIC S16 cmPkPrbRprtInd
1100 RgmPrbRprtInd * prbRprtInd,
1104 PUBLIC S16 cmPkPrbRprtInd(prbRprtInd, mBuf)
1105 RgmPrbRprtInd * prbRprtInd;
1106 Buffer *mBuf = NULLP;
1111 TRC3(cmPkPrbRprtInd);
1114 for(idx = RGM_MAX_QCI_REPORTS-1; idx >= 0; idx--)
1116 CMCHKPK(cmPkRgmPrbQciRpt, &prbRprtInd->stQciPrbRpts[idx], mBuf);
1118 CMCHKPK(SPkU8, prbRprtInd->bPrbUsageMask, mBuf);
1119 CMCHKPK(SPkU8, prbRprtInd->bCellId, mBuf);
1125 * @brief PRB Usage Report Indication from MAC to RRM
1129 * Function : cmUnpkPrbRprtInd
1131 * @param[in] RgmPrbRprtInd * prbRprtInd
1132 * @param[in] Buffer *mBuf
1137 PUBLIC S16 cmUnpkPrbRprtInd
1139 RgmPrbRprtInd * prbRprtInd,
1143 PUBLIC S16 cmUnpkPrbRprtInd(prbRprtInd, mBuf)
1144 RgmPrbRprtInd * prbRprtInd;
1150 TRC3(cmUnpkPrbRprtInd);
1153 CMCHKUNPK(SUnpkU8, &prbRprtInd->bCellId, mBuf);
1154 CMCHKUNPK(SUnpkU8, &prbRprtInd->bPrbUsageMask, mBuf);
1155 for(idx = 0; idx < RGM_MAX_QCI_REPORTS; idx++)
1157 CMCHKUNPK(cmUnpkRgmPrbQciRpt, &prbRprtInd->stQciPrbRpts[idx], mBuf);
1167 * @brief PRB Usage Report Indication from MAC to RRM
1171 * Function : cmPkRgmPrbRprtInd
1173 * @param[in] Pst* pst
1174 * @param[in] SuId suId
1175 * @param[in] RgmPrbRprtInd * prbRprtInd
1180 PUBLIC S16 cmPkRgmPrbRprtInd
1184 RgmPrbRprtInd * prbRprtInd
1187 PUBLIC S16 cmPkRgmPrbRprtInd(pst, suId, prbRprtInd)
1190 RgmPrbRprtInd * prbRprtInd;
1193 Buffer *mBuf = NULLP;
1195 TRC3(cmPkRgmPrbRprtInd)
1197 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1198 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1202 if(cmPkPrbRprtInd(prbRprtInd, mBuf) != ROK)
1204 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1209 if (SPkS16(suId, mBuf) != ROK)
1211 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1216 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1218 pst->event = (Event) EVTRGMPRBRPRTIND;
1219 RETVALUE(SPstTsk(pst,mBuf));
1222 * @brief PRB Usage Report Indication from MAC to RRM
1226 * Function : cmUnpkRgmPrbRprtInd
1228 * @param[in] Pst* pst
1229 * @param[in] SuId suId
1230 * @param[in] RgmPrbRprtInd * prbRprtInd
1235 PUBLIC S16 cmUnpkRgmPrbRprtInd
1237 RgmPrbRprtIndFptr func,
1242 PUBLIC S16 cmUnpkRgmPrbRprtInd(func, pst, mBuf)
1243 RgmPrbRprtIndFptr func;
1249 RgmPrbRprtInd prbRprtInd;
1251 TRC3(cmUnpkRgmPrbRprtInd)
1253 if (SUnpkS16(&suId, mBuf) != ROK)
1259 if (cmUnpkPrbRprtInd(&prbRprtInd, mBuf) != ROK)
1266 RETVALUE((*func)(pst, suId, &prbRprtInd));
1270 * @brief Transmission Mode Change Indication from MAC to RRM
1274 * Function : cmPkTransModeInd
1276 * @param[in] RgmTransModeInd *transModeInd
1277 * @param[in] Buffer *mBuf
1282 PUBLIC S16 cmPkTransModeInd
1284 RgmTransModeInd *transModeInd,
1288 PUBLIC S16 cmPkTransModeInd(transModeInd, mBuf)
1289 RgmTransModeInd *transModeInd;
1293 TRC3(cmPkTransModeInd);
1294 CMCHKPK(SPkU32, transModeInd->eMode, mBuf);
1295 CMCHKPK(SPkU16, transModeInd->usCrnti, mBuf);
1296 CMCHKPK(SPkU8, transModeInd->bCellId, mBuf);
1301 * @brief Transmission Mode Change Indication from MAC to RRM
1305 * Function : cmUnpkTransModeInd
1307 * @param[in] RgmTransModeInd *transModeInd
1308 * @param[in] Buffer *mBuf
1313 PUBLIC S16 cmUnpkTransModeInd
1315 RgmTransModeInd *transModeInd,
1319 PUBLIC S16 cmUnpkTransModeInd(transModeInd, mBuf)
1320 RgmTransModeInd *transModeInd;
1325 TRC3(cmUnpkTransModeInd);
1326 CMCHKUNPK(SUnpkU8, &transModeInd->bCellId, mBuf);
1327 CMCHKUNPK(SUnpkU16, &transModeInd->usCrnti, mBuf);
1328 CMCHKUNPK(SUnpkU32, (U32 *)&tmpModeEnum, mBuf);
1329 transModeInd->eMode = (RgmTxnMode)tmpModeEnum;
1333 * @brief Transmission Mode Change Indication from MAC to RRM
1337 * Function : cmPkRgmTransModeInd
1339 * @param[in] Pst* pst
1340 * @param[in] SuId suId
1341 * @param[in] RgmTransModeInd *transModeInd
1346 PUBLIC S16 cmPkRgmTransModeInd
1350 RgmTransModeInd *transModeInd
1353 PUBLIC S16 cmPkRgmTransModeInd(pst, suId, transModeInd)
1356 RgmTransModeInd *transModeInd;
1359 Buffer *mBuf = NULLP;
1361 TRC3(cmPkRgmTransModeInd)
1363 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1364 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1368 if(cmPkTransModeInd(transModeInd, mBuf) != ROK)
1370 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1375 if (SPkS16(suId, mBuf) != ROK)
1377 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1382 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1384 pst->event = (Event) EVTRGMTRANSMODEIND;
1385 RETVALUE(SPstTsk(pst,mBuf));
1388 * @brief Transmission Mode Change Indication from MAC to RRM
1392 * Function : cmUnpkRgmTransModeInd
1394 * @param[in] Pst* pst
1395 * @param[in] SuId suId
1396 * @param[in] RgmTransModeInd *transModeInd
1401 PUBLIC S16 cmUnpkRgmTransModeInd
1403 RgmTransModeIndFptr func,
1408 PUBLIC S16 cmUnpkRgmTransModeInd(func, pst, mBuf)
1409 RgmTransModeIndFptr func;
1415 RgmTransModeInd transModeInd;
1417 TRC3(cmUnpkRgmTransModeInd)
1419 if (SUnpkS16(&suId, mBuf) != ROK)
1425 if (cmUnpkTransModeInd(&transModeInd, mBuf) != ROK)
1432 RETVALUE((*func)(pst, suId, &transModeInd));
1434 /**********************************************************************
1438 **********************************************************************/