Adding new commiter to ODU-High repo
[o-du/l2.git] / src / 5gnrrlc / rlc_dl_ul_inf_ptdl.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
19 /************************************************************************
20  
21      Name:     NR RLC ULDL Interface
22   
23      Type:     C source file
24   
25      Desc:     C source code for INF Interface Module 
26   
27      File:     rlc_dl_ul_inf_ptdl.c
28   
29 **********************************************************************/
30
31 /** @file rlc_dl_ul_inf_ptdl.c
32 */
33
34 /* header include files (.h) */
35 #include "common_def.h"
36 #include "lkw.h"           /* LKW defines */
37 #include "ckw.h"           /* CKW defines */
38 #include "kwu.h"           /* KWU defines */
39 #include "rgu.h"           /* RGU defines */
40 #include "rlc_err.h"        /* Err defines */
41 #include "rlc_env.h"        /* RLC environment options */
42
43 /* extern (.x) include files */
44 #include "lkw.x"           /* LKW */
45 #include "ckw.x"           /* CKW */
46 #include "kwu.x"           /* KWU */
47 #include "rgu.x"           /* RGU */
48
49 #include "rlc_utils.h"            /* RLC defines */
50 #include "rlc_dl_ul_inf.h"
51 #include "rlc_dl.h"
52
53 #define UDX_MAX_SEL   3
54
55 #ifndef LCKWULUDX
56 static S16 PtDlUdxBndCfm ARGS(( Pst *pst,SuId suId,uint8_t status ));
57 static S16 PtDlUdxCfgCfm ARGS((Pst *pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
58 static S16 PtDlUdxUeIdChgCfm ARGS(( Pst *pst, SuId suId,uint32_t transId, 
59                                      CmStatus status));
60 static S16  PtDlUdxStaUpdCfm ARGS(( Pst* pst,SuId suId,CmLteRlcId *rlcId,
61                               RlcUdxBufLst *pBufLst));
62
63 /* UDX Bind Confirm primitive */
64 /**
65  *
66  * @brief 
67  *
68  *        Handler for confirming  the bind request received from KWU
69  *        interface.
70  *
71  * @b Description:
72  *
73  *        This function send the bind confirm primitive to the RLC user,
74  *        when it receives a bind request from its service user.
75  *
76  *  @param[in] pst     Post structure  
77  *  @param[in] suId    Service user SAP ID 
78  *  @param[in] status  Status of Confirmation 
79  *
80  *  @return  S16
81  *      -# ROK 
82  *
83  */
84 static S16 PtDlUdxBndCfm
85 (
86 Pst *pst,                       /* post structure */
87 SuId suId,                      /* Service User Id */
88 uint8_t   status                     /* Status */
89 )
90 {
91
92    return ROK;
93
94 } /* end of rlcDlUdxBndCfm */
95
96
97
98 /**
99  *
100  * @brief 
101  *
102  *        Handler for confirming  the bind request received from KWU
103  *        interface.
104  *
105  * @b Description:
106  *
107  *        This function send the bind confirm primitive to the RLC user,
108  *        when it receives a bind request from its service user.
109  *
110  *  @param[in] pst     Post structure  
111  *  @param[in] suId    Service user SAP ID 
112  *  @param[in] status  Status of Confirmation 
113  *
114  *  @return  S16
115  *      -# ROK 
116  *
117  */
118 static S16 PtDlUdxCfgCfm
119 (
120 Pst *pst,                       /* post structure */
121 SuId suId,                      /* Service User Id */
122 RlcCfgCfmInfo *cfmInfo                    /* Status */
123 )
124 {
125
126    return ROK;
127
128 } /* end of rlcDlUdxBndCfm */
129
130 /**
131  *
132  * @brief 
133  *
134  *        Handler for confirming  the bind request received from KWU
135  *        interface.
136  *
137  * @b Description:
138  *
139  *        This function send the bind confirm primitive to the RLC user,
140  *        when it receives a bind request from its service user.
141  *
142  *  @param[in] pst     Post structure  
143  *  @param[in] suId    Service user SAP ID 
144  *  @param[in] status  Status of Confirmation 
145  *
146  *  @return  S16
147  *      -# ROK 
148  *
149  */
150 static S16 PtDlUdxUeIdChgCfm
151 (
152 Pst *pst,                       /* post structure */
153 SuId suId,                      /* Service User Id */
154 uint32_t transId,
155 CmStatus status
156 )
157 {
158
159    return ROK;
160
161 } /* end of rlcDlUdxBndCfm */
162
163
164
165 static S16  PtDlUdxStaUpdCfm
166 (
167 Pst*                pst,
168 SuId                suId,
169 CmLteRlcId          *rlcId,
170 RlcUdxBufLst         *pBufLst
171 )
172 {
173    return ROK;
174 }
175
176 static S16  PtDlUdxStaProhTmrStart
177 (
178 Pst*                pst,
179 SuId                suId,
180 CmLteRlcId          *rlcId
181 )
182 {
183    return ROK;
184 }
185 #endif
186
187 static UdxBndCfm rlcDlUdxBndCfmMt[UDX_MAX_SEL] =
188 {
189 #ifdef LCKWULUDX
190    cmPkUdxBndCfm,            /* 0 - loosely coupled */
191 #else
192    PtDlUdxBndCfm,            /* 0 - loosely coupled, portable  */
193 #endif /* LCKWUIKWU */
194 #ifdef LWLCKWULUDX
195    cmPkUdxBndCfm,            /* 1 - loosely coupled */
196 #else
197    PtDlUdxBndCfm,            /* 1 - loosely coupled, portable  */
198 #endif /* LCKWUIKWU */
199 #ifdef KW
200    rlcUlUdxBndCfm,            /* 2 - tightly coupled, RRC  */
201 #else
202    PtDlUdxBndCfm,            /* 2 - tightly coupled, portable */
203 #endif /* KW */
204 };
205
206 UdxCfgCfm rlcDlUdxCfgCfmMt[UDX_MAX_SEL] =
207 {
208 #ifdef LCKWULUDX
209    cmPkUdxCfgCfm,            /* 0 - loosely coupled */
210 #else
211    PtDlUdxCfgCfm,            /* 0 - loosely coupled, portable  */
212 #endif /* LCKWUIKWU */
213 #ifdef LWLCKWULUDX
214    cmPkUdxCfgCfm,            /* 1 - loosely coupled */
215 #else
216    PtDlUdxCfgCfm,            /* 1 - loosely coupled, portable  */
217 #endif /* LCKWUIKWU */
218 #ifdef KW
219    rlcUlUdxCfgCfm,            /* 2 - tightly coupled, RRC  */
220 #else
221    PtDlUdxCfgCfm,            /* 2 - tightly coupled, portable */
222 #endif /* KW */
223 };
224
225 UdxUeIdChgCfm rlcDlUdxUeIdChgCfmMt[UDX_MAX_SEL] =
226 {
227 #ifdef LCKWULUDX
228    cmPkUdxUeIdChgCfm,            /* 0 - loosely coupled */
229 #else
230    PtDlUdxUeIdChgCfm,            /* 0 - loosely coupled, portable  */
231 #endif /* LCKWUIKWU */
232 #ifdef LWLCKWULUDX
233    cmPkUdxUeIdChgCfm,            /* 1 - loosely coupled */
234 #else
235    PtDlUdxUeIdChgCfm,            /* 1 - loosely coupled, portable  */
236 #endif /* LCKWUIKWU */
237 #ifdef KW
238    rlcUlUdxUeIdChgCfm,            /* 2 - tightly coupled, RRC  */
239 #else
240    PtDlUdxUeIdChgCfm,            /* 2 - tightly coupled, portable */
241 #endif /* KW */
242 };
243
244
245 static const UdxStaProhTmrStart rlcDlUdxStaProhTmrStartMt[UDX_MAX_SEL] =
246 {
247 #ifdef LCKWULUDX
248    cmPkUdxStaProhTmrStart,
249 #else
250    PtDlUdxStaProhTmrStart,
251 #endif
252 #ifdef LWLCKWULUDX
253    cmPkUdxStaProhTmrStart,            /* 1 - loosely coupled */
254 #else
255    PtDlUdxStaProhTmrStart,            /* 1 - loosely coupled, portable  */
256 #endif /* LCKWUIKWU */
257 #ifdef KW
258    rlcUlUdxStaProhTmrStart,            /* 2 - tightly coupled, RRC  */
259 #else
260    PtDlUdxStaProhTmrStart,            /* 2 - tightly coupled, portable */
261 #endif /* KW */
262 };
263
264 /**
265  *
266  * @brief 
267  *
268  *        Handler for confirming  the bind request received from KWU
269  *        interface.
270  *
271  * @b Description:
272  *
273  *        This function send the bind confirm primitive to the RLC user,
274  *        when it receives a bind request from its service user.
275  *
276  *  @param[in] pst     Post structure  
277  *  @param[in] suId    Service user SAP ID 
278  *  @param[in] status  Status of Confirmation 
279  *
280  *  @return  S16
281  *      -# ROK 
282  *
283  */
284 S16 rlcDlUdxBndCfm
285 (
286 Pst *pst,                       /* post structure */
287 SuId suId,                      /* Service User Id */
288 uint8_t status                     /* Status */
289 )
290 {
291
292    /* jump to specific primitive depending on configured selector */
293    (*rlcDlUdxBndCfmMt[pst->selector])(pst, suId, status);
294
295    return ROK;
296
297 } /* end of rlcDlUdxBndCfm */
298
299
300
301 /**
302  *
303  * @brief 
304  *
305  *        Handler for confirming  the bind request received from KWU
306  *        interface.
307  *
308  * @b Description:
309  *
310  *        This function send the bind confirm primitive to the RLC user,
311  *        when it receives a bind request from its service user.
312  *
313  *  @param[in] pst     Post structure  
314  *  @param[in] suId    Service user SAP ID 
315  *  @param[in] status  Status of Confirmation 
316  *
317  *  @return  S16
318  *      -# ROK 
319  *
320  */
321 S16 rlcDlUdxCfgCfm
322 (
323 Pst *pst,                       /* post structure */
324 SuId suId,                      /* Service User Id */
325 RlcCfgCfmInfo *cfmInfo                    /* Status */
326 )
327 {
328
329    /* jump to specific primitive depending on configured selector */
330    (*rlcDlUdxCfgCfmMt[pst->selector])(pst, suId, cfmInfo);
331
332    return ROK;
333
334 } /* end of rlcDlUdxBndCfm */
335
336 /**
337  *
338  * @brief 
339  *
340  *        Handler for confirming  the bind request received from KWU
341  *        interface.
342  *
343  * @b Description:
344  *
345  *        This function send the bind confirm primitive to the RLC user,
346  *        when it receives a bind request from its service user.
347  *
348  *  @param[in] pst     Post structure  
349  *  @param[in] suId    Service user SAP ID 
350  *  @param[in] status  Status of Confirmation 
351  *
352  *  @return  S16
353  *      -# ROK 
354  *
355  */
356 S16 rlcDlUdxUeIdChgCfm
357 (
358 Pst *pst,                       /* post structure */
359 SuId suId,                      /* Service User Id */
360 uint32_t      transId,
361 CmStatus      status
362 )
363 {
364
365    /* jump to specific primitive depending on configured selector */
366    (*rlcDlUdxUeIdChgCfmMt[pst->selector])(pst, suId,transId,status);
367
368    return ROK;
369
370 } /* end of rlcDlUdxBndCfm */
371
372
373 uint8_t rlcDlUdxStaProhTmrStart(Pst *pst, SuId suId, CmLteRlcId *rlcId)
374 {
375    /* jump to specific primitive depending on configured selector */
376    (*rlcDlUdxStaProhTmrStartMt[pst->selector])(pst, suId, rlcId);
377
378    return ROK;
379
380 } /* end of rlcDlUdxBndCfm */
381
382 /**********************************************************************
383  
384          End of file
385 **********************************************************************/