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 RACH resource Release from MAC to SCH
424 * Function : packMacSchRachRsrcRel
427 * Pack and Send RACH resouece Release from MAC to SCH
429 * @params[in] Post structure
430 * RACH resource release
431 * @return ROK - success
434 * ****************************************************************/
435 uint8_t packMacSchRachRsrcRel(Pst *pst, SchRachRsrcRel *schRachRsrcRel)
437 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
448 /*******************************************************************
450 * @brief Pack and Send UE Delete Request from MAC to SCH
454 * Function : packMacSchUeDeleteReq
457 * Pack and Send UE Delete Request from MAC to SCH
460 * @return ROK - success
463 * ****************************************************************/
464 uint8_t packMacSchUeDeleteReq(Pst *pst, SchUeDelete *schUeDel)
466 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
477 /*******************************************************************
479 * @brief Packs and send UE delete response
483 * Function : packSchUeDeleteRsp
486 * Packs and send UE delete response
488 * @params[in] Post structure
490 * @return ROK - success
493 * ****************************************************************/
495 uint8_t packSchUeDeleteRsp(Pst *pst, SchUeDeleteRsp *delRsp)
500 /*******************************************************************
502 * @brief Pack and Send Cell Delete Request from MAC to SCH
506 * Function : packMacSchCellDeleteReq
509 * Pack and Send Cell Delete Request from MAC to SCH
511 * @params[in] Pst *pst, SchCellDelete *schCellDelete
512 * @return ROK - success
515 * ****************************************************************/
516 uint8_t packMacSchCellDeleteReq(Pst *pst, SchCellDelete *schCellDelete)
518 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
529 /*******************************************************************
531 * @brief Packs and send CELL delete response
535 * Function : packSchCellDeleteRsp
538 * * @params[in] Post structure, SchCellDeleteRsp schCellDeleteRsp
540 * @return ROK - success
544 * ****************************************************************/
546 uint8_t packSchCellDeleteRsp(Pst *pst, SchCellDeleteRsp *schCellDeleteRsp)
551 /*******************************************************************
553 * @brief Pack and Send Slice Cfg request from MAC to SCH
557 * Function : packMacSchSliceCfgReq
560 * Pack and Send Slice Cfg request from MAC to SCH
562 * @params[in] Pst *pst, SchSliceCfgReq *cfgReq
563 * @return ROK - success
566 * ****************************************************************/
567 uint8_t packMacSchSliceCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
569 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
581 * @brief function to pack slice cfg rsp from SCH to MAC
585 * Function : packSchSliceCfgRsp
588 * @param[in] Pst *pst, SchSliceCfgRsp *cfgRsp
591 uint8_t packSchSliceCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
596 /*******************************************************************
598 * @brief Pack and Send Slice ReCfg request from MAC to SCH
602 * Function : packMacSchSliceReCfgReq
605 * Pack and Send Slice ReCfg request from MAC to SCH
607 * @params[in] Pst *pst, SchSliceCfgReq *cfgReq
608 * @return ROK - success
611 * ****************************************************************/
612 uint8_t packMacSchSliceReCfgReq(Pst *pst, SchSliceCfgReq *cfgReq)
614 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LWLC))
626 * @brief function to pack slice cfg rsp from SCH to MAC
630 * Function : packSchSliceReCfgRsp
633 * @param[in] Pst *pst, SchSliceCfgRsp *cfgRsp
636 uint8_t packSchSliceReCfgRsp(Pst *pst, SchSliceCfgRsp *cfgRsp)
641 /*******************************************************************
643 * @brief Pack and Send paging indication from MAC to SCH
647 * Function : packMacSchPagingInd
650 * Pack and Send paging indication from MAC to SCH
652 * @params[in] Pst *pst, SchPageInd *pageInd
653 * @return ROK - success
656 * ****************************************************************/
657 uint8_t packMacSchPagingInd(Pst *pst, SchPageInd *pageInd)
659 if((pst->selector == ODU_SELECTOR_LC) || (pst->selector == ODU_SELECTOR_LC))
671 * @brief function to pack DL Paging allocation message
676 * Function : packSchMacDlPageAlloc
679 * @param[in] Pst *pst, the post structure
680 * @param[in] DlPageAlloc *dlPageAlloc
684 uint8_t packSchMacDlPageAlloc(Pst *pst, DlPageAlloc *dlPageAlloc)
688 /**********************************************************************
690 **********************************************************************/