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 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code for packing/unpacking of RGU interface
30 **********************************************************************/
33 @brief This file contains the packing/unpacking code for the RGU interface
37 /* header include files (.h) */
38 #include "common_def.h"
39 #include "rgu.h" /* RGU Interface defines */
41 /* header/extern include files (.x) */
42 #include "rgu.x" /* RGU Interface includes */
53 * @brief Request from RLC to MAC to bind the interface saps
57 * Function : cmPkRguBndReq
60 * @param[in] SuId suId
61 * @param[in] SpId spId
73 S16 cmPkRguBndReq(pst, suId, spId)
81 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
82 #if (ERRCLASS & ERRCLS_ADD_RES)
83 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
84 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
85 (ErrVal)ERGU001, (ErrVal)0, "Packing failed");
89 if (SPkS16(spId, mBuf) != ROK) {
90 #if (ERRCLASS & ERRCLS_ADD_RES)
91 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
92 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
93 (ErrVal)ERGU002, (ErrVal)0, "Packing failed");
98 if (SPkS16(suId, mBuf) != ROK) {
99 #if (ERRCLASS & ERRCLS_ADD_RES)
100 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
101 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
102 (ErrVal)ERGU003, (ErrVal)0, "Packing failed");
107 pst->event = (Event) EVTRGUBNDREQ;
108 return (SPstTsk(pst,mBuf));
113 * @brief Request from RLC to MAC to bind the interface saps
117 * Function : cmUnpkRguBndReq
119 * @param[in] Pst* pst
120 * @param[in] SuId suId
121 * @param[in] SpId spId
133 S16 cmUnpkRguBndReq(func, pst, mBuf)
143 if (SUnpkS16(&suId, mBuf) != ROK) {
144 #if (ERRCLASS & ERRCLS_ADD_RES)
145 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
146 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
147 (ErrVal)ERGU004, (ErrVal)0, "UnPacking failed");
152 if (SUnpkS16(&spId, mBuf) != ROK) {
153 #if (ERRCLASS & ERRCLS_ADD_RES)
154 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
155 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
156 (ErrVal)ERGU005, (ErrVal)0, "UnPacking failed");
162 return ((*func)(pst, suId, spId));
167 * @brief Request from RLC to MAC to Unbind the interface saps
171 * Function : cmPkRguUbndReq
173 * @param[in] Pst* pst
174 * @param[in] SpId spId
175 * @param[in] Reason reason
187 S16 cmPkRguUbndReq(pst, spId, reason)
193 Buffer *mBuf = NULLP;
195 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
196 #if (ERRCLASS & ERRCLS_ADD_RES)
197 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
198 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
199 (ErrVal)ERGU006, (ErrVal)0, "Packing failed");
203 if (SPkS16(reason, mBuf) != ROK) {
204 #if (ERRCLASS & ERRCLS_ADD_RES)
205 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
206 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
207 (ErrVal)ERGU007, (ErrVal)0, "Packing failed");
212 if (SPkS16(spId, mBuf) != ROK) {
213 #if (ERRCLASS & ERRCLS_ADD_RES)
214 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
215 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
216 (ErrVal)ERGU008, (ErrVal)0, "Packing failed");
221 pst->event = (Event) EVTRGUUBNDREQ;
222 return (SPstTsk(pst,mBuf));
227 * @brief Request from RLC to MAC to Unbind the interface saps
231 * Function : cmUnpkRguUbndReq
233 * @param[in] Pst* pst
234 * @param[in] SpId spId
235 * @param[in] Reason reason
247 S16 cmUnpkRguUbndReq(func, pst, mBuf)
257 if (SUnpkS16(&spId, mBuf) != ROK) {
258 #if (ERRCLASS & ERRCLS_ADD_RES)
259 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
260 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
261 (ErrVal)ERGU009, (ErrVal)0, "UnPacking failed");
266 if (SUnpkS16(&reason, mBuf) != ROK) {
267 #if (ERRCLASS & ERRCLS_ADD_RES)
268 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
269 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
270 (ErrVal)ERGU010, (ErrVal)0, "UnPacking failed");
276 return ((*func)(pst, spId, reason));
281 * @brief Confirmation from MAC to RLC for the bind/Unbind
282 * request for the interface saps
286 * Function : cmPkRguBndCfm
288 * @param[in] Pst* pst
289 * @param[in] SuId suId
290 * @param[in] U8 status
302 S16 cmPkRguBndCfm(pst, suId, status)
308 Buffer *mBuf = NULLP;
310 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
311 #if (ERRCLASS & ERRCLS_ADD_RES)
312 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
313 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
314 (ErrVal)ERGU011, (ErrVal)0, "Packing failed");
318 if (oduUnpackUInt8(status, mBuf) != ROK) {
319 #if (ERRCLASS & ERRCLS_ADD_RES)
320 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
321 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
322 (ErrVal)ERGU012, (ErrVal)0, "Packing failed");
327 if (SPkS16(suId, mBuf) != ROK) {
328 #if (ERRCLASS & ERRCLS_ADD_RES)
329 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
330 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
331 (ErrVal)ERGU013, (ErrVal)0, "Packing failed");
336 pst->event = (Event) EVTRGUBNDCFM;
337 return (SPstTsk(pst,mBuf));
342 * @brief Confirmation from MAC to RLC for the bind/Unbind
343 * request for the interface saps
347 * Function : cmUnpkRguBndCfm
349 * @param[in] Pst* pst
350 * @param[in] SuId suId
351 * @param[in] U8 status
363 S16 cmUnpkRguBndCfm(func, pst, mBuf)
373 if (SUnpkS16(&suId, mBuf) != ROK) {
374 #if (ERRCLASS & ERRCLS_ADD_RES)
375 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
376 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
377 (ErrVal)ERGU014, (ErrVal)0, "UnPacking failed");
382 if (oduPackUInt8(&status, mBuf) != ROK) {
383 #if (ERRCLASS & ERRCLS_ADD_RES)
384 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
385 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
386 (ErrVal)ERGU015, (ErrVal)0, "UnPacking failed");
392 return ((*func)(pst, suId, status));
395 /*rgu_c_001.main_5 - ADD - L2M & R9 Support */
398 /***********************************************************
400 * Func :cmPkRguL2MUlThrpMeasReqInfo
403 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
404 * Scheduled throughput measurement
413 **********************************************************/
415 S16 cmPkRguL2MUlThrpMeasReqInfo
417 RguL2MUlThrpMeasReqInfo* param,
421 S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf)
422 RguL2MUlThrpMeasReqInfo* param;
428 CMCHKPK(oduUnpackUInt8, param->enbMeas, mBuf);
429 for (loop=param->numLcId-1; loop >= 0; loop--)
431 CMCHKPK(oduUnpackUInt8, param->lcId[loop], mBuf);
433 CMCHKPK(cmPkLteLcId, param->numLcId, mBuf);
434 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
435 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
441 /***********************************************************
443 * Func :cmUnpkRguL2MUlThrpMeasReqInfo
446 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
447 * Scheduled throughput measurement
456 **********************************************************/
458 S16 cmUnpkRguL2MUlThrpMeasReqInfo
460 RguL2MUlThrpMeasReqInfo *param,
464 S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf)
465 RguL2MUlThrpMeasReqInfo *param;
471 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
472 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
473 CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf);
474 for (loop=0; loop<param->numLcId; loop++)
476 CMCHKUNPK(oduPackUInt8, ¶m->lcId[loop], mBuf);
478 CMCHKUNPK(oduPackUInt8, ¶m->enbMeas, mBuf);
483 * @brief Primitive invoked from RLC to MAC to
484 * inform the On/Off status for Scheduled UL throughput
485 * measurment for dedicated channels
489 * Function :cmPkRguL2MUlThrpMeasReq
491 * @param[in] Pst* pst
492 * @param[in] SpId spId
493 * @param[in] RguL2MUlThrpMeasReqInfo* measReq
498 S16 cmPkRguL2MUlThrpMeasReq
502 RguL2MUlThrpMeasReqInfo* measReq
505 S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq)
508 RguL2MUlThrpMeasReqInfo* measReq;
511 Buffer *mBuf = NULLP;
513 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
514 #if (ERRCLASS & ERRCLS_ADD_RES)
515 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
516 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
517 (ErrVal)ERGU049, (ErrVal)0, "Packing failed");
519 SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo));
522 if (pst->selector == ODU_SELECTOR_LWLC)
524 CMCHKPK(oduPackPointer,(PTR) measReq, mBuf);
528 if (cmPkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
529 #if (ERRCLASS & ERRCLS_ADD_RES)
530 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
531 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
532 (ErrVal)ERGU050, (ErrVal)0, "Packing failed");
534 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
535 sizeof(RguL2MUlThrpMeasReqInfo));
539 if (SPutSBuf(pst->region, pst->pool, (Data *)measReq,
540 sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) {
541 #if (ERRCLASS & ERRCLS_ADD_RES)
542 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
543 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
544 (ErrVal)ERGU052, (ErrVal)0, "Packing failed");
552 if (SPkS16(spId, mBuf) != ROK) {
553 #if (ERRCLASS & ERRCLS_ADD_RES)
554 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
555 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
556 (ErrVal)ERGU051, (ErrVal)0, "Packing failed");
558 if (measReq != NULLP)
560 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
561 sizeof(RguL2MUlThrpMeasReqInfo));
567 pst->event = (Event) EVTRGUL2MULTHRPMEASREQ;
568 return (SPstTsk(pst,mBuf));
573 * @brief Primitive invoked from RLC to MAC to
574 * inform the On/Off status for Scheduled UL throughput
575 * measurment for dedicated channels
579 * Function :cmUnpkRguL2MUlThrpMeasReq
581 * @param[in] Pst* pst
582 * @param[in] SpId spId
583 * @param[in] RguL2MUlThrpMeasReqInfo * measReq
588 S16 cmUnpkRguL2MUlThrpMeasReq
590 RguL2MUlThrpMeasReq func,
595 S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf)
596 RguL2MUlThrpMeasReq func;
602 RguL2MUlThrpMeasReqInfo* measReq;
605 if (SUnpkS16(&spId, mBuf) != ROK) {
606 #if (ERRCLASS & ERRCLS_ADD_RES)
607 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
608 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
609 (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed");
614 if (pst->selector == ODU_SELECTOR_LWLC)
616 CMCHKUNPK(oduUnpackPointer,(PTR *) &measReq, mBuf);
620 if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq,
621 sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) {
622 #if (ERRCLASS & ERRCLS_ADD_RES)
623 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
624 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
625 (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed");
630 if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
631 #if (ERRCLASS & ERRCLS_ADD_RES)
632 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
633 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
634 (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed");
637 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
638 sizeof(RguL2MUlThrpMeasReqInfo));
643 return ((*func)(pst, spId, measReq));
649 /*rgu_c_001.main_5 - ADD - L2M Support */
653 * @brief Harq Status Indication from MAC to RLC
657 * Function : cmPkRguHqStaInd
659 * @param[in] Pst* pst
660 * @param[in] SuId suId
661 * @param[in] RguHarqStatusInd *harqStatusInd
670 RguHarqStatusInd *harqStatusInd
673 S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
676 RguHarqStatusInd *harqStatusInd;
682 RguHarqStatusInd *harqStaInd = NULL;
684 #ifdef XEON_SPECIFIC_CHANGES
685 if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
687 if ((SGetStaticBuffer(pst->region, pst->pool,
688 (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
691 #if (ERRCLASS & ERRCLS_ADD_RES)
692 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
693 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
694 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
699 memcpy(harqStaInd, harqStatusInd, sizeof(RguHarqStatusInd));
701 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
702 #if (ERRCLASS & ERRCLS_ADD_RES)
703 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
704 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
705 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
707 #ifdef XEON_SPECIFIC_CHANGES
708 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
710 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
715 if (pst->selector == ODU_SELECTOR_LWLC)
717 CMCHKPK(oduPackPointer,(PTR) harqStaInd, mBuf);
721 for(idx = 0; idx < harqStaInd->numTbs; idx++)
723 CMCHKPK(oduUnpackUInt16, harqStaInd->status[idx], mBuf);
725 for(idx = 0; idx < harqStaInd->numTbs; idx++)
727 CMCHKPK(oduUnpackUInt32, harqStaInd->tbId[idx], mBuf);
729 CMCHKPK(oduUnpackUInt8, harqStaInd->numTbs, mBuf);
730 CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
731 CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
733 if (SPkS16(suId, mBuf) != ROK) {
734 #if (ERRCLASS & ERRCLS_ADD_RES)
735 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
736 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
737 (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
739 #ifdef XEON_SPECIFIC_CHANGES
740 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
741 sizeof(RguHarqStatusInd));
743 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
748 #ifdef XEON_SPECIFIC_CHANGES
749 if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
750 sizeof(RguHarqStatusInd)) != ROK) {
752 if (pst->selector != ODU_SELECTOR_LWLC)
754 if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd,
755 sizeof(RguHarqStatusInd), 0) != ROK)
758 #if (ERRCLASS & ERRCLS_ADD_RES)
759 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
760 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
761 (ErrVal)ERGU072, (ErrVal)0, "Packing failed");
766 #ifndef XEON_SPECIFIC_CHANGES
770 pst->event = (Event) EVTRGUHQSTAIND;
771 return (SPstTsk(pst,mBuf));
776 * @brief Harq Status Indication from MAC to RLC
780 * Function : cmUnpkRguHqStaInd
782 * @param[in] RguHqStaInd func
783 * @param[in] Pst *pst
784 * @param[in] Buffer *mBuf
789 S16 cmUnpkRguHqStaInd
796 S16 cmUnpkRguHqStaInd(func, pst, mBuf)
802 RguHarqStatusInd *hqStaInd;
807 if (SUnpkS16(&suId, mBuf) != ROK) {
808 #if (ERRCLASS & ERRCLS_ADD_RES)
809 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
810 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
811 (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
816 #ifdef XEON_SPECIFIC_CHANGES
817 if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd,
818 sizeof(RguHarqStatusInd))) != ROK) {
820 if (pst->selector == ODU_SELECTOR_LWLC)
822 CMCHKUNPK(oduUnpackPointer,(PTR *) &hqStaInd, mBuf);
826 if ((SGetStaticBuffer(pst->region, pst->pool,
827 (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
830 #if (ERRCLASS & ERRCLS_ADD_RES)
831 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
832 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
833 (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
838 CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
839 CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
840 CMCHKUNPK(oduPackUInt8, &hqStaInd->numTbs, mBuf);
841 for(idx = hqStaInd->numTbs; idx > 0; idx--)
843 CMCHKUNPK(oduPackUInt32, &hqStaInd->tbId[idx - 1], mBuf);
845 for(idx = hqStaInd->numTbs; idx > 0; idx--)
847 CMCHKUNPK(oduPackUInt16, &hqStaInd->status[idx - 1], mBuf);
849 #ifndef XEON_SPECIFIC_CHANGES
853 (*func)(pst, suId, hqStaInd);
854 #ifdef XEON_SPECIFIC_CHANGES
855 SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
857 SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
861 #endif /* LTE_L2_MEAS */
864 S16 cmPkRguLcFlowCntrlInfo
866 RguLcFlowCntrlInfo *param,
870 S16 cmPkRguLcFlowCntrlInfo (param,mBuf)
871 RguLcFlowCntrlInfo *param;
875 CMCHKPK(oduUnpackUInt32, param->maxBo4FlowCtrl, mBuf);
876 CMCHKPK(oduUnpackUInt32, param->pktAdmitCnt, mBuf);
877 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
883 S16 cmPkRguUeFlowCntrlInfo
885 RguUeFlowCntrlInfo *param,
889 S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
890 RguUeFlowCntrlInfo *param;
897 for(idx=(param->numLcs - 1); idx >= 0; idx--)
899 cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
901 CMCHKPK(oduUnpackUInt32, param->numLcs, mBuf);
902 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
907 S16 cmPkRguFlowCntrlInfo
909 RguFlowCntrlInd *param,
913 S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
914 RguFlowCntrlInd *param;
921 for (idx=(param->numUes - 1); idx >= 0; idx--)
923 cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
925 CMCHKPK(oduUnpackUInt32, param->numUes, mBuf);
926 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
931 * @brief Flow Cntrl Indication from MAC to RLC
932 * Informs RLC of the LCs on which flow control
937 * Function : cmPkRguFlowCntrlInd
939 * @param[in] Pst* pst
940 * @param[in] SuId suId
941 * @param[in] RguFlowCntrlInd *staInd
946 S16 cmPkRguFlowCntrlInd
950 RguFlowCntrlInd *flowCntrlInd
953 S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd)
956 RguFlowCntrlInd *flowCntrlInd;
959 Buffer *mBuf = NULLP;
961 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
962 #if (ERRCLASS & ERRCLS_ADD_RES)
963 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
964 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
965 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
969 if (pst->selector == ODU_SELECTOR_LWLC)
971 CMCHKPK(oduPackPointer,(PTR) flowCntrlInd, mBuf);
975 if (cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
976 #if (ERRCLASS & ERRCLS_ADD_RES)
977 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
978 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
979 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
985 if (SPkS16(suId, mBuf) != ROK) {
986 #if (ERRCLASS & ERRCLS_ADD_RES)
987 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
988 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
989 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
995 pst->event = (Event) EVTRGUFLOWCNTRLIND;
996 return (SPstTsk(pst,mBuf));
1000 S16 cmUnpkRguLcFlowCntrlInfo
1002 RguLcFlowCntrlInfo *param,
1006 S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf)
1007 RguLcFlowCntrlInfo *param;
1012 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1013 CMCHKUNPK(oduPackUInt32, ¶m->pktAdmitCnt, mBuf);
1014 CMCHKUNPK(oduPackUInt32, ¶m->maxBo4FlowCtrl, mBuf);
1019 S16 cmUnpkRguUeFlowCntrlInfo
1021 RguUeFlowCntrlInfo *param,
1025 S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
1026 RguUeFlowCntrlInfo *param;
1031 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
1032 CMCHKUNPK(oduPackUInt32, ¶m->numLcs, mBuf);
1033 for(idx=0; idx < param->numLcs; idx++)
1035 cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1041 S16 cmUnpkRguFlowCntrlInfo
1043 RguFlowCntrlInd *param,
1047 S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
1048 RguFlowCntrlInd *param;
1055 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1056 CMCHKUNPK(oduPackUInt32, ¶m->numUes, mBuf);
1057 for (idx=0; idx < param->numUes; idx++)
1059 cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1065 * @brief Flow control indication from MAC to RLC
1066 * Informs RLC of the LCs on which flow control to
1071 * Function : cmUnpkRguFlowCntrlInd
1073 * @param[in] RguFlowCntrlInd func
1074 * @param[in] Pst *pst
1075 * @param[in] Buffer *mBuf
1080 S16 cmUnpkRguFlowCntrlInd
1082 RguFlowCntrlIndInfo func,
1087 S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf)
1088 RguFlowCntrlIndInfo func;
1094 RguFlowCntrlInd *flowCntrlInd;
1097 if (SUnpkS16(&suId, mBuf) != ROK) {
1098 #if (ERRCLASS & ERRCLS_ADD_RES)
1099 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1100 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1101 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1106 if (pst->selector == ODU_SELECTOR_LWLC)
1108 CMCHKUNPK(oduUnpackPointer,(PTR *) &flowCntrlInd, mBuf);
1112 if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) {
1113 #if (ERRCLASS & ERRCLS_ADD_RES)
1114 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1115 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1116 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1121 if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1122 #if (ERRCLASS & ERRCLS_ADD_RES)
1123 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1124 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1125 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1128 SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd));
1133 return ((*func)(pst, suId, flowCntrlInd));
1136 /***********************************************************
1138 * Func : cmPkRguPduInfo
1142 * PDU information given on a logical channel
1151 **********************************************************/
1159 S16 cmPkRguPduInfo(param, mBuf)
1167 for (i=param->numPdu-1; i >= 0; i--) {
1168 /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */
1170 if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK)
1172 if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
1174 SPutMsg(param->mBuf[i]);
1175 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1177 CMCHKPK(oduUnpackUInt8, param->numPdu, mBuf);
1183 /***********************************************************
1185 * Func : cmUnpkRguPduInfo
1189 * PDU information given on a logical channel
1198 **********************************************************/
1200 S16 cmUnpkRguPduInfo
1206 S16 cmUnpkRguPduInfo(param, mBuf)
1214 CMCHKUNPK(oduPackUInt8, ¶m->numPdu, mBuf);
1215 for (i=0; i<param->numPdu; i++) {
1216 MsgLen msgLen, totalMsgLen;
1217 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1218 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1220 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
1228 /***********************************************************
1230 * Func : cmPkRguDBoReport
1233 * Desc : RguDBoReport
1234 * Buffer Occupancy Report for dedicated logical channel
1243 **********************************************************/
1245 S16 cmPkRguDBoReport
1247 RguDBoReport *param,
1251 S16 cmPkRguDBoReport(param, mBuf)
1252 RguDBoReport *param;
1258 CMCHKPK(oduUnpackUInt32, param->oldestSduArrTime, mBuf);
1259 CMCHKPK(oduUnpackUInt32, param->staPduBo, mBuf);
1261 CMCHKPK(oduUnpackUInt8, param->staPduPrsnt, mBuf);
1262 CMCHKPK(oduUnpackUInt16, param->estRlcHdrSz, mBuf);
1264 CMCHKPK(SPkS32, param->bo, mBuf);
1270 /***********************************************************
1272 * Func : cmUnpkRguDBoReport
1275 * Desc : RguDBoReport
1276 * Buffer Occupancy Report for dedicated logical channel
1285 **********************************************************/
1287 S16 cmUnpkRguDBoReport
1289 RguDBoReport *param,
1293 S16 cmUnpkRguDBoReport(param, mBuf)
1294 RguDBoReport *param;
1300 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
1302 CMCHKUNPK(oduPackUInt16, ¶m->estRlcHdrSz, mBuf);
1303 CMCHKUNPK(oduPackUInt8, ¶m->staPduPrsnt, mBuf);
1306 CMCHKUNPK(oduPackUInt32, ¶m->staPduBo, mBuf);
1307 CMCHKUNPK(oduPackUInt32, ¶m->oldestSduArrTime, mBuf);
1312 /***********************************************************
1314 * Func : cmPkRguCDatReqInfo
1317 * Desc : RguCDatReqInfo
1318 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
1327 **********************************************************/
1329 S16 cmPkRguCDatReqInfo
1331 RguCDatReqInfo *param,
1335 S16 cmPkRguCDatReqInfo(param, mBuf)
1336 RguCDatReqInfo *param;
1343 if (param->pdu != NULLP)
1345 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
1347 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
1349 SPutMsg(param->pdu);
1350 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1352 switch(param->lcType) {
1353 case CM_LTE_LCH_CCCH:
1354 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
1356 case CM_LTE_LCH_BCCH:
1357 case CM_LTE_LCH_PCCH:
1358 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
1360 CMCHKPK(oduUnpackUInt8,param->pnb,mBuf);
1366 CMCHKPK(oduUnpackUInt32, param->transId, mBuf);
1367 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
1368 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1369 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1375 /***********************************************************
1377 * Func : cmUnpkRguCDatReqInfo
1380 * Desc : RguCDatReqInfo
1381 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
1390 **********************************************************/
1392 S16 cmUnpkRguCDatReqInfo
1394 RguCDatReqInfo *param,
1398 S16 cmUnpkRguCDatReqInfo(param, mBuf)
1399 RguCDatReqInfo *param;
1403 MsgLen msgLen, totalMsgLen;
1406 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1407 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1408 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
1409 CMCHKUNPK(oduPackUInt32, ¶m->transId, mBuf);
1410 switch(param->lcType) {
1411 case CM_LTE_LCH_BCCH:
1412 case CM_LTE_LCH_PCCH:
1414 CMCHKUNPK(oduPackUInt8,¶m->pnb, mBuf);
1416 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
1418 case CM_LTE_LCH_CCCH:
1419 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
1424 SFndLenMsg(mBuf, &msgLen);
1427 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1428 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1430 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
1438 /***********************************************************
1440 * Func : cmPkRguLchDatReq
1443 * Desc : RguLchDatReq
1444 * DatReq Information of a logical channel
1453 **********************************************************/
1455 S16 cmPkRguLchDatReq
1457 RguLchDatReq *param,
1461 S16 cmPkRguLchDatReq(param, mBuf)
1462 RguLchDatReq *param;
1469 CMCHKPK(oduUnpackUInt8, param->freeBuff, mBuf);
1471 CMCHKPK(oduUnpackUInt8, param->setMaxUlPrio, mBuf);
1472 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
1473 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
1474 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1480 /***********************************************************
1482 * Func : cmUnpkRguLchDatReq
1485 * Desc : RguLchDatReq
1486 * DatReq Information of a logical channel
1495 **********************************************************/
1497 S16 cmUnpkRguLchDatReq
1499 RguLchDatReq *param,
1503 S16 cmUnpkRguLchDatReq(param, mBuf)
1504 RguLchDatReq *param;
1510 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1511 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
1512 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
1513 CMCHKUNPK(oduPackUInt8, ¶m->setMaxUlPrio, mBuf);
1515 CMCHKUNPK(oduPackUInt8, ¶m->freeBuff, mBuf);
1521 /***********************************************************
1523 * Func : cmPkRguDatReqTb
1526 * Desc : RguDatReqTb
1527 * DatReq from RLC to MAC for dedicated channels of a UE
1536 **********************************************************/
1544 S16 cmPkRguDatReqTb(param, mBuf)
1551 /*rgu_c_001.main_5 - ADD - L2M Support */
1553 CMCHKPK(oduUnpackUInt32, param->tbId, mBuf);
1555 for (i=param->nmbLch-1; i >= 0; i--) {
1556 CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf);
1558 CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
1564 /***********************************************************
1566 * Func : cmUnpkRguDatReqTb
1569 * Desc : RguDatReqTb
1570 * DatReq from RLC to MAC for dedicated channels of a UE
1579 **********************************************************/
1582 S16 cmUnpkRguDatReqTb
1589 S16 cmUnpkRguDatReqTb(pst, param, mBuf)
1596 S16 cmUnpkRguDatReqTb
1602 S16 cmUnpkRguDatReqTb(param, mBuf)
1611 CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf);
1612 for (i=0; i<param->nmbLch; i++) {
1613 CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf);
1615 /*rgu_c_001.main_5 - ADD - L2M Support */
1617 CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf);
1623 /***********************************************************
1625 * Func : cmPkRguDDatReqInfo
1628 * Desc : RguDDatReqInfo
1629 * DatReq from RLC to MAC for dedicated channels of a UE
1638 **********************************************************/
1639 /*rgu_c_001.main_5 - ADD - L2M Support */
1642 S16 cmPkRguDDatReqInfo
1645 RguDDatReqInfo *param,
1649 S16 cmPkRguDDatReqInfo(pst, param, mBuf)
1651 RguDDatReqInfo *param;
1656 S16 cmPkRguDDatReqInfo
1658 RguDDatReqInfo *param,
1662 S16 cmPkRguDDatReqInfo(param, mBuf)
1663 RguDDatReqInfo *param;
1672 for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--)
1674 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
1675 for (i=RGU_MAX_TB-1; i >= 0; i--)
1677 CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf);
1679 CMCHKPK(oduUnpackUInt8, datReq->nmbOfTbs, mBuf);
1680 CMCHKPK(oduUnpackUInt32, datReq->transId, mBuf);
1681 CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf);
1683 CMCHKPK(oduUnpackUInt8, param->nmbOfUeGrantPerTti, mBuf);
1684 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1690 /***********************************************************
1692 * Func : cmUnpkRguDDatReqInfo
1695 * Desc : RguDDatReqInfo
1696 * DatReq from RLC to MAC for dedicated channels of a UE
1705 **********************************************************/
1708 S16 cmUnpkRguDDatReqInfo
1711 RguDDatReqInfo *param,
1715 S16 cmUnpkRguDDatReqInfo(pst, param, mBuf)
1717 RguDDatReqInfo *param;
1722 S16 cmUnpkRguDDatReqInfo
1724 RguDDatReqInfo *param,
1728 S16 cmUnpkRguDDatReqInfo(param, mBuf)
1729 RguDDatReqInfo *param;
1735 /* After Merging from 2.1 to 2.2 */
1736 /*rgu_c_001.main_5 - ADD - L2M Support */
1743 /* After Merging from 2.1 to 2.2 */
1744 /*rgu_c_001.main_5 - ADD - L2M Support */
1748 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1749 CMCHKUNPK(oduPackUInt8, ¶m->nmbOfUeGrantPerTti, mBuf);
1750 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
1752 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
1753 CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf);
1754 CMCHKUNPK(oduPackUInt32, &datReq->transId, mBuf);
1755 CMCHKUNPK(oduPackUInt8, &datReq->nmbOfTbs, mBuf);
1756 /* rgu_c_001.main_4 - Changes for MIMO feature addition */
1757 for (i=0; i<RGU_MAX_TB; i++)
1759 /*rgu_c_001.main_5 - ADD - L2M Support */
1761 /* After Merging from 2.1 to 2.2 */
1762 retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf);
1768 CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf);
1777 /***********************************************************
1779 * Func : cmPkRguCDatIndInfo
1782 * Desc : RguCDatIndInfo
1783 * DatInd from MAC to RLC on CCCH
1792 **********************************************************/
1794 S16 cmPkRguCDatIndInfo
1796 RguCDatIndInfo *param,
1800 S16 cmPkRguCDatIndInfo(param, mBuf)
1801 RguCDatIndInfo *param;
1808 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
1810 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
1812 SPutMsg(param->pdu);
1813 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1814 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1815 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
1816 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1822 /***********************************************************
1824 * Func : cmUnpkRguCDatIndInfo
1827 * Desc : RguCDatIndInfo
1828 * DatInd from MAC to RLC on CCCH
1837 **********************************************************/
1839 S16 cmUnpkRguCDatIndInfo
1841 RguCDatIndInfo *param,
1845 S16 cmUnpkRguCDatIndInfo(param, mBuf)
1846 RguCDatIndInfo *param;
1850 MsgLen msgLen, totalMsgLen;
1853 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1854 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
1855 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1856 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1857 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1859 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
1866 /***********************************************************
1868 * Func : cmPkRguLchDatInd
1871 * Desc : RguLchDatInd
1872 * DatInd Information for a logical channel
1881 **********************************************************/
1883 S16 cmPkRguLchDatInd
1885 RguLchDatInd *param,
1889 S16 cmPkRguLchDatInd(param, mBuf)
1890 RguLchDatInd *param;
1895 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
1896 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1902 /***********************************************************
1904 * Func : cmUnpkRguLchDatInd
1907 * Desc : RguLchDatInd
1908 * DatInd Information for a logical channel
1917 **********************************************************/
1919 S16 cmUnpkRguLchDatInd
1921 RguLchDatInd *param,
1925 S16 cmUnpkRguLchDatInd(param, mBuf)
1926 RguLchDatInd *param;
1931 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1932 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
1937 /***********************************************************
1939 * Func : cmPkRguCStaRspInfo
1942 * Desc : RguCStaRspInfo
1943 * Status Response from RLC to MAC for common logical channel
1952 **********************************************************/
1954 S16 cmPkRguCStaRspInfo
1956 RguCStaRspInfo *param,
1960 S16 cmPkRguCStaRspInfo(param, mBuf)
1961 RguCStaRspInfo *param;
1967 switch(param->lcType) {
1968 case CM_LTE_LCH_CCCH:
1969 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
1971 case CM_LTE_LCH_BCCH:
1972 case CM_LTE_LCH_PCCH:
1973 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
1975 CMCHKPK(oduUnpackUInt8,param->pnb,mBuf);
1976 CMCHKPK(oduUnpackUInt8,param->emtcDiReason,mBuf);
1982 CMCHKPK(SPkS32, param->bo, mBuf);
1983 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
1984 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1985 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1991 /***********************************************************
1993 * Func : cmUnpkRguCStaRspInfo
1996 * Desc : RguCStaRspInfo
1997 * Status Response from RLC to MAC for common logical channel
2006 **********************************************************/
2008 S16 cmUnpkRguCStaRspInfo
2010 RguCStaRspInfo *param,
2014 S16 cmUnpkRguCStaRspInfo(param, mBuf)
2015 RguCStaRspInfo *param;
2021 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2022 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2023 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2024 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2025 switch(param->lcType) {
2026 case CM_LTE_LCH_BCCH:
2027 case CM_LTE_LCH_PCCH:
2029 CMCHKUNPK(oduPackUInt8,¶m->emtcDiReason , mBuf);
2030 CMCHKUNPK(oduPackUInt8,¶m->pnb , mBuf);
2032 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2034 case CM_LTE_LCH_CCCH:
2035 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2044 /***********************************************************
2046 * Func : cmPkRguLchStaInd
2049 * Desc : RguLchStaInd
2050 * StaInd info for each logical channel of a UE
2059 **********************************************************/
2061 S16 cmPkRguLchStaInd
2063 RguLchStaInd *param,
2067 S16 cmPkRguLchStaInd(param, mBuf)
2068 RguLchStaInd *param;
2074 CMCHKPK(SPkS16, param->totBufSize, mBuf);
2075 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2081 /***********************************************************
2083 * Func : cmUnpkRguLchStaInd
2086 * Desc : RguLchStaInd
2087 * StaInd info for each logical channel of a UE
2096 **********************************************************/
2098 S16 cmUnpkRguLchStaInd
2100 RguLchStaInd *param,
2104 S16 cmUnpkRguLchStaInd(param, mBuf)
2105 RguLchStaInd *param;
2111 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2112 CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf);
2117 /***********************************************************
2119 * Func : cmPkRguStaIndTb
2122 * Desc : RguStaIndTb
2123 * StaInd from RLC to MAC for dedicated channels of a UE
2132 **********************************************************/
2140 S16 cmPkRguStaIndTb(param, mBuf)
2149 CMCHKPK(oduUnpackUInt16, param->status, mBuf);
2150 CMCHKPK(oduUnpackUInt32, param->tbId, mBuf);
2152 for (i=param->nmbLch-1; i >= 0; i--) {
2153 CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
2155 CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
2161 /***********************************************************
2163 * Func : cmUnpkRguStaIndTb
2166 * Desc : RguStaIndTb
2167 * StaInd from RLC to MAC for dedicated channels of a UE
2176 **********************************************************/
2178 S16 cmUnpkRguStaIndTb
2184 S16 cmUnpkRguStaIndTb(param, mBuf)
2191 CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf);
2192 for (i=0; i<param->nmbLch; i++) {
2193 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
2196 CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf);
2197 CMCHKUNPK(oduPackUInt16, ¶m->status, mBuf);
2204 /**********************************************************************
2206 **********************************************************************/