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, SlotTimingInfo *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 Config Request from MAC to SCH
226 * Function : packMacSchAddUeConfigReq
229 * Pack and Send UE Create Request from MAC to SCH
232 * @return ROK - success
235 * ****************************************************************/
236 uint8_t packMacSchAddUeConfigReq(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)
271 /*******************************************************************
273 * @brief Pack and Send BSR from MAC to SCH
277 * Function : packMacSchBsr
280 * Pack and Send BSR from MAC to SCH
283 * @return ROK - success
286 * ****************************************************************/
287 uint8_t packMacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd)
289 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
300 /*******************************************************************
302 * @brief Pack and Send SR UCI Ind from MAC to SCH
306 * Function : packMacSrSchUciInd
309 * Pack and Send SR UCI Ind from MAC to SCH
312 * @return ROK - success
315 * ****************************************************************/
316 uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd)
318 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
329 /*******************************************************************
331 * @brief Pack and Send Modify UE Config Request from MAC to SCH
335 * Function : packMacSchModUeConfigReq
338 * Pack and Send Modify UE Config Request from MAC to SCH
341 * @return ROK - success
344 * ****************************************************************/
345 uint8_t packMacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfg)
347 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
358 /*******************************************************************
360 * @brief Pack and Send UE Delete Request from MAC to SCH
364 * Function : packMacSchUeDeleteReq
367 * Pack and Send UE Delete Request from MAC to SCH
370 * @return ROK - success
373 * ****************************************************************/
374 uint8_t packMacSchUeDeleteReq(Pst *pst, SchUeDelete *schUeDel)
376 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
387 /*******************************************************************
389 * @brief Packs and send UE delete response
393 * Function : packSchUeDeleteRsp
396 * Packs and send UE delete response
398 * @params[in] Post structure
400 * @return ROK - success
403 * ****************************************************************/
405 uint8_t packSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *delRsp)
410 /*******************************************************************
412 * @brief Pack and Send Cell Delete Request from MAC to SCH
416 * Function : packMacSchCellDeleteReq
419 * Pack and Send Cell Delete Request from MAC to SCH
421 * @params[in] Pst *pst, SchCellDelete *schCellDelete
422 * @return ROK - success
425 * ****************************************************************/
426 uint8_t packMacSchCellDeleteReq(Pst *pst, SchCellDelete *schCellDelete)
428 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
439 /*******************************************************************
441 * @brief Packs and send CELL delete response
445 * Function : packSchCellDeleteRsp
448 * * @params[in] Post structure, SchCellDeleteRsp schCellDeleteRsp
450 * @return ROK - success
454 * ****************************************************************/
456 uint8_t packSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDeleteRsp)
461 /*******************************************************************
463 * @brief Pack and Send Slice Cfg request from MAC to SCH
467 * Function : packMacSchSliceCfgReq
470 * Pack and Send Slice Cfg request from MAC to SCH
472 * @params[in] Pst *pst, SchSliceCfgReq *cfgReq
473 * @return ROK - success
476 * ****************************************************************/
477 uint8_t packMacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
479 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
491 * @brief function to pack slice cfg rsp from SCH to MAC
495 * Function : packSchSliceCfgRsp
498 * @param[in] Pst *pst, SchSliceCfgRsp *cfgRsp
501 uint8_t packSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
506 /*******************************************************************
508 * @brief Pack and Send Slice ReCfg request from MAC to SCH
512 * Function : packMacSchSliceReCfgReq
515 * Pack and Send Slice ReCfg request from MAC to SCH
517 * @params[in] Pst *pst, SchSliceCfgReq *cfgReq
518 * @return ROK - success
521 * ****************************************************************/
522 uint8_t packMacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
524 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
536 * @brief function to pack slice cfg rsp from SCH to MAC
540 * Function : packSchSliceReCfgRsp
543 * @param[in] Pst *pst, SchSliceCfgRsp *cfgRsp
546 uint8_t packSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
551 /**********************************************************************
553 **********************************************************************/