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