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 RACH resource Request from MAC to SCH
364 * Function : packMacSchRachRsrcReq
367 * Pack and Send RACH resouece Request from MAC to SCH
369 * @params[in] Post structure
370 * RACH resource request
371 * @return ROK - success
374 * ****************************************************************/
375 uint8_t packMacSchRachRsrcReq(Pst *pst, SchRachRsrcReq *schRachRsrcReq)
377 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
388 /*******************************************************************
390 * @brief Pack and Send RACH resource Response from SCH to MAC
394 * Function : packSchRachRsrcRsp
397 * Pack and Send RACH resource Response from SCH to MAC
399 * @params[in] Post structure
400 * RACH resource response
401 * @return ROK - success
404 * ****************************************************************/
405 uint8_t packSchRachRsrcRsp(Pst *pst, SchRachRsrcRsp *schRachRsrcRsp)
407 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
418 /*******************************************************************
420 * @brief Pack and Send UE Delete Request from MAC to SCH
424 * Function : packMacSchUeDeleteReq
427 * Pack and Send UE Delete Request from MAC to SCH
430 * @return ROK - success
433 * ****************************************************************/
434 uint8_t packMacSchUeDeleteReq(Pst *pst, SchUeDelete *schUeDel)
436 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
447 /*******************************************************************
449 * @brief Packs and send UE delete response
453 * Function : packSchUeDeleteRsp
456 * Packs and send UE delete response
458 * @params[in] Post structure
460 * @return ROK - success
463 * ****************************************************************/
465 uint8_t packSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *delRsp)
470 /*******************************************************************
472 * @brief Pack and Send Cell Delete Request from MAC to SCH
476 * Function : packMacSchCellDeleteReq
479 * Pack and Send Cell Delete Request from MAC to SCH
481 * @params[in] Pst *pst, SchCellDelete *schCellDelete
482 * @return ROK - success
485 * ****************************************************************/
486 uint8_t packMacSchCellDeleteReq(Pst *pst, SchCellDelete *schCellDelete)
488 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
499 /*******************************************************************
501 * @brief Packs and send CELL delete response
505 * Function : packSchCellDeleteRsp
508 * * @params[in] Post structure, SchCellDeleteRsp schCellDeleteRsp
510 * @return ROK - success
514 * ****************************************************************/
516 uint8_t packSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDeleteRsp)
521 /*******************************************************************
523 * @brief Pack and Send Slice Cfg request from MAC to SCH
527 * Function : packMacSchSliceCfgReq
530 * Pack and Send Slice Cfg request from MAC to SCH
532 * @params[in] Pst *pst, SchSliceCfgReq *cfgReq
533 * @return ROK - success
536 * ****************************************************************/
537 uint8_t packMacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
539 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
551 * @brief function to pack slice cfg rsp from SCH to MAC
555 * Function : packSchSliceCfgRsp
558 * @param[in] Pst *pst, SchSliceCfgRsp *cfgRsp
561 uint8_t packSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
566 /*******************************************************************
568 * @brief Pack and Send Slice ReCfg request from MAC to SCH
572 * Function : packMacSchSliceReCfgReq
575 * Pack and Send Slice ReCfg request from MAC to SCH
577 * @params[in] Pst *pst, SchSliceCfgReq *cfgReq
578 * @return ROK - success
581 * ****************************************************************/
582 uint8_t packMacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
584 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
596 * @brief function to pack slice cfg rsp from SCH to MAC
600 * Function : packSchSliceReCfgRsp
603 * @param[in] Pst *pst, SchSliceCfgRsp *cfgRsp
606 uint8_t packSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
611 /**********************************************************************
613 **********************************************************************/