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));
219 * @brief Request from RRM to MAC to Unbind the interface saps
223 * Function : cmUnpkLwLcRgmUbndReq
225 * @param[in] Pst* pst
226 * @param[in] SpId spId
227 * @param[in] Reason reason
232 PUBLIC S16 cmUnpkLwLcRgmUbndReq
239 PUBLIC S16 cmUnpkLwLcRgmUbndReq(func, pst, mBuf)
248 TRC3(cmUnpkLwLcRgmUbndReq)
250 if (SUnpkS16(&spId, mBuf) != ROK)
255 if (SUnpkS16(&reason, mBuf) != ROK)
261 RETVALUE((*func)(pst, spId, reason));
266 * @brief Confirmation from MAC to RRM for the bind/Unbind
267 * request for the interface saps
271 * Function : cmPkLwLcRgmBndCfm
273 * @param[in] Pst* pst
274 * @param[in] SuId suId
275 * @param[in] U8 status
280 PUBLIC S16 cmPkLwLcRgmBndCfm
287 PUBLIC S16 cmPkLwLcRgmBndCfm(pst, suId, status)
293 Buffer *mBuf = NULLP;
294 TRC3(cmPkLwLcRgmBndCfm)
296 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
301 if (SPkS16(suId, mBuf) != ROK)
307 if (SPkU8(status, mBuf) != ROK)
313 pst->event = (Event) EVTRGMBNDCFM;
314 RETVALUE(SPstTsk(pst,mBuf));
319 * @brief Confirmation from MAC to RRM for the bind/Unbind
320 * request for the interface saps
324 * Function : cmUnpkLwLcRgmBndCfm
326 * @param[in] Pst* pst
327 * @param[in] SuId suId
328 * @param[in] U8 status
333 PUBLIC S16 cmUnpkLwLcRgmBndCfm
340 PUBLIC S16 cmUnpkLwLcRgmBndCfm(func, pst, mBuf)
349 TRC3(cmUnpkLwLcRgmBndCfm)
351 if (SUnpkU8(&status, mBuf) != ROK)
357 if (SUnpkS16(&suId, mBuf) != ROK)
363 RETVALUE((*func)(pst, suId, status));
368 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
372 * Function : cmPkLwLcRgmCfgPrbRprt
374 * @param[in] Pst* pst
375 * @param[in] SpId spId
376 * @param[in] RgmPrbRprtCfg * prbRprtCfg
381 PUBLIC S16 cmPkLwLcRgmCfgPrbRprt
385 RgmPrbRprtCfg * prbRprtCfg
388 PUBLIC S16 cmPkLwLcRgmCfgPrbRprt(pst, spId, prbRprtCfg)
391 RgmPrbRprtCfg * prbRprtCfg;
394 Buffer *mBuf = NULLP;
395 U32 len = sizeof(RgmPrbRprtCfg);
396 TRC3(cmPkLwLcRgmCfgPrbRprt)
398 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
400 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
404 if(cmPkPtr((PTR)prbRprtCfg, mBuf) != ROK)
407 SPutSBuf(pst->region, pst->pool, (Data*)prbRprtCfg, len);
411 if (SPkS16(spId, mBuf) != ROK)
413 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
418 pst->event = (Event) EVTRGMCFGPRBRPRT;
419 RETVALUE(SPstTsk(pst,mBuf));
424 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
428 * Function : cmUnpkLwLcRgmCfgPrbRprt
430 * @param[in] Pst* pst
431 * @param[in] SpId spId
432 * @param[in] RgmPrbRprtCfg * prbRprtCfg
437 PUBLIC S16 cmUnpkLwLcRgmCfgPrbRprt
439 RgmCfgPrbRprtFptr func,
444 PUBLIC S16 cmUnpkLwLcRgmCfgPrbRprt(func, pst, mBuf)
445 RgmCfgPrbRprtFptr func;
452 RgmPrbRprtCfg *prbRprtCfg;
454 TRC3(cmUnpkLwLcRgmCfgPrbRprt)
456 if (SUnpkS16(&spId, mBuf) != ROK)
462 if (cmUnpkPtr((PTR *)&prbRprtCfg, mBuf) != ROK)
465 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
469 ret = ((*func)(pst, spId, prbRprtCfg));
477 * @brief PRB Usage Report Indication from MAC to RRM
481 * Function : cmPkLwLcRgmPrbRprtInd
483 * @param[in] Pst* pst
484 * @param[in] SuId suId
485 * @param[in] RgmPrbRprtInd * prbRprtInd
490 PUBLIC S16 cmPkLwLcRgmPrbRprtInd
494 RgmPrbRprtInd * prbRprtInd
497 PUBLIC S16 cmPkLwLcRgmPrbRprtInd(pst, suId, prbRprtInd)
500 RgmPrbRprtInd * prbRprtInd;
503 Buffer *mBuf = NULLP;
505 TRC3(cmPkLwLcRgmPrbRprtInd)
507 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
508 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
512 if(cmPkPtr((PTR)prbRprtInd, mBuf) != ROK)
514 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
519 if (SPkS16(suId, mBuf) != ROK)
521 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
526 pst->event = (Event) EVTRGMCFGPRBRPRT;
527 RETVALUE(SPstTsk(pst,mBuf));
532 * @brief PRB Usage Report Indication from MAC to RRM
536 * Function : cmUnpkLwLcRgmPrbRprtInd
538 * @param[in] Pst* pst
539 * @param[in] SuId suId
540 * @param[in] RgmPrbRprtInd * prbRprtInd
545 PUBLIC S16 cmUnpkLwLcRgmPrbRprtInd
547 RgmPrbRprtIndFptr func,
552 PUBLIC S16 cmUnpkLwLcRgmPrbRprtInd(func, pst, mBuf)
553 RgmPrbRprtIndFptr func;
559 RgmPrbRprtInd *prbRprtInd;
562 TRC3(cmUnpkLwLcRgmPrbRprtInd)
564 if (SUnpkS16(&suId, mBuf) != ROK)
570 if (cmUnpkPtr((PTR *)&prbRprtInd, mBuf) != ROK)
573 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
578 ret = ((*func)(pst, suId, prbRprtInd));
588 * @brief Request from RRM to MAC to bind the interface saps
592 * Function : cmPkRgmBndReq
594 * @param[in] Pst* pst
595 * @param[in] SuId suId
596 * @param[in] SpId spId
601 PUBLIC S16 cmPkRgmBndReq
608 PUBLIC S16 cmPkRgmBndReq(pst, suId, spId)
614 Buffer *mBuf = NULLP;
617 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
622 if (SPkS16(spId, mBuf) != ROK)
628 if (SPkS16(suId, mBuf) != ROK)
634 pst->event = (Event) EVTRGMBNDREQ;
635 RETVALUE(SPstTsk(pst,mBuf));
640 * @brief Request from RRM to MAC to bind the interface saps
644 * Function : cmUnpkRgmBndReq
646 * @param[in] Pst* pst
647 * @param[in] SuId suId
648 * @param[in] SpId spId
653 PUBLIC S16 cmUnpkRgmBndReq
660 PUBLIC S16 cmUnpkRgmBndReq(func, pst, mBuf)
670 TRC3(cmUnpkRgmBndReq)
672 if (SUnpkS16(&suId, mBuf) != ROK)
678 if (SUnpkS16(&spId, mBuf) != ROK)
684 ret = ((*func)(pst, suId, spId));
692 * @brief Request from RRM to MAC to Unbind the interface saps
696 * Function : cmPkRgmUbndReq
698 * @param[in] Pst* pst
699 * @param[in] SpId spId
700 * @param[in] Reason reason
705 PUBLIC S16 cmPkRgmUbndReq
712 PUBLIC S16 cmPkRgmUbndReq(pst, spId, reason)
718 Buffer *mBuf = NULLP;
721 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
725 if (SPkS16(reason, mBuf) != ROK)
730 if (SPkS16(spId, mBuf) != ROK)
736 pst->event = (Event) EVTRGMUBNDREQ;
737 RETVALUE(SPstTsk(pst,mBuf));
743 * @brief Request from RRM to MAC to Unbind the interface saps
747 * Function : cmUnpkRgmUbndReq
749 * @param[in] Pst* pst
750 * @param[in] SpId spId
751 * @param[in] Reason reason
756 PUBLIC S16 cmUnpkRgmUbndReq
763 PUBLIC S16 cmUnpkRgmUbndReq(func, pst, mBuf)
772 TRC3(cmUnpkRgmUbndReq)
774 if (SUnpkS16(&spId, mBuf) != ROK)
779 if (SUnpkS16(&reason, mBuf) != ROK)
785 RETVALUE((*func)(pst, spId, reason));
790 * @brief Confirmation from MAC to RRM for the bind/Unbind
791 * request for the interface saps
795 * Function : cmPkRgmBndCfm
797 * @param[in] Pst* pst
798 * @param[in] SuId suId
799 * @param[in] U8 status
804 PUBLIC S16 cmPkRgmBndCfm
811 PUBLIC S16 cmPkRgmBndCfm(pst, suId, status)
817 Buffer *mBuf = NULLP;
820 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
825 if (SPkS16(suId, mBuf) != ROK)
831 if (SPkU8(status, mBuf) != ROK)
837 pst->event = (Event) EVTRGMBNDCFM;
838 RETVALUE(SPstTsk(pst,mBuf));
843 * @brief Confirmation from MAC to RRM for the bind/Unbind
844 * request for the interface saps
848 * Function : cmUnpkRgmBndCfm
850 * @param[in] Pst* pst
851 * @param[in] SuId suId
852 * @param[in] U8 status
857 PUBLIC S16 cmUnpkRgmBndCfm
864 PUBLIC S16 cmUnpkRgmBndCfm(func, pst, mBuf)
873 TRC3(cmUnpkRgmBndCfm)
875 if (SUnpkU8(&status, mBuf) != ROK)
881 if (SUnpkS16(&suId, mBuf) != ROK)
887 RETVALUE((*func)(pst, suId, status));
894 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
898 * Function : cmPkCfgPrbRprt
900 * @param[in] RgmPrbRprtCfg *prbRprtCfg
901 * @param[in] Buffer *mBuf
906 PUBLIC S16 cmPkCfgPrbRprt
908 RgmPrbRprtCfg * prbRprtCfg,
912 PUBLIC S16 cmPkCfgPrbRprt(prbRprtCfg, mBuf)
913 RgmPrbRprtCfg * prbRprtCfg;
917 TRC3(cmPkCfgPrbRprt);
918 CMCHKPK(SPkU16, prbRprtCfg->usPrbAvgPeriodicty, mBuf);
919 CMCHKPK(SPkU8, prbRprtCfg->bConfigType, mBuf);
920 CMCHKPK(SPkU8, prbRprtCfg->bCellId, mBuf);
924 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
928 * Function : cmUnPkCfgPrbRprt
930 * @param[in] RgmPrbRprtCfg *prbRprtCfg
931 * @param[in] Buffer *mBuf
936 PUBLIC S16 cmUnPkCfgPrbRprt
938 RgmPrbRprtCfg * prbRprtCfg,
942 PUBLIC S16 cmUnPkCfgPrbRprt(prbRprtCfg, mBuf)
943 RgmPrbRprtCfg * prbRprtCfg;
947 TRC3(cmUnPkCfgPrbRprt);
948 CMCHKUNPK(SUnpkU8, &prbRprtCfg->bCellId, mBuf);
949 CMCHKUNPK(SUnpkU8, &prbRprtCfg->bConfigType, mBuf);
950 CMCHKUNPK(SUnpkU16, &prbRprtCfg->usPrbAvgPeriodicty, mBuf);
958 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
962 * Function : cmPkRgmCfgPrbRprt
964 * @param[in] Pst* pst
965 * @param[in] SpId spId
966 * @param[in] RgmPrbRprtCfg *prbRprtCfg
971 PUBLIC S16 cmPkRgmCfgPrbRprt
975 RgmPrbRprtCfg * prbRprtCfg
978 PUBLIC S16 cmPkRgmCfgPrbRprt(pst, spId, prbRprtCfg)
981 RgmPrbRprtCfg * prbRprtCfg;
984 Buffer *mBuf = NULLP;
985 U32 len = sizeof(RgmPrbRprtCfg);
986 TRC3(cmPkRgmCfgPrbRprt)
988 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
990 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
994 if(cmPkCfgPrbRprt(prbRprtCfg, mBuf) != ROK)
997 SPutSBuf(pst->region, pst->pool, (Data*)prbRprtCfg, len);
1001 if (SPkS16(spId, mBuf) != ROK)
1003 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
1008 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
1010 pst->event = (Event) EVTRGMCFGPRBRPRT;
1011 RETVALUE(SPstTsk(pst,mBuf));
1017 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
1021 * Function : cmUnpkRgmCfgPrbRprt
1023 * @param[in] Pst* pst
1024 * @param[in] SpId spId
1025 * @param[in] RgmPrbRprtCfg * prbRprtCfg
1030 PUBLIC S16 cmUnpkRgmCfgPrbRprt
1032 RgmCfgPrbRprtFptr func,
1037 PUBLIC S16 cmUnpkRgmCfgPrbRprt(func, pst, mBuf)
1038 RgmCfgPrbRprtFptr func;
1044 RgmPrbRprtCfg *prbRprtCfg;
1046 TRC3(cmUnpkRgmCfgPrbRprt)
1047 if ((SGetSBuf(pst->region, pst->pool, (Data **)&prbRprtCfg, sizeof(RgmPrbRprtCfg))) != ROK)
1053 if (SUnpkS16(&spId, mBuf) != ROK)
1059 if (cmUnPkCfgPrbRprt(prbRprtCfg, mBuf) != ROK)
1066 RETVALUE((*func)(pst, spId, prbRprtCfg));
1071 * @brief Packing of PRB Usage Report for qci for sending
1076 * Function : cmPkRgmPrbQciRpt
1078 * @param[in] RgmPrbRptPerQci * qciPrbRprt
1079 * @param[out] Buffer *mBuf
1084 PUBLIC S16 cmPkRgmPrbQciRpt
1086 RgmPrbRptPerQci *qciPrbRprt,
1090 PUBLIC S16 cmPkRgmPrbQciRpt(qciPrbRprt, mBuf)
1091 RgmPrbRptPerQci *qciPrbRprt;
1092 Buffer *mBuf = NULLP;
1095 CMCHKPK(SPkU8, qciPrbRprt->bQci, mBuf);
1096 CMCHKPK(SPkU8, qciPrbRprt->bAvgPrbUlUsage, mBuf);
1097 CMCHKPK(SPkU8, qciPrbRprt->bAvgPrbDlUsage, mBuf);
1103 * @brief Unpacking of PRB Usage Report for qci received from MAC
1107 * Function : cmUnpkRgmPrbQciRpt
1109 * @param[out] RgmPrbRptPerQci * qciPrbRprt
1110 * @param[in] Buffer *mBuf
1115 PUBLIC S16 cmUnpkRgmPrbQciRpt
1117 RgmPrbRptPerQci *qciPrbRprt,
1121 PUBLIC S16 cmUnpkRgmPrbQciRpt(qciPrbRprt, mBuf)
1122 RgmPrbRptPerQci *qciPrbRprt;
1123 Buffer *mBuf = NULLP;
1126 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bAvgPrbDlUsage, mBuf);
1127 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bAvgPrbUlUsage, mBuf);
1128 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bQci, mBuf);
1135 * @brief PRB Usage Report Indication from MAC to RRM
1139 * Function : cmPkPrbRprtInd
1141 * @param[in] RgmPrbRprtInd * prbRprtInd
1142 * @param[in] Buffer *mBuf
1147 PUBLIC S16 cmPkPrbRprtInd
1149 RgmPrbRprtInd * prbRprtInd,
1153 PUBLIC S16 cmPkPrbRprtInd(prbRprtInd, mBuf)
1154 RgmPrbRprtInd * prbRprtInd;
1155 Buffer *mBuf = NULLP;
1160 TRC3(cmPkPrbRprtInd);
1163 for(idx = RGM_MAX_QCI_REPORTS-1; idx >= 0; idx--)
1165 CMCHKPK(cmPkRgmPrbQciRpt, &prbRprtInd->stQciPrbRpts[idx], mBuf);
1167 CMCHKPK(SPkU8, prbRprtInd->bPrbUsageMask, mBuf);
1168 CMCHKPK(SPkU8, prbRprtInd->bCellId, mBuf);
1174 * @brief PRB Usage Report Indication from MAC to RRM
1178 * Function : cmUnpkPrbRprtInd
1180 * @param[in] RgmPrbRprtInd * prbRprtInd
1181 * @param[in] Buffer *mBuf
1186 PUBLIC S16 cmUnpkPrbRprtInd
1188 RgmPrbRprtInd * prbRprtInd,
1192 PUBLIC S16 cmUnpkPrbRprtInd(prbRprtInd, mBuf)
1193 RgmPrbRprtInd * prbRprtInd;
1199 TRC3(cmUnpkPrbRprtInd);
1202 CMCHKUNPK(SUnpkU8, &prbRprtInd->bCellId, mBuf);
1203 CMCHKUNPK(SUnpkU8, &prbRprtInd->bPrbUsageMask, mBuf);
1204 for(idx = 0; idx < RGM_MAX_QCI_REPORTS; idx++)
1206 CMCHKUNPK(cmUnpkRgmPrbQciRpt, &prbRprtInd->stQciPrbRpts[idx], mBuf);
1216 * @brief PRB Usage Report Indication from MAC to RRM
1220 * Function : cmPkRgmPrbRprtInd
1222 * @param[in] Pst* pst
1223 * @param[in] SuId suId
1224 * @param[in] RgmPrbRprtInd * prbRprtInd
1229 PUBLIC S16 cmPkRgmPrbRprtInd
1233 RgmPrbRprtInd * prbRprtInd
1236 PUBLIC S16 cmPkRgmPrbRprtInd(pst, suId, prbRprtInd)
1239 RgmPrbRprtInd * prbRprtInd;
1242 Buffer *mBuf = NULLP;
1244 TRC3(cmPkRgmPrbRprtInd)
1246 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1247 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1251 if(cmPkPrbRprtInd(prbRprtInd, mBuf) != ROK)
1253 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1258 if (SPkS16(suId, mBuf) != ROK)
1260 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1265 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1267 pst->event = (Event) EVTRGMPRBRPRTIND;
1268 RETVALUE(SPstTsk(pst,mBuf));
1271 * @brief PRB Usage Report Indication from MAC to RRM
1275 * Function : cmUnpkRgmPrbRprtInd
1277 * @param[in] Pst* pst
1278 * @param[in] SuId suId
1279 * @param[in] RgmPrbRprtInd * prbRprtInd
1284 PUBLIC S16 cmUnpkRgmPrbRprtInd
1286 RgmPrbRprtIndFptr func,
1291 PUBLIC S16 cmUnpkRgmPrbRprtInd(func, pst, mBuf)
1292 RgmPrbRprtIndFptr func;
1298 RgmPrbRprtInd prbRprtInd;
1300 TRC3(cmUnpkRgmPrbRprtInd)
1302 if (SUnpkS16(&suId, mBuf) != ROK)
1308 if (cmUnpkPrbRprtInd(&prbRprtInd, mBuf) != ROK)
1315 RETVALUE((*func)(pst, suId, &prbRprtInd));
1319 * @brief Transmission Mode Change Indication from MAC to RRM
1323 * Function : cmPkTransModeInd
1325 * @param[in] RgmTransModeInd *transModeInd
1326 * @param[in] Buffer *mBuf
1331 PUBLIC S16 cmPkTransModeInd
1333 RgmTransModeInd *transModeInd,
1337 PUBLIC S16 cmPkTransModeInd(transModeInd, mBuf)
1338 RgmTransModeInd *transModeInd;
1342 TRC3(cmPkTransModeInd);
1343 CMCHKPK(SPkU32, transModeInd->eMode, mBuf);
1344 CMCHKPK(SPkU16, transModeInd->usCrnti, mBuf);
1345 CMCHKPK(SPkU8, transModeInd->bCellId, mBuf);
1350 * @brief Transmission Mode Change Indication from MAC to RRM
1354 * Function : cmUnpkTransModeInd
1356 * @param[in] RgmTransModeInd *transModeInd
1357 * @param[in] Buffer *mBuf
1362 PUBLIC S16 cmUnpkTransModeInd
1364 RgmTransModeInd *transModeInd,
1368 PUBLIC S16 cmUnpkTransModeInd(transModeInd, mBuf)
1369 RgmTransModeInd *transModeInd;
1374 TRC3(cmUnpkTransModeInd);
1375 CMCHKUNPK(SUnpkU8, &transModeInd->bCellId, mBuf);
1376 CMCHKUNPK(SUnpkU16, &transModeInd->usCrnti, mBuf);
1377 CMCHKUNPK(SUnpkU32, (U32 *)&tmpModeEnum, mBuf);
1378 transModeInd->eMode = (RgmTxnMode)tmpModeEnum;
1382 * @brief Transmission Mode Change Indication from MAC to RRM
1386 * Function : cmPkRgmTransModeInd
1388 * @param[in] Pst* pst
1389 * @param[in] SuId suId
1390 * @param[in] RgmTransModeInd *transModeInd
1395 PUBLIC S16 cmPkRgmTransModeInd
1399 RgmTransModeInd *transModeInd
1402 PUBLIC S16 cmPkRgmTransModeInd(pst, suId, transModeInd)
1405 RgmTransModeInd *transModeInd;
1408 Buffer *mBuf = NULLP;
1410 TRC3(cmPkRgmTransModeInd)
1412 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1413 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1417 if(cmPkTransModeInd(transModeInd, mBuf) != ROK)
1419 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1424 if (SPkS16(suId, mBuf) != ROK)
1426 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1431 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1433 pst->event = (Event) EVTRGMTRANSMODEIND;
1434 RETVALUE(SPstTsk(pst,mBuf));
1437 * @brief Transmission Mode Change Indication from MAC to RRM
1441 * Function : cmUnpkRgmTransModeInd
1443 * @param[in] Pst* pst
1444 * @param[in] SuId suId
1445 * @param[in] RgmTransModeInd *transModeInd
1450 PUBLIC S16 cmUnpkRgmTransModeInd
1452 RgmTransModeIndFptr func,
1457 PUBLIC S16 cmUnpkRgmTransModeInd(func, pst, mBuf)
1458 RgmTransModeIndFptr func;
1464 RgmTransModeInd transModeInd;
1466 TRC3(cmUnpkRgmTransModeInd)
1468 if (SUnpkS16(&suId, mBuf) != ROK)
1474 if (cmUnpkTransModeInd(&transModeInd, mBuf) != ROK)
1481 RETVALUE((*func)(pst, suId, &transModeInd));
1483 /**********************************************************************
1487 **********************************************************************/