1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code SSI Interface Implementation
27 File: sch_msg_router.c
29 **********************************************************************/
31 #include "common_def.h"
36 #include "rg_sch_inf.h"
38 #include "mac_sch_interface.h"
40 #include "tfu.x" /* TFU types */
41 #include "lrg.x" /* layer management typedefs for MAC */
42 #include "rgr.x" /* layer management typedefs for MAC */
43 #include "rg_sch_inf.x" /* typedefs for Scheduler */
46 #ifdef CALL_FLOW_DEBUG_LOG
48 * @brief Function prints src, dest, msg infor about all the msgs that received.
52 * Function : callFlowSchMsgRouter
54 * Function prints src, dest, msg infor about all the msgs that received
56 * @param[in] Pst *pst, Post structure of the primitive.
61 void callFlowSchMsgRouter(Pst *pst)
64 char destTask[50]="ENTSCH";
67 strcpy(sourceTask,"ENTMAC");
70 case EVENT_SCH_GEN_CFG:
72 strcpy(message,"EVENT_SCH_GEN_CFG");
75 case EVENT_SLICE_CFG_REQ_TO_SCH:
77 strcpy(message,"EVENT_SLICE_CFG_REQ_TO_SCH");
80 case EVENT_SLICE_RECFG_REQ_TO_SCH:
82 strcpy(message,"EVENT_SLICE_RECFG_REQ_TO_SCH");
85 case EVENT_SCH_CELL_CFG:
87 strcpy(message,"EVENT_SCH_CELL_CFG");
90 case EVENT_SLOT_IND_TO_SCH:
92 strcpy(message,"EVENT_SLOT_IND_TO_SCH");
95 case EVENT_ADD_UE_CONFIG_REQ_TO_SCH:
97 strcpy(message,"EVENT_ADD_UE_CONFIG_REQ_TO_SCH");
100 case EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH:
102 strcpy(message,"EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH");
105 case EVENT_RACH_IND_TO_SCH:
107 strcpy(message,"EVENT_RACH_IND_TO_SCH");
110 case EVENT_CRC_IND_TO_SCH:
112 strcpy(message,"EVENT_CRC_IND_TO_SCH");
115 case EVENT_DL_RLC_BO_INFO_TO_SCH:
117 strcpy(message,"EVENT_DL_RLC_BO_INFO_TO_SCH");
120 case EVENT_SHORT_BSR:
122 strcpy(message,"EVENT_SHORT_BSR");
127 strcpy(message,"EVENT_LONG_BSR");
130 case EVENT_UCI_IND_TO_SCH:
132 strcpy(message,"EVENT_UCI_IND_TO_SCH");
135 case EVENT_UE_DELETE_REQ_TO_SCH:
137 strcpy(message,"EVENT_UE_DELETE_REQ_TO_SCH");
140 case EVENT_CELL_DELETE_REQ_TO_SCH:
142 strcpy(message,"EVENT_CELL_DELETE_REQ_TO_SCH");
145 case EVENT_RACH_RESOURCE_REQUEST_TO_SCH:
147 strcpy(message,"EVENT_RACH_RESOURCE_REQUEST_TO_SCH");
150 case EVENT_RACH_RESOURCE_RELEASE_TO_SCH:
152 strcpy(message,"EVENT_RACH_RESOURCE_RELEASE_TO_SCH");
155 case EVENT_PAGING_IND_TO_SCH:
157 strcpy(message,"EVENT_PAGING_IND_TO_SCH");
160 case EVENT_DL_HARQ_IND_TO_SCH:
162 strcpy(message,"EVENT_DL_HARQ_IND_TO_SCH");
166 strcpy(message,"Invalid Event");
169 DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message);
173 uint8_t SchMessageRouter(Pst *pst, void *msg)
175 #ifdef CALL_FLOW_DEBUG_LOG
176 callFlowSchMsgRouter(pst);
181 case EVENT_SCH_GEN_CFG:
183 SchProcGenCfgReq(pst, (RgMngmt *)msg);
186 case EVENT_SLICE_CFG_REQ_TO_SCH:
188 SchProcSliceCfgReq(pst, (SchSliceCfgReq *)msg);
191 case EVENT_SLICE_RECFG_REQ_TO_SCH:
193 SchProcSliceRecfgReq(pst, (SchSliceRecfgReq *)msg);
196 case EVENT_SCH_CELL_CFG:
198 SchProcCellCfgReq(pst, (SchCellCfg *)msg);
201 case EVENT_SLOT_IND_TO_SCH:
203 SchProcSlotInd(pst, (SlotTimingInfo *)msg);
206 case EVENT_ADD_UE_CONFIG_REQ_TO_SCH:
208 SchAddUeConfigReq(pst, (SchUeCfgReq *)msg);
211 case EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH:
213 SchModUeConfigReq(pst, (SchUeRecfgReq *)msg);
216 case EVENT_RACH_IND_TO_SCH:
218 SchProcRachInd(pst, (RachIndInfo *)msg);
221 case EVENT_CRC_IND_TO_SCH:
223 SchProcCrcInd(pst, (CrcIndInfo *)msg);
226 case EVENT_DL_RLC_BO_INFO_TO_SCH:
228 SchProcDlRlcBoInfo(pst, (DlRlcBoInfo *)msg);
231 case EVENT_SHORT_BSR:
234 SchProcBsr(pst, (UlBufferStatusRptInd *)msg);
237 case EVENT_UCI_IND_TO_SCH:
239 SchProcSrUciInd(pst, (SrUciIndInfo *)msg);
242 case EVENT_UE_DELETE_REQ_TO_SCH:
244 SchProcUeDeleteReq(pst, (SchUeDelete *)msg);
247 case EVENT_CELL_DELETE_REQ_TO_SCH:
249 SchProcCellDeleteReq(pst, (SchCellDeleteReq *)msg);
252 case EVENT_RACH_RESOURCE_REQUEST_TO_SCH:
254 SchProcRachRsrcReq(pst, (SchRachRsrcReq *)msg);
257 case EVENT_RACH_RESOURCE_RELEASE_TO_SCH:
259 SchProcRachRsrcRel(pst, (SchRachRsrcRel *)msg);
262 case EVENT_PAGING_IND_TO_SCH:
264 SchProcPagingInd(pst, (SchPageInd *)msg);
267 case EVENT_DL_HARQ_IND_TO_SCH:
269 SchProcDlHarqInd(pst, (DlHarqInd *)msg);
274 DU_LOG("\nERROR --> SCH : SchMessageRouter(): Invalid event [%d] received", pst->event);
282 /**********************************************************************
285 **********************************************************************/