U8, U16, U32 data type changes
[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 PRIVATE S16 PtDlUdxBndCfm ARGS(( Pst *pst,SuId suId,uint8_t status ));
63 PRIVATE S16 PtDlUdxCfgCfm ARGS((Pst *pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
64 PRIVATE S16 PtDlUdxUeIdChgCfm ARGS(( Pst *pst, SuId suId,uint32_t transId, 
65                                      CmStatus status));
66 PRIVATE 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 #ifdef ANSI
91 PRIVATE S16 PtDlUdxBndCfm
92 (
93 Pst *pst,                       /* post structure */
94 SuId suId,                      /* Service User Id */
95 uint8_t   status                     /* Status */
96 )
97 #else
98 PRIVATE S16 PtDlUdxBndCfm(pst, suId, status)
99 Pst *pst;                       /* post structure */
100 SuId suId;                      /* Service User Id */
101 uint8_t   status;                    /* Status */
102 #endif
103 {
104
105    return ROK;
106
107 } /* end of rlcDlUdxBndCfm */
108
109
110
111 /**
112  *
113  * @brief 
114  *
115  *        Handler for confirming  the bind request received from KWU
116  *        interface.
117  *
118  * @b Description:
119  *
120  *        This function send the bind confirm primitive to the RLC user,
121  *        when it receives a bind request from its service user.
122  *
123  *  @param[in] pst     Post structure  
124  *  @param[in] suId    Service user SAP ID 
125  *  @param[in] status  Status of Confirmation 
126  *
127  *  @return  S16
128  *      -# ROK 
129  *
130  */
131 #ifdef ANSI
132 PRIVATE S16 PtDlUdxCfgCfm
133 (
134 Pst *pst,                       /* post structure */
135 SuId suId,                      /* Service User Id */
136 RlcCfgCfmInfo *cfmInfo                    /* Status */
137 )
138 #else
139 PRIVATE S16 PtDlUdxCfgCfm(pst, suId, status)
140 Pst           *pst;            /* post structure */
141 SuId          suId;            /* Service User Id */
142 RlcCfgCfmInfo *cfmInfo;        /* Status */
143 #endif
144 {
145
146    return ROK;
147
148 } /* end of rlcDlUdxBndCfm */
149
150 /**
151  *
152  * @brief 
153  *
154  *        Handler for confirming  the bind request received from KWU
155  *        interface.
156  *
157  * @b Description:
158  *
159  *        This function send the bind confirm primitive to the RLC user,
160  *        when it receives a bind request from its service user.
161  *
162  *  @param[in] pst     Post structure  
163  *  @param[in] suId    Service user SAP ID 
164  *  @param[in] status  Status of Confirmation 
165  *
166  *  @return  S16
167  *      -# ROK 
168  *
169  */
170 #ifdef ANSI
171 PRIVATE S16 PtDlUdxUeIdChgCfm
172 (
173 Pst *pst,                       /* post structure */
174 SuId suId,                      /* Service User Id */
175 uint32_t      transId,
176 CmStatus      status
177 )
178 #else
179 PRIVATE S16 PtDlUdxUeIdChgCfm(pst, suId, status)
180 Pst           *pst;            /* post structure */
181 SuId          suId;            /* Service User Id */
182 uint32_t      transId;
183 CmStatus      status;
184 #endif
185 {
186
187    return ROK;
188
189 } /* end of rlcDlUdxBndCfm */
190
191
192
193 PRIVATE S16  PtDlUdxStaUpdCfm
194 (
195 Pst*                pst,
196 SuId                suId,
197 CmLteRlcId          *rlcId,
198 RlcUdxBufLst         *pBufLst
199 )
200 {
201    return ROK;
202 }
203
204 PRIVATE S16  PtDlUdxStaProhTmrStart
205 (
206 Pst*                pst,
207 SuId                suId,
208 CmLteRlcId          *rlcId
209 )
210 {
211    return ROK;
212 }
213 #endif
214
215 PRIVATE UdxBndCfm rlcDlUdxBndCfmMt[UDX_MAX_SEL] =
216 {
217 #ifdef LCKWULUDX
218    cmPkUdxBndCfm,            /* 0 - loosely coupled */
219 #else
220    PtDlUdxBndCfm,            /* 0 - loosely coupled, portable  */
221 #endif /* LCKWUIKWU */
222 #ifdef LWLCKWULUDX
223    cmPkUdxBndCfm,            /* 1 - loosely coupled */
224 #else
225    PtDlUdxBndCfm,            /* 1 - loosely coupled, portable  */
226 #endif /* LCKWUIKWU */
227 #ifdef KW
228    rlcUlUdxBndCfm,            /* 2 - tightly coupled, RRC  */
229 #else
230    PtDlUdxBndCfm,            /* 2 - tightly coupled, portable */
231 #endif /* KW */
232 };
233
234 UdxCfgCfm rlcDlUdxCfgCfmMt[UDX_MAX_SEL] =
235 {
236 #ifdef LCKWULUDX
237    cmPkUdxCfgCfm,            /* 0 - loosely coupled */
238 #else
239    PtDlUdxCfgCfm,            /* 0 - loosely coupled, portable  */
240 #endif /* LCKWUIKWU */
241 #ifdef LWLCKWULUDX
242    cmPkUdxCfgCfm,            /* 1 - loosely coupled */
243 #else
244    PtDlUdxCfgCfm,            /* 1 - loosely coupled, portable  */
245 #endif /* LCKWUIKWU */
246 #ifdef KW
247    rlcUlUdxCfgCfm,            /* 2 - tightly coupled, RRC  */
248 #else
249    PtDlUdxCfgCfm,            /* 2 - tightly coupled, portable */
250 #endif /* KW */
251 };
252
253 UdxUeIdChgCfm rlcDlUdxUeIdChgCfmMt[UDX_MAX_SEL] =
254 {
255 #ifdef LCKWULUDX
256    cmPkUdxUeIdChgCfm,            /* 0 - loosely coupled */
257 #else
258    PtDlUdxUeIdChgCfm,            /* 0 - loosely coupled, portable  */
259 #endif /* LCKWUIKWU */
260 #ifdef LWLCKWULUDX
261    cmPkUdxUeIdChgCfm,            /* 1 - loosely coupled */
262 #else
263    PtDlUdxUeIdChgCfm,            /* 1 - loosely coupled, portable  */
264 #endif /* LCKWUIKWU */
265 #ifdef KW
266    rlcUlUdxUeIdChgCfm,            /* 2 - tightly coupled, RRC  */
267 #else
268    PtDlUdxUeIdChgCfm,            /* 2 - tightly coupled, portable */
269 #endif /* KW */
270 };
271
272
273 PRIVATE CONSTANT UdxStaProhTmrStart rlcDlUdxStaProhTmrStartMt[UDX_MAX_SEL] =
274 {
275 #ifdef LCKWULUDX
276    cmPkUdxStaProhTmrStart,
277 #else
278    PtDlUdxStaProhTmrStart,
279 #endif
280 #ifdef LWLCKWULUDX
281    cmPkUdxStaProhTmrStart,            /* 1 - loosely coupled */
282 #else
283    PtDlUdxStaProhTmrStart,            /* 1 - loosely coupled, portable  */
284 #endif /* LCKWUIKWU */
285 #ifdef KW
286    rlcUlUdxStaProhTmrStart,            /* 2 - tightly coupled, RRC  */
287 #else
288    PtDlUdxStaProhTmrStart,            /* 2 - tightly coupled, portable */
289 #endif /* KW */
290 };
291
292 /**
293  *
294  * @brief 
295  *
296  *        Handler for confirming  the bind request received from KWU
297  *        interface.
298  *
299  * @b Description:
300  *
301  *        This function send the bind confirm primitive to the RLC user,
302  *        when it receives a bind request from its service user.
303  *
304  *  @param[in] pst     Post structure  
305  *  @param[in] suId    Service user SAP ID 
306  *  @param[in] status  Status of Confirmation 
307  *
308  *  @return  S16
309  *      -# ROK 
310  *
311  */
312 #ifdef ANSI
313 S16 rlcDlUdxBndCfm
314 (
315 Pst *pst,                       /* post structure */
316 SuId suId,                      /* Service User Id */
317 uint8_t   status                     /* Status */
318 )
319 #else
320 S16 rlcDlUdxBndCfm(pst, suId, status)
321 Pst *pst;                       /* post structure */
322 SuId suId;                      /* Service User Id */
323 uint8_t   status;                    /* Status */
324 #endif
325 {
326
327    /* jump to specific primitive depending on configured selector */
328    (*rlcDlUdxBndCfmMt[pst->selector])(pst, suId, status);
329
330    return ROK;
331
332 } /* end of rlcDlUdxBndCfm */
333
334
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 #ifdef ANSI
357 S16 rlcDlUdxCfgCfm
358 (
359 Pst *pst,                       /* post structure */
360 SuId suId,                      /* Service User Id */
361 RlcCfgCfmInfo *cfmInfo                    /* Status */
362 )
363 #else
364 S16 rlcDlUdxCfgCfm(pst, suId, status)
365 Pst           *pst;            /* post structure */
366 SuId          suId;            /* Service User Id */
367 RlcCfgCfmInfo *cfmInfo;        /* Status */
368 #endif
369 {
370
371    /* jump to specific primitive depending on configured selector */
372    (*rlcDlUdxCfgCfmMt[pst->selector])(pst, suId, cfmInfo);
373
374    return ROK;
375
376 } /* end of rlcDlUdxBndCfm */
377
378 /**
379  *
380  * @brief 
381  *
382  *        Handler for confirming  the bind request received from KWU
383  *        interface.
384  *
385  * @b Description:
386  *
387  *        This function send the bind confirm primitive to the RLC user,
388  *        when it receives a bind request from its service user.
389  *
390  *  @param[in] pst     Post structure  
391  *  @param[in] suId    Service user SAP ID 
392  *  @param[in] status  Status of Confirmation 
393  *
394  *  @return  S16
395  *      -# ROK 
396  *
397  */
398 #ifdef ANSI
399 S16 rlcDlUdxUeIdChgCfm
400 (
401 Pst *pst,                       /* post structure */
402 SuId suId,                      /* Service User Id */
403 uint32_t      transId,
404 CmStatus      status
405 )
406 #else
407 S16 rlcDlUdxUeIdChgCfm(pst, suId, status)
408 Pst           *pst;            /* post structure */
409 SuId          suId;            /* Service User Id */
410 uint32_t      transId;
411 CmStatus      status;
412 #endif
413 {
414
415    /* jump to specific primitive depending on configured selector */
416    (*rlcDlUdxUeIdChgCfmMt[pst->selector])(pst, suId,transId,status);
417
418    return ROK;
419
420 } /* end of rlcDlUdxBndCfm */
421
422
423 uint8_t rlcDlUdxStaProhTmrStart(Pst *pst, SuId suId, CmLteRlcId *rlcId)
424 {
425    /* jump to specific primitive depending on configured selector */
426    (*rlcDlUdxStaProhTmrStartMt[pst->selector])(pst, suId, rlcId);
427
428    return ROK;
429
430 } /* end of rlcDlUdxBndCfm */
431
432 /**********************************************************************
433  
434          End of file
435 **********************************************************************/