[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-480] WG8 Alignment | Third Phase | RLC-MAC...
[o-du/l2.git] / src / 5gnrrlc / rlc_lwr_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 /* This file defines API towards lower interface of RLC */
19
20 #include "common_def.h"
21 #include "rlc_mac_inf.h" 
22
23 RlcMacBoStatusFunc rlcMacSendBoStatusOpts[] =
24 {
25    packRlcBoStatus,            /* 0 - loosely coupled */
26    MacProcRlcBoStatus,      /* 1 - tightly coupled, MAC  */
27    packRlcBoStatus,            /* 2 - LWLC loosely coupled */
28 };
29 RlcMacDlDataFunc rlcMacSendDlDataOpts[] =
30 {
31    packRlcDlData,            /* 0 - loosely coupled */
32    MacProcRlcDlData,      /* 1 - tightly coupled, MAC  */
33    packRlcDlData,            /* 2 - loosely coupled */
34 };
35 /**
36  *
37  * @brief  
38  *
39  *        Handler for reporting the Buffer Occupancy to MAC 
40  *        for logical channels.
41  *
42  * @b Description:
43  *
44  *        This function reports the Buffer Occupancy of one or more
45  *         logical channels to MAC. 
46  *
47  *  @param[in] post         Post structure  
48  *  @param[in] spId        Service Provider ID
49  *  @param[in] boSta       BO Status Information 
50  *
51  *  @return  S16
52  *      -# ROK 
53  *      -# RFAILED
54  *
55  */
56 uint8_t RlcSendBoStatusToMac(Pst *pst, RlcBoStatus *boSta)
57 {
58    /* jump to specific primitive depending on configured selector */
59    return (*rlcMacSendBoStatusOpts[pst->selector])(pst, boSta);
60  
61 } /* end of RlcMacSendBOStatus */
62  
63 /*******************************************************************
64  *
65  * @brief Sends DL data to MAC
66  *
67  * @details
68  *
69  *    Function : RlcSendDlDataToMac
70  *
71  *    Functionality: Sends DL data to MAC
72  *
73  * @params[in] 
74  * @return ROK     - success
75  *         RFAILED - failure
76  *
77  * ****************************************************************/
78 uint8_t RlcSendDlDataToMac(Pst *pst, RlcDlData *dlData)
79 {
80    /* jump to specific primitive depending on configured selector */
81    return (*rlcMacSendDlDataOpts[pst->selector])(pst, dlData);
82  
83 }
84 /**********************************************************************
85          End of file
86 **********************************************************************/