[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-501] WG8 Alignment | RLC Max Retransmission...
[o-du/l2.git] / src / 5gnrrlc / rlc_upr_inf_api.c
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18 #include "common_def.h"
19 #include "du_app_rlc_inf.h"
20
21 /* Function pointer array for UL RRC Msg Transfer */
22 RlcUlRrcMsgToDuFunc rlcSendUlRrcMsgToDuOpts[] = 
23 {
24    packRlcUlRrcMsgToDu,       /* 0 - Loosely coupled */
25    DuProcRlcUlRrcMsgTrans,    /* 1 - Tightly coupled */
26    packRlcUlRrcMsgToDu        /* 2 - Light weight loosely coupled */
27 };
28
29 RlcDuMaxRetransInd rlcMaxRetransIndOpts[] =
30 {
31    packRlcDuMaxRetransInd,     /* 0 - loosely coupled */
32    DuProcRlcMaxRetransInd,     /* 1 - tightly coupled */
33    packRlcDuMaxRetransInd     /* 2 - LWLC loosely coupled */
34 };
35
36 RlcRrcDeliveryReportToDuFunc rlcSendRrcDeliveryReportToDuOpts[]=
37 {
38    packRrcDeliveryReportToDu,          /* 0 - Loosely coupled */
39    DuProcRlcRrcDeliveryReport,    /* 1 - Tightly coupled */
40    packRrcDeliveryReportToDu           /* 2 - Light weight loosely coupled */
41 };
42
43 /* Function pointer array for DL RRC Msg Rsp Transfer */
44 RlcDlRrcMsgRspToDuFunc rlcSendDlRrcMsgRspToDuOpts[] = 
45 {
46    packRlcDlRrcMsgRspToDu,       /* 0 - Loosely coupled */
47    DuProcRlcDlRrcMsgRsp,         /* 1 - Tightly coupled */
48    packRlcDlRrcMsgRspToDu        /* 2 - Light weight loosely coupled */
49 };
50
51 /* Function pointer array for UL RRC Msg Transfer */
52 RlcUlUserDataToDuFunc rlcSendUlUserDataToDuOpts[] =
53 {
54    packRlcUlUserDataToDu,       /* 0 - Loosely coupled */
55    DuProcRlcUlUserDataTrans,    /* 1 - Tightly coupled */
56    packRlcUlUserDataToDu        /* 2 - Light weight loosely coupled */
57 };
58
59 RlcDuUeDeleteRsp rlcUeDeleteRspOpts[] =
60 {
61    packRlcDuUeDeleteRsp,     /* 0 - loosely coupled */
62    DuProcRlcUeDeleteRsp,     /* 1 - tightly coupled */
63    packRlcDuUeDeleteRsp     /* 2 - LWLC loosely coupled */
64 };
65
66 RlcSlicePmToDuFunc rlcSlicePmOpts[] =
67 {
68    packRlcDuSlicePm,          /* 0 - loosely coupled */
69    DuProcRlcSliceMetrics,     /* 1 - tightly coupled */
70    packRlcDuSlicePm           /* 2 - LWLC loosely coupled */
71 };
72
73 RlcDuUeReestablishRsp rlcUeReestablishRspOpts[] =
74 {
75    packRlcDuUeReestablishRsp,     /* 0 - loosely coupled */
76    DuProcRlcUeReestablishRsp,     /* 1 - tightly coupled */
77    packRlcDuUeReestablishRsp     /* 2 - LWLC loosely coupled */
78 };
79
80 /*******************************************************************
81  *
82  * @brief Sends UL RRC Message Info to DU APP
83  *
84  * @details
85  *
86  *    Function : rlcSendUlRrcMsgToDu
87  *
88  *    Functionality:  Sends UL RRC Message Info to DU APP
89  *
90  * @params[in] Pst structure
91  *             UL RRC Msg Info
92  * @return ROK     - success
93  *         RFAILED - failure
94  *
95  * ****************************************************************/
96 uint8_t rlcSendUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
97 {
98    return (*rlcSendUlRrcMsgToDuOpts[pst->selector])(pst, ulRrcMsgInfo);
99 }
100
101 /*******************************************************************
102 *
103 * @brief Sends max retransmission reached Info to DU APP
104 *
105 * @details
106 *
107 *    Function : rlcSendMaxRetransIndToDu 
108 *
109 *    Functionality:  Sends  max retransmission reached Info to DU APP
110 *
111 * @params[in] Pst structure
112 *              max retransmission reached Info
113 * @return ROK     - success
114 *         RFAILED - failure
115 *
116 * ****************************************************************/
117 uint8_t rlcSendMaxRetransIndToDu(Pst *pst, RlcMaxRetransInfo *maxRetransInfo) 
118 {
119    return (*rlcMaxRetransIndOpts[pst->selector])(pst, maxRetransInfo);
120 }
121
122 /*******************************************************************
123 *
124 * @brief Sends RRC delivery Message Info to DU APP
125 *
126 * @details
127 *
128 *    Function : rlcSendRrcDeliveryReportToDu
129 *
130 *    Functionality:  Sends RRC delivery Message Info to DU APP
131 *
132 * @params[in] Pst structure
133 *             RRC delivery Msg Info
134 * @return ROK     - success
135 *         RFAILED - failure
136 *
137 * ****************************************************************/
138 uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery) 
139 {
140    return (*rlcSendRrcDeliveryReportToDuOpts[pst->selector])(pst, rrcDelivery);
141 }
142 /*******************************************************************
143  *
144  * @brief Sends DL RRC Message Status to DU APP
145  *
146  * @details
147  *
148  *    Function : rlcSendDlRrcMsgRspToDu
149  *
150  *    Functionality:  Sends DL RRC Message Status to DU APP
151  *
152  * @params[in] Pst structure
153  *             DL RRC Msg Info
154  * @return ROK     - success
155  *         RFAILED - failure
156  *
157  * ****************************************************************/
158 uint8_t rlcSendDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsg)
159 {
160    return (*rlcSendDlRrcMsgRspToDuOpts[pst->selector])(pst, dlRrcMsg);
161 }
162
163 /*******************************************************************
164  *
165  * @brief Sends UL User data Info to DU APP
166  *
167  * @details
168  *
169  *    Function : rlcSendUlUserDataToDu
170  *
171  *    Functionality:  Sends UL User Data Info to DU APP
172  *
173  * @params[in] Pst structure
174  *             UL user data Info
175  * @return ROK     - success
176  *         RFAILED - failure
177  *
178  * ****************************************************************/
179 uint8_t rlcSendUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData)
180 {
181    return (*rlcSendUlUserDataToDuOpts[pst->selector])(pst, ulUserData);
182 }
183
184 /*******************************************************************
185  *
186  * @brief Sends Ue Delete Rsp to DU APP
187  *
188  * @details
189  *
190  *    Function : rlcSendUeDeleteRspToDu 
191  *
192  *    Functionality:  Sends Ue Delete Rsp to DU APP
193  *
194  * @params[in] Pst *pst, RlcUeDeleteRsp *ueDeleteRsp 
195  *             
196  * @return ROK     - success
197  *         RFAILED - failure
198  *
199  * ****************************************************************/
200 uint8_t rlcSendUeDeleteRspToDu(Pst *pst, RlcUeDeleteRsp *ueDeleteRsp)
201 {
202     return (*rlcUeDeleteRspOpts[pst->selector])(pst, ueDeleteRsp);
203 }
204
205 /*******************************************************************
206  *
207  * @brief Sends Slice Performance Metrics to DU APP
208  *
209  * @details
210  *
211  *    Function : rlcSendSlicePmToDu 
212  *
213  *    Functionality:  Sends Performace Metrics per slice together to DU APP
214  *
215  * @params[in] Pst *pst, SlicePmList *sliceStats 
216  *             
217  * @return ROK     - success
218  *         RFAILED - failure
219  *
220  * ****************************************************************/
221 uint8_t rlcSendSlicePmToDu(Pst *pst, SlicePmList *sliceStats)
222 {
223     return (*rlcSlicePmOpts[pst->selector])(pst, sliceStats);
224 }
225
226 /*******************************************************************
227  *
228  * @brief Sends Ue Reestablishment Rsp to DU APP
229  *
230  * @details
231  *
232  *    Function : rlcSendUeReestablishRspToDu 
233  *
234  *    Functionality:  Sends Ue Reestablishment Rsp to DU APP
235  *
236  * @params[in] Pst *pst, RlcUeReestablishRsp *ueReestablishRsp 
237  *             
238  * @return ROK     - success
239  *         RFAILED - failure
240  *
241  * ****************************************************************/
242 uint8_t rlcSendUeReestablishRspToDu(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp)
243 {
244     return (*rlcUeReestablishRspOpts[pst->selector])(pst, ueReestablishRsp);
245 }
246
247 /**********************************************************************
248          End of file
249 **********************************************************************/