Moving all common header file into common_def.h file
[o-du/l2.git] / src / 5gnrmac / mac_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
19 /* This file contains the definitions for Upper Interface APIs that are
20  * invoked from MAC */
21 #include "common_def.h"
22 #include "mac_upr_inf_api.h"
23
24 /* Funtion pointer options for slot indication */
25 DuMacSlotInd packMacSlotIndOpts[] =
26 {
27    packMacSlotInd,
28    duHandleSlotInd,
29    packMacSlotInd
30 };
31 /* Funtion pointer options for stop indication */
32 DuMacStopInd packMacStopIndOpts[] =
33 {
34    packMacStopInd,
35    duHandleStopInd,
36    packMacStopInd
37 };
38
39 /* Funtion pointer options for UL CCCH indication */
40 DuMacUlCcchInd packMacUlCcchIndOpts[] =
41 {
42    packMacUlCcchInd,
43    duHandleUlCcchInd,
44    packMacUlCcchInd
45 };
46
47 /*******************************************************************
48  *
49  * @brief Send slot indication to MAC
50  *
51  * @details
52  *
53  *    Function : MacDuAppSlotInd
54  *
55  *    Functionality:
56  *       Select appropriate function using selector value and
57  *       send to MAC
58  *
59  * @params[in]  Post structure pointer
60  *              Slot info pointer 
61  * @return ROK     - success
62  *         RFAILED - failure
63  *
64  * ****************************************************************/
65 uint16_t MacDuAppSlotInd(Pst *pst, SlotInfo *slotInfo)
66 {
67    return (*packMacSlotIndOpts[pst->selector])(pst, slotInfo);
68 }
69
70 /*******************************************************************
71  *
72  * @brief Send stop indication to MAC
73  *
74  * @details
75  *
76  *    Function : MacDuAppStopInd
77  *
78  *    Functionality:
79  *       Sends Stop Indication to MAC
80  *
81  * @params[in]  Post structure pointer
82  * @return ROK     - success
83  *         RFAILED - failure
84  *
85  * ****************************************************************/
86 uint16_t MacDuAppStopInd(Pst *pst, MacCellStopInfo *cellStopId)
87 {
88    return (*packMacStopIndOpts[pst->selector])(pst, cellStopId);
89 }
90
91 /*******************************************************************
92  *
93  * @brief Send UL CCCH Ind to DU APP
94  *
95  * @details
96  *
97  *    Function :MacDuAppUlCcchInd 
98  *
99  *    Functionality:
100  *       Select appropriate function using selector value and
101  *       send to DU APP
102  *
103  * @params[in]  Post structure pointer
104  *              UlCcchInd pointer 
105  * @return ROK     - success
106  *         RFAILED - failure
107  *
108  * ****************************************************************/
109 uint16_t MacDuAppUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo)
110 {
111    return (*packMacUlCcchIndOpts[pst->selector])(pst, ulCcchIndInfo);
112 }
113
114
115 /**********************************************************************
116          End of file
117 **********************************************************************/
118