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
66 PUBLIC S16 cmPkRguBndReq
73 PUBLIC S16 cmPkRguBndReq(pst, suId, spId)
82 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
83 #if (ERRCLASS & ERRCLS_ADD_RES)
84 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
85 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
86 (ErrVal)ERGU001, (ErrVal)0, "Packing failed");
90 if (SPkS16(spId, mBuf) != ROK) {
91 #if (ERRCLASS & ERRCLS_ADD_RES)
92 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
93 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
94 (ErrVal)ERGU002, (ErrVal)0, "Packing failed");
99 if (SPkS16(suId, mBuf) != ROK) {
100 #if (ERRCLASS & ERRCLS_ADD_RES)
101 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
102 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
103 (ErrVal)ERGU003, (ErrVal)0, "Packing failed");
108 pst->event = (Event) EVTRGUBNDREQ;
109 return (SPstTsk(pst,mBuf));
114 * @brief Request from RLC to MAC to bind the interface saps
118 * Function : cmUnpkRguBndReq
120 * @param[in] Pst* pst
121 * @param[in] SuId suId
122 * @param[in] SpId spId
127 PUBLIC S16 cmUnpkRguBndReq
134 PUBLIC S16 cmUnpkRguBndReq(func, pst, mBuf)
143 TRC3(cmUnpkRguBndReq)
145 if (SUnpkS16(&suId, mBuf) != ROK) {
146 #if (ERRCLASS & ERRCLS_ADD_RES)
147 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
148 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
149 (ErrVal)ERGU004, (ErrVal)0, "UnPacking failed");
154 if (SUnpkS16(&spId, mBuf) != ROK) {
155 #if (ERRCLASS & ERRCLS_ADD_RES)
156 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
157 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
158 (ErrVal)ERGU005, (ErrVal)0, "UnPacking failed");
164 return ((*func)(pst, suId, spId));
169 * @brief Request from RLC to MAC to Unbind the interface saps
173 * Function : cmPkRguUbndReq
175 * @param[in] Pst* pst
176 * @param[in] SpId spId
177 * @param[in] Reason reason
182 PUBLIC S16 cmPkRguUbndReq
189 PUBLIC S16 cmPkRguUbndReq(pst, spId, reason)
195 Buffer *mBuf = NULLP;
198 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
199 #if (ERRCLASS & ERRCLS_ADD_RES)
200 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
201 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
202 (ErrVal)ERGU006, (ErrVal)0, "Packing failed");
206 if (SPkS16(reason, mBuf) != ROK) {
207 #if (ERRCLASS & ERRCLS_ADD_RES)
208 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
209 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
210 (ErrVal)ERGU007, (ErrVal)0, "Packing failed");
215 if (SPkS16(spId, mBuf) != ROK) {
216 #if (ERRCLASS & ERRCLS_ADD_RES)
217 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
218 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
219 (ErrVal)ERGU008, (ErrVal)0, "Packing failed");
224 pst->event = (Event) EVTRGUUBNDREQ;
225 return (SPstTsk(pst,mBuf));
230 * @brief Request from RLC to MAC to Unbind the interface saps
234 * Function : cmUnpkRguUbndReq
236 * @param[in] Pst* pst
237 * @param[in] SpId spId
238 * @param[in] Reason reason
243 PUBLIC S16 cmUnpkRguUbndReq
250 PUBLIC S16 cmUnpkRguUbndReq(func, pst, mBuf)
259 TRC3(cmUnpkRguUbndReq)
261 if (SUnpkS16(&spId, mBuf) != ROK) {
262 #if (ERRCLASS & ERRCLS_ADD_RES)
263 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
264 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
265 (ErrVal)ERGU009, (ErrVal)0, "UnPacking failed");
270 if (SUnpkS16(&reason, mBuf) != ROK) {
271 #if (ERRCLASS & ERRCLS_ADD_RES)
272 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
273 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
274 (ErrVal)ERGU010, (ErrVal)0, "UnPacking failed");
280 return ((*func)(pst, spId, reason));
285 * @brief Confirmation from MAC to RLC for the bind/Unbind
286 * request for the interface saps
290 * Function : cmPkRguBndCfm
292 * @param[in] Pst* pst
293 * @param[in] SuId suId
294 * @param[in] U8 status
299 PUBLIC S16 cmPkRguBndCfm
306 PUBLIC S16 cmPkRguBndCfm(pst, suId, status)
312 Buffer *mBuf = NULLP;
315 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
316 #if (ERRCLASS & ERRCLS_ADD_RES)
317 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
318 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
319 (ErrVal)ERGU011, (ErrVal)0, "Packing failed");
323 if (oduUnpackUInt8(status, mBuf) != ROK) {
324 #if (ERRCLASS & ERRCLS_ADD_RES)
325 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
326 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
327 (ErrVal)ERGU012, (ErrVal)0, "Packing failed");
332 if (SPkS16(suId, mBuf) != ROK) {
333 #if (ERRCLASS & ERRCLS_ADD_RES)
334 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
335 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
336 (ErrVal)ERGU013, (ErrVal)0, "Packing failed");
341 pst->event = (Event) EVTRGUBNDCFM;
342 return (SPstTsk(pst,mBuf));
347 * @brief Confirmation from MAC to RLC for the bind/Unbind
348 * request for the interface saps
352 * Function : cmUnpkRguBndCfm
354 * @param[in] Pst* pst
355 * @param[in] SuId suId
356 * @param[in] U8 status
361 PUBLIC S16 cmUnpkRguBndCfm
368 PUBLIC S16 cmUnpkRguBndCfm(func, pst, mBuf)
377 TRC3(cmUnpkRguBndCfm)
379 if (SUnpkS16(&suId, mBuf) != ROK) {
380 #if (ERRCLASS & ERRCLS_ADD_RES)
381 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
382 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
383 (ErrVal)ERGU014, (ErrVal)0, "UnPacking failed");
388 if (oduPackUInt8(&status, mBuf) != ROK) {
389 #if (ERRCLASS & ERRCLS_ADD_RES)
390 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
391 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
392 (ErrVal)ERGU015, (ErrVal)0, "UnPacking failed");
398 return ((*func)(pst, suId, status));
403 * @brief Request from RLC to MAC for forwarding SDUs on
404 * dedicated channel for transmission
408 * Function : packDlData
410 * @param[in] Pst* pst
411 * @param[in] SpId spId
412 * @param[in] RguDDatReqInfo * datReq
416 PUBLIC uint16_t packDlData
423 Buffer *mBuf = NULLP;
426 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
427 #if (ERRCLASS & ERRCLS_ADD_RES)
428 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
429 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
430 (ErrVal)ERGU022, (ErrVal)0, "Packing failed");
432 SPutSBuf(pst->region, pst->pool, (Data *)dlData, sizeof(RlcMacData));
436 if (pst->selector == ODU_SELECTOR_LWLC)
438 CMCHKPK(oduPackPointer,(PTR) dlData, mBuf);
442 /*rgu_c_001.main_5 - ADD - L2M Support */
444 if (packRlcMacDataInfo(pst, dlData, mBuf) != ROK)
446 if (packRlcMacDataInfo(dlData, mBuf) != ROK)
449 #if (ERRCLASS & ERRCLS_ADD_RES)
450 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
451 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
452 (ErrVal)ERGU023, (ErrVal)0, "Packing failed");
454 SPutSBuf(pst->region, pst->pool, (Data *)dlData,
460 if (SPutSBuf(pst->region, pst->pool,
461 (Data *)dlData, sizeof(RlcMacData)) != ROK) {
462 #if (ERRCLASS & ERRCLS_ADD_RES)
463 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
464 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
465 (ErrVal)ERGU025, (ErrVal)0, "Packing failed");
472 if (SPkS16(spId, mBuf) != ROK) {
473 #if (ERRCLASS & ERRCLS_ADD_RES)
474 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
475 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
476 (ErrVal)ERGU024, (ErrVal)0, "Packing failed");
480 SPutSBuf(pst->region, pst->pool,
481 (Data *)dlData, sizeof(RlcMacData));
486 pst->event = (Event) EVTRLCDLDAT;
487 return (SPstTsk(pst,mBuf));
492 * @brief Request from RLC to MAC for forwarding SDUs on
493 * dedicated channel for transmission
497 * Function : unpackDlData
499 * @param[in] Pst* pst
500 * @param[in] SpId spId
501 * @param[in] RguDDatReqInfo * datReq
505 PUBLIC S16 unpackDlData
517 if (SUnpkS16(&spId, mBuf) != ROK) {
522 if (pst->selector == ODU_SELECTOR_LWLC)
524 CMCHKUNPK(oduUnpackPointer,(PTR *) &dlData, mBuf);
528 if ((SGetSBuf(pst->region, pst->pool,
529 (Data **)&dlData, sizeof(RlcMacData))) != ROK) {
530 #if (ERRCLASS & ERRCLS_ADD_RES)
531 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
532 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
533 (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed");
538 cmMemset((U8*)dlData, (U8)0, sizeof(RlcMacData));
539 /*rgu_c_001.main_5 - ADD - L2M Support */
541 if (unpackRlcMacDataInfo(pst,dlData, mBuf) != ROK)
543 if (unpackRlcMacDataInfo(dlData, mBuf) != ROK)
546 #if (ERRCLASS & ERRCLS_ADD_RES)
547 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
548 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
549 (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed");
552 SPutSBuf(pst->region, pst->pool, (Data *)dlData,
559 /* TODO : change function call to send RlcMacData as below: */
560 return ((*func)(pst, spId, dlData));
562 //return ((*func)(pst, spId, datReq));
567 * @brief Data Indication from MAC to RLC to
568 * forward the data received for dedicated channels
572 * Function : packRcvdUlData
574 * @param[in] Pst* pst
575 * @param[in] SuId suId
576 * @param[in] RlcMacData *ulData
580 uint8_t packRlcUlData(Pst* pst, RlcMacData *ulData)
582 Buffer *mBuf = NULLP;
584 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
585 #if (ERRCLASS & ERRCLS_ADD_RES)
586 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
587 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
588 (ErrVal)ERGU035, (ErrVal)0, "Packing failed");
590 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
594 if (pst->selector == ODU_SELECTOR_LWLC)
596 CMCHKPK(oduPackPointer,(PTR)ulData, mBuf);
600 if (packRlcMacDataInfo(ulData, mBuf) != ROK) {
601 #if (ERRCLASS & ERRCLS_ADD_RES)
602 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
603 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
604 (ErrVal)ERGU036, (ErrVal)0, "Packing failed");
606 SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
611 if (SPutStaticBuffer(pst->region, pst->pool,
612 (Data *)ulData, sizeof(RlcMacData),0) != ROK) {
613 #if (ERRCLASS & ERRCLS_ADD_RES)
614 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
615 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
616 (ErrVal)ERGU038, (ErrVal)0, "Packing failed");
623 pst->event = (Event) EVTRLCULDAT;
624 return (SPstTsk(pst,mBuf));
629 * @brief Data Indication from MAC to RLC to
630 * forward the data received for dedicated channels
634 * Function : unpackRcvdUlData
636 * @param[in] Pst* pst
637 * @param[in] SuId suId
638 * @param[in] RlcMacData *ulData
642 uint8_t unpackRcvdUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf)
646 TRC3(unpackRcvdUlData)
648 if (pst->selector == ODU_SELECTOR_LWLC)
650 CMCHKUNPK(oduUnpackPointer,(PTR *) &ulData, mBuf);
654 if ((SGetStaticBuffer(pst->region, pst->pool,
655 (Data **)&ulData, sizeof(RlcMacData),0)) != ROK) {
656 #if (ERRCLASS & ERRCLS_ADD_RES)
657 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
658 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
659 (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed");
664 if (unpackRlcMacDataInfo(ulData, mBuf) != ROK) {
665 #if (ERRCLASS & ERRCLS_ADD_RES)
666 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
667 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
668 (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed");
671 SPutStaticBuffer(pst->region, pst->pool,
672 (Data *)ulData, sizeof(RlcMacData),0);
677 return ((*func)(pst, ulData));
681 /*rgu_c_001.main_5 - ADD - L2M & R9 Support */
684 /***********************************************************
686 * Func :cmPkRguL2MUlThrpMeasReqInfo
689 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
690 * Scheduled throughput measurement
699 **********************************************************/
701 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo
703 RguL2MUlThrpMeasReqInfo* param,
707 PUBLIC S16 cmPkRguL2MUlThrpMeasReqInfo(param, mBuf)
708 RguL2MUlThrpMeasReqInfo* param;
713 TRC3(cmPkRguL2MUlThrpMeasReqInfo);
715 CMCHKPK(oduUnpackUInt8, param->enbMeas, mBuf);
716 for (loop=param->numLcId-1; loop >= 0; loop--)
718 CMCHKPK(oduUnpackUInt8, param->lcId[loop], mBuf);
720 CMCHKPK(cmPkLteLcId, param->numLcId, mBuf);
721 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
722 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
728 /***********************************************************
730 * Func :cmUnpkRguL2MUlThrpMeasReqInfo
733 * Status Response from RLC to MAC on UL dedicated logical channel for Uplink
734 * Scheduled throughput measurement
743 **********************************************************/
745 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo
747 RguL2MUlThrpMeasReqInfo *param,
751 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReqInfo(param, mBuf)
752 RguL2MUlThrpMeasReqInfo *param;
757 TRC3(cmUnpkRguL2MUlThrpMeasReqInfo);
759 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
760 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
761 CMCHKUNPK(cmUnpkLteLcId, ¶m->numLcId, mBuf);
762 for (loop=0; loop<param->numLcId; loop++)
764 CMCHKUNPK(oduPackUInt8, ¶m->lcId[loop], mBuf);
766 CMCHKUNPK(oduPackUInt8, ¶m->enbMeas, mBuf);
771 * @brief Primitive invoked from RLC to MAC to
772 * inform the On/Off status for Scheduled UL throughput
773 * measurment for dedicated channels
777 * Function :cmPkRguL2MUlThrpMeasReq
779 * @param[in] Pst* pst
780 * @param[in] SpId spId
781 * @param[in] RguL2MUlThrpMeasReqInfo* measReq
786 PUBLIC S16 cmPkRguL2MUlThrpMeasReq
790 RguL2MUlThrpMeasReqInfo* measReq
793 PUBLIC S16 cmPkRguL2MUlThrpMeasReq(pst, spId, measReq)
796 RguL2MUlThrpMeasReqInfo* measReq;
799 Buffer *mBuf = NULLP;
800 TRC3(cmPkRguL2MUlThrpMeasReq)
802 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
803 #if (ERRCLASS & ERRCLS_ADD_RES)
804 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
805 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
806 (ErrVal)ERGU049, (ErrVal)0, "Packing failed");
808 SPutSBuf(pst->region, pst->pool, (Data *)measReq, sizeof(RguL2MUlThrpMeasReqInfo));
811 if (pst->selector == ODU_SELECTOR_LWLC)
813 CMCHKPK(oduPackPointer,(PTR) measReq, mBuf);
817 if (cmPkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
818 #if (ERRCLASS & ERRCLS_ADD_RES)
819 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
820 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
821 (ErrVal)ERGU050, (ErrVal)0, "Packing failed");
823 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
824 sizeof(RguL2MUlThrpMeasReqInfo));
828 if (SPutSBuf(pst->region, pst->pool, (Data *)measReq,
829 sizeof(RguL2MUlThrpMeasReqInfo)) != ROK) {
830 #if (ERRCLASS & ERRCLS_ADD_RES)
831 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
832 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
833 (ErrVal)ERGU052, (ErrVal)0, "Packing failed");
841 if (SPkS16(spId, mBuf) != ROK) {
842 #if (ERRCLASS & ERRCLS_ADD_RES)
843 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
844 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
845 (ErrVal)ERGU051, (ErrVal)0, "Packing failed");
847 if (measReq != NULLP)
849 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
850 sizeof(RguL2MUlThrpMeasReqInfo));
856 pst->event = (Event) EVTRGUL2MULTHRPMEASREQ;
857 return (SPstTsk(pst,mBuf));
862 * @brief Primitive invoked from RLC to MAC to
863 * inform the On/Off status for Scheduled UL throughput
864 * measurment for dedicated channels
868 * Function :cmUnpkRguL2MUlThrpMeasReq
870 * @param[in] Pst* pst
871 * @param[in] SpId spId
872 * @param[in] RguL2MUlThrpMeasReqInfo * measReq
877 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq
879 RguL2MUlThrpMeasReq func,
884 PUBLIC S16 cmUnpkRguL2MUlThrpMeasReq(func, pst, mBuf)
885 RguL2MUlThrpMeasReq func;
891 RguL2MUlThrpMeasReqInfo* measReq;
893 TRC3(cmUnpkRguL2MUlThrpMeasReq)
895 if (SUnpkS16(&spId, mBuf) != ROK) {
896 #if (ERRCLASS & ERRCLS_ADD_RES)
897 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
898 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
899 (ErrVal)ERGU053, (ErrVal)0, "UnPacking failed");
904 if (pst->selector == ODU_SELECTOR_LWLC)
906 CMCHKUNPK(oduUnpackPointer,(PTR *) &measReq, mBuf);
910 if ((SGetSBuf(pst->region, pst->pool, (Data **)&measReq,
911 sizeof(RguL2MUlThrpMeasReqInfo))) != ROK) {
912 #if (ERRCLASS & ERRCLS_ADD_RES)
913 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
914 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
915 (ErrVal)ERGU054, (ErrVal)0, "UnPacking failed");
920 if (cmUnpkRguL2MUlThrpMeasReqInfo(measReq, mBuf) != ROK) {
921 #if (ERRCLASS & ERRCLS_ADD_RES)
922 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
923 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
924 (ErrVal)ERGU055, (ErrVal)0, "UnPacking failed");
927 SPutSBuf(pst->region, pst->pool, (Data *)measReq,
928 sizeof(RguL2MUlThrpMeasReqInfo));
933 return ((*func)(pst, spId, measReq));
942 * @brief Primitive invoked from RLC to MAC to
943 * inform the BO report for dedicated channels
947 * Function : packBOStatus,
949 * @param[in] Pst* pst
950 * @param[in] SpId spId
951 * @param[in] RlcMacBOStatus * staRsp
955 PUBLIC uint16_t packBOStatus
959 RlcMacBOStatus *boStatus
962 RlcMacBOStatus *boStaInfo = NULL;
963 Buffer *mBuf = NULLP;
965 if(SGetSBuf(pst->region, pst->pool, (Data **)&boStaInfo, sizeof(RlcMacBOStatus)) != ROK)
967 #if (ERRCLASS & ERRCLS_ADD_RES)
968 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
969 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
970 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
975 /* boStaInfo cant be NULL here */
976 if (boStaInfo == NULLP)
981 cmMemcpy((U8 *)boStaInfo, (U8 *)boStatus, sizeof(RlcMacBOStatus));
982 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
983 #if (ERRCLASS & ERRCLS_ADD_RES)
984 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
985 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
986 (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
988 SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
992 if (pst->selector == ODU_SELECTOR_LWLC)
994 CMCHKPK(oduPackPointer,(PTR) boStaInfo, mBuf);
998 if (packBOStatusInfo(boStatus, mBuf) != ROK) {
999 #if (ERRCLASS & ERRCLS_ADD_RES)
1000 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1001 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1002 (ErrVal)ERGU057, (ErrVal)0, "Packing failed");
1008 if (SPkS16(spId, mBuf) != ROK) {
1009 #if (ERRCLASS & ERRCLS_ADD_RES)
1010 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1011 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1012 (ErrVal)ERGU058, (ErrVal)0, "Packing failed");
1014 if (boStaInfo != NULLP)
1016 SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
1022 pst->event = (Event)EVTRLCBOSTA;
1023 return (SPstTsk(pst,mBuf));
1029 * @brief Primitive invoked from RLC to MAC to
1030 * inform the BO report for dedicated channels
1034 * Function : unpackBOStatus
1036 * @param[in] Pst* pst
1037 * @param[in] SpId spId
1038 * @param[in] RlcMacBOStatus * staRsp
1042 PUBLIC uint16_t unpackBOStatus
1044 RlcMacBoStatus func,
1050 RlcMacBOStatus *boSta;
1052 TRC3(unpackBOStatus)
1054 if (SUnpkS16(&spId, mBuf) != ROK) {
1055 #if (ERRCLASS & ERRCLS_ADD_RES)
1056 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1057 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1058 (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed");
1064 if (pst->selector == ODU_SELECTOR_LWLC)
1066 CMCHKUNPK(oduUnpackPointer,(PTR *) &boSta, mBuf);
1070 if ((SGetSBuf(pst->region, pst->pool, (Data **)&boSta,
1071 sizeof(RlcMacBOStatus))) != ROK) {
1072 #if (ERRCLASS & ERRCLS_ADD_RES)
1073 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1074 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1075 (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed");
1080 if (unpackBOStatusInfo(boSta, mBuf) != ROK) {
1081 #if (ERRCLASS & ERRCLS_ADD_RES)
1082 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1083 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1084 (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed");
1087 SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
1092 // (*func)(pst, spId, boSta);
1093 SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
1098 /*rgu_c_001.main_5 - ADD - L2M Support */
1102 * @brief Harq Status Indication from MAC to RLC
1106 * Function : cmPkRguHqStaInd
1108 * @param[in] Pst* pst
1109 * @param[in] SuId suId
1110 * @param[in] RguHarqStatusInd *harqStatusInd
1115 PUBLIC S16 cmPkRguHqStaInd
1119 RguHarqStatusInd *harqStatusInd
1122 PUBLIC S16 cmPkRguHqStaInd(pst, suId, harqStatusInd)
1125 RguHarqStatusInd *harqStatusInd;
1131 RguHarqStatusInd *harqStaInd = NULL;
1133 TRC3(cmPkRguHqStaInd)
1134 #ifdef XEON_SPECIFIC_CHANGES
1135 if (SGetSBuf(pst->region, pst->pool, (Data **)&harqStaInd, sizeof(RguHarqStatusInd)) != ROK)
1137 if ((SGetStaticBuffer(pst->region, pst->pool,
1138 (Data **)&harqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1141 #if (ERRCLASS & ERRCLS_ADD_RES)
1142 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1143 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1144 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1149 cmMemcpy((U8 *)harqStaInd, (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
1151 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1152 #if (ERRCLASS & ERRCLS_ADD_RES)
1153 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1154 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1155 (ErrVal)ERGU070, (ErrVal)0, "Packing failed");
1157 #ifdef XEON_SPECIFIC_CHANGES
1158 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd));
1160 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1165 if (pst->selector == ODU_SELECTOR_LWLC)
1167 CMCHKPK(oduPackPointer,(PTR) harqStaInd, mBuf);
1171 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1173 CMCHKPK(oduUnpackUInt16, harqStaInd->status[idx], mBuf);
1175 for(idx = 0; idx < harqStaInd->numTbs; idx++)
1177 CMCHKPK(oduUnpackUInt32, harqStaInd->tbId[idx], mBuf);
1179 CMCHKPK(oduUnpackUInt8, harqStaInd->numTbs, mBuf);
1180 CMCHKPK(cmPkLteRnti, harqStaInd->ueId, mBuf);
1181 CMCHKPK(cmPkLteCellId, harqStaInd->cellId, mBuf);
1183 if (SPkS16(suId, mBuf) != ROK) {
1184 #if (ERRCLASS & ERRCLS_ADD_RES)
1185 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1186 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1187 (ErrVal)ERGU071, (ErrVal)0, "Packing failed");
1189 #ifdef XEON_SPECIFIC_CHANGES
1190 SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1191 sizeof(RguHarqStatusInd));
1193 SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd, sizeof(RguHarqStatusInd), 0);
1198 #ifdef XEON_SPECIFIC_CHANGES
1199 if (SPutSBuf(pst->region, pst->pool, (Data *)harqStaInd,
1200 sizeof(RguHarqStatusInd)) != ROK) {
1202 if (pst->selector != ODU_SELECTOR_LWLC)
1204 if(SPutStaticBuffer(pst->region, pst->pool, (Data *)harqStaInd,
1205 sizeof(RguHarqStatusInd), 0) != ROK)
1208 #if (ERRCLASS & ERRCLS_ADD_RES)
1209 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1210 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1211 (ErrVal)ERGU072, (ErrVal)0, "Packing failed");
1216 #ifndef XEON_SPECIFIC_CHANGES
1220 pst->event = (Event) EVTRGUHQSTAIND;
1221 return (SPstTsk(pst,mBuf));
1226 * @brief Harq Status Indication from MAC to RLC
1230 * Function : cmUnpkRguHqStaInd
1232 * @param[in] RguHqStaInd func
1233 * @param[in] Pst *pst
1234 * @param[in] Buffer *mBuf
1239 PUBLIC S16 cmUnpkRguHqStaInd
1246 PUBLIC S16 cmUnpkRguHqStaInd(func, pst, mBuf)
1252 RguHarqStatusInd *hqStaInd;
1256 TRC3(cmUnpkRguHqStaInd)
1258 if (SUnpkS16(&suId, mBuf) != ROK) {
1259 #if (ERRCLASS & ERRCLS_ADD_RES)
1260 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1261 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1262 (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
1267 #ifdef XEON_SPECIFIC_CHANGES
1268 if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd,
1269 sizeof(RguHarqStatusInd))) != ROK) {
1271 if (pst->selector == ODU_SELECTOR_LWLC)
1273 CMCHKUNPK(oduUnpackPointer,(PTR *) &hqStaInd, mBuf);
1277 if ((SGetStaticBuffer(pst->region, pst->pool,
1278 (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
1281 #if (ERRCLASS & ERRCLS_ADD_RES)
1282 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1283 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1284 (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
1289 CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
1290 CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
1291 CMCHKUNPK(oduPackUInt8, &hqStaInd->numTbs, mBuf);
1292 for(idx = hqStaInd->numTbs; idx > 0; idx--)
1294 CMCHKUNPK(oduPackUInt32, &hqStaInd->tbId[idx - 1], mBuf);
1296 for(idx = hqStaInd->numTbs; idx > 0; idx--)
1298 CMCHKUNPK(oduPackUInt16, &hqStaInd->status[idx - 1], mBuf);
1300 #ifndef XEON_SPECIFIC_CHANGES
1304 (*func)(pst, suId, hqStaInd);
1305 #ifdef XEON_SPECIFIC_CHANGES
1306 SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
1308 SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
1312 #endif /* LTE_L2_MEAS */
1316 * @brief Status Indication from MAC to RLC
1317 * as a response to the staRsp primitive from RLC.
1318 * Informs RLC of the totalBufferSize and Timing Info
1319 * for the transmission on dedicated channels.
1323 * Function : packSchedRep
1325 * @param[in] Pst* pst
1326 * @param[in] SuId suId
1327 * @param[in] RlcMacSchedRep* schRep
1331 PUBLIC S16 packSchedRep
1335 RlcMacSchedRepInfo * schRep
1338 Buffer *mBuf = NULLP;
1341 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1342 #if (ERRCLASS & ERRCLS_ADD_RES)
1343 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1344 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1345 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
1347 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1350 if (pst->selector == ODU_SELECTOR_LWLC)
1352 CMCHKPK(oduPackPointer,(PTR) schRep, mBuf);
1356 if (packSchedRepInfo(schRep, mBuf) != ROK) {
1357 #if (ERRCLASS & ERRCLS_ADD_RES)
1358 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1359 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1360 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
1362 SPutSBuf(pst->region, pst->pool, (Data *)schRep,
1363 sizeof(RlcMacSchedRepInfo));
1367 if (SPutSBuf(pst->region, pst->pool, (Data *)schRep,
1368 sizeof(RlcMacSchedRepInfo)) != ROK) {
1369 #if (ERRCLASS & ERRCLS_ADD_RES)
1370 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1371 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1372 (ErrVal)ERGU079, (ErrVal)0, "Packing failed");
1379 if (SPkS16(suId, mBuf) != ROK) {
1380 #if (ERRCLASS & ERRCLS_ADD_RES)
1381 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1382 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1383 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
1385 if (schRep != NULLP)
1387 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1393 pst->event = (Event) EVTSCHREP;
1394 return (SPstTsk(pst,mBuf));
1399 * @brief Status Indication from MAC to RLC
1400 * as a response to the staRsp primitive from RLC.
1401 * Informs RLC of the totalBufferSize and Timing Info
1402 * for the transmission on dedicated channels.
1406 * Function : unpackSchedRep
1408 * @param[in] Pst* pst
1409 * @param[in] SuId suId
1410 * @param[in] RguDStaIndInfo * staInd
1414 PUBLIC S16 unpackSchedRep
1416 RlcMacSchedRep func,
1422 RlcMacSchedRepInfo *schRep;
1424 TRC3(unpackSchedRep)
1426 if (SUnpkS16(&suId, mBuf) != ROK) {
1427 #if (ERRCLASS & ERRCLS_ADD_RES)
1428 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1429 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1430 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1435 if (pst->selector == ODU_SELECTOR_LWLC)
1437 CMCHKUNPK(oduUnpackPointer,(PTR *) &schRep, mBuf);
1441 if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRepInfo))) != ROK) {
1442 #if (ERRCLASS & ERRCLS_ADD_RES)
1443 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1444 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1445 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1450 if (unpackSchedRepInfo(schRep, mBuf) != ROK) {
1451 #if (ERRCLASS & ERRCLS_ADD_RES)
1452 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1453 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1454 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1457 SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
1462 return ((*func)(pst, suId, schRep));
1466 PUBLIC S16 cmPkRguLcFlowCntrlInfo
1468 RguLcFlowCntrlInfo *param,
1472 PUBLIC S16 cmPkRguLcFlowCntrlInfo (param,mBuf)
1473 RguLcFlowCntrlInfo *param;
1477 TRC3(cmPkRguLcFlowCntrlInfo);
1478 CMCHKPK(oduUnpackUInt32, param->maxBo4FlowCtrl, mBuf);
1479 CMCHKPK(oduUnpackUInt32, param->pktAdmitCnt, mBuf);
1480 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1486 PUBLIC S16 cmPkRguUeFlowCntrlInfo
1488 RguUeFlowCntrlInfo *param,
1492 PUBLIC S16 cmPkRguUeFlowCntrlInfo (param,mBuf)
1493 RguUeFlowCntrlInfo *param;
1499 TRC3(cmPkRguUeFlowCntrlInfo);
1501 for(idx=(param->numLcs - 1); idx >= 0; idx--)
1503 cmPkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1505 CMCHKPK(oduUnpackUInt32, param->numLcs, mBuf);
1506 CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
1511 PUBLIC S16 cmPkRguFlowCntrlInfo
1513 RguFlowCntrlInd *param,
1517 PUBLIC S16 cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf)
1518 RguFlowCntrlInd *param;
1524 TRC3(cmPkRguFlowCntrlInfo);
1526 for (idx=(param->numUes - 1); idx >= 0; idx--)
1528 cmPkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1530 CMCHKPK(oduUnpackUInt32, param->numUes, mBuf);
1531 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1536 * @brief Flow Cntrl Indication from MAC to RLC
1537 * Informs RLC of the LCs on which flow control
1542 * Function : cmPkRguFlowCntrlInd
1544 * @param[in] Pst* pst
1545 * @param[in] SuId suId
1546 * @param[in] RguFlowCntrlInd *staInd
1551 PUBLIC S16 cmPkRguFlowCntrlInd
1555 RguFlowCntrlInd *flowCntrlInd
1558 PUBLIC S16 cmPkRguFlowCntrlInd(pst, suId, flowCntrlInd)
1561 RguFlowCntrlInd *flowCntrlInd;
1564 Buffer *mBuf = NULLP;
1566 TRC3(cmPkRguFlowCntrlInd);
1567 if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
1568 #if (ERRCLASS & ERRCLS_ADD_RES)
1569 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1570 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1571 (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
1575 if (pst->selector == ODU_SELECTOR_LWLC)
1577 CMCHKPK(oduPackPointer,(PTR) flowCntrlInd, mBuf);
1581 if (cmPkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1582 #if (ERRCLASS & ERRCLS_ADD_RES)
1583 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1584 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1585 (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
1591 if (SPkS16(suId, mBuf) != ROK) {
1592 #if (ERRCLASS & ERRCLS_ADD_RES)
1593 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1594 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1595 (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
1601 pst->event = (Event) EVTRGUFLOWCNTRLIND;
1602 return (SPstTsk(pst,mBuf));
1606 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo
1608 RguLcFlowCntrlInfo *param,
1612 PUBLIC S16 cmUnpkRguLcFlowCntrlInfo (param,mBuf)
1613 RguLcFlowCntrlInfo *param;
1617 TRC3(cmUnpkRguLcFlowCntrlInfo);
1619 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
1620 CMCHKUNPK(oduPackUInt32, ¶m->pktAdmitCnt, mBuf);
1621 CMCHKUNPK(oduPackUInt32, ¶m->maxBo4FlowCtrl, mBuf);
1626 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo
1628 RguUeFlowCntrlInfo *param,
1632 PUBLIC S16 cmUnpkRguUeFlowCntrlInfo (param,mBuf)
1633 RguUeFlowCntrlInfo *param;
1638 TRC3(cmUnpkRguUeFlowCntrlInfo);
1639 CMCHKUNPK(cmUnpkLteRnti, ¶m->ueId, mBuf);
1640 CMCHKUNPK(oduPackUInt32, ¶m->numLcs, mBuf);
1641 for(idx=0; idx < param->numLcs; idx++)
1643 cmUnpkRguLcFlowCntrlInfo(¶m->lcInfo[idx],mBuf);
1649 PUBLIC S16 cmUnpkRguFlowCntrlInfo
1651 RguFlowCntrlInd *param,
1655 PUBLIC S16 cmUnpkRguFlowCntrlInfo(flowCntrlInfo, mBuf)
1656 RguFlowCntrlInd *param;
1662 TRC3(cmUnpkRguFlowCntrlInfo);
1664 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
1665 CMCHKUNPK(oduPackUInt32, ¶m->numUes, mBuf);
1666 for (idx=0; idx < param->numUes; idx++)
1668 cmUnpkRguUeFlowCntrlInfo(¶m->ueFlowCntrlInfo[idx],mBuf);
1674 * @brief Flow control indication from MAC to RLC
1675 * Informs RLC of the LCs on which flow control to
1680 * Function : cmUnpkRguFlowCntrlInd
1682 * @param[in] RguFlowCntrlInd func
1683 * @param[in] Pst *pst
1684 * @param[in] Buffer *mBuf
1689 PUBLIC S16 cmUnpkRguFlowCntrlInd
1691 RguFlowCntrlIndInfo func,
1696 PUBLIC S16 cmUnpkRguFlowCntrlInd(func, pst, mBuf)
1697 RguFlowCntrlIndInfo func;
1703 RguFlowCntrlInd *flowCntrlInd;
1705 TRC3(cmUnpkRguFlowCntrlInd)
1707 if (SUnpkS16(&suId, mBuf) != ROK) {
1708 #if (ERRCLASS & ERRCLS_ADD_RES)
1709 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1710 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1711 (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
1716 if (pst->selector == ODU_SELECTOR_LWLC)
1718 CMCHKUNPK(oduUnpackPointer,(PTR *) &flowCntrlInd, mBuf);
1722 if ((SGetSBuf(pst->region, pst->pool, (Data **)&flowCntrlInd, sizeof(RguFlowCntrlInd))) != ROK) {
1723 #if (ERRCLASS & ERRCLS_ADD_RES)
1724 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1725 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1726 (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
1731 if (cmUnpkRguFlowCntrlInfo(flowCntrlInd, mBuf) != ROK) {
1732 #if (ERRCLASS & ERRCLS_ADD_RES)
1733 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1734 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1735 (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
1738 SPutSBuf(pst->region, pst->pool, (Data *)flowCntrlInd, sizeof(RguFlowCntrlInd));
1743 return ((*func)(pst, suId, flowCntrlInd));
1746 /***********************************************************
1748 * Func : cmPkRguPduInfo
1752 * PDU information given on a logical channel
1761 **********************************************************/
1763 PUBLIC S16 cmPkRguPduInfo
1769 PUBLIC S16 cmPkRguPduInfo(param, mBuf)
1776 TRC3(cmPkRguPduInfo);
1778 for (i=param->numPdu-1; i >= 0; i--) {
1779 /* rgu_c_001.main_3: ccpu00111328: S16 is renamed as MsgLen */
1781 if (SFndLenMsg(param->mBuf[i], &msgLen) != ROK)
1783 if (SCatMsg(mBuf, param->mBuf[i], M1M2) != ROK)
1785 SPutMsg(param->mBuf[i]);
1786 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
1788 CMCHKPK(oduUnpackUInt8, param->numPdu, mBuf);
1794 /***********************************************************
1796 * Func : cmUnpkRguPduInfo
1800 * PDU information given on a logical channel
1809 **********************************************************/
1811 PUBLIC S16 cmUnpkRguPduInfo
1817 PUBLIC S16 cmUnpkRguPduInfo(param, mBuf)
1824 TRC3(cmUnpkRguPduInfo);
1826 CMCHKUNPK(oduPackUInt8, ¶m->numPdu, mBuf);
1827 for (i=0; i<param->numPdu; i++) {
1828 MsgLen msgLen, totalMsgLen;
1829 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
1830 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
1832 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->mBuf[i]) != ROK)
1840 /***********************************************************
1842 * Func : cmPkRguDBoReport
1845 * Desc : RguDBoReport
1846 * Buffer Occupancy Report for dedicated logical channel
1855 **********************************************************/
1857 PUBLIC S16 cmPkRguDBoReport
1859 RguDBoReport *param,
1863 PUBLIC S16 cmPkRguDBoReport(param, mBuf)
1864 RguDBoReport *param;
1869 TRC3(cmPkRguDBoReport);
1871 CMCHKPK(oduUnpackUInt32, param->oldestSduArrTime, mBuf);
1872 CMCHKPK(oduUnpackUInt32, param->staPduBo, mBuf);
1874 CMCHKPK(oduUnpackUInt8, param->staPduPrsnt, mBuf);
1875 CMCHKPK(oduUnpackUInt16, param->estRlcHdrSz, mBuf);
1877 CMCHKPK(SPkS32, param->bo, mBuf);
1883 /***********************************************************
1885 * Func : cmUnpkRguDBoReport
1888 * Desc : RguDBoReport
1889 * Buffer Occupancy Report for dedicated logical channel
1898 **********************************************************/
1900 PUBLIC S16 cmUnpkRguDBoReport
1902 RguDBoReport *param,
1906 PUBLIC S16 cmUnpkRguDBoReport(param, mBuf)
1907 RguDBoReport *param;
1912 TRC3(cmUnpkRguDBoReport);
1914 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
1916 CMCHKUNPK(oduPackUInt16, ¶m->estRlcHdrSz, mBuf);
1917 CMCHKUNPK(oduPackUInt8, ¶m->staPduPrsnt, mBuf);
1920 CMCHKUNPK(oduPackUInt32, ¶m->staPduBo, mBuf);
1921 CMCHKUNPK(oduPackUInt32, ¶m->oldestSduArrTime, mBuf);
1926 /***********************************************************
1928 * Func : cmPkRguCDatReqInfo
1931 * Desc : RguCDatReqInfo
1932 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
1941 **********************************************************/
1943 PUBLIC S16 cmPkRguCDatReqInfo
1945 RguCDatReqInfo *param,
1949 PUBLIC S16 cmPkRguCDatReqInfo(param, mBuf)
1950 RguCDatReqInfo *param;
1956 TRC3(cmPkRguCDatReqInfo);
1958 if (param->pdu != NULLP)
1960 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
1962 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
1964 SPutMsg(param->pdu);
1965 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
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);
1981 CMCHKPK(oduUnpackUInt32, param->transId, mBuf);
1982 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
1983 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
1984 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
1990 /***********************************************************
1992 * Func : cmUnpkRguCDatReqInfo
1995 * Desc : RguCDatReqInfo
1996 * DatReq from RLC to MAC for Common Channels(BCCH, PCCH and CCCH)
2005 **********************************************************/
2007 PUBLIC S16 cmUnpkRguCDatReqInfo
2009 RguCDatReqInfo *param,
2013 PUBLIC S16 cmUnpkRguCDatReqInfo(param, mBuf)
2014 RguCDatReqInfo *param;
2018 MsgLen msgLen, totalMsgLen;
2020 TRC3(cmUnpkRguCDatReqInfo);
2022 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2023 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2024 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2025 CMCHKUNPK(oduPackUInt32, ¶m->transId, mBuf);
2026 switch(param->lcType) {
2027 case CM_LTE_LCH_BCCH:
2028 case CM_LTE_LCH_PCCH:
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);
2040 SFndLenMsg(mBuf, &msgLen);
2043 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2044 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2046 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2054 /***********************************************************
2056 * Func : cmPkRguLchDatReq
2059 * Desc : RguLchDatReq
2060 * DatReq Information of a logical channel
2069 **********************************************************/
2071 PUBLIC S16 cmPkRguLchDatReq
2073 RguLchDatReq *param,
2077 PUBLIC S16 cmPkRguLchDatReq(param, mBuf)
2078 RguLchDatReq *param;
2083 TRC3(cmPkRguLchDatReq);
2086 CMCHKPK(oduUnpackUInt8, param->freeBuff, mBuf);
2088 CMCHKPK(oduUnpackUInt8, param->setMaxUlPrio, mBuf);
2089 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2090 CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf);
2091 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2097 /***********************************************************
2099 * Func : cmUnpkRguLchDatReq
2102 * Desc : RguLchDatReq
2103 * DatReq Information of a logical channel
2112 **********************************************************/
2114 PUBLIC S16 cmUnpkRguLchDatReq
2116 RguLchDatReq *param,
2120 PUBLIC S16 cmUnpkRguLchDatReq(param, mBuf)
2121 RguLchDatReq *param;
2126 TRC3(cmUnpkRguLchDatReq);
2128 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2129 CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf);
2130 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2131 CMCHKUNPK(oduPackUInt8, ¶m->setMaxUlPrio, mBuf);
2133 CMCHKUNPK(oduPackUInt8, ¶m->freeBuff, mBuf);
2139 /***********************************************************
2141 * Func : cmPkRguDatReqTb
2144 * Desc : RguDatReqTb
2145 * DatReq from RLC to MAC for dedicated channels of a UE
2154 **********************************************************/
2156 PUBLIC S16 cmPkRguDatReqTb
2162 PUBLIC S16 cmPkRguDatReqTb(param, mBuf)
2169 TRC3(cmPkRguDatReqTb);
2170 /*rgu_c_001.main_5 - ADD - L2M Support */
2172 CMCHKPK(oduUnpackUInt32, param->tbId, mBuf);
2174 for (i=param->nmbLch-1; i >= 0; i--) {
2175 CMCHKPK(cmPkRguLchDatReq, ¶m->lchData[i], mBuf);
2177 CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
2183 /***********************************************************
2185 * Func : cmUnpkRguDatReqTb
2188 * Desc : RguDatReqTb
2189 * DatReq from RLC to MAC for dedicated channels of a UE
2198 **********************************************************/
2201 PUBLIC S16 cmUnpkRguDatReqTb
2208 PUBLIC S16 cmUnpkRguDatReqTb(pst, param, mBuf)
2215 PUBLIC S16 cmUnpkRguDatReqTb
2221 PUBLIC S16 cmUnpkRguDatReqTb(param, mBuf)
2229 TRC3(cmUnpkRguDatReqTb);
2231 CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf);
2232 for (i=0; i<param->nmbLch; i++) {
2233 CMCHKUNPK(cmUnpkRguLchDatReq, ¶m->lchData[i], mBuf);
2235 /*rgu_c_001.main_5 - ADD - L2M Support */
2237 CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf);
2243 /***********************************************************
2245 * Func : cmPkRguDDatReqInfo
2248 * Desc : RguDDatReqInfo
2249 * DatReq from RLC to MAC for dedicated channels of a UE
2258 **********************************************************/
2259 /*rgu_c_001.main_5 - ADD - L2M Support */
2262 PUBLIC S16 cmPkRguDDatReqInfo
2265 RguDDatReqInfo *param,
2269 PUBLIC S16 cmPkRguDDatReqInfo(pst, param, mBuf)
2271 RguDDatReqInfo *param;
2276 PUBLIC S16 cmPkRguDDatReqInfo
2278 RguDDatReqInfo *param,
2282 PUBLIC S16 cmPkRguDDatReqInfo(param, mBuf)
2283 RguDDatReqInfo *param;
2291 TRC3(cmPkRguDDatReqInfo);
2293 for(idx = (param->nmbOfUeGrantPerTti-1); idx >= 0; idx--)
2295 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
2296 for (i=RGU_MAX_TB-1; i >= 0; i--)
2298 CMCHKPK(cmPkRguDatReqTb, &datReq->datReqTb[i], mBuf);
2300 CMCHKPK(oduUnpackUInt8, datReq->nmbOfTbs, mBuf);
2301 CMCHKPK(oduUnpackUInt32, datReq->transId, mBuf);
2302 CMCHKPK(cmPkLteRnti, datReq->rnti, mBuf);
2304 CMCHKPK(oduUnpackUInt8, param->nmbOfUeGrantPerTti, mBuf);
2305 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2311 /***********************************************************
2313 * Func : cmUnpkRguDDatReqInfo
2316 * Desc : RguDDatReqInfo
2317 * DatReq from RLC to MAC for dedicated channels of a UE
2326 **********************************************************/
2329 PUBLIC S16 cmUnpkRguDDatReqInfo
2332 RguDDatReqInfo *param,
2336 PUBLIC S16 cmUnpkRguDDatReqInfo(pst, param, mBuf)
2338 RguDDatReqInfo *param;
2343 PUBLIC S16 cmUnpkRguDDatReqInfo
2345 RguDDatReqInfo *param,
2349 PUBLIC S16 cmUnpkRguDDatReqInfo(param, mBuf)
2350 RguDDatReqInfo *param;
2356 /* After Merging from 2.1 to 2.2 */
2357 /*rgu_c_001.main_5 - ADD - L2M Support */
2363 TRC3(cmUnpkRguDDatReqInfo);
2365 /* After Merging from 2.1 to 2.2 */
2366 /*rgu_c_001.main_5 - ADD - L2M Support */
2370 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2371 CMCHKUNPK(oduPackUInt8, ¶m->nmbOfUeGrantPerTti, mBuf);
2372 for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++)
2374 RguDDatReqPerUe *datReq = ¶m->datReq[idx];
2375 CMCHKUNPK(cmUnpkLteRnti, &datReq->rnti, mBuf);
2376 CMCHKUNPK(oduPackUInt32, &datReq->transId, mBuf);
2377 CMCHKUNPK(oduPackUInt8, &datReq->nmbOfTbs, mBuf);
2378 /* rgu_c_001.main_4 - Changes for MIMO feature addition */
2379 for (i=0; i<RGU_MAX_TB; i++)
2381 /*rgu_c_001.main_5 - ADD - L2M Support */
2383 /* After Merging from 2.1 to 2.2 */
2384 retVal = cmUnpkRguDatReqTb(pst, &datReq->datReqTb[i], mBuf);
2390 CMCHKUNPK(cmUnpkRguDatReqTb, &datReq->datReqTb[i], mBuf);
2399 /***********************************************************
2401 * Func : cmPkRguCDatIndInfo
2404 * Desc : RguCDatIndInfo
2405 * DatInd from MAC to RLC on CCCH
2414 **********************************************************/
2416 PUBLIC S16 cmPkRguCDatIndInfo
2418 RguCDatIndInfo *param,
2422 PUBLIC S16 cmPkRguCDatIndInfo(param, mBuf)
2423 RguCDatIndInfo *param;
2429 TRC3(cmPkRguCDatIndInfo);
2431 if (SFndLenMsg(param->pdu, &msgLen) != ROK)
2433 if (SCatMsg(mBuf, param->pdu, M1M2) != ROK)
2435 SPutMsg(param->pdu);
2436 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2437 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2438 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2439 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2445 /***********************************************************
2447 * Func : cmUnpkRguCDatIndInfo
2450 * Desc : RguCDatIndInfo
2451 * DatInd from MAC to RLC on CCCH
2460 **********************************************************/
2462 PUBLIC S16 cmUnpkRguCDatIndInfo
2464 RguCDatIndInfo *param,
2468 PUBLIC S16 cmUnpkRguCDatIndInfo(param, mBuf)
2469 RguCDatIndInfo *param;
2473 MsgLen msgLen, totalMsgLen;
2475 TRC3(cmUnpkRguCDatIndInfo);
2477 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2478 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2479 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2480 CMCHKUNPK(cmUnpkMsgLen, &msgLen, mBuf);
2481 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2483 if (SSegMsg(mBuf, totalMsgLen-msgLen, ¶m->pdu) != ROK)
2490 /***********************************************************
2492 * Func : cmPkRguLchDatInd
2495 * Desc : RguLchDatInd
2496 * DatInd Information for a logical channel
2505 **********************************************************/
2507 PUBLIC S16 cmPkRguLchDatInd
2509 RguLchDatInd *param,
2513 PUBLIC S16 cmPkRguLchDatInd(param, mBuf)
2514 RguLchDatInd *param;
2518 TRC3(cmPkRguLchDatInd);
2520 CMCHKPK(cmPkRguPduInfo, ¶m->pdu, mBuf);
2521 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2527 /***********************************************************
2529 * Func : cmUnpkRguLchDatInd
2532 * Desc : RguLchDatInd
2533 * DatInd Information for a logical channel
2542 **********************************************************/
2544 PUBLIC S16 cmUnpkRguLchDatInd
2546 RguLchDatInd *param,
2550 PUBLIC S16 cmUnpkRguLchDatInd(param, mBuf)
2551 RguLchDatInd *param;
2555 TRC3(cmUnpkRguLchDatInd);
2557 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2558 CMCHKUNPK(cmUnpkRguPduInfo, ¶m->pdu, mBuf);
2564 /***********************************************************
2566 * Func : packRlcMacDataInfo
2570 * Data Indication from MAC to RLC for dedicated channels of a UE
2579 **********************************************************/
2581 PUBLIC S16 packRlcMacDataInfo
2587 PUBLIC S16 packRlcMacDataInfo(param, mBuf)
2595 TRC3(packRlcMacDataInfo);
2597 for (i=param->numPdu-1; i >= 0; i--)
2600 //if (SFndLenMsg(param->pduInfo[i].pduBuf, &msgLen) != ROK)
2602 //if (SCatMsg(mBuf, param->pduInfo[i].pduBuf, M1M2) != ROK)
2604 CMCHKPK(cmPkMsgLen, msgLen, mBuf);
2605 CMCHKPK(cmPkLteLcId, param->pduInfo[i].lcId, mBuf);
2606 CMCHKPK(oduPackBool, param->pduInfo[i].commCh, mBuf);
2608 CMCHKPK(oduUnpackUInt8, param->numPdu, mBuf);
2609 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2610 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2611 //CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf);
2617 /***********************************************************
2619 * Func : unpackRlcMacDataInfo
2623 * Data Indication from MAC to RLC for dedicated channels of a UE
2632 **********************************************************/
2634 PUBLIC S16 unpackRlcMacDataInfo
2640 PUBLIC S16 unpackRlcMacDataInfo(param, mBuf)
2647 TRC3(unpackRlcMacDataInfo);
2649 //CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf);
2650 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2651 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2652 CMCHKUNPK(oduPackUInt8, ¶m->numPdu, mBuf);
2653 for (i=0; i<param->numPdu; i++)
2657 CMCHKUNPK(oduUnpackBool, ¶m->pduInfo[i].commCh, mBuf);
2658 CMCHKUNPK(cmUnpkLteLcId, ¶m->pduInfo[i].lcId, mBuf);
2659 CMCHKUNPK(cmUnpkMsgLen, ¶m->pduInfo[i].pduLen, mBuf);
2660 if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
2662 //if (SSegMsg(mBuf, totalMsgLen-param->pduInfo[i].pduLen, ¶m->pduInfo[i].pduBuf) != ROK)
2669 /***********************************************************
2671 * Func : cmPkRguCStaRspInfo
2674 * Desc : RguCStaRspInfo
2675 * Status Response from RLC to MAC for common logical channel
2684 **********************************************************/
2686 PUBLIC S16 cmPkRguCStaRspInfo
2688 RguCStaRspInfo *param,
2692 PUBLIC S16 cmPkRguCStaRspInfo(param, mBuf)
2693 RguCStaRspInfo *param;
2698 TRC3(cmPkRguCStaRspInfo);
2700 switch(param->lcType) {
2701 case CM_LTE_LCH_CCCH:
2702 CMCHKPK(cmPkLteRnti, param->u.rnti, mBuf);
2704 case CM_LTE_LCH_BCCH:
2705 case CM_LTE_LCH_PCCH:
2706 CMCHKPK(cmPkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2708 CMCHKPK(oduUnpackUInt8,param->pnb,mBuf);
2709 CMCHKPK(oduUnpackUInt8,param->emtcDiReason,mBuf);
2715 CMCHKPK(SPkS32, param->bo, mBuf);
2716 CMCHKPK(cmPkLteLcType, param->lcType, mBuf);
2717 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2718 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2724 /***********************************************************
2726 * Func : cmUnpkRguCStaRspInfo
2729 * Desc : RguCStaRspInfo
2730 * Status Response from RLC to MAC for common logical channel
2739 **********************************************************/
2741 PUBLIC S16 cmUnpkRguCStaRspInfo
2743 RguCStaRspInfo *param,
2747 PUBLIC S16 cmUnpkRguCStaRspInfo(param, mBuf)
2748 RguCStaRspInfo *param;
2753 TRC3(cmUnpkRguCStaRspInfo);
2755 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2756 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2757 CMCHKUNPK(cmUnpkLteLcType, ¶m->lcType, mBuf);
2758 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2759 switch(param->lcType) {
2760 case CM_LTE_LCH_BCCH:
2761 case CM_LTE_LCH_PCCH:
2763 CMCHKUNPK(oduPackUInt8,¶m->emtcDiReason , mBuf);
2764 CMCHKUNPK(oduPackUInt8,¶m->pnb , mBuf);
2766 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->u.timeToTx, mBuf);
2768 case CM_LTE_LCH_CCCH:
2769 CMCHKUNPK(cmUnpkLteRnti, ¶m->u.rnti, mBuf);
2779 /***********************************************************
2781 * Func : packBOStatusInfo
2784 * Desc : RlcMacBOStatus
2785 * Status Response from RLC to MAC for dedicated logical channel
2794 **********************************************************/
2796 PUBLIC S16 packBOStatusInfo
2798 RlcMacBOStatus *param,
2802 PUBLIC S16 packBOStatusInfo(param, mBuf)
2803 RlcMacBOStatus *param;
2808 TRC3(packBOStatusInfo);
2810 CMCHKPK(SPkS32, param->bo, mBuf);
2811 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2812 CMCHKPK(oduPackBool, param->commCh, mBuf);
2813 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
2814 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
2816 } /* End of packBOStatusInfo */
2820 /***********************************************************
2822 * Func : unpackBOStatusInfo
2825 * Desc : RlcMacBOStatus
2826 * Status Response from RLC to MAC for dedicated logical channel
2835 **********************************************************/
2837 PUBLIC S16 unpackBOStatusInfo
2839 RlcMacBOStatus *param,
2843 PUBLIC S16 unpackBOStatusInfo(param, mBuf)
2844 RlcMacBOStatus *param;
2849 TRC3(unpackBOStatusInfo);
2851 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
2852 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
2853 CMCHKUNPK(oduUnpackBool, ¶m->commCh, mBuf);
2854 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2855 CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf);
2857 } /* End of unpackBOStatusInfo */
2860 /***********************************************************
2862 * Func : cmPkRguLchStaInd
2865 * Desc : RguLchStaInd
2866 * StaInd info for each logical channel of a UE
2875 **********************************************************/
2877 PUBLIC S16 cmPkRguLchStaInd
2879 RguLchStaInd *param,
2883 PUBLIC S16 cmPkRguLchStaInd(param, mBuf)
2884 RguLchStaInd *param;
2889 TRC3(cmPkRguLchStaInd);
2891 CMCHKPK(SPkS16, param->totBufSize, mBuf);
2892 CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
2898 /***********************************************************
2900 * Func : cmUnpkRguLchStaInd
2903 * Desc : RguLchStaInd
2904 * StaInd info for each logical channel of a UE
2913 **********************************************************/
2915 PUBLIC S16 cmUnpkRguLchStaInd
2917 RguLchStaInd *param,
2921 PUBLIC S16 cmUnpkRguLchStaInd(param, mBuf)
2922 RguLchStaInd *param;
2927 TRC3(cmUnpkRguLchStaInd);
2929 CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf);
2930 CMCHKUNPK(SUnpkS16, ¶m->totBufSize, mBuf);
2935 /***********************************************************
2937 * Func : cmPkRguStaIndTb
2940 * Desc : RguStaIndTb
2941 * StaInd from RLC to MAC for dedicated channels of a UE
2950 **********************************************************/
2952 PUBLIC S16 cmPkRguStaIndTb
2958 PUBLIC S16 cmPkRguStaIndTb(param, mBuf)
2965 TRC3(cmPkRguStaIndTb);
2968 CMCHKPK(oduUnpackUInt16, param->status, mBuf);
2969 CMCHKPK(oduUnpackUInt32, param->tbId, mBuf);
2971 for (i=param->nmbLch-1; i >= 0; i--) {
2972 CMCHKPK(cmPkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
2974 CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
2980 /***********************************************************
2982 * Func : cmUnpkRguStaIndTb
2985 * Desc : RguStaIndTb
2986 * StaInd from RLC to MAC for dedicated channels of a UE
2995 **********************************************************/
2997 PUBLIC S16 cmUnpkRguStaIndTb
3003 PUBLIC S16 cmUnpkRguStaIndTb(param, mBuf)
3010 TRC3(cmUnpkRguStaIndTb);
3012 CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf);
3013 for (i=0; i<param->nmbLch; i++) {
3014 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchStaInd[i], mBuf);
3017 CMCHKUNPK(oduPackUInt32, ¶m->tbId, mBuf);
3018 CMCHKUNPK(oduPackUInt16, ¶m->status, mBuf);
3024 /***********************************************************
3026 * Func : packSchedRepInfo
3029 * Desc : RlcMacSchedRep
3030 * StaInd from MAC to RLC for dedicated logical channels of a UE
3039 **********************************************************/
3040 PUBLIC S16 packSchedRepInfo
3042 RlcMacSchedRepInfo *param,
3048 TRC3(packSchedRepInfo);
3050 for(idx = (param->nmbLch-1); idx >= 0; idx--)
3052 CMCHKPK(cmPkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf);
3053 CMCHKPK(oduPackBool, param->lchSta[idx].commCh, mBuf);
3055 CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
3056 CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
3057 CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
3058 CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf);
3061 } /* End of packSchedRepInfo */
3065 /***********************************************************
3067 * Func : unpackSchedRepInfo
3070 * Desc : RlcMacSchedRep
3071 * StaInd from MAC to RLC for dedicated logical channels of a UE
3080 **********************************************************/
3081 PUBLIC S16 unpackSchedRepInfo
3083 RlcMacSchedRepInfo *param,
3089 TRC3(unpackSchedRepInfo);
3091 CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf);
3092 CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf);
3093 CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf);
3094 CMCHKUNPK(oduPackUInt8, ¶m->nmbLch, mBuf);
3095 for(idx = 0; idx < param->nmbLch; idx++)
3097 CMCHKUNPK(oduUnpackBool, ¶m->lchSta[idx].commCh, mBuf);
3098 CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf);
3102 } /* End of unpackSchedRepInfo */
3106 /**********************************************************************
3108 **********************************************************************/