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
29 **********************************************************************/
32 @brief This file contains the implementation of callback functions
33 registered with SSI during the LTE MAC Task initialization.
35 /* header include files -- defines (.h) */
36 #include "common_def.h"
37 #include "tfu.h" /* RGU defines */
38 #include "lrg.h" /* layer management defines for LTE-MAC */
39 #include "rgr.h" /* layer management defines for LTE-MAC */
40 #include "rgm.h" /* layer management defines for LTE-MAC */
41 #include "rg_env.h" /* customisable defines and macros for LTE-MAC */
42 #include "rg_sch_err.h" /* defines and macros for Scheduler */
43 #include "rg_sch_inf.h" /* defines and macros for Scheduler */
44 #include "rg_sch.h" /* defines and macros for Scheduler */
47 /* header/extern include files (.x) */
48 #include "tfu.x" /* RGU types */
49 #include "lrg.x" /* layer management typedefs for MAC */
50 #include "rgr.x" /* layer management typedefs for MAC */
51 #include "rgm.x" /* layer management typedefs for MAC */
52 #include "rg_sch_inf.x" /* typedefs for Scheduler */
53 #include "rg_sch.x" /* typedefs for Scheduler */
54 #include "mac_sch_interface.h"
59 * @brief Task Activation callback function.
63 * Function : schActvTsk
65 * Primitives invoked by MAC's users/providers through
66 * a loosely coupled interface arrive here by means of
67 * SSI's message handling. This API is registered with
68 * SSI during the Task Registration of MAC.
70 * @param[in] Pst *pst, post structure of the Primitive.
71 * @param[in] Buffer *mBuf, Packed primitive parameters in the buffer.
72 * @param[in] Reason reason.
79 Pst *pst, /* post structure */
80 Buffer *mBuf /* message buffer */
83 PUBLIC S16 schActvTsk(pst, mBuf)
84 Pst *pst; /* post structure */
85 Buffer *mBuf; /* message buffer */
92 /* The originator of this message is the stack manager,
93 * unpack and go to the respective primitive processing function */
98 case EVTMACSCHGENCFGREQ:
99 /* Process a config. request */
100 cmUnpkLrgSchCfgReq(SchProcGenCfgReq, pst, mBuf);
102 case EVTLRGSCHCNTRLREQ:
103 /* Process a control request */
104 cmUnpkLrgSchCntrlReq(RgMiLrgSchCntrlReq, pst, mBuf);
106 case EVTLRGSCHSTAIND:
107 /* Process a control request */
108 cmUnpkLrgSchStaInd(RgMiLrgSchStaInd, pst, mBuf);
111 case EVTLRGSCHL2MEASREQ:
112 /* Process L2 Measurement request */
113 cmUnpkLrgSchL2MeasReq(RgMiLrgSchL2MeasReq, pst, mBuf);
115 case EVTLRGSCHL2MEASSTOPREQ:
116 /* Process L2 Measurement Stop request */
117 cmUnpkLrgSchL2MeasStopReq(RgMiLrgSchL2MeasStopReq, pst, mBuf);
119 case EVTLRGSCHL2MEASSENDREQ:
120 /* Process L2 Measurement Send request */
121 cmUnpkLrgSchL2MeasSendReq(RgMiLrgSchL2MeasSendReq, pst, mBuf);
124 #endif /* LCRGMILRG */
126 RGSCH_FREE_MSG(mBuf);
135 cmUnpkRgrBndReq(RgUiRgrBndReq, pst, mBuf);
138 cmUnpkRgrUbndReq(RgUiRgrUbndReq, pst, mBuf);
142 cmUnpkRgrSiCfgReq(RgUiRgrSiCfgReq, pst, mBuf);
144 case EVTRGRWARNINGSICFGREQ:
145 cmUnpkRgrWarningSiCfgReq(RgUiRgrWarningSiCfgReq, pst, mBuf);
148 case EVTRGRWARNINGSISTOPREQ:
149 cmUnpkRgrWarningSiStopReq(RgUiRgrWarningSiStopReq, pst, mBuf);
151 #endif/*RGR_SI_SCH */
152 /* LTE_ADV_FLAG_REMOVED_START */
153 case EVTRGRLOADINFREQ:
154 cmUnpkRgrLoadInfReq(RgUiRgrLoadInfReq, pst, mBuf);
156 /* LTE_ADV_FLAG_REMOVED_END */
159 RGSCH_FREE_MSG(mBuf);
166 /*#ifdef LCRGLITFU L2Split */
167 #if (defined(LCRGLITFU) || defined(LWLCRGLITFU))
168 case EVTTFUSCHBNDCFM:
169 cmUnpkTfuBndCfm(RgLiTfuSchBndCfm, pst, mBuf);
172 cmUnpkTfuRaReqInd(RgLiTfuRaReqInd, pst, mBuf);
175 cmUnpkTfuUlCqiInd(RgLiTfuUlCqiInd, pst, mBuf);
178 cmUnpkTfuHqInd(RgLiTfuHqInd, pst, mBuf);
181 cmUnpkTfuSrInd(RgLiTfuSrInd, pst, mBuf);
184 cmUnpkTfuDlCqiInd(RgLiTfuDlCqiInd, pst, mBuf);
187 /*cmUnpkTfuCrcIndInfo(RgLiTfuCrcInd, pst, mBuf); */
188 cmUnpkTfuCrcInd(RgLiTfuCrcInd, pst, mBuf);
190 case EVTTFUTIMINGADVIND:
191 cmUnpkTfuTimingAdvInd(RgLiTfuTimingAdvInd, pst, mBuf);
193 case EVTTFUPUCCHDELPWR:
194 cmUnpkTfuPucchDeltaPwr(RgLiTfuPucchDeltaPwrInd, pst, mBuf);
197 cmUnpkTfuDoaInd(RgLiTfuDoaInd, pst, mBuf);
200 case EVTTFURAWCQIIND:
201 cmUnpkTfuRawCqiInd(RgLiTfuRawCqiInd, pst, mBuf);
204 cmUnpkTfuSrsInd(RgLiTfuSrsInd, pst, mBuf);
207 /*LAA: Error Indication on SCell*/
209 cmUnpkTfuErrInd(RgLiTfuErrInd, pst, mBuf);
213 RGSCH_FREE_MSG(mBuf);
217 case ENTRG: /* When MAC sends a msg to Scheduler instance */
221 case EVTINFDEDBOUPDTREQ:
222 cmUnpkMacSchDedBoUpdtReq(RgMacSchDedBoUpdtReq, pst, mBuf);
224 case EVTINFCMNBOUPDTREQ:
225 cmUnpkMacSchCmnBoUpdtReq(RgMacSchCmnBoUpdtReq, pst, mBuf);
227 case EVTINFSFRECPIND:
228 cmUnpkMacSchSfRecpInd(RgMacSchSfRecpInd, pst, mBuf);
230 /*Fix: start: Inform UE delete to scheduler*/
232 cmUnpkMacSchUeDelInd(RgMacSchUeDelInd, pst, mBuf);
234 /*Fix: end: Inform UE delete to scheduler*/
236 case EVTINFL2MEASCFM:
237 cmUnpkMacSchL2MeasCfm(RgMacSchL2MeasCfm, pst, mBuf);
239 case EVTINFL2MEASSTOPCFM:
240 cmUnpkMacSchL2MeasCfm(RgMacSchL2MeasStopCfm, pst, mBuf);
244 case EVENT_SLOT_IND_TO_SCH:
245 unpackMacSchSlotInd(MacSchSlotInd, pst, mBuf);
248 RGSCH_FREE_MSG(mBuf);
252 case ENTRM: /* When RRM sends msg to scheduler */
256 cmUnpkRgmBndReq(RgUiRgmBndReq, pst, mBuf);
259 cmUnpkRgmUbndReq(RgUiRgmUbndReq, pst, mBuf);
261 case EVTRGMCFGPRBRPRT:
262 cmUnpkRgmCfgPrbRprt(RgUiRgmCfgPrbRprt, pst, mBuf);
265 RGSCH_FREE_MSG(mBuf);
270 RGSCH_FREE_MSG(mBuf);
275 }/* end of schActvTsk */
278 /**********************************************************************
281 **********************************************************************/