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_UL_CQI_TO_SCH:
107 strcpy(message,"EVENT_UL_CQI_TO_SCH");
110 case EVENT_DL_CQI_TO_SCH:
112 strcpy(message,"EVENT_DL_CQI_TO_SCH");
115 case EVENT_PHR_IND_TO_SCH
117 strcpy(message,"EVENT_PHR_IND_TO_SCH");
119 case EVENT_RACH_IND_TO_SCH:
121 strcpy(message,"EVENT_RACH_IND_TO_SCH");
124 case EVENT_CRC_IND_TO_SCH:
126 strcpy(message,"EVENT_CRC_IND_TO_SCH");
129 case EVENT_DL_RLC_BO_INFO_TO_SCH:
131 strcpy(message,"EVENT_DL_RLC_BO_INFO_TO_SCH");
134 case EVENT_SHORT_BSR:
136 strcpy(message,"EVENT_SHORT_BSR");
141 strcpy(message,"EVENT_LONG_BSR");
144 case EVENT_UCI_IND_TO_SCH:
146 strcpy(message,"EVENT_UCI_IND_TO_SCH");
149 case EVENT_UE_DELETE_REQ_TO_SCH:
151 strcpy(message,"EVENT_UE_DELETE_REQ_TO_SCH");
154 case EVENT_CELL_DELETE_REQ_TO_SCH:
156 strcpy(message,"EVENT_CELL_DELETE_REQ_TO_SCH");
159 case EVENT_RACH_RESOURCE_REQUEST_TO_SCH:
161 strcpy(message,"EVENT_RACH_RESOURCE_REQUEST_TO_SCH");
164 case EVENT_RACH_RESOURCE_RELEASE_TO_SCH:
166 strcpy(message,"EVENT_RACH_RESOURCE_RELEASE_TO_SCH");
169 case EVENT_PAGING_IND_TO_SCH:
171 strcpy(message,"EVENT_PAGING_IND_TO_SCH");
174 case EVENT_DL_HARQ_IND_TO_SCH:
176 strcpy(message,"EVENT_DL_HARQ_IND_TO_SCH");
180 strcpy(message,"Invalid Event");
183 DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message);
187 uint8_t SchMessageRouter(Pst *pst, void *msg)
189 #ifdef CALL_FLOW_DEBUG_LOG
190 callFlowSchMsgRouter(pst);
195 case EVENT_SCH_GEN_CFG:
197 SchProcGenCfgReq(pst, (RgMngmt *)msg);
200 case EVENT_SLICE_CFG_REQ_TO_SCH:
202 SchProcSliceCfgReq(pst, (SchSliceCfgReq *)msg);
205 case EVENT_SLICE_RECFG_REQ_TO_SCH:
207 SchProcSliceRecfgReq(pst, (SchSliceRecfgReq *)msg);
210 case EVENT_SCH_CELL_CFG:
212 SchProcCellCfgReq(pst, (SchCellCfg *)msg);
215 case EVENT_SLOT_IND_TO_SCH:
217 SchProcSlotInd(pst, (SlotTimingInfo *)msg);
220 case EVENT_ADD_UE_CONFIG_REQ_TO_SCH:
222 SchAddUeConfigReq(pst, (SchUeCfgReq *)msg);
225 case EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH:
227 SchModUeConfigReq(pst, (SchUeRecfgReq *)msg);
230 case EVENT_UL_CQI_TO_SCH:
232 SchProcUlCqiInd(pst, (SchUlCqiInd *)msg);
235 case EVENT_DL_CQI_TO_SCH:
237 SchProcDlCqiInd(pst, (SchDlCqiInd *)msg);
240 case EVENT_PHR_IND_TO_SCH:
242 SchProcPhrInd(pst, (SchPwrHeadroomInd *)msg);
245 case EVENT_RACH_IND_TO_SCH:
247 SchProcRachInd(pst, (RachIndInfo *)msg);
250 case EVENT_CRC_IND_TO_SCH:
252 SchProcCrcInd(pst, (CrcIndInfo *)msg);
255 case EVENT_DL_RLC_BO_INFO_TO_SCH:
257 SchProcDlRlcBoInfo(pst, (DlRlcBoInfo *)msg);
260 case EVENT_SHORT_BSR:
263 SchProcBsr(pst, (UlBufferStatusRptInd *)msg);
266 case EVENT_UCI_IND_TO_SCH:
268 SchProcSrUciInd(pst, (SrUciIndInfo *)msg);
271 case EVENT_UE_DELETE_REQ_TO_SCH:
273 SchProcUeDeleteReq(pst, (SchUeDelete *)msg);
276 case EVENT_CELL_DELETE_REQ_TO_SCH:
278 SchProcCellDeleteReq(pst, (SchCellDeleteReq *)msg);
281 case EVENT_RACH_RESOURCE_REQUEST_TO_SCH:
283 SchProcRachRsrcReq(pst, (SchRachRsrcReq *)msg);
286 case EVENT_RACH_RESOURCE_RELEASE_TO_SCH:
288 SchProcRachRsrcRel(pst, (SchRachRsrcRel *)msg);
291 case EVENT_PAGING_IND_TO_SCH:
293 SchProcPagingInd(pst, (SchPageInd *)msg);
296 case EVENT_DL_HARQ_IND_TO_SCH:
298 SchProcDlHarqInd(pst, (DlHarqInd *)msg);
303 DU_LOG("\nERROR --> SCH : SchMessageRouter(): Invalid event [%d] received", pst->event);
311 /**********************************************************************
314 **********************************************************************/