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 #include "common_def.h"
20 #include "du_app_rlc_inf.h"
22 /*******************************************************************
24 * @brief Packs and Sends Max Retransmission Reached Info from RLC to DUAPP
28 * Function : packRlcDuMaxRetransInd
31 * Packs and Sends Max Retransmission Reached Info from RLC to DUAPP
34 * @params[in] Post structure pointer
35 * RlcMaxRetransInfo *maxRetransInfo
37 * @return ROK - success
40 * ****************************************************************/
42 uint8_t packRlcDuMaxRetransInd(Pst *pst, RlcMaxRetransInfo *maxRetransInfo)
46 if(pst->selector == ODU_SELECTOR_LWLC)
48 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
50 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuMaxRetransInd");
53 /* pack the address of the structure */
54 CMCHKPK(oduPackPointer,(PTR)maxRetransInfo, mBuf);
58 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuMaxRetransInd");
62 return ODU_POST_TASK(pst,mBuf);
65 /*******************************************************************
67 * @brief Unpacks Max Retransmission Reached Info received from DU APP
71 * Function : unpackRlcMaxRetransInd
74 * Unpacks Max Retransmission Reached Info received from DU APP
76 * @params[in] Pointer to Handler
77 * Post structure pointer
79 * @return ROK - success
82 * ****************************************************************/
84 uint8_t unpackRlcMaxRetransInd(RlcDuMaxRetransInd func, Pst *pst, Buffer *mBuf)
86 if(pst->selector == ODU_SELECTOR_LWLC)
88 RlcMaxRetransInfo *maxRetransInfo = NULLP;
89 /* unpack the address of the structure */
90 CMCHKUNPK(oduUnpackPointer, (PTR *)&maxRetransInfo, mBuf);
91 ODU_PUT_MSG_BUF(mBuf);
92 return (*func)(pst, maxRetransInfo);
96 /* Nothing to do for other selectors */
97 DU_LOG("\nERROR --> RLC: Only LWLC supported for Max Retransmission Reached Info ");
98 ODU_PUT_MSG_BUF(mBuf);
104 /*******************************************************************
106 * @brief Packs and Sends UE create Request from DUAPP to RLC
110 * Function : packDuRlcUeCreateReq
113 * Packs and Sends UE Create Request from DUAPP to RLC
116 * @params[in] Post structure pointer
117 * RlcUeCreate pointer
118 * @return ROK - success
121 * ****************************************************************/
122 uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCreate *ueCfg)
124 Buffer *mBuf = NULLP;
126 if(pst->selector == ODU_SELECTOR_LWLC)
128 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
130 DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeCreateReq");
133 /* pack the address of the structure */
134 CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
138 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeCreateReq");
142 return ODU_POST_TASK(pst,mBuf);
145 /*******************************************************************
147 * @brief Unpacks UE Create Request received from DU APP
151 * Function : unpackRlcUeCreateReq
154 * Unpacks UE Create Request received from DU APP
156 * @params[in] Pointer to Handler
157 * Post structure pointer
159 * @return ROK - success
162 * ****************************************************************/
163 uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf)
165 if(pst->selector == ODU_SELECTOR_LWLC)
168 /* unpack the address of the structure */
169 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
170 ODU_PUT_MSG_BUF(mBuf);
171 return (*func)(pst, ueCfg);
175 /* Nothing to do for other selectors */
176 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Create Request ");
177 ODU_PUT_MSG_BUF(mBuf);
183 /*******************************************************************
185 * @brief Packs and Sends UE Create Response from RLC to DUAPP
189 * Function : packRlcDuUeCreateRsp
192 * Packs and Sends UE Cfg Rrsponse from RLC to DUAPP
195 * @params[in] Post structure pointer
197 * @return ROK - success
200 * ****************************************************************/
201 uint8_t packRlcDuUeCreateRsp(Pst *pst, RlcUeCreateRsp *ueCfg)
203 Buffer *mBuf = NULLP;
205 if(pst->selector == ODU_SELECTOR_LWLC)
207 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
209 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeCreateRsp");
212 /* pack the address of the structure */
213 CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
217 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeCreateRsp");
221 return ODU_POST_TASK(pst,mBuf);
224 /*******************************************************************
226 * @brief Unpacks UE Create Response received from DU APP
230 * Function : unpackRlcUeCreateRsp
233 * Unpacks UE Cfg Response received from DU APP
235 * @params[in] Pointer to Handler
236 * Post structure pointer
238 * @return ROK - success
241 * ****************************************************************/
242 uint8_t unpackRlcUeCreateRsp(RlcDuUeCreateRsp func, Pst *pst, Buffer *mBuf)
244 if(pst->selector == ODU_SELECTOR_LWLC)
246 RlcUeCreateRsp *cfgRsp = NULLP;
247 /* unpack the address of the structure */
248 CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
249 ODU_PUT_MSG_BUF(mBuf);
250 return (*func)(pst, cfgRsp);
254 /* Nothing to do for other selectors */
255 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Cfg Response ");
256 ODU_PUT_MSG_BUF(mBuf);
262 /*******************************************************************
264 * @brief Packs and Sends UE Reconfig Response from RLC to DUAPP
268 * Function : packRlcDuUeReconfigRsp
271 * Packs and Sends UE Reconfig Rrsponse from RLC to DUAPP
274 * @params[in] Post structure pointer
275 * RlcUeRecfgRsp pointer
276 * @return ROK - success
279 * ****************************************************************/
280 uint8_t packRlcDuUeReconfigRsp(Pst *pst, RlcUeReconfigRsp *ueCfg)
282 Buffer *mBuf = NULLP;
284 if(pst->selector == ODU_SELECTOR_LWLC)
286 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
288 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeReconfigRsp");
291 /* pack the address of the structure */
292 CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
296 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeReconfigRsp");
300 return ODU_POST_TASK(pst,mBuf);
303 /*******************************************************************
305 * @brief Unpacks UE Reconfig Response received from DU APP
309 * Function : unpackRlcUeReconfigRsp
312 * Unpacks UE Reconfig Response received from DU APP
314 * @params[in] Pointer to Handler
315 * Post structure pointer
317 * @return ROK - success
320 * ****************************************************************/
321 uint8_t unpackRlcUeReconfigRsp(RlcDuUeReconfigRsp func, Pst *pst, Buffer *mBuf)
323 if(pst->selector == ODU_SELECTOR_LWLC)
325 RlcUeReconfigRsp *cfgRsp = NULLP;
326 /* unpack the address of the structure */
327 CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
328 ODU_PUT_MSG_BUF(mBuf);
329 return (*func)(pst, cfgRsp);
333 /* Nothing to do for other selectors */
334 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Re-Cfg Response ");
335 ODU_PUT_MSG_BUF(mBuf);
341 /*******************************************************************
343 * @brief Pack and send UL RRC message transfer from RLC to DU APP
347 * Function : packRlcUlRrcMsgToDu
350 * Pack and send UL RRC message transfer from RLC to DU APP
352 * @params[in] Post structure
353 * UL RRC Msg transfer info
354 * @return ROK - success
357 * ****************************************************************/
358 uint8_t packRlcUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
360 Buffer *mBuf = NULLP;
362 if(pst->selector == ODU_SELECTOR_LWLC)
364 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
366 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcUlRrcMsgToDu");
369 /* pack the address of the structure */
370 CMCHKPK(oduPackPointer,(PTR)ulRrcMsgInfo, mBuf);
371 return ODU_POST_TASK(pst,mBuf);
375 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcUlRrcMsgToDu");
380 /*******************************************************************
382 * @brief Unpack UL RRC Msg Transfer received at DU APP from RLC
386 * Function : unpackRlcUlRrcMsgToDu
389 * Unpack UL RRC Msg Transfer received at DU APP from RLC
392 * @return ROK - success
395 * ****************************************************************/
396 uint8_t unpackRlcUlRrcMsgToDu(RlcUlRrcMsgToDuFunc func, Pst *pst, Buffer *mBuf)
398 if(pst->selector == ODU_SELECTOR_LWLC)
400 RlcUlRrcMsgInfo *ulRrcMsgInfo;
401 /* unpack the address of the structure */
402 CMCHKUNPK(oduUnpackPointer, (PTR *)&ulRrcMsgInfo, mBuf);
403 ODU_PUT_MSG_BUF(mBuf);
404 return (*func)(pst, ulRrcMsgInfo);
408 /* Nothing to do for other selectors */
409 DU_LOG("\nERROR --> RLC: Only LWLC supported for UL RRC Message transfer ");
410 ODU_PUT_MSG_BUF(mBuf);
416 /*******************************************************************
418 * @brief Pack and post DL RRC Message from DU APP to RLC
422 * Function : packDlRrcMsgToRlc
424 * Functionality: Pack and post DL RRC Message from DU APP to RLC
426 * @params[in] Post structure
427 * DL RRC Message info
428 * @return ROK - success
431 * ****************************************************************/
432 uint8_t packDlRrcMsgToRlc(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo)
434 Buffer *mBuf = NULLP;
436 if(pst->selector == ODU_SELECTOR_LWLC)
438 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
440 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDlRrcMsgToRlc");
443 /* pack the address of the structure */
444 CMCHKPK(oduPackPointer,(PTR)dlRrcMsgInfo, mBuf);
445 return ODU_POST_TASK(pst,mBuf);
449 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDlRrcMsgToRlc");
454 /*******************************************************************
456 * @brief Unpacks DL RRC Message info received at RLC from DU APP
460 * Function : unpackDlRrcMsgToRlc
463 * Unpacks the DL RRC Message info received at RLC from DU APP
465 * @params[in] Pointer to handler function
467 * Messae buffer to be unpacked
468 * @return ROK - success
471 * ****************************************************************/
472 uint8_t unpackDlRrcMsgToRlc(DuDlRrcMsgToRlcFunc func, Pst *pst, Buffer *mBuf)
474 if(pst->selector == ODU_SELECTOR_LWLC)
476 RlcDlRrcMsgInfo *dlRrcMsgInfo;
477 /* unpack the address of the structure */
478 CMCHKUNPK(oduUnpackPointer, (PTR *)&dlRrcMsgInfo, mBuf);
479 ODU_PUT_MSG_BUF(mBuf);
480 return (*func)(pst, dlRrcMsgInfo);
484 /* Nothing to do for other selectors */
485 DU_LOG("\nERROR --> RLC: Only LWLC supported for UL RRC Message transfer ");
486 ODU_PUT_MSG_BUF(mBuf);
491 /*******************************************************************
493 * @brief packs RRC delivery report sending from RLC to DU APP
497 * Function : packRrcDeliveryReportToDu
500 * Unpacks the DL RRC Message info received at RLC from DU APP
502 * @params[in] Pointer to handler function
504 * Messae buffer to be unpacked
505 * @return ROK - success
508 * ****************************************************************/
509 uint8_t packRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDeliveryReport)
511 Buffer *mBuf = NULLP;
513 if(pst->selector == ODU_SELECTOR_LWLC)
515 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
517 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRrcDeliveryReportToDu");
520 /* pack the address of the structure */
521 CMCHKPK(oduPackPointer,(PTR)rrcDeliveryReport, mBuf);
522 return ODU_POST_TASK(pst,mBuf);
526 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRrcDeliveryReportToDu");
531 /*******************************************************************
533 * @brief Unpacks RRC Delivery Report info received at DU APP from RIC
537 * Function : unpackRrcDeliveryReportToDu
540 * Unpacks RRC Delivery Report info received at DU APP from RIC
542 * @params[in] Pointer to handler function
544 * Messae buffer to be unpacked
545 * @return ROK - success
548 * ****************************************************************/
549 uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func, Pst *pst, Buffer *mBuf)
551 if(pst->selector == ODU_SELECTOR_LWLC)
553 RrcDeliveryReport *rrcDeliveryReport;
554 /* unpack the address of the structure */
555 CMCHKUNPK(oduUnpackPointer, (PTR *)&rrcDeliveryReport, mBuf);
556 ODU_PUT_MSG_BUF(mBuf);
557 return (*func)(pst, rrcDeliveryReport);
561 /* Nothing to do for other selectors */
562 DU_LOG("\nERROR --> RLC: Only LWLC supported for RRC delivery Message transfer ");
563 ODU_PUT_MSG_BUF(mBuf);
569 /*******************************************************************
571 * @brief Packs and Sends UE Reconfig Request from DUAPP to RLC
575 * Function : packDuRlcUeReconfigReq
578 * Packs and Sends UE Reconfig Request from DUAPP to RLC
581 * @params[in] Post structure pointer
583 * @return ROK - success
586 * ****************************************************************/
587 uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeRecfg *ueRecfg)
589 Buffer *mBuf = NULLP;
591 if(pst->selector == ODU_SELECTOR_LWLC)
593 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
595 DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeReconfigReq");
598 /* pack the address of the structure */
599 CMCHKPK(oduPackPointer,(PTR)ueRecfg, mBuf);
603 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeReconfigReq");
607 return ODU_POST_TASK(pst,mBuf);
610 /*******************************************************************
611 * @brief Unpacks UE Reconfig Request received from DU APP
615 * Function : unpackRlcUeReconfigReq
618 * Unpacks UE Create Request received from DU APP
620 * @params[in] Pointer to Handler
621 * Post structure pointer
623 * @return ROK - success
626 * ****************************************************************/
627 uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf)
629 if(pst->selector == ODU_SELECTOR_LWLC)
632 /* unpack the address of the structure */
633 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueRecfg, mBuf);
634 ODU_PUT_MSG_BUF(mBuf);
635 return (*func)(pst, ueRecfg);
639 /* Nothing to do for other selectors */
640 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Create Request ");
641 ODU_PUT_MSG_BUF(mBuf);
646 /*******************************************************************
648 * @brief Pack and send DL RRC message Response from RLC to DU APP
652 * Function : packRlcDlRrcMsgRspToDu
655 * Pack and send DL RRC message Response from RLC to DU APP
657 * @params[in] Post structure
658 * DL RRC Msg Response
659 * @return ROK - success
662 * ****************************************************************/
663 uint8_t packRlcDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp)
665 Buffer *mBuf = NULLP;
667 if(pst->selector == ODU_SELECTOR_LWLC)
669 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
671 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDlRrcMsgRspToDu");
674 /* pack the address of the structure */
675 CMCHKPK(oduPackPointer,(PTR)dlRrcMsgRsp, mBuf);
676 return ODU_POST_TASK(pst,mBuf);
680 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDlRrcMsgRspToDu");
685 /*******************************************************************
687 * @brief Unpack DL RRC Msg Response received at DU APP from RLC
691 * Function : unpackRlcDlRrcMsgRspToDu
694 * Unpack DL RRC Msg Response received at DU APP from RLC
697 * @return ROK - success
700 * ****************************************************************/
701 uint8_t unpackRlcDlRrcMsgRspToDu(RlcDlRrcMsgRspToDuFunc func, Pst *pst, Buffer *mBuf)
703 if(pst->selector == ODU_SELECTOR_LWLC)
705 RlcDlRrcMsgRsp *dlRrcMsgRsp;
706 /* unpack the address of the structure */
707 CMCHKUNPK(oduUnpackPointer, (PTR *)&dlRrcMsgRsp, mBuf);
708 ODU_PUT_MSG_BUF(mBuf);
709 return (*func)(pst, dlRrcMsgRsp);
713 /* Nothing to do for other selectors */
714 DU_LOG("\nERROR --> RLC: Only LWLC supported for DL RRC Message transfer ");
715 ODU_PUT_MSG_BUF(mBuf);
720 /*******************************************************************
722 * @brief Pack and send UL user data from RLC to DU APP
726 * Function : packRlcUlUserDataToDu
729 * Pack and send UL User Data from RLC to DU APP
731 * @params[in] Post structure
733 * @return ROK - success
736 * ****************************************************************/
737 uint8_t packRlcUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData)
739 Buffer *mBuf = NULLP;
741 if(pst->selector == ODU_SELECTOR_LWLC)
743 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
745 DU_LOG("\nERROR --> RLC UL: Memory allocation failed at packRlcUlUserDataToDu");
748 /* pack the address of the structure */
749 CMCHKPK(oduPackPointer,(PTR)ulUserData, mBuf);
750 return ODU_POST_TASK(pst,mBuf);
754 DU_LOG("\nERROR --> RLC UL: Only LWLC supported for packRlcUlUserDataToDu");
759 /*******************************************************************
761 * @brief Unpack UL user data received at DU APP from RLC
765 * Function : unpackRlcUlUserDataToDu
768 * Unpack UL user data received at DU APP from RLC
771 * @return ROK - success
774 * ****************************************************************/
775 uint8_t unpackRlcUlUserDataToDu(RlcUlUserDataToDuFunc func, Pst *pst, Buffer *mBuf)
777 if(pst->selector == ODU_SELECTOR_LWLC)
779 RlcUlUserDatInfo *ulUserData;
780 /* unpack the address of the structure */
781 CMCHKUNPK(oduUnpackPointer, (PTR *)&ulUserData, mBuf);
782 ODU_PUT_MSG_BUF(mBuf);
783 return (*func)(pst, ulUserData);
787 /* Nothing to do for other selectors */
788 DU_LOG("\nERROR --> RLC UL: Only LWLC supported for UL User data transfer ");
789 ODU_PUT_MSG_BUF(mBuf);
795 /*******************************************************************
797 * @brief Pack and send DL user data from DUAPP to RLC
801 * Function : packRlcDlUserDataToRlc
804 * Pack and send DL User Data from DUAPP to RLC
806 * @params[in] Post structure
808 * @return ROK - success
811 * ****************************************************************/
812 uint8_t packRlcDlUserDataToRlc(Pst *pst, RlcDlUserDataInfo *dlUserData)
814 if(pst->selector == ODU_SELECTOR_LWLC)
816 /* pack the address of the structure */
817 CMCHKPK(oduPackPointer,(PTR)dlUserData, dlUserData->dlMsg);
818 return ODU_POST_TASK(pst,dlUserData->dlMsg);
822 DU_LOG("\nERROR --> RLC DL: Only LWLC supported for packRlcUlUserDataToDu");
827 /*******************************************************************
829 * @brief Unpack DL user data received at RLC from DUAPP
833 * Function : unpackRlcDlUserDataToRlc
836 * Unpack DL user data received at RLC from DUAPP
839 * @return ROK - success
842 * ****************************************************************/
843 uint8_t unpackRlcDlUserDataToRlc(DuRlcDlUserDataToRlcFunc func, Pst *pst, Buffer *mBuf)
845 if(pst->selector == ODU_SELECTOR_LWLC)
847 RlcDlUserDataInfo *dlUserData;
848 /* unpack the address of the structure */
849 CMCHKUNPK(oduUnpackPointer, (PTR *)&dlUserData, mBuf);
850 return (*func)(pst, dlUserData);
854 /* Nothing to do for other selectors */
855 DU_LOG("\nERROR --> RLC DL: Only LWLC supported for UL User data transfer ");
856 ODU_PUT_MSG_BUF(mBuf);
862 /*******************************************************************
864 * @brief Packs and Sends UE Delete Request from DUAPP to RLC
868 * Function : packDuRlcUeDeleteReq
871 * Packs and Sends UE Delete Request from DUAPP to RLC
874 * @params[in] Post structure pointer
875 * RlcUeDelete pointer
876 * @return ROK - success
879 * ****************************************************************/
881 uint8_t packDuRlcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete)
883 Buffer *mBuf = NULLP;
885 if(pst->selector == ODU_SELECTOR_LWLC)
887 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
889 DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeDeleteReq");
892 /* pack the address of the structure */
893 CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
897 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeDeleteReq");
901 return ODU_POST_TASK(pst,mBuf);
904 /*******************************************************************
905 * @brief Unpacks UE Delete Request received from DU APP
909 * Function : unpackRlcUeDeleteReq
912 * Unpacks UE Delete Request received from DU APP
914 * @params[in] Pointer to Handler
915 * Post structure pointer
917 * @return ROK - success
920 * ****************************************************************/
922 uint8_t unpackRlcUeDeleteReq(DuRlcUeDeleteReq func, Pst *pst, Buffer *mBuf)
924 if(pst->selector == ODU_SELECTOR_LWLC)
926 RlcUeDelete *ueDelete;
927 /* unpack the address of the structure */
928 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
929 ODU_PUT_MSG_BUF(mBuf);
930 return (*func)(pst, ueDelete);
934 /* Nothing to do for other selectors */
935 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Delete Request ");
936 ODU_PUT_MSG_BUF(mBuf);
941 /*******************************************************************
943 * @brief Packs and Sends UE Del Response from RLC to DUAPP
947 * Function : packRlcDuUeDeleteRsp
950 * Packs and Sends UE Del Response from RLC to DUAPP
953 * @params[in] Post structure pointer
954 * RlcUeDeleteRsp *ueDelRsp
956 * @return ROK - success
959 * ****************************************************************/
961 uint8_t packRlcDuUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *ueDelRsp)
963 Buffer *mBuf = NULLP;
965 if(pst->selector == ODU_SELECTOR_LWLC)
967 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
969 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeDeleteRsp");
972 /* pack the address of the structure */
973 CMCHKPK(oduPackPointer,(PTR)ueDelRsp, mBuf);
977 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeDeleteRsp");
981 return ODU_POST_TASK(pst,mBuf);
984 /*******************************************************************
986 * @brief Unpacks UE Del Response received from DU APP
990 * Function : unpackRlcUeDeleteRsp
993 * Unpacks UE Del Response received from DU APP
995 * @params[in] Pointer to Handler
996 * Post structure pointer
998 * @return ROK - success
1001 * ****************************************************************/
1003 uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf)
1005 if(pst->selector == ODU_SELECTOR_LWLC)
1007 RlcUeDeleteRsp *ueDeleteRsp = NULLP;
1008 /* unpack the address of the structure */
1009 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDeleteRsp, mBuf);
1010 ODU_PUT_MSG_BUF(mBuf);
1011 return (*func)(pst, ueDeleteRsp);
1015 /* Nothing to do for other selectors */
1016 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Del Response ");
1017 ODU_PUT_MSG_BUF(mBuf);
1023 /*******************************************************************
1025 * @brief Packs and Sends Slice PM from RLC to DUAPP
1029 * Function : packRlcDuSlicePm
1032 * Packs and Sends Slice Performance Metrics from RLC to DUAPP
1035 * @params[in] Post structure pointer
1036 * SlicePmList *sliceStats
1038 * @return ROK - success
1041 * ****************************************************************/
1043 uint8_t packRlcDuSlicePm(Pst *pst, SlicePmList *sliceStats)
1045 Buffer *mBuf = NULLP;
1047 if(pst->selector == ODU_SELECTOR_LWLC)
1049 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
1051 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuSlicePm");
1054 /* pack the address of the structure */
1055 CMCHKPK(oduPackPointer,(PTR)sliceStats, mBuf);
1059 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuSlicePm");
1063 return ODU_POST_TASK(pst,mBuf);
1066 /*******************************************************************
1068 * @brief Unpacks Slice PM received from RLC
1072 * Function : unpackRlcSlicePm
1075 * Unpacks Slice Performance Metrics received from RLC
1077 * @params[in] Pointer to Handler
1078 * Post structure pointer
1080 * @return ROK - success
1083 * ****************************************************************/
1085 uint8_t unpackRlcSlicePm(RlcSlicePmToDuFunc func, Pst *pst, Buffer *mBuf)
1087 if(pst->selector == ODU_SELECTOR_LWLC)
1089 SlicePmList *sliceStats = NULLP;
1090 /* unpack the address of the structure */
1091 CMCHKUNPK(oduUnpackPointer, (PTR *)&sliceStats, mBuf);
1092 ODU_PUT_MSG_BUF(mBuf);
1093 return (*func)(pst, sliceStats);
1097 /* Nothing to do for other selectors */
1098 DU_LOG("\nERROR --> RLC: Only LWLC supported for Slice Metrics ");
1099 ODU_PUT_MSG_BUF(mBuf);
1105 /*******************************************************************
1107 * @brief Packs and Sends UE Reestablishment Req from DUAPP to RLC
1111 * Function : packDuRlcUeReestablishReq
1114 * Packs and Sends UE Reestablishment Req from DUAPP to RLC
1117 * @params[in] Post structure pointer
1118 * RlcUeReestablishReq pointer
1119 * @return ROK - success
1122 * ****************************************************************/
1124 uint8_t packDuRlcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueDelete)
1126 Buffer *mBuf = NULLP;
1128 if(pst->selector == ODU_SELECTOR_LWLC)
1130 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
1132 DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeReestablishReq");
1135 /* pack the address of the structure */
1136 CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
1140 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeReestablishReq");
1144 return ODU_POST_TASK(pst,mBuf);
1147 /*******************************************************************
1148 * @brief Unpacks UE Reestablishment Req received from DU APP
1152 * Function : unpackRlcUeReestablishReq
1155 * Unpacks UE Reestablishment Req received from DU APP
1157 * @params[in] Pointer to Handler
1158 * Post structure pointer
1160 * @return ROK - success
1163 * ****************************************************************/
1165 uint8_t unpackRlcUeReestablishReq(DuRlcUeReestablishReq func, Pst *pst, Buffer *mBuf)
1167 if(pst->selector == ODU_SELECTOR_LWLC)
1169 RlcUeReestablishReq *ueDelete;
1170 /* unpack the address of the structure */
1171 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
1172 ODU_PUT_MSG_BUF(mBuf);
1173 return (*func)(pst, ueDelete);
1177 /* Nothing to do for other selectors */
1178 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Reestablishment Req ");
1179 ODU_PUT_MSG_BUF(mBuf);
1184 /*******************************************************************
1186 * @brief Packs and Sends UE Reestablishment Response from RLC to DUAPP
1190 * Function : packRlcDuUeReestablishRsp
1193 * Packs and Sends UE Reestablishment Response from RLC to DUAPP
1196 * @params[in] Post structure pointer
1197 * RlcUeReestablishRsp *ueReestablish
1199 * @return ROK - success
1202 * ****************************************************************/
1204 uint8_t packRlcDuUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablish)
1206 Buffer *mBuf = NULLP;
1208 if(pst->selector == ODU_SELECTOR_LWLC)
1210 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
1212 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeReestablishRsp");
1215 /* pack the address of the structure */
1216 CMCHKPK(oduPackPointer,(PTR)ueReestablish, mBuf);
1220 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeReestablishRsp");
1224 return ODU_POST_TASK(pst,mBuf);
1227 /*******************************************************************
1229 * @brief Unpacks UE Reestablishment Response received from DU APP
1233 * Function : unpackRlcUeReestablishRsp
1236 * Unpacks UE Reestablishment Response received from DU APP
1238 * @params[in] Pointer to Handler
1239 * Post structure pointer
1241 * @return ROK - success
1244 * ****************************************************************/
1246 uint8_t unpackRlcUeReestablishRsp(RlcDuUeReestablishRsp func, Pst *pst, Buffer *mBuf)
1248 if(pst->selector == ODU_SELECTOR_LWLC)
1250 RlcUeReestablishRsp *ueReestablishRsp = NULLP;
1251 /* unpack the address of the structure */
1252 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueReestablishRsp, mBuf);
1253 ODU_PUT_MSG_BUF(mBuf);
1254 return (*func)(pst, ueReestablishRsp);
1258 /* Nothing to do for other selectors */
1259 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Reestablishment Response ");
1260 ODU_PUT_MSG_BUF(mBuf);
1265 /**********************************************************************
1267 ***********************************************************************/