RLC BO, BO response and DL Data handling. [Issue-ID: ODUHIGH-181]
[o-du/l2.git] / src / cm / mac_sch_interface.c
1 /* header include files (.h) */
2 #include "common_def.h"
3 #include "lrg.h"
4
5 /* header/extern include files (.x) */
6 #include "lrg.x"
7 #include "mac_sch_interface.h"
8
9 /**
10  * @brief function to send Slot ind message from MAC
11  *        to scheduler with loose coupling 
12  *
13  * @details
14  *
15  *     Function : packMacSchSlotInd
16  *     
17  *     
18  *  @param[in]  Pst *pst, the post structure     
19  *  @param[in]  *slotInd, the value of SFN and slot
20  *  @return  S16
21  *      -# ROK
22  **/
23 uint8_t packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd)
24 {
25    Buffer *mBuf = NULLP;
26    if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
27    {
28       return RFAILED;
29    }
30
31    /* pack SFN and slot value */
32    CMCHKPK(oduUnpackUInt16,slotInd->sfn, mBuf);
33    CMCHKPK(oduUnpackUInt16,slotInd->slot, mBuf);
34
35    return ODU_POST_TASK(pst,mBuf);
36 }
37
38 /**
39  * @brief function to unpack Slot ind message from MAC
40  *        to scheduler with loose coupling
41  *
42  * @details
43  *
44  *     Function : unpackMacSchSlotInd
45  *
46  *
47  *  @param[in]  Pst *pst, the post structure
48  *  @param[in]  Buffer *mBuf, the message buffer
49  *  @return  S16
50  *      -# ROK
51  **/
52 uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer  *mBuf)
53 {
54    /* TODO */
55    return ROK;
56 }
57
58
59 /*******************************************************************
60  *
61  * @brief Pack and Send Rach Ind from MAC to SCH
62  *
63  * @details
64  *
65  *    Function : packMacSchRachInd
66  *
67  *    Functionality:
68  *      Pack and Send Rach Ind from MAC to SCH
69  *
70  * @params[in] 
71  * @return ROK     - success
72  *         RFAILED - failure
73  *
74  * ****************************************************************/
75 uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd)
76 {
77    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
78    {
79       /* TODO */
80    }
81    else
82    {
83       return RFAILED;
84    }
85    return ROK;
86 }
87
88 /*******************************************************************
89  *
90  * @brief Pack and Send Crc Ind from MAC to SCH
91  *
92  * @details
93  *
94  *    Function : packMacSchCrcInd
95  *
96  *    Functionality:
97  *       Pack and Send Crc Ind from MAC to SCH
98  *
99  * @params[in] 
100  * @return ROK     - success
101  *         RFAILED - failure
102  *
103  * ****************************************************************/
104 uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd)
105 {
106    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
107    {
108       /* TODO */
109    }
110    else
111    {
112       return RFAILED;
113    }
114    return ROK;
115 }
116
117 /*******************************************************************
118  *
119  * @brief Pack and Send DL RLC BO Info from MAC to SCH
120  *
121  * @details
122  *
123  *    Function : packMacSchDlRlcBoInfo
124  *
125  *    Functionality:
126  *       Pack and Send L RLC BO Info from MAC to SCH
127  *
128  * @params[in] 
129  * @return ROK     - success
130  *         RFAILED - failure
131  *
132  * ****************************************************************/
133 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo)
134 {
135    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
136    {
137       /* TODO */
138    }
139    else
140    {
141       return RFAILED;
142    }
143    return ROK;
144 }
145
146 /**
147  * @brief function to pack DL Broadcast allocation message 
148  *        from MAC to SCH
149  *
150  * @details
151  *
152  *     Function : packSchMaccDlAlloc 
153  *     
154  *     
155  *  @param[in]  Pst *pst, the post structure     
156  *  @param[in]  DlSchedInfo  *dlSchedInfo
157  *  @return  S16
158  *      -# ROK
159  **/
160 uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo  *dlSchedInfo)
161 {
162    return ROK;
163 }
164
165 /**
166  * @brief function to pack UL Sch Info  message 
167  *        from SCH to MAC
168  *
169  * @details
170  *
171  *     Function : packSchMacUlSchInfo 
172  *     
173  *     
174  *  @param[in]  Pst *pst, the post structure     
175  *  @param[in]  UlSchedInfo *ulSchedInfo
176  *  @return  S16
177  *      -# ROK
178  **/
179 uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo)
180 {
181    return ROK;
182 }
183
184 /**
185  * @brief function to pack cell cfg from MAC to SCH
186  *
187  * @details
188  *
189  *     Function : packSchCellCfg 
190  *     
191  *     
192  *  @param[in]  Pst *pst, the post structure     
193  *  @param[in]  *schCellCfg, SchCellCfg structure
194  *  @return  S16
195  *      -# ROK
196  **/
197 uint8_t packSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg)
198 {
199    return ROK;
200 }
201
202 /**
203  * @brief function to pack cell cfg cfm from SCH to MAC
204  *
205  * @details
206  *
207  *     Function : packSchCellCfgCfm
208  *     
209  *     
210  *  @param[in]  Pst *pst, the post structure     
211  *  @param[in]  *schCellCfgCfm, SchCellCfgCfm structure
212  *  @return  S16
213  *      -# ROK
214  **/
215 uint8_t packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm)
216 {
217    return ROK;
218 }
219
220 /*******************************************************************
221  *
222  * @brief Pack and Send UE Create Request from MAC to SCH
223  *
224  * @details
225  *
226  *    Function : packMacSchUeCreateReq
227  *
228  *    Functionality:
229  *       Pack and Send UE Create Request from MAC to SCH
230  *
231  * @params[in]
232  * @return ROK     - success
233  *         RFAILED - failure
234  *
235  * ****************************************************************/
236 uint8_t packMacSchUeCreateReq(Pst *pst, SchUeCfg  *ueCfg)
237 {
238    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
239    {
240       /* TODO */
241    }
242    else
243    {
244       return RFAILED; 
245    }
246    return ROK;
247 }
248
249
250 /*******************************************************************
251  *
252  * @brief Packs and send UE create response
253  *
254  * @details 
255  *
256  *    Function : packSchUeCfgRsp
257  *
258  *    Functionality:
259  *      Packs and send UE create response
260  *
261  * @params[in] Post structure
262  *             UE config response
263  * @return ROK     - success
264  *         RFAILED - failure
265  *
266  * ****************************************************************/
267 uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp)
268 {
269    return ROK;
270 }
271
272 /*******************************************************************
273  *
274  * @brief Pack and Send BSR from MAC to SCH
275  *
276  * @details
277  *
278  *    Function : packMacSchBsr
279  *
280  *    Functionality:
281  *       Pack and Send BSR from MAC to SCH
282  *
283  * @params[in]
284  * @return ROK     - success
285  *         RFAILED - failure
286  *
287  * ****************************************************************/
288 uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd)
289 {
290    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
291    {
292       /* TODO */
293    }
294    else
295    {
296       return RFAILED;
297    }
298    return ROK;
299 }
300
301 /*******************************************************************
302  *
303  * @brief Pack and Send SR UCI Ind from MAC to SCH
304  *
305  * @details
306  *
307  *    Function : packMacSrSchUciInd
308  *
309  *    Functionality:
310  *       Pack and Send SR UCI Ind from MAC to SCH
311  *
312  * @params[in] 
313  * @return ROK     - success
314  *         RFAILED - failure
315  *
316  * ****************************************************************/
317 uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd)
318 {
319    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
320    {
321       /* TODO */
322    }
323    else
324    {
325       return RFAILED;
326    }
327    return ROK;
328 }
329
330
331
332 /**********************************************************************
333   End of file
334  **********************************************************************/
335