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 for portable definitions for Layer Manager
30 **********************************************************************/
33 @brief This file contains the definitions for Layer Manager
34 Interface primitives that are invoked from MAC to Layer Manager
35 (Confirmations and Indications) Portable functions corresponding
36 to these primitives are also defined.
39 /* header include files (.h) */
40 #include "common_def.h"
41 #include "lrg.h" /* LRG Interface defines */
42 /* header/extern include files (.x) */
43 #include "lrg.x" /* LRG Interface includes */
47 #endif /* __cplusplus */
49 #if !(defined(LCRGMILRG) && defined(SM))
53 #define RG_MAX_LRG_USR 2
55 /* portable functions at LRG interface */
57 S16 PtMiLrgCfgCfm ARGS((Pst *pst, RgMngmt *cfm));
58 S16 PtMiLrgSchCfgCfm ARGS((Pst *pst, RgMngmt *cfm));
59 S16 PtMiLrgStsCfm ARGS((Pst *pst, RgMngmt *cfm));
60 S16 PtMiLrgStaInd ARGS((Pst *pst, RgMngmt *usta));
61 S16 PtMiLrgSchStaInd ARGS((Pst *pst, RgMngmt *usta));
62 S16 PtMiLrgCntrlCfm ARGS((Pst *pst, RgMngmt *cfm));
63 S16 PtMiLrgTrcInd ARGS((Pst *pst, RgMngmt *trc,Buffer *mBuf));
65 S16 PtMiLrgSchL2MeasCfm ARGS((Pst *pst, LrgSchMeasCfmInfo *cfm));
66 S16 PtMiLrgSchL2MeasStopCfm ARGS((Pst *pst,LrgSchMeasCfmInfo *cfm ));
70 /* ***********LRG interface Mapping matrices ********************/
72 /** @brief Configuration Confirm primitive Matrix
73 * This matrix defines the mapping between the configuration confirm
74 * primitive called by the upper interface of MAC layer and the
75 * corresponding primitives of the MAC layer service user(s).
77 * The parameter RG_MAX_LRG_USR defines the maximum number of Layer
78 * managers of MAC at the LRG interface. This is an array of functions
79 * per primitive invoked by MAC whose size is RG_MAX_LRG_USR.
81 * The dispatching is performed by the configurable variable: selector.
82 * The selector is configured on a per SAP basis. The selectors are:
84 * LCRGMILRG - loosely coupled LMK interface
85 * TCRGMILRG - Tightly coupled LMK interface
87 * In a similar fashion, the matrices for Status, Statistics and
88 * Control confirms and, Status and trace indications are defined.
90 static const LrgCfgCfm RgMiLrgCfgCfmMt[RG_MAX_LRG_USR] =
93 cmPkLrgCfgCfm, /* 0 - loosely coupled */
95 PtMiLrgCfgCfm, /* 0 - loosely coupled */
98 SmMiLrgCfgCfm, /* 1 - Tightly coupled SM */
100 //PtMiLrgCfgCfm, /* 1 - Tightly coupled SM */
104 /** @brief Scheduler Config Confirm primitive Matrix */
105 static const LrgSchCfgCfm RgMiLrgSchCfgCfmMt[RG_MAX_LRG_USR] =
108 cmPkLrgSchCfgCfm, /* 0 - loosely coupled */
110 PtMiLrgSchCfgCfm, /* 0 - loosely coupled */
113 SmMiLrgSchCfgCfm, /* 1 - Tightly coupled SM */
115 //PtMiLrgSchCfgCfm, /* 1 - Tightly coupled SM */
119 /** @brief Statistics Confirm primitive Matrix */
120 static const LrgStsCfm RgMiLrgStsCfmMt[RG_MAX_LRG_USR] =
123 cmPkLrgStsCfm, /* 0 - loosely coupled */
125 PtMiLrgStsCfm, /* 0 - loosely coupled */
128 SmMiLrgStsCfm, /* 1 - Tightly coupled SM */
130 PtMiLrgStsCfm, /* 1 - Tightly coupled SM */
134 /** @brief Status Indication primitive Matrix */
135 static const LrgStaInd RgMiLrgStaIndMt[RG_MAX_LRG_USR] =
138 cmPkLrgStaInd, /* 0 - loosely coupled */
140 PtMiLrgStaInd, /* 0 - loosely coupled */
143 SmMiLrgStaInd, /* 1 - Tightly coupled SM */
145 PtMiLrgStaInd, /* 1 - Tightly coupled SM */
149 /** @brief Scheduler Status Indication primitive Matrix */
150 static const LrgSchStaInd RgMiLrgSchStaIndMt[RG_MAX_LRG_USR] =
153 cmPkLrgSchStaInd, /* 0 - loosely coupled */
155 PtMiLrgSchStaInd, /* 0 - loosely coupled */
158 SmMiLrgSchStaInd, /* 1 - Tightly coupled SM */
160 PtMiLrgSchStaInd, /* 1 - Tightly coupled SM */
165 /** @brief L2 Meas Cfm primitive Matrix */
166 static const LrgSchL2MeasCfm RgMiLrgSchL2mMeasCfmMt[RG_MAX_LRG_USR] =
169 cmPkLrgSchL2MeasCfm, /* 0 - loosely coupled */
171 PtMiLrgSchL2MeasCfm, /* 0 - loosely coupled */
174 SmMiLrgSchL2MeasCfm, /* 1 - Tightly coupled SM */
176 PtMiLrgSchL2MeasCfm, /* 1 - loosely coupled */
179 /** @brief L2 Meas Stop Cfm primitive Matrix */
180 static const LrgSchL2MeasStopCfm RgMiLrgSchL2mMeasStopCfmMt[RG_MAX_LRG_USR] =
183 cmPkLrgSchL2MeasStopCfm, /* 0 - loosely coupled */
185 PtMiLrgSchL2MeasStopCfm, /* 0 - loosely coupled */
188 SmMiLrgSchL2MeasStopCfm, /* 1 - Tightly coupled SM */
190 PtMiLrgSchL2MeasStopCfm, /* 1 - loosely coupled */
193 #endif /* LTE_L2_MEAS */
197 #endif /* __cplusplus */
203 * @brief Layer Manager Configuration confirm handler.
207 * Function : RgMiLrgCfgCfm
209 * This function handles the configuration
210 * confirm invoked by MAC to Layer Manager.
211 * -# Based on the pst->selector value it invokes one of the
212 * functions cmPkLrgCfgCfm() or SmMiLrgCfgCfm().
214 * @param[in] Pst *pst, the post structure
215 * @param[in] RgMngmt *cfm, the configuration confirm structure
221 Pst *pst, /* post structure */
222 RgMngmt *cfm /* config confirm structure */
226 (*RgMiLrgCfgCfmMt[pst->selector])(pst, cfm);
230 }/*-- RgMiLrgCfgCfm --*/
233 * @brief Layer Manager scheduler Configuration confirm handler.
237 * Function : RgMiLrgSchCfgCfm
239 * This function handles the configuration
240 * confirm invoked by Scheduler to Layer Manager.
241 * -# Based on the pst->selector value it invokes one of the
242 * functions cmPkLrgSchCfgCfm() or SmMiLrgSchCfgCfm().
244 * @param[in] Pst *pst, the post structure
245 * @param[in] RgMngmt *cfm, the configuration confirm structure
251 Pst *pst, /* post structure */
252 RgMngmt *cfm /* config confirm structure */
256 (*RgMiLrgSchCfgCfmMt[pst->selector])(pst, cfm);
260 }/*-- RgMiLrgSchCfgCfm --*/
265 * @brief Layer Manager Statistics confirm handler.
269 * Function : RgMiLrgStsCfm
271 * This function handles the statistics
272 * confirm invoked by MAC to Layer Manager.
273 * -# Based on the pst->selector value it invokes one of the
274 * functions cmPkLrgStsCfm() or SmMiLrgStsCfm().
276 * @param[in] Pst *pst, the post structure
277 * @param[in] RgMngmt *cfm, the statistics confirm structure
283 Pst *pst, /* post structure */
284 RgMngmt *cfm /* statistics confirm structure */
288 (*RgMiLrgStsCfmMt[pst->selector])(pst, cfm);
292 }/*-- RgMiLrgStsCfm --*/
296 * @brief Layer Manager Unsolicited Status Indication handler.
300 * Function : RgMiLrgStaInd
302 * This function handles the unsolicited status
303 * Indication invoked by MAC to Layer Manager.
304 * -# Based on the pst->selector value it invokes one of the
305 * functions cmPkLrgStaInd() or SmMiLrgStaInd().
307 * @param[in] Pst *pst, the post structure
308 * @param[in] RgMngmt *usta, the status indication structure
314 Pst *pst, /* post structure */
315 RgMngmt *usta /* status indication structure */
319 (*RgMiLrgStaIndMt[pst->selector])(pst,usta);
323 }/*-- RgMiLrgStaInd --*/
326 * @brief Layer Manager Unsolicited Status Indication handler from scheduler
330 * Function : RgMiLrgSchStaInd
332 * This function handles the unsolicited status
333 * Indication invoked by Scheduler to Layer Manager.
334 * -# Based on the pst->selector value it invokes one of the
335 * functions cmPkLrgSchStaInd() or SmMiLrgSchStaInd().
337 * @param[in] Pst *pst, the post structure
338 * @param[in] RgMngmt *usta, the status indication structure
344 Pst *pst, /* post structure */
345 RgMngmt *usta /* status indication structure */
349 (*RgMiLrgSchStaIndMt[pst->selector])(pst,usta);
353 }/*-- RgMiLrgSchStaInd --*/
357 /* TODO: Function header */
358 S16 RgMiLrgSchL2MeasCfm
360 Pst *pst, /* post structure */
361 LrgSchMeasCfmInfo *cfm /* Meas Cfm Info */
365 (*RgMiLrgSchL2mMeasCfmMt[pst->selector])(pst,cfm);
369 } /* RgMiLrgSchL2MeasCfm */
372 * @brief This function used to send L2 measurement stop confirmation
378 * Function : RgMiLrgSchL2MeasStopCfm
379 * This function sends reposnes to L2 Measurement stop request
382 * @param[in] Pst *pst, the post structure
383 * @param[in] LrgSchMeasCfmInfo *cfm, theconfirm structure
388 S16 RgMiLrgSchL2MeasStopCfm
390 Pst *pst, /* post structure */
391 LrgSchMeasCfmInfo *cfm /* Meas Cfm Info */
394 (*RgMiLrgSchL2mMeasStopCfmMt[pst->selector])(pst,cfm);
398 } /* RgMiLrgSchL2MeasStopCfm */
400 #endif /* LTE_L2_MEAS */
407 * @brief Portable Function definition for Layer Manager Configuration
412 * Function : PtMiLrgCfgCfm
414 * This function handles the configuration
415 * confirm invoked by MAC to Layer Manager.
416 * Users of MAC who intend to provide a glue logic
417 * for portability of Configuration Confirm are expected
418 * to fill in the code in this function definition.
420 * @param[in] Pst *pst, the post structure
421 * @param[in] RgMngmt *cfm, the configuration confirm structure
427 Pst *pst, /* post structure */
428 RgMngmt *cfm /* Config Confirm */
432 }/* end of PtMiLrgCfgCfm */
435 * @brief Portable Function definition for Layer Manager Configuration
440 * Function : PtMiLrgSchCfgCfm
442 * This function handles the configuration
443 * confirm invoked by scheduler to Layer Manager.
444 * Users of MAC who intend to provide a glue logic
445 * for portability of Configuration Confirm are expected
446 * to fill in the code in this function definition.
448 * @param[in] Pst *pst, the post structure
449 * @param[in] RgMngmt *cfm, the configuration confirm structure
455 Pst *pst, /* post structure */
456 RgMngmt *cfm /* Config Confirm */
461 }/* end of PtMiLrgSchCfgCfm */
466 * @brief Portable Function definition for Layer Manager Statistics
471 * Function : PtMiLrgStsCfm
473 * This function handles the statistics
474 * confirm invoked by MAC to Layer Manager.
475 * Users of MAC who intend to provide a glue logic
476 * for portability of statistics Confirm are expected
477 * to fill in the code in this function definition.
479 * @param[in] Pst *pst, the post structure
480 * @param[in] RgMngmt *cfm, the statistics confirm structure
486 Pst *pst, /* post structure */
487 RgMngmt *cfm /* Statistics Confirm */
492 }/* end of PtMiLrgStsCfm */
497 * @brief Portable Function definition for Layer Manager Status
498 * Indication handler.
502 * Function : PtMiLrgStaInd
504 * This function handles the status
505 * indication invoked by MAC to Layer Manager.
506 * Users of MAC who intend to provide a glue logic
507 * for portability of status indication are expected
508 * to fill in the code in this function definition.
510 * @param[in] Pst *pst, the post structure
511 * @param[in] RgMngmt *cfm, the status indication structure
517 Pst *pst, /* post structure */
518 RgMngmt *usta /* Status Indication */
522 }/* end of PtMiLrgStaInd */
525 * @brief Portable Function definition for Layer Manager Status
526 * Indication handler.
530 * Function : PtMiLrgSchStaInd
532 * This function handles the status
533 * indication invoked by Scheduler to Layer Manager.
534 * Users of MAC who intend to provide a glue logic
535 * for portability of status indication are expected
536 * to fill in the code in this function definition.
538 * @param[in] Pst *pst, the post structure
539 * @param[in] RgMngmt *cfm, the status indication structure
545 Pst *pst, /* post structure */
546 RgMngmt *usta /* Status Indication */
550 }/* end of PtMiLrgSchStaInd */
554 * @brief Portable Function definition for Layer Manager Control
559 * Function : PtMiLrgCntrlCfm
561 * This function handles the control
562 * confirm invoked by MAC to Layer Manager.
563 * Users of MAC who intend to provide a glue logic
564 * for portability of control Confirm are expected
565 * to fill in the code in this function definition.
567 * @param[in] Pst *pst, the post structure
568 * @param[in] RgMngmt *cfm, the control confirm structure
574 Pst *pst, /* post structure */
575 RgMngmt *cfm /* Control Confirm */
579 }/* end of PtMiLrgCntrlCfm */
583 * @brief Portable Function definition for L2 Measurement Configuration
588 * Function : PtMiLrgSchL2MeasCfm
591 * @param[in] Pst *pst, the post structure
592 * @param[in] *cfm, the measurement confirm structure
596 S16 PtMiLrgSchL2MeasCfm
598 Pst *pst, /* post structure */
599 LrgSchMeasCfmInfo *cfm /* Measurement Confirm */
604 }/* end of PtMiLrgSchL2MeasCfm */
607 * @brief Portable Function definition for L2 Measurement stop
612 * Function : PtMiLrgSchL2MeasStopCfm
615 * @param[in] Pst *pst, the post structure
616 * @param[in] *cfm, the measurement confirm structure
620 S16 PtMiLrgSchL2MeasStopCfm
622 Pst *pst, /* post structure */
623 LrgSchMeasCfmInfo *cfm /* Measurement Confirm */
628 }/* end of PtMiLrgSchL2MeasStopCfm */
630 #endif /*--PTRGMILRG--*/
633 /**********************************************************************
636 **********************************************************************/