1 /* header include files (.h) */
2 #include "common_def.h"
5 /* header/extern include files (.x) */
7 #include "mac_sch_interface.h"
10 * @brief function to send Slot ind message from MAC
11 * to scheduler with loose coupling
15 * Function : packMacSchSlotInd
18 * @param[in] Pst *pst, the post structure
19 * @param[in] *slotInd, the value of SFN and slot
23 uint8_t packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd)
26 if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
31 /* pack SFN and slot value */
32 CMCHKPK(oduUnpackUInt16,slotInd->sfn, mBuf);
33 CMCHKPK(oduUnpackUInt16,slotInd->slot, mBuf);
35 return ODU_POST_TASK(pst,mBuf);
39 * @brief function to unpack Slot ind message from MAC
40 * to scheduler with loose coupling
44 * Function : unpackMacSchSlotInd
47 * @param[in] Pst *pst, the post structure
48 * @param[in] Buffer *mBuf, the message buffer
52 uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer *mBuf)
59 /*******************************************************************
61 * @brief Pack and Send Rach Ind from MAC to SCH
65 * Function : packMacSchRachInd
68 * Pack and Send Rach Ind from MAC to SCH
71 * @return ROK - success
74 * ****************************************************************/
75 uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd)
77 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
88 /*******************************************************************
90 * @brief Pack and Send Crc Ind from MAC to SCH
94 * Function : packMacSchCrcInd
97 * Pack and Send Crc Ind from MAC to SCH
100 * @return ROK - success
103 * ****************************************************************/
104 uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd)
106 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
117 /*******************************************************************
119 * @brief Pack and Send DL RLC BO Info from MAC to SCH
123 * Function : packMacSchDlRlcBoInfo
126 * Pack and Send L RLC BO Info from MAC to SCH
129 * @return ROK - success
132 * ****************************************************************/
133 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo)
135 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
147 * @brief function to pack DL Broadcast allocation message
152 * Function : packSchMaccDlAlloc
155 * @param[in] Pst *pst, the post structure
156 * @param[in] DlSchedInfo *dlSchedInfo
160 uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo)
166 * @brief function to pack UL Sch Info message
171 * Function : packSchMacUlSchInfo
174 * @param[in] Pst *pst, the post structure
175 * @param[in] UlSchedInfo *ulSchedInfo
179 uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo)
185 * @brief function to pack cell cfg from MAC to SCH
189 * Function : packSchCellCfg
192 * @param[in] Pst *pst, the post structure
193 * @param[in] *schCellCfg, SchCellCfg structure
197 uint8_t packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg)
203 * @brief function to pack cell cfg cfm from SCH to MAC
207 * Function : packSchCellCfgCfm
210 * @param[in] Pst *pst, the post structure
211 * @param[in] *schCellCfgCfm, SchCellCfgCfm structure
215 uint8_t packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm)
220 /*******************************************************************
222 * @brief Pack and Send UE Create Request from MAC to SCH
226 * Function : packMacSchUeCreateReq
229 * Pack and Send UE Create Request from MAC to SCH
232 * @return ROK - success
235 * ****************************************************************/
236 uint8_t packMacSchUeCreateReq(Pst *pst, SchUeCfg *ueCfg)
238 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
250 /*******************************************************************
252 * @brief Packs and send UE create response
256 * Function : packSchUeCfgRsp
259 * Packs and send UE create response
261 * @params[in] Post structure
263 * @return ROK - success
266 * ****************************************************************/
267 uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp)
272 /*******************************************************************
274 * @brief Pack and Send BSR from MAC to SCH
278 * Function : packMacSchBsr
281 * Pack and Send BSR from MAC to SCH
284 * @return ROK - success
287 * ****************************************************************/
288 uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd)
290 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
301 /*******************************************************************
303 * @brief Pack and Send SR UCI Ind from MAC to SCH
307 * Function : packMacSrSchUciInd
310 * Pack and Send SR UCI Ind from MAC to SCH
313 * @return ROK - success
316 * ****************************************************************/
317 uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd)
319 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
332 /**********************************************************************
334 **********************************************************************/