Moving all common header file into common_def.h file
[o-du/l2.git] / src / cm / mac_sch_interface.c
1 /* header include files (.h) */
2 #include "common_def.h"
3 #include "tfu.h"           /* RGU Interface defines */
4 #include "lrg.h"
5
6 /* header/extern include files (.x) */
7 #include "tfu.x"           /* RGU Interface includes */
8 #include "lrg.x"
9 #include "du_app_mac_inf.h"
10 #include "mac_sch_interface.h"
11
12 /**
13  * @brief function to send Slot ind message from MAC
14  *        to scheduler with loose coupling 
15  *
16  * @details
17  *
18  *     Function : packMacSchSlotInd
19  *     
20  *     
21  *  @param[in]  Pst *pst, the post structure     
22  *  @param[in]  *slotInd, the value of SFN and slot
23  *  @return  S16
24  *      -# ROK
25  **/
26 int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd)
27 {
28    Buffer *mBuf = NULLP;
29    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
30    {
31       RETVALUE(RFAILED);
32    }
33
34    /* pack SFN and slot value */
35    CMCHKPK(SPkU16,slotInd->sfn, mBuf);
36    CMCHKPK(SPkU16,slotInd->slot, mBuf);
37
38    RETVALUE(SPstTsk(pst,mBuf));
39 }
40
41 /*******************************************************************
42  *
43  * @brief Pack and Send Rach Ind from MAC to SCH
44  *
45  * @details
46  *
47  *    Function : packMacSchRachInd
48  *
49  *    Functionality:
50  *      Pack and Send Rach Ind from MAC to SCH
51  *
52  * @params[in] 
53  * @return ROK     - success
54  *         RFAILED - failure
55  *
56  * ****************************************************************/
57 int packMacSchRachInd(Pst *pst, RachIndInfo *rachInd)
58 {
59    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
60    {
61       /* TODO */
62    }
63    else
64    {
65       return RFAILED;
66    }
67    return ROK;
68 }
69
70 /*******************************************************************
71  *
72  * @brief Pack and Send Crc Ind from MAC to SCH
73  *
74  * @details
75  *
76  *    Function : packMacSchCrcInd
77  *
78  *    Functionality:
79  *       Pack and Send Crc Ind from MAC to SCH
80  *
81  * @params[in] 
82  * @return ROK     - success
83  *         RFAILED - failure
84  *
85  * ****************************************************************/
86 int packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd)
87 {
88    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
89    {
90       /* TODO */
91    }
92    else
93    {
94       return RFAILED;
95    }
96    return ROK;
97 }
98
99 /*******************************************************************
100  *
101  * @brief Pack and Send DL RLC BO Info from MAC to SCH
102  *
103  * @details
104  *
105  *    Function : packMacSchDlRlcBoInfo
106  *
107  *    Functionality:
108  *       Pack and Send L RLC BO Info from MAC to SCH
109  *
110  * @params[in] 
111  * @return ROK     - success
112  *         RFAILED - failure
113  *
114  * ****************************************************************/
115 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo)
116 {
117    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
118    {
119       /* TODO */
120    }
121    else
122    {
123       return RFAILED;
124    }
125    return ROK;
126 }
127
128 /**
129  * @brief function to pack DL Broadcast allocation message 
130  *        from MAC to SCH
131  *
132  * @details
133  *
134  *     Function : packSchMaccDlAlloc 
135  *     
136  *     
137  *  @param[in]  Pst *pst, the post structure     
138  *  @param[in]  DlSchedInfo  *dlSchedInfo
139  *  @return  S16
140  *      -# ROK
141  **/
142 int packSchMacDlAlloc(Pst *pst, DlSchedInfo  *dlSchedInfo)
143 {
144         return ROK;
145 }
146
147 /**
148  * @brief function to pack UL Sch Info  message 
149  *        from SCH to MAC
150  *
151  * @details
152  *
153  *     Function : packSchMacUlSchInfo 
154  *     
155  *     
156  *  @param[in]  Pst *pst, the post structure     
157  *  @param[in]  UlSchedInfo *ulSchedInfo
158  *  @return  S16
159  *      -# ROK
160  **/
161 int packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo)
162 {
163         return ROK;
164 }
165
166 /**
167  * @brief function to pack cell cfg from MAC to SCH
168  *
169  * @details
170  *
171  *     Function : packSchCellCfg 
172  *     
173  *     
174  *  @param[in]  Pst *pst, the post structure     
175  *  @param[in]  *schCellCfg, SchCellCfg structure
176  *  @return  S16
177  *      -# ROK
178  **/
179 int packSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg)
180 {
181         return ROK;
182 }
183
184 /**
185  * @brief function to pack cell cfg cfm from SCH to MAC
186  *
187  * @details
188  *
189  *     Function : packSchCellCfgCfm
190  *     
191  *     
192  *  @param[in]  Pst *pst, the post structure     
193  *  @param[in]  *schCellCfgCfm, SchCellCfgCfm structure
194  *  @return  S16
195  *      -# ROK
196  **/
197 int packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm)
198 {
199         return ROK;
200 }
201
202
203 /**********************************************************************
204   End of file
205  **********************************************************************/
206