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
118 * @return ROK - success
121 * ****************************************************************/
122 uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *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 Cfg Response from RLC to DUAPP
189 * Function : packRlcDuUeCfgRsp
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 packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *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 packRlcDuUeCfgRsp");
212 /* pack the address of the structure */
213 CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
217 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeCfgRsp");
221 return ODU_POST_TASK(pst,mBuf);
224 /*******************************************************************
226 * @brief Unpacks UE Cfg Response received from DU APP
230 * Function : unpackRlcUeCfgRsp
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 unpackRlcUeCfgRsp(RlcDuUeCfgRsp func, Pst *pst, Buffer *mBuf)
244 if(pst->selector == ODU_SELECTOR_LWLC)
246 RlcUeCfgRsp *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 Pack and send UL RRC message transfer from RLC to DU APP
268 * Function : packRlcUlRrcMsgToDu
271 * Pack and send UL RRC message transfer from RLC to DU APP
273 * @params[in] Post structure
274 * UL RRC Msg transfer info
275 * @return ROK - success
278 * ****************************************************************/
279 uint8_t packRlcUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
281 Buffer *mBuf = NULLP;
283 if(pst->selector == ODU_SELECTOR_LWLC)
285 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
287 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcUlRrcMsgToDu");
290 /* pack the address of the structure */
291 CMCHKPK(oduPackPointer,(PTR)ulRrcMsgInfo, mBuf);
292 return ODU_POST_TASK(pst,mBuf);
296 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcUlRrcMsgToDu");
301 /*******************************************************************
303 * @brief Unpack UL RRC Msg Transfer received at DU APP from RLC
307 * Function : unpackRlcUlRrcMsgToDu
310 * Unpack UL RRC Msg Transfer received at DU APP from RLC
313 * @return ROK - success
316 * ****************************************************************/
317 uint8_t unpackRlcUlRrcMsgToDu(RlcUlRrcMsgToDuFunc func, Pst *pst, Buffer *mBuf)
319 if(pst->selector == ODU_SELECTOR_LWLC)
321 RlcUlRrcMsgInfo *ulRrcMsgInfo;
322 /* unpack the address of the structure */
323 CMCHKUNPK(oduUnpackPointer, (PTR *)&ulRrcMsgInfo, mBuf);
324 ODU_PUT_MSG_BUF(mBuf);
325 return (*func)(pst, ulRrcMsgInfo);
329 /* Nothing to do for other selectors */
330 DU_LOG("\nERROR --> RLC: Only LWLC supported for UL RRC Message transfer ");
331 ODU_PUT_MSG_BUF(mBuf);
337 /*******************************************************************
339 * @brief Pack and post DL RRC Message from DU APP to RLC
343 * Function : packDlRrcMsgToRlc
345 * Functionality: Pack and post DL RRC Message from DU APP to RLC
347 * @params[in] Post structure
348 * DL RRC Message info
349 * @return ROK - success
352 * ****************************************************************/
353 uint8_t packDlRrcMsgToRlc(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo)
355 Buffer *mBuf = NULLP;
357 if(pst->selector == ODU_SELECTOR_LWLC)
359 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
361 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDlRrcMsgToRlc");
364 /* pack the address of the structure */
365 CMCHKPK(oduPackPointer,(PTR)dlRrcMsgInfo, mBuf);
366 return ODU_POST_TASK(pst,mBuf);
370 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDlRrcMsgToRlc");
375 /*******************************************************************
377 * @brief Unpacks DL RRC Message info received at RLC from DU APP
381 * Function : unpackDlRrcMsgToRlc
384 * Unpacks the DL RRC Message info received at RLC from DU APP
386 * @params[in] Pointer to handler function
388 * Messae buffer to be unpacked
389 * @return ROK - success
392 * ****************************************************************/
393 uint8_t unpackDlRrcMsgToRlc(DuDlRrcMsgToRlcFunc func, Pst *pst, Buffer *mBuf)
395 if(pst->selector == ODU_SELECTOR_LWLC)
397 RlcDlRrcMsgInfo *dlRrcMsgInfo;
398 /* unpack the address of the structure */
399 CMCHKUNPK(oduUnpackPointer, (PTR *)&dlRrcMsgInfo, mBuf);
400 ODU_PUT_MSG_BUF(mBuf);
401 return (*func)(pst, dlRrcMsgInfo);
405 /* Nothing to do for other selectors */
406 DU_LOG("\nERROR --> RLC: Only LWLC supported for UL RRC Message transfer ");
407 ODU_PUT_MSG_BUF(mBuf);
412 /*******************************************************************
414 * @brief packs RRC delivery report sending from RLC to DU APP
418 * Function : packRrcDeliveryReportToDu
421 * Unpacks the DL RRC Message info received at RLC from DU APP
423 * @params[in] Pointer to handler function
425 * Messae buffer to be unpacked
426 * @return ROK - success
429 * ****************************************************************/
430 uint8_t packRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDeliveryReport)
432 Buffer *mBuf = NULLP;
434 if(pst->selector == ODU_SELECTOR_LWLC)
436 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
438 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRrcDeliveryReportToDu");
441 /* pack the address of the structure */
442 CMCHKPK(oduPackPointer,(PTR)rrcDeliveryReport, mBuf);
443 return ODU_POST_TASK(pst,mBuf);
447 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRrcDeliveryReportToDu");
452 /*******************************************************************
454 * @brief Unpacks RRC Delivery Report info received at DU APP from RIC
458 * Function : unpackRrcDeliveryReportToDu
461 * Unpacks RRC Delivery Report info received at DU APP from RIC
463 * @params[in] Pointer to handler function
465 * Messae buffer to be unpacked
466 * @return ROK - success
469 * ****************************************************************/
470 uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func, Pst *pst, Buffer *mBuf)
472 if(pst->selector == ODU_SELECTOR_LWLC)
474 RrcDeliveryReport *rrcDeliveryReport;
475 /* unpack the address of the structure */
476 CMCHKUNPK(oduUnpackPointer, (PTR *)&rrcDeliveryReport, mBuf);
477 ODU_PUT_MSG_BUF(mBuf);
478 return (*func)(pst, rrcDeliveryReport);
482 /* Nothing to do for other selectors */
483 DU_LOG("\nERROR --> RLC: Only LWLC supported for RRC delivery Message transfer ");
484 ODU_PUT_MSG_BUF(mBuf);
490 /*******************************************************************
492 * @brief Packs and Sends UE Reconfig Request from DUAPP to RLC
496 * Function : packDuRlcUeReconfigReq
499 * Packs and Sends UE Reconfig Request from DUAPP to RLC
502 * @params[in] Post structure pointer
504 * @return ROK - success
507 * ****************************************************************/
508 uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeRecfg *ueRecfg)
510 Buffer *mBuf = NULLP;
512 if(pst->selector == ODU_SELECTOR_LWLC)
514 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
516 DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeReconfigReq");
519 /* pack the address of the structure */
520 CMCHKPK(oduPackPointer,(PTR)ueRecfg, mBuf);
524 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeReconfigReq");
528 return ODU_POST_TASK(pst,mBuf);
531 /*******************************************************************
532 * @brief Unpacks UE Reconfig Request received from DU APP
536 * Function : unpackRlcUeReconfigReq
539 * Unpacks UE Create Request received from DU APP
541 * @params[in] Pointer to Handler
542 * Post structure pointer
544 * @return ROK - success
547 * ****************************************************************/
548 uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf)
550 if(pst->selector == ODU_SELECTOR_LWLC)
553 /* unpack the address of the structure */
554 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueRecfg, mBuf);
555 ODU_PUT_MSG_BUF(mBuf);
556 return (*func)(pst, ueRecfg);
560 /* Nothing to do for other selectors */
561 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Create Request ");
562 ODU_PUT_MSG_BUF(mBuf);
567 /*******************************************************************
569 * @brief Pack and send DL RRC message Response from RLC to DU APP
573 * Function : packRlcDlRrcMsgRspToDu
576 * Pack and send DL RRC message Response from RLC to DU APP
578 * @params[in] Post structure
579 * DL RRC Msg Response
580 * @return ROK - success
583 * ****************************************************************/
584 uint8_t packRlcDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp)
586 Buffer *mBuf = NULLP;
588 if(pst->selector == ODU_SELECTOR_LWLC)
590 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
592 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDlRrcMsgRspToDu");
595 /* pack the address of the structure */
596 CMCHKPK(oduPackPointer,(PTR)dlRrcMsgRsp, mBuf);
597 return ODU_POST_TASK(pst,mBuf);
601 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDlRrcMsgRspToDu");
606 /*******************************************************************
608 * @brief Unpack DL RRC Msg Response received at DU APP from RLC
612 * Function : unpackRlcDlRrcMsgRspToDu
615 * Unpack DL RRC Msg Response received at DU APP from RLC
618 * @return ROK - success
621 * ****************************************************************/
622 uint8_t unpackRlcDlRrcMsgRspToDu(RlcDlRrcMsgRspToDuFunc func, Pst *pst, Buffer *mBuf)
624 if(pst->selector == ODU_SELECTOR_LWLC)
626 RlcDlRrcMsgRsp *dlRrcMsgRsp;
627 /* unpack the address of the structure */
628 CMCHKUNPK(oduUnpackPointer, (PTR *)&dlRrcMsgRsp, mBuf);
629 ODU_PUT_MSG_BUF(mBuf);
630 return (*func)(pst, dlRrcMsgRsp);
634 /* Nothing to do for other selectors */
635 DU_LOG("\nERROR --> RLC: Only LWLC supported for DL RRC Message transfer ");
636 ODU_PUT_MSG_BUF(mBuf);
641 /*******************************************************************
643 * @brief Pack and send UL user data from RLC to DU APP
647 * Function : packRlcUlUserDataToDu
650 * Pack and send UL User Data from RLC to DU APP
652 * @params[in] Post structure
654 * @return ROK - success
657 * ****************************************************************/
658 uint8_t packRlcUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData)
660 Buffer *mBuf = NULLP;
662 if(pst->selector == ODU_SELECTOR_LWLC)
664 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
666 DU_LOG("\nERROR --> RLC UL: Memory allocation failed at packRlcUlUserDataToDu");
669 /* pack the address of the structure */
670 CMCHKPK(oduPackPointer,(PTR)ulUserData, mBuf);
671 return ODU_POST_TASK(pst,mBuf);
675 DU_LOG("\nERROR --> RLC UL: Only LWLC supported for packRlcUlUserDataToDu");
680 /*******************************************************************
682 * @brief Unpack UL user data received at DU APP from RLC
686 * Function : unpackRlcUlUserDataToDu
689 * Unpack UL user data received at DU APP from RLC
692 * @return ROK - success
695 * ****************************************************************/
696 uint8_t unpackRlcUlUserDataToDu(RlcUlUserDataToDuFunc func, Pst *pst, Buffer *mBuf)
698 if(pst->selector == ODU_SELECTOR_LWLC)
700 RlcUlUserDatInfo *ulUserData;
701 /* unpack the address of the structure */
702 CMCHKUNPK(oduUnpackPointer, (PTR *)&ulUserData, mBuf);
703 ODU_PUT_MSG_BUF(mBuf);
704 return (*func)(pst, ulUserData);
708 /* Nothing to do for other selectors */
709 DU_LOG("\nERROR --> RLC UL: Only LWLC supported for UL User data transfer ");
710 ODU_PUT_MSG_BUF(mBuf);
716 /*******************************************************************
718 * @brief Pack and send DL user data from DUAPP to RLC
722 * Function : packRlcDlUserDataToRlc
725 * Pack and send DL User Data from DUAPP to RLC
727 * @params[in] Post structure
729 * @return ROK - success
732 * ****************************************************************/
733 uint8_t packRlcDlUserDataToRlc(Pst *pst, RlcDlUserDataInfo *dlUserData)
735 if(pst->selector == ODU_SELECTOR_LWLC)
737 /* pack the address of the structure */
738 CMCHKPK(oduPackPointer,(PTR)dlUserData, dlUserData->dlMsg);
739 return ODU_POST_TASK(pst,dlUserData->dlMsg);
743 DU_LOG("\nERROR --> RLC DL: Only LWLC supported for packRlcUlUserDataToDu");
748 /*******************************************************************
750 * @brief Unpack DL user data received at RLC from DUAPP
754 * Function : unpackRlcDlUserDataToRlc
757 * Unpack DL user data received at RLC from DUAPP
760 * @return ROK - success
763 * ****************************************************************/
764 uint8_t unpackRlcDlUserDataToRlc(DuRlcDlUserDataToRlcFunc func, Pst *pst, Buffer *mBuf)
766 if(pst->selector == ODU_SELECTOR_LWLC)
768 RlcDlUserDataInfo *dlUserData;
769 /* unpack the address of the structure */
770 CMCHKUNPK(oduUnpackPointer, (PTR *)&dlUserData, mBuf);
771 return (*func)(pst, dlUserData);
775 /* Nothing to do for other selectors */
776 DU_LOG("\nERROR --> RLC DL: Only LWLC supported for UL User data transfer ");
777 ODU_PUT_MSG_BUF(mBuf);
783 /*******************************************************************
785 * @brief Packs and Sends UE Delete Request from DUAPP to RLC
789 * Function : packDuRlcUeDeleteReq
792 * Packs and Sends UE Delete Request from DUAPP to RLC
795 * @params[in] Post structure pointer
796 * RlcUeDelete pointer
797 * @return ROK - success
800 * ****************************************************************/
802 uint8_t packDuRlcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete)
804 Buffer *mBuf = NULLP;
806 if(pst->selector == ODU_SELECTOR_LWLC)
808 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
810 DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeDeleteReq");
813 /* pack the address of the structure */
814 CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
818 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeDeleteReq");
822 return ODU_POST_TASK(pst,mBuf);
825 /*******************************************************************
826 * @brief Unpacks UE Delete Request received from DU APP
830 * Function : unpackRlcUeDeleteReq
833 * Unpacks UE Delete Request received from DU APP
835 * @params[in] Pointer to Handler
836 * Post structure pointer
838 * @return ROK - success
841 * ****************************************************************/
843 uint8_t unpackRlcUeDeleteReq(DuRlcUeDeleteReq func, Pst *pst, Buffer *mBuf)
845 if(pst->selector == ODU_SELECTOR_LWLC)
847 RlcUeDelete *ueDelete;
848 /* unpack the address of the structure */
849 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
850 ODU_PUT_MSG_BUF(mBuf);
851 return (*func)(pst, ueDelete);
855 /* Nothing to do for other selectors */
856 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Delete Request ");
857 ODU_PUT_MSG_BUF(mBuf);
862 /*******************************************************************
864 * @brief Packs and Sends UE Del Response from RLC to DUAPP
868 * Function : packRlcDuUeDeleteRsp
871 * Packs and Sends UE Del Response from RLC to DUAPP
874 * @params[in] Post structure pointer
875 * RlcUeDeleteRsp *ueDelRsp
877 * @return ROK - success
880 * ****************************************************************/
882 uint8_t packRlcDuUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *ueDelRsp)
884 Buffer *mBuf = NULLP;
886 if(pst->selector == ODU_SELECTOR_LWLC)
888 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
890 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeDeleteRsp");
893 /* pack the address of the structure */
894 CMCHKPK(oduPackPointer,(PTR)ueDelRsp, mBuf);
898 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeDeleteRsp");
902 return ODU_POST_TASK(pst,mBuf);
905 /*******************************************************************
907 * @brief Unpacks UE Del Response received from DU APP
911 * Function : unpackRlcUeDeleteRsp
914 * Unpacks UE Del Response received from DU APP
916 * @params[in] Pointer to Handler
917 * Post structure pointer
919 * @return ROK - success
922 * ****************************************************************/
924 uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf)
926 if(pst->selector == ODU_SELECTOR_LWLC)
928 RlcUeDeleteRsp *ueDeleteRsp = NULLP;
929 /* unpack the address of the structure */
930 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDeleteRsp, mBuf);
931 ODU_PUT_MSG_BUF(mBuf);
932 return (*func)(pst, ueDeleteRsp);
936 /* Nothing to do for other selectors */
937 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Del Response ");
938 ODU_PUT_MSG_BUF(mBuf);
944 /*******************************************************************
946 * @brief Packs and Sends Slice PM from RLC to DUAPP
950 * Function : packRlcDuSlicePm
953 * Packs and Sends Slice Performance Metrics from RLC to DUAPP
956 * @params[in] Post structure pointer
957 * SlicePmList *sliceStats
959 * @return ROK - success
962 * ****************************************************************/
964 uint8_t packRlcDuSlicePm(Pst *pst, SlicePmList *sliceStats)
966 Buffer *mBuf = NULLP;
968 if(pst->selector == ODU_SELECTOR_LWLC)
970 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
972 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuSlicePm");
975 /* pack the address of the structure */
976 CMCHKPK(oduPackPointer,(PTR)sliceStats, mBuf);
980 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuSlicePm");
984 return ODU_POST_TASK(pst,mBuf);
987 /*******************************************************************
989 * @brief Unpacks Slice PM received from RLC
993 * Function : unpackRlcSlicePm
996 * Unpacks Slice Performance Metrics received from RLC
998 * @params[in] Pointer to Handler
999 * Post structure pointer
1001 * @return ROK - success
1004 * ****************************************************************/
1006 uint8_t unpackRlcSlicePm(RlcSlicePmToDuFunc func, Pst *pst, Buffer *mBuf)
1008 if(pst->selector == ODU_SELECTOR_LWLC)
1010 SlicePmList *sliceStats = NULLP;
1011 /* unpack the address of the structure */
1012 CMCHKUNPK(oduUnpackPointer, (PTR *)&sliceStats, mBuf);
1013 ODU_PUT_MSG_BUF(mBuf);
1014 return (*func)(pst, sliceStats);
1018 /* Nothing to do for other selectors */
1019 DU_LOG("\nERROR --> RLC: Only LWLC supported for Slice Metrics ");
1020 ODU_PUT_MSG_BUF(mBuf);
1026 /*******************************************************************
1028 * @brief Packs and Sends UE Reestablishment Req from DUAPP to RLC
1032 * Function : packDuRlcUeReestablishReq
1035 * Packs and Sends UE Reestablishment Req from DUAPP to RLC
1038 * @params[in] Post structure pointer
1039 * RlcUeReestablishReq pointer
1040 * @return ROK - success
1043 * ****************************************************************/
1045 uint8_t packDuRlcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueDelete)
1047 Buffer *mBuf = NULLP;
1049 if(pst->selector == ODU_SELECTOR_LWLC)
1051 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
1053 DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeReestablishReq");
1056 /* pack the address of the structure */
1057 CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
1061 DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeReestablishReq");
1065 return ODU_POST_TASK(pst,mBuf);
1068 /*******************************************************************
1069 * @brief Unpacks UE Reestablishment Req received from DU APP
1073 * Function : unpackRlcUeReestablishReq
1076 * Unpacks UE Reestablishment Req received from DU APP
1078 * @params[in] Pointer to Handler
1079 * Post structure pointer
1081 * @return ROK - success
1084 * ****************************************************************/
1086 uint8_t unpackRlcUeReestablishReq(DuRlcUeReestablishReq func, Pst *pst, Buffer *mBuf)
1088 if(pst->selector == ODU_SELECTOR_LWLC)
1090 RlcUeReestablishReq *ueDelete;
1091 /* unpack the address of the structure */
1092 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
1093 ODU_PUT_MSG_BUF(mBuf);
1094 return (*func)(pst, ueDelete);
1098 /* Nothing to do for other selectors */
1099 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Reestablishment Req ");
1100 ODU_PUT_MSG_BUF(mBuf);
1105 /*******************************************************************
1107 * @brief Packs and Sends UE Reestablishment Response from RLC to DUAPP
1111 * Function : packRlcDuUeReestablishRsp
1114 * Packs and Sends UE Reestablishment Response from RLC to DUAPP
1117 * @params[in] Post structure pointer
1118 * RlcUeReestablishRsp *ueReestablish
1120 * @return ROK - success
1123 * ****************************************************************/
1125 uint8_t packRlcDuUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablish)
1127 Buffer *mBuf = NULLP;
1129 if(pst->selector == ODU_SELECTOR_LWLC)
1131 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
1133 DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeReestablishRsp");
1136 /* pack the address of the structure */
1137 CMCHKPK(oduPackPointer,(PTR)ueReestablish, mBuf);
1141 DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeReestablishRsp");
1145 return ODU_POST_TASK(pst,mBuf);
1148 /*******************************************************************
1150 * @brief Unpacks UE Reestablishment Response received from DU APP
1154 * Function : unpackRlcUeReestablishRsp
1157 * Unpacks UE Reestablishment Response received from DU APP
1159 * @params[in] Pointer to Handler
1160 * Post structure pointer
1162 * @return ROK - success
1165 * ****************************************************************/
1167 uint8_t unpackRlcUeReestablishRsp(RlcDuUeReestablishRsp func, Pst *pst, Buffer *mBuf)
1169 if(pst->selector == ODU_SELECTOR_LWLC)
1171 RlcUeReestablishRsp *ueReestablishRsp = NULLP;
1172 /* unpack the address of the structure */
1173 CMCHKUNPK(oduUnpackPointer, (PTR *)&ueReestablishRsp, mBuf);
1174 ODU_PUT_MSG_BUF(mBuf);
1175 return (*func)(pst, ueReestablishRsp);
1179 /* Nothing to do for other selectors */
1180 DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Reestablishment Response ");
1181 ODU_PUT_MSG_BUF(mBuf);
1186 /**********************************************************************
1188 ***********************************************************************/