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 "common_def.h"
40 #include "rgm.h" /* RGM Interface defines */
41 /* header/extern include files (.x) */
42 #include "rgm.x" /* RGM Interface includes */
48 * @brief Request from RRM to MAC to bind the interface saps
52 * Function : cmPkLwLcRgmBndReq
55 * @param[in] SuId suId
56 * @param[in] SpId spId
61 PUBLIC S16 cmPkLwLcRgmBndReq
68 PUBLIC S16 cmPkLwLcRgmBndReq(pst, suId, spId)
75 TRC3(cmPkLwLcRgmBndReq)
77 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
82 if (SPkS16(spId, mBuf) != ROK)
88 if (SPkS16(suId, mBuf) != ROK)
94 pst->event = (Event) EVTRGMBNDREQ;
95 RETVALUE(SPstTsk(pst,mBuf));
100 * @brief Request from RRM to MAC to bind the interface saps
104 * Function : cmUnpkLwLcRgmBndReq
106 * @param[in] Pst* pst
107 * @param[in] SuId suId
108 * @param[in] SpId spId
113 PUBLIC S16 cmUnpkLwLcRgmBndReq
120 PUBLIC S16 cmUnpkLwLcRgmBndReq(func, pst, mBuf)
130 TRC3(cmUnpkLwLcRgmBndReq)
132 if (SUnpkS16(&suId, mBuf) != ROK)
138 if (SUnpkS16(&spId, mBuf) != ROK)
144 ret = ((*func)(pst, suId, spId));
152 * @brief Request from RRM to MAC to Unbind the interface saps
156 * Function : cmPkLwLcRgmUbndReq
158 * @param[in] Pst* pst
159 * @param[in] SpId spId
160 * @param[in] Reason reason
165 PUBLIC S16 cmPkLwLcRgmUbndReq
172 PUBLIC S16 cmPkLwLcRgmUbndReq(pst, spId, reason)
178 Buffer *mBuf = NULLP;
179 TRC3(cmPkLwLcRgmUbndReq)
181 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
185 if (SPkS16(reason, mBuf) != ROK)
190 if (SPkS16(spId, mBuf) != ROK)
196 pst->event = (Event) EVTRGMUBNDREQ;
197 RETVALUE(SPstTsk(pst,mBuf));
201 * @brief Confirmation from MAC to RRM for the bind/Unbind
202 * request for the interface saps
206 * Function : cmPkLwLcRgmBndCfm
208 * @param[in] Pst* pst
209 * @param[in] SuId suId
210 * @param[in] U8 status
215 PUBLIC S16 cmPkLwLcRgmBndCfm
222 PUBLIC S16 cmPkLwLcRgmBndCfm(pst, suId, status)
228 Buffer *mBuf = NULLP;
229 TRC3(cmPkLwLcRgmBndCfm)
231 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
236 if (SPkS16(suId, mBuf) != ROK)
242 if (SPkU8(status, mBuf) != ROK)
248 pst->event = (Event) EVTRGMBNDCFM;
249 RETVALUE(SPstTsk(pst,mBuf));
254 * @brief Confirmation from MAC to RRM for the bind/Unbind
255 * request for the interface saps
259 * Function : cmUnpkLwLcRgmBndCfm
261 * @param[in] Pst* pst
262 * @param[in] SuId suId
263 * @param[in] U8 status
268 PUBLIC S16 cmUnpkLwLcRgmBndCfm
275 PUBLIC S16 cmUnpkLwLcRgmBndCfm(func, pst, mBuf)
284 TRC3(cmUnpkLwLcRgmBndCfm)
286 if (SUnpkU8(&status, mBuf) != ROK)
292 if (SUnpkS16(&suId, mBuf) != ROK)
298 RETVALUE((*func)(pst, suId, status));
303 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
307 * Function : cmPkLwLcRgmCfgPrbRprt
309 * @param[in] Pst* pst
310 * @param[in] SpId spId
311 * @param[in] RgmPrbRprtCfg * prbRprtCfg
316 PUBLIC S16 cmPkLwLcRgmCfgPrbRprt
320 RgmPrbRprtCfg * prbRprtCfg
323 PUBLIC S16 cmPkLwLcRgmCfgPrbRprt(pst, spId, prbRprtCfg)
326 RgmPrbRprtCfg * prbRprtCfg;
329 Buffer *mBuf = NULLP;
330 U32 len = sizeof(RgmPrbRprtCfg);
331 TRC3(cmPkLwLcRgmCfgPrbRprt)
333 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
335 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
339 if(cmPkPtr((PTR)prbRprtCfg, mBuf) != ROK)
342 SPutSBuf(pst->region, pst->pool, (Data*)prbRprtCfg, len);
346 if (SPkS16(spId, mBuf) != ROK)
348 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
353 pst->event = (Event) EVTRGMCFGPRBRPRT;
354 RETVALUE(SPstTsk(pst,mBuf));
359 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
363 * Function : cmUnpkLwLcRgmCfgPrbRprt
365 * @param[in] Pst* pst
366 * @param[in] SpId spId
367 * @param[in] RgmPrbRprtCfg * prbRprtCfg
372 PUBLIC S16 cmUnpkLwLcRgmCfgPrbRprt
374 RgmCfgPrbRprtFptr func,
379 PUBLIC S16 cmUnpkLwLcRgmCfgPrbRprt(func, pst, mBuf)
380 RgmCfgPrbRprtFptr func;
387 RgmPrbRprtCfg *prbRprtCfg;
389 TRC3(cmUnpkLwLcRgmCfgPrbRprt)
391 if (SUnpkS16(&spId, mBuf) != ROK)
397 if (cmUnpkPtr((PTR *)&prbRprtCfg, mBuf) != ROK)
400 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
404 ret = ((*func)(pst, spId, prbRprtCfg));
412 * @brief PRB Usage Report Indication from MAC to RRM
416 * Function : cmPkLwLcRgmPrbRprtInd
418 * @param[in] Pst* pst
419 * @param[in] SuId suId
420 * @param[in] RgmPrbRprtInd * prbRprtInd
425 PUBLIC S16 cmPkLwLcRgmPrbRprtInd
429 RgmPrbRprtInd * prbRprtInd
432 PUBLIC S16 cmPkLwLcRgmPrbRprtInd(pst, suId, prbRprtInd)
435 RgmPrbRprtInd * prbRprtInd;
438 Buffer *mBuf = NULLP;
440 TRC3(cmPkLwLcRgmPrbRprtInd)
442 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
443 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
447 if(cmPkPtr((PTR)prbRprtInd, mBuf) != ROK)
449 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
454 if (SPkS16(suId, mBuf) != ROK)
456 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
461 pst->event = (Event) EVTRGMCFGPRBRPRT;
462 RETVALUE(SPstTsk(pst,mBuf));
467 * @brief PRB Usage Report Indication from MAC to RRM
471 * Function : cmUnpkLwLcRgmPrbRprtInd
473 * @param[in] Pst* pst
474 * @param[in] SuId suId
475 * @param[in] RgmPrbRprtInd * prbRprtInd
480 PUBLIC S16 cmUnpkLwLcRgmPrbRprtInd
482 RgmPrbRprtIndFptr func,
487 PUBLIC S16 cmUnpkLwLcRgmPrbRprtInd(func, pst, mBuf)
488 RgmPrbRprtIndFptr func;
494 RgmPrbRprtInd *prbRprtInd;
497 TRC3(cmUnpkLwLcRgmPrbRprtInd)
499 if (SUnpkS16(&suId, mBuf) != ROK)
505 if (cmUnpkPtr((PTR *)&prbRprtInd, mBuf) != ROK)
508 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
513 ret = ((*func)(pst, suId, prbRprtInd));
523 * @brief Request from RRM to MAC to bind the interface saps
527 * Function : cmPkRgmBndReq
529 * @param[in] Pst* pst
530 * @param[in] SuId suId
531 * @param[in] SpId spId
536 PUBLIC S16 cmPkRgmBndReq
543 PUBLIC S16 cmPkRgmBndReq(pst, suId, spId)
549 Buffer *mBuf = NULLP;
552 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
557 if (SPkS16(spId, mBuf) != ROK)
563 if (SPkS16(suId, mBuf) != ROK)
569 pst->event = (Event) EVTRGMBNDREQ;
570 RETVALUE(SPstTsk(pst,mBuf));
575 * @brief Request from RRM to MAC to bind the interface saps
579 * Function : cmUnpkRgmBndReq
581 * @param[in] Pst* pst
582 * @param[in] SuId suId
583 * @param[in] SpId spId
588 PUBLIC S16 cmUnpkRgmBndReq
595 PUBLIC S16 cmUnpkRgmBndReq(func, pst, mBuf)
605 TRC3(cmUnpkRgmBndReq)
607 if (SUnpkS16(&suId, mBuf) != ROK)
613 if (SUnpkS16(&spId, mBuf) != ROK)
619 ret = ((*func)(pst, suId, spId));
627 * @brief Request from RRM to MAC to Unbind the interface saps
631 * Function : cmPkRgmUbndReq
633 * @param[in] Pst* pst
634 * @param[in] SpId spId
635 * @param[in] Reason reason
640 PUBLIC S16 cmPkRgmUbndReq
647 PUBLIC S16 cmPkRgmUbndReq(pst, spId, reason)
653 Buffer *mBuf = NULLP;
656 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
660 if (SPkS16(reason, mBuf) != ROK)
665 if (SPkS16(spId, mBuf) != ROK)
671 pst->event = (Event) EVTRGMUBNDREQ;
672 RETVALUE(SPstTsk(pst,mBuf));
678 * @brief Request from RRM to MAC to Unbind the interface saps
682 * Function : cmUnpkRgmUbndReq
684 * @param[in] Pst* pst
685 * @param[in] SpId spId
686 * @param[in] Reason reason
691 PUBLIC S16 cmUnpkRgmUbndReq
698 PUBLIC S16 cmUnpkRgmUbndReq(func, pst, mBuf)
707 TRC3(cmUnpkRgmUbndReq)
709 if (SUnpkS16(&spId, mBuf) != ROK)
714 if (SUnpkS16(&reason, mBuf) != ROK)
720 RETVALUE((*func)(pst, spId, reason));
725 * @brief Confirmation from MAC to RRM for the bind/Unbind
726 * request for the interface saps
730 * Function : cmPkRgmBndCfm
732 * @param[in] Pst* pst
733 * @param[in] SuId suId
734 * @param[in] U8 status
739 PUBLIC S16 cmPkRgmBndCfm
746 PUBLIC S16 cmPkRgmBndCfm(pst, suId, status)
752 Buffer *mBuf = NULLP;
755 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
760 if (SPkS16(suId, mBuf) != ROK)
766 if (SPkU8(status, mBuf) != ROK)
772 pst->event = (Event) EVTRGMBNDCFM;
773 RETVALUE(SPstTsk(pst,mBuf));
778 * @brief Confirmation from MAC to RRM for the bind/Unbind
779 * request for the interface saps
783 * Function : cmUnpkRgmBndCfm
785 * @param[in] Pst* pst
786 * @param[in] SuId suId
787 * @param[in] U8 status
792 PUBLIC S16 cmUnpkRgmBndCfm
799 PUBLIC S16 cmUnpkRgmBndCfm(func, pst, mBuf)
808 TRC3(cmUnpkRgmBndCfm)
810 if (SUnpkU8(&status, mBuf) != ROK)
816 if (SUnpkS16(&suId, mBuf) != ROK)
822 RETVALUE((*func)(pst, suId, status));
829 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
833 * Function : cmPkCfgPrbRprt
835 * @param[in] RgmPrbRprtCfg *prbRprtCfg
836 * @param[in] Buffer *mBuf
841 PUBLIC S16 cmPkCfgPrbRprt
843 RgmPrbRprtCfg * prbRprtCfg,
847 PUBLIC S16 cmPkCfgPrbRprt(prbRprtCfg, mBuf)
848 RgmPrbRprtCfg * prbRprtCfg;
852 TRC3(cmPkCfgPrbRprt);
853 CMCHKPK(SPkU16, prbRprtCfg->usPrbAvgPeriodicty, mBuf);
854 CMCHKPK(SPkU8, prbRprtCfg->bConfigType, mBuf);
855 CMCHKPK(SPkU8, prbRprtCfg->bCellId, mBuf);
859 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
863 * Function : cmUnPkCfgPrbRprt
865 * @param[in] RgmPrbRprtCfg *prbRprtCfg
866 * @param[in] Buffer *mBuf
871 PUBLIC S16 cmUnPkCfgPrbRprt
873 RgmPrbRprtCfg * prbRprtCfg,
877 PUBLIC S16 cmUnPkCfgPrbRprt(prbRprtCfg, mBuf)
878 RgmPrbRprtCfg * prbRprtCfg;
882 TRC3(cmUnPkCfgPrbRprt);
883 CMCHKUNPK(SUnpkU8, &prbRprtCfg->bCellId, mBuf);
884 CMCHKUNPK(SUnpkU8, &prbRprtCfg->bConfigType, mBuf);
885 CMCHKUNPK(SUnpkU16, &prbRprtCfg->usPrbAvgPeriodicty, mBuf);
893 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
897 * Function : cmPkRgmCfgPrbRprt
899 * @param[in] Pst* pst
900 * @param[in] SpId spId
901 * @param[in] RgmPrbRprtCfg *prbRprtCfg
906 PUBLIC S16 cmPkRgmCfgPrbRprt
910 RgmPrbRprtCfg * prbRprtCfg
913 PUBLIC S16 cmPkRgmCfgPrbRprt(pst, spId, prbRprtCfg)
916 RgmPrbRprtCfg * prbRprtCfg;
919 Buffer *mBuf = NULLP;
920 U32 len = sizeof(RgmPrbRprtCfg);
921 TRC3(cmPkRgmCfgPrbRprt)
923 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
925 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
929 if(cmPkCfgPrbRprt(prbRprtCfg, mBuf) != ROK)
932 SPutSBuf(pst->region, pst->pool, (Data*)prbRprtCfg, len);
936 if (SPkS16(spId, mBuf) != ROK)
938 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
943 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
945 pst->event = (Event) EVTRGMCFGPRBRPRT;
946 RETVALUE(SPstTsk(pst,mBuf));
952 * @brief Configure the PRB Report Preparation Start/Stop from RRM to MAC
956 * Function : cmUnpkRgmCfgPrbRprt
958 * @param[in] Pst* pst
959 * @param[in] SpId spId
960 * @param[in] RgmPrbRprtCfg * prbRprtCfg
965 PUBLIC S16 cmUnpkRgmCfgPrbRprt
967 RgmCfgPrbRprtFptr func,
972 PUBLIC S16 cmUnpkRgmCfgPrbRprt(func, pst, mBuf)
973 RgmCfgPrbRprtFptr func;
979 RgmPrbRprtCfg *prbRprtCfg;
981 TRC3(cmUnpkRgmCfgPrbRprt)
982 if ((SGetSBuf(pst->region, pst->pool, (Data **)&prbRprtCfg, sizeof(RgmPrbRprtCfg))) != ROK)
988 if (SUnpkS16(&spId, mBuf) != ROK)
994 if (cmUnPkCfgPrbRprt(prbRprtCfg, mBuf) != ROK)
1001 RETVALUE((*func)(pst, spId, prbRprtCfg));
1006 * @brief Packing of PRB Usage Report for qci for sending
1011 * Function : cmPkRgmPrbQciRpt
1013 * @param[in] RgmPrbRptPerQci * qciPrbRprt
1014 * @param[out] Buffer *mBuf
1019 PUBLIC S16 cmPkRgmPrbQciRpt
1021 RgmPrbRptPerQci *qciPrbRprt,
1025 PUBLIC S16 cmPkRgmPrbQciRpt(qciPrbRprt, mBuf)
1026 RgmPrbRptPerQci *qciPrbRprt;
1027 Buffer *mBuf = NULLP;
1030 CMCHKPK(SPkU8, qciPrbRprt->bQci, mBuf);
1031 CMCHKPK(SPkU8, qciPrbRprt->bAvgPrbUlUsage, mBuf);
1032 CMCHKPK(SPkU8, qciPrbRprt->bAvgPrbDlUsage, mBuf);
1038 * @brief Unpacking of PRB Usage Report for qci received from MAC
1042 * Function : cmUnpkRgmPrbQciRpt
1044 * @param[out] RgmPrbRptPerQci * qciPrbRprt
1045 * @param[in] Buffer *mBuf
1050 PUBLIC S16 cmUnpkRgmPrbQciRpt
1052 RgmPrbRptPerQci *qciPrbRprt,
1056 PUBLIC S16 cmUnpkRgmPrbQciRpt(qciPrbRprt, mBuf)
1057 RgmPrbRptPerQci *qciPrbRprt;
1058 Buffer *mBuf = NULLP;
1061 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bAvgPrbDlUsage, mBuf);
1062 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bAvgPrbUlUsage, mBuf);
1063 CMCHKUNPK(SUnpkU8, &qciPrbRprt->bQci, mBuf);
1070 * @brief PRB Usage Report Indication from MAC to RRM
1074 * Function : cmPkPrbRprtInd
1076 * @param[in] RgmPrbRprtInd * prbRprtInd
1077 * @param[in] Buffer *mBuf
1082 PUBLIC S16 cmPkPrbRprtInd
1084 RgmPrbRprtInd * prbRprtInd,
1088 PUBLIC S16 cmPkPrbRprtInd(prbRprtInd, mBuf)
1089 RgmPrbRprtInd * prbRprtInd;
1090 Buffer *mBuf = NULLP;
1095 TRC3(cmPkPrbRprtInd);
1098 for(idx = RGM_MAX_QCI_REPORTS-1; idx >= 0; idx--)
1100 CMCHKPK(cmPkRgmPrbQciRpt, &prbRprtInd->stQciPrbRpts[idx], mBuf);
1102 CMCHKPK(SPkU8, prbRprtInd->bPrbUsageMask, mBuf);
1103 CMCHKPK(SPkU8, prbRprtInd->bCellId, mBuf);
1109 * @brief PRB Usage Report Indication from MAC to RRM
1113 * Function : cmUnpkPrbRprtInd
1115 * @param[in] RgmPrbRprtInd * prbRprtInd
1116 * @param[in] Buffer *mBuf
1121 PUBLIC S16 cmUnpkPrbRprtInd
1123 RgmPrbRprtInd * prbRprtInd,
1127 PUBLIC S16 cmUnpkPrbRprtInd(prbRprtInd, mBuf)
1128 RgmPrbRprtInd * prbRprtInd;
1134 TRC3(cmUnpkPrbRprtInd);
1137 CMCHKUNPK(SUnpkU8, &prbRprtInd->bCellId, mBuf);
1138 CMCHKUNPK(SUnpkU8, &prbRprtInd->bPrbUsageMask, mBuf);
1139 for(idx = 0; idx < RGM_MAX_QCI_REPORTS; idx++)
1141 CMCHKUNPK(cmUnpkRgmPrbQciRpt, &prbRprtInd->stQciPrbRpts[idx], mBuf);
1151 * @brief PRB Usage Report Indication from MAC to RRM
1155 * Function : cmPkRgmPrbRprtInd
1157 * @param[in] Pst* pst
1158 * @param[in] SuId suId
1159 * @param[in] RgmPrbRprtInd * prbRprtInd
1164 PUBLIC S16 cmPkRgmPrbRprtInd
1168 RgmPrbRprtInd * prbRprtInd
1171 PUBLIC S16 cmPkRgmPrbRprtInd(pst, suId, prbRprtInd)
1174 RgmPrbRprtInd * prbRprtInd;
1177 Buffer *mBuf = NULLP;
1179 TRC3(cmPkRgmPrbRprtInd)
1181 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1182 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1186 if(cmPkPrbRprtInd(prbRprtInd, mBuf) != ROK)
1188 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1193 if (SPkS16(suId, mBuf) != ROK)
1195 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1200 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtInd, sizeof(RgmPrbRprtInd));
1202 pst->event = (Event) EVTRGMPRBRPRTIND;
1203 RETVALUE(SPstTsk(pst,mBuf));
1206 * @brief PRB Usage Report Indication from MAC to RRM
1210 * Function : cmUnpkRgmPrbRprtInd
1212 * @param[in] Pst* pst
1213 * @param[in] SuId suId
1214 * @param[in] RgmPrbRprtInd * prbRprtInd
1219 PUBLIC S16 cmUnpkRgmPrbRprtInd
1221 RgmPrbRprtIndFptr func,
1226 PUBLIC S16 cmUnpkRgmPrbRprtInd(func, pst, mBuf)
1227 RgmPrbRprtIndFptr func;
1233 RgmPrbRprtInd prbRprtInd;
1235 TRC3(cmUnpkRgmPrbRprtInd)
1237 if (SUnpkS16(&suId, mBuf) != ROK)
1243 if (cmUnpkPrbRprtInd(&prbRprtInd, mBuf) != ROK)
1250 RETVALUE((*func)(pst, suId, &prbRprtInd));
1254 * @brief Transmission Mode Change Indication from MAC to RRM
1258 * Function : cmPkTransModeInd
1260 * @param[in] RgmTransModeInd *transModeInd
1261 * @param[in] Buffer *mBuf
1266 PUBLIC S16 cmPkTransModeInd
1268 RgmTransModeInd *transModeInd,
1272 PUBLIC S16 cmPkTransModeInd(transModeInd, mBuf)
1273 RgmTransModeInd *transModeInd;
1277 TRC3(cmPkTransModeInd);
1278 CMCHKPK(SPkU32, transModeInd->eMode, mBuf);
1279 CMCHKPK(SPkU16, transModeInd->usCrnti, mBuf);
1280 CMCHKPK(SPkU8, transModeInd->bCellId, mBuf);
1285 * @brief Transmission Mode Change Indication from MAC to RRM
1289 * Function : cmUnpkTransModeInd
1291 * @param[in] RgmTransModeInd *transModeInd
1292 * @param[in] Buffer *mBuf
1297 PUBLIC S16 cmUnpkTransModeInd
1299 RgmTransModeInd *transModeInd,
1303 PUBLIC S16 cmUnpkTransModeInd(transModeInd, mBuf)
1304 RgmTransModeInd *transModeInd;
1309 TRC3(cmUnpkTransModeInd);
1310 CMCHKUNPK(SUnpkU8, &transModeInd->bCellId, mBuf);
1311 CMCHKUNPK(SUnpkU16, &transModeInd->usCrnti, mBuf);
1312 CMCHKUNPK(SUnpkU32, (U32 *)&tmpModeEnum, mBuf);
1313 transModeInd->eMode = (RgmTxnMode)tmpModeEnum;
1317 * @brief Transmission Mode Change Indication from MAC to RRM
1321 * Function : cmPkRgmTransModeInd
1323 * @param[in] Pst* pst
1324 * @param[in] SuId suId
1325 * @param[in] RgmTransModeInd *transModeInd
1330 PUBLIC S16 cmPkRgmTransModeInd
1334 RgmTransModeInd *transModeInd
1337 PUBLIC S16 cmPkRgmTransModeInd(pst, suId, transModeInd)
1340 RgmTransModeInd *transModeInd;
1343 Buffer *mBuf = NULLP;
1345 TRC3(cmPkRgmTransModeInd)
1347 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1348 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1352 if(cmPkTransModeInd(transModeInd, mBuf) != ROK)
1354 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1359 if (SPkS16(suId, mBuf) != ROK)
1361 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1366 SPutSBuf(pst->region, pst->pool, (Data *)transModeInd, sizeof(RgmTransModeInd));
1368 pst->event = (Event) EVTRGMTRANSMODEIND;
1369 RETVALUE(SPstTsk(pst,mBuf));
1372 * @brief Transmission Mode Change Indication from MAC to RRM
1376 * Function : cmUnpkRgmTransModeInd
1378 * @param[in] Pst* pst
1379 * @param[in] SuId suId
1380 * @param[in] RgmTransModeInd *transModeInd
1385 PUBLIC S16 cmUnpkRgmTransModeInd
1387 RgmTransModeIndFptr func,
1392 PUBLIC S16 cmUnpkRgmTransModeInd(func, pst, mBuf)
1393 RgmTransModeIndFptr func;
1399 RgmTransModeInd transModeInd;
1401 TRC3(cmUnpkRgmTransModeInd)
1403 if (SUnpkS16(&suId, mBuf) != ROK)
1409 if (cmUnpkTransModeInd(&transModeInd, mBuf) != ROK)
1416 RETVALUE((*func)(pst, suId, &transModeInd));
1418 /**********************************************************************
1422 **********************************************************************/