522bdf42951612033b6fab1e71ab471e8ae20b22
[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, SlotTimingInfo *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 Config Request from MAC to SCH
223  *
224  * @details
225  *
226  *    Function : packMacSchAddUeConfigReq
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 packMacSchAddUeConfigReq(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  * @brief Pack and Send BSR from MAC to SCH
274  *
275  * @details
276  *
277  *    Function : packMacSchBsr
278  *
279  *    Functionality:
280  *       Pack and Send BSR from MAC to SCH
281  *
282  * @params[in]
283  * @return ROK     - success
284  *         RFAILED - failure
285  *
286  * ****************************************************************/
287 uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd)
288 {
289    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
290    {
291       /* TODO */
292    }
293    else
294    {
295       return RFAILED;
296    }
297    return ROK;
298 }
299
300 /*******************************************************************
301  *
302  * @brief Pack and Send SR UCI Ind from MAC to SCH
303  *
304  * @details
305  *
306  *    Function : packMacSrSchUciInd
307  *
308  *    Functionality:
309  *       Pack and Send SR UCI Ind from MAC to SCH
310  *
311  * @params[in] 
312  * @return ROK     - success
313  *         RFAILED - failure
314  *
315  * ****************************************************************/
316 uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd)
317 {
318    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
319    {
320       /* TODO */
321    }
322    else
323    {
324       return RFAILED;
325    }
326    return ROK;
327 }
328
329 /*******************************************************************
330  *
331  * @brief Pack and Send Modify UE Config Request from MAC to SCH
332  *
333  * @details
334  *
335  *    Function : packMacSchModUeConfigReq
336  *
337  *    Functionality:
338  *       Pack and Send Modify UE Config Request from MAC to SCH
339  *
340  * @params[in]
341  * @return ROK     - success
342  *         RFAILED - failure
343  *
344  * ****************************************************************/
345 uint8_t packMacSchModUeConfigReq(Pst *pst, SchUeCfg  *ueCfg)
346 {
347    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
348    {
349       /* TODO */
350    }
351    else
352    {
353       return RFAILED; 
354    }
355    return ROK;
356 }
357
358 /*******************************************************************
359 *
360 * @brief Pack and Send UE Delete Request from MAC to SCH
361 *
362 * @details
363 *
364 *    Function : packMacSchUeDeleteReq 
365 *
366 *    Functionality:
367 *       Pack and Send  UE Delete Request from MAC to SCH
368 *
369 * @params[in]
370 * @return ROK     - success
371 *         RFAILED - failure
372 *
373 * ****************************************************************/
374 uint8_t packMacSchUeDeleteReq(Pst *pst,  SchUeDelete *schUeDel)
375 {
376     if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
377     {
378        /* TODO */
379     }
380     else
381     {
382        return RFAILED;
383     }
384     return ROK;
385 }
386
387 /*******************************************************************
388 *
389 * @brief Packs and send UE delete response
390 *
391 * @details
392 *
393 *    Function : packSchUeDeleteRsp
394 *
395 *    Functionality:
396 *      Packs and send UE delete response
397 *
398 * @params[in] Post structure
399 *             UE delete response
400 * @return ROK     - success
401 *         RFAILED - failure
402 *
403 * ****************************************************************/
404
405 uint8_t packSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp  *delRsp)
406 {
407    return ROK;
408 }
409
410 /*******************************************************************
411  *
412  * @brief Pack and Send Cell Delete Request from MAC to SCH
413  *
414  * @details
415  *
416  *    Function : packMacSchCellDeleteReq
417  *
418  *    Functionality:
419  *       Pack and Send  Cell Delete Request from MAC to SCH
420  *
421  * @params[in] Pst *pst,  SchCellDelete *schCellDelete
422  * @return ROK     - success
423  *         RFAILED - failure
424  *
425  * ****************************************************************/
426 uint8_t packMacSchCellDeleteReq(Pst *pst,  SchCellDelete *schCellDelete)
427 {
428    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
429    {
430       /* TODO */
431    }
432    else
433    {
434       return RFAILED;
435    }
436    return ROK;
437 }
438
439 /*******************************************************************
440  *
441  * @brief Packs and send CELL delete response
442  *
443  * @details
444  *
445  *    Function : packSchCellDeleteRsp
446  *
447  *    Functionality:
448  * * @params[in] Post structure, SchCellDeleteRsp schCellDeleteRsp
449  *
450  * @return ROK     - success
451  *         RFAILED - failure
452  *
453  *
454  * ****************************************************************/
455
456 uint8_t packSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp  *schCellDeleteRsp)
457 {
458    return ROK;
459 }
460
461 /*******************************************************************
462  *
463  * @brief Pack and Send Slice Cfg request from MAC to SCH
464  *
465  * @details
466  *
467  *    Function : packMacSchSliceCfgReq 
468  *
469  *    Functionality:
470  *       Pack and Send Slice Cfg request from MAC to SCH
471  *
472  * @params[in] Pst *pst, SchSliceCfgReq *cfgReq 
473  * @return ROK     - success
474  *         RFAILED - failure
475  *
476  * ****************************************************************/
477 uint8_t packMacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
478 {
479    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
480    {
481       /* TODO */
482    }
483    else
484    {
485       return RFAILED;
486    }
487    return ROK;
488 }
489
490 /**
491  * @brief function to pack slice cfg rsp from SCH to MAC
492  *
493  * @details
494  *
495  *     Function : packSchSliceCfgRsp 
496  *     
497  *     
498  *  @param[in]  Pst *pst, SchSliceCfgRsp *cfgRsp
499  *  @return  S16 - ROK
500  **/
501 uint8_t packSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
502 {
503    return ROK;
504 }
505
506 /*******************************************************************
507  *
508  * @brief Pack and Send Slice ReCfg request from MAC to SCH
509  *
510  * @details
511  *
512  *    Function : packMacSchSliceReCfgReq 
513  *
514  *    Functionality:
515  *       Pack and Send Slice ReCfg request from MAC to SCH
516  *
517  * @params[in] Pst *pst, SchSliceCfgReq *cfgReq 
518  * @return ROK     - success
519  *         RFAILED - failure
520  *
521  * ****************************************************************/
522 uint8_t packMacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
523 {
524    if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
525    {
526       /* TODO */
527    }
528    else
529    {
530       return RFAILED;
531    }
532    return ROK;
533 }
534
535 /**
536  * @brief function to pack slice cfg rsp from SCH to MAC
537  *
538  * @details
539  *
540  *     Function : packSchSliceReCfgRsp 
541  *     
542  *     
543  *  @param[in]  Pst *pst, SchSliceCfgRsp *cfgRsp
544  *  @return  S16 - ROK
545  **/
546 uint8_t packSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
547 {
548    return ROK;
549 }
550
551 /**********************************************************************
552   End of file
553  **********************************************************************/
554