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