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