[Epic-ID: ODUHIGH-461][Task-ID: ODUHIGH-468]Unused files and functions removed/disabled
[o-du/l2.git] / src / cm / crg.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /**********************************************************************
20
21   Name:     LTE-MAC layer 
22   
23   Type:     C Include File 
24   
25   Desc:     Structures, variables and typedefs required by the LTE MAC-RRC
26             Control (CRG) interface.
27
28   File:     crg.x 
29
30 **********************************************************************/
31
32 #ifndef __CRG_X__
33 #define __CRG_X__
34
35 /** 
36   @file crg.x 
37   @brief Structure declarations and definitions for CRG interface.
38   */
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 /* Enumertaions for CRG */
45
46 /* Data Structures for CRG */
47
48 /** 
49   @brief Transaction ID between MAC and RRC. */
50 typedef struct crgCfgTransId
51 {
52    uint8_t trans[CRG_CFG_TRANSID_SIZE]; /*!< RRC transaction ID */
53 } CrgCfgTransId;
54
55 /** 
56   @brief Bandwidth configuration per cell. */
57 typedef struct crgBwCfg
58 {
59    uint8_t dlTotalBw;            /*!< Total Dowlink Bandwidth */
60    uint8_t ulTotalBw;            /*!< Total Uplink Bandwidth  */
61 } CrgBwCfg;
62
63 /** 
64   @brief RACH configuration per cell. */
65 typedef struct crgRachCfg
66 {
67    uint8_t  maxMsg3Tx;            /*!< Maximum number of message 3 transmissions */
68 } CrgRachCfg;
69
70 #ifdef LTE_ADV
71 /** @brief UE secondary cell config params to MAC*/
72 typedef struct crgUeSCellInfo
73 {
74   uint16_t                  sCellId;       /*!< This will be secondary cellId */
75   Inst                 macInst;       /*!< MAC instance for SCell */
76   SuId                 rguUlSapId;    /*!< MAC-RLC UL Sap ID */ 
77   SuId                 rguDlSapId;    /*!< MAC-RLC DL SAP ID */
78 }CrgUeSCellInfo;
79
80
81 /** @brief Configuration information of Secondary cells for a UE*/
82 typedef struct crgUeSecCellInfo 
83 {
84   Bool                 isSCellCfgPres; /*!<  Bool indicates whether configuration
85                                    is present */
86   uint8_t                   numSCells;                        /*!< Number of SCells
87                                                           */
88   CrgUeSCellInfo       ueSCellCfg[CRG_MAX_SCELL_PER_UE]; /*!< Secondary cell 
89                                                            configuration per UE */
90 }CrgUeSecCellInfo;
91
92 #endif /* LTE_ADV */
93
94 /** 
95   @brief Cell configuration. */
96 typedef struct crgCellCfg
97 {
98    CmLteCellId   cellId;       /*!< Cell ID */
99    CrgRachCfg    rachCfg;      /*!< RACH Configuration */
100    CrgBwCfg      bwCfg;        /*!< Bandwidth Configuration */
101 #ifdef TENB_MULT_CELL_SUPPRT
102    SpId          rguUlSapId;   /*!< RLC UL SAP Id for common channels */
103    SpId          rguDlSapId;   /*!< RLC DL SAP Id for common channels */
104 #endif
105 #ifdef EMTC_ENABLE
106    uint8_t            emtcEnable;
107 #endif
108 } CrgCellCfg;
109
110 /** 
111   @brief Uplink HARQ configuration per UE. */
112 typedef struct crgUeUlHqCfg
113 {
114    uint8_t maxUlHqTx;           /*!< Maximum number of UL HARQ transmissions */
115 } CrgUeUlHqCfg;
116
117 /* crg_x_001.main_3 - Changes for MIMO feature addition */
118 /* crg_x_001.main_4 - Changes for MIMO feature addition */
119 /** 
120  * @enum UE Transmission Modes */
121 typedef enum crgTxMode
122 {
123    CRG_UE_TM_1 = 1,    /** Transmission Mode 1 */
124    CRG_UE_TM_2,        /** Transmission Mode 2 */
125    CRG_UE_TM_3,        /** Transmission Mode 3 */
126    CRG_UE_TM_4,        /** Transmission Mode 4 */
127    CRG_UE_TM_5,        /** Transmission Mode 5 */
128    CRG_UE_TM_6,        /** Transmission Mode 6 */
129    CRG_UE_TM_7         /** Transmission Mode 7 */
130 } CrgTxMode;
131
132 /** 
133   @brief UE Transmission mode configuration */
134 typedef struct crgTxModeCfg
135 {
136    Bool      pres;  /*!< TRUE if Transmission mode is being CFG/RECFG ed */
137    CrgTxMode tm;    /*!< Transmission mode */
138 }CrgTxModeCfg;
139 /** 
140   @brief UE configuration. */
141 typedef struct crgUeCfg
142 {
143    CmLteCellId    cellId;      /*!< Cell ID */
144    CmLteRnti      crnti;       /*!< UE ID: CRNTI */ 
145    CrgUeUlHqCfg   ueUlHqCfg;   /*!< UE related UL HARQ configuration */
146    CrgTxModeCfg   txMode;      /*!< UE Transmission mode Cfg */
147 #ifdef TENB_MULT_CELL_SUPPRT
148    SpId           rguUlSapId;   /*!< RLC UL SAP Id for common channels */
149    SpId           rguDlSapId;   /*!< RLC DL SAP Id for common channels */
150 #endif
151 } CrgUeCfg;
152
153 /** 
154   @brief Logical channel configuration information for downlink logical channels. */
155 typedef struct crgDlLchCfg 
156 {
157    uint8_t             dlTrchType; /*!< Indicates type of DL transport channel:
158                                    Validated only for BCCH at MAC. DL Transport
159                                    channel type can take following values:<br>
160                                    CM_LTE_TRCH_BCH<br> 
161                                    CM_LTE_TRCH_PCH<br>
162                                    CM_LTE_TRCH_DL_SCH  */
163 } CrgDlLchCfg;
164
165 /** 
166   @brief Logical channel configuration information for uplink logical channels. */
167 typedef struct crgUlLchCfg
168 {
169    uint8_t             ulTrchType; /*!< Indicates type of UL transport channel:
170                                    Validated only for BCCH at MAC. 
171                                    UL Transport channel type can take following values:<br>
172                                    CM_LTE_TRCH_RACH<br>
173                                    CM_LTE_TRCH_UL_SCH */  
174    uint8_t             lcgId;      /*!< Logical channel group ID */
175 } CrgUlLchCfg;
176
177 /* crg_x_001.main_2: Documentation update */
178 /** 
179   @brief Logical channel configuration information for common and dedicated channels. */
180 typedef struct crgLchCfg
181 {
182    CmLteCellId   cellId;     /*!< Cell ID */
183    CmLteRnti     crnti;      /*!< CRNTI for DTCH and DCCH */
184    CmLteLcId     lcId;       /*!< Logical channel ID */
185    CmLteLcType   lcType;     /*!< Identifies the Logical channel type. lcType can take the following values:<br>                                            
186                                       CM_LTE_LCH_BCCH<br>
187                                       CM_LTE_LCH_PCCH<br>
188                                       CM_LTE_LCH_CCCH<br>
189                                       CM_LTE_LCH_DCCH<br>
190                                       CM_LTE_LCH_DTCH */  
191                             
192    uint8_t            dir;        /*!< Indicates Direction. Direction can take following 
193                                   values:<br>
194                                   CRG_DIR_TX<br>
195                                   CRG_DIR_RX<br>
196                                   CRG_DIR_TX_RX */  
197
198    CrgDlLchCfg   dlInfo;     /*!< Downlink logical channel configuration info */
199    CrgUlLchCfg   ulInfo;     /*!< Uplink logical channel configuration info */
200    /* crg_x_001.main_5 - ADD - Members corresponding to LTE_L2_MEAS */
201 #ifdef LTE_L2_MEAS
202    uint8_t qci;                   /*!< QCI for the logical channel.
203                                   Valid Range:[0-255] (Actual QCI - 1). */
204
205 #endif /* LTE_L2_MEAS */
206 } CrgLchCfg;
207
208 /** 
209   @brief Activation time information. */
210 typedef struct crgActvTime
211 {
212    Bool            pres;      /*!< Indicates the presence of activation time */
213    CmLteTimingInfo actvTime;  /*!< Activation time information */ 
214 } CrgActvTime;
215
216
217 /** 
218   @brief Cell reconfiguration information. */
219 typedef struct crgCellRecfg
220 {
221    CmLteCellId     cellId;         /*!< Cell ID */
222    CrgRachCfg      rachRecfg;      /*!< RACH Configuration */
223 } CrgCellRecfg;
224
225 /** 
226   @brief UE reconfiguration information. */
227 typedef struct crgUeRecfg
228 {
229    CmLteCellId       cellId;          /*!< Cell ID */
230    CmLteRnti         oldCrnti;        /*!< Old UE ID */
231    CmLteRnti         newCrnti;        /*!< New UE ID: This value must match
232                                         'oldCrnti',if no CRNTI change during
233                                          reconfiguration */
234    CrgUeUlHqCfg      ueUlHqRecfg;     /*!< UE UL HARQ information */
235    CrgTxModeCfg      txMode;          /*!< UE Transmission mode ReCfg */
236 #ifdef LTE_ADV
237    CrgUeSecCellInfo crgSCellCfg;    /*!< Secondary cell dedicated informaton
238                                              per UE */
239 #endif
240 } CrgUeRecfg;
241
242 /** 
243   @brief Logical channel reconfiguration information for dedicated channels only. */
244 typedef struct crgLchRecfg
245 {
246    CmLteCellId cellId;       /*!< Cell ID */
247    CmLteRnti   crnti;        /*!< CRNTI for DTCH and DCCH */
248    CmLteLcId   lcId;         /*!< Logical channel ID */
249    
250    struct ulRecfgS 
251    {
252       uint8_t             lcgId;  /*!< Logical channel group ID */
253    } ulRecfg;                /*!< Uplink logical channel reconfiguration information */
254
255 } CrgLchRecfg;
256
257 /** 
258   @brief Basic reconfiguration information for MAC. */
259 typedef struct crgRecfg
260 {
261    uint8_t recfgType;                /*!< Indicates reconfiguration type */
262    union crgRecfgU
263    {
264       CrgCellRecfg  cellRecfg;  /*!< Cell Reconfig information */
265       CrgUeRecfg    ueRecfg;    /*!< UE Reconfig information */ 
266       CrgLchRecfg   lchRecfg;   /*!< Logical channel reconfiguration information */
267    } u;                         /*!< Union of Cell/UE/Lch reconfiguration information
268                                   */
269 } CrgRecfg;
270
271 /** 
272   @brief Basic Delete information for MAC. */
273 typedef struct crgDel
274 {
275    uint8_t delType;               /*!< Indicates configuration item to be deleted */
276    union crgDelU
277    {
278       struct cellDelS 
279       {
280          CmLteCellId cellId; /*!< Cell ID */
281       } cellDel;             /*!< Cell Delete information */
282
283       struct ueDelS 
284       {
285          CmLteCellId cellId; /*!< Cell ID */
286          CmLteRnti   crnti;  /*!< UE ID: CRNTI */
287       } ueDel;               /*!< UE Delete information */
288       
289       struct lchDelS
290       {
291          CmLteCellId cellId; /*!< Cell ID */
292          CmLteRnti   crnti;  /*!< CRNTI for DTCH and DCCH */
293          CmLteLcId   lcId;   /*!< Logical channel ID */
294          uint8_t          dir;    /*!< Indicates Direction. Direction can take following 
295                                   values:<br>
296                                   CRG_DIR_TX<br>
297                                   CRG_DIR_RX<br>
298                                   CRG_DIR_TX_RX */ 
299       } lchDel;              /*!< Logical channel delete information */
300    } u;                      /*!< Union of Cell/UE/Lch delete information */
301 } CrgDel;
302
303 /** 
304   @brief UE RESET information for MAC. */
305 typedef struct crgRst
306 {
307    CmLteCellId cellId; /*!< Cell ID */
308    CmLteRnti   crnti;  /*!< UE ID: CRNTI tobe RESET */
309 } CrgRst;
310
311 /* 
312    Function Prototypes 
313  */
314 /** @brief Request from RRC to MAC to bind the interface SAPs. */
315 typedef S16 (*CrgBndReq) ARGS((
316    Pst*                 pst,
317    SuId                 suId,
318    SpId                 spId));
319 /** @brief Confirmation from MAC to RRC for the bind/unbind 
320  * request for the interface SAPs. */
321 typedef S16 (*CrgBndCfm) ARGS((
322    Pst*                 pst,
323    SuId                 suId,
324    uint8_t                   status));
325 /** @brief Request from RRC to MAC to unbind the interface SAPs. */
326 typedef S16 (*CrgUbndReq) ARGS((
327    Pst*                 pst,
328    SpId                 spId,
329    Reason               reason));
330 /** @brief Configuration Confirm from MAC to RRC. */
331 typedef S16 (*CrgCfgCfm) ARGS((
332    Pst*                 pst,
333    SuId                 suId,
334    CrgCfgTransId        transId,
335    uint8_t                   status));
336
337 /** @brief Request from RRC to MAC to bind the interface SAPs. */
338 S16 RgUiCrgBndReq ARGS((
339    Pst*                 pst,
340    SuId                 suId,
341    SpId                 spId
342 ));
343 /** @brief Confirmation from MAC to RRC for the bind/unbind 
344  * request for the interface SAPs. */
345 S16 RgUiCrgBndCfm ARGS((
346    Pst*                 pst,
347    SuId                 suId,
348    uint8_t                   status
349 ));
350 /** @brief Request from RRC to MAC to Unbind the interface SAPs. */
351 S16 RgUiCrgUbndReq ARGS((
352    Pst*                 pst,
353    SpId                 spId,
354    Reason               reason
355 ));
356 /** @brief Configuration Confirm from MAC to RRC. */
357 S16 RgUiCrgCfgCfm ARGS((
358    Pst*                 pst,
359    SuId                 suId,
360    CrgCfgTransId        transId,
361    uint8_t                   status
362 ));
363
364 #ifdef NH
365 /** @brief Request from RRC to MAC to bind the interface SAPs. */
366 S16 NhLiCrgBndReq ARGS((
367    Pst*                 pst,
368    SuId                 suId,
369    SpId                 spId
370 ));
371 /** @brief Confirmation from MAC to RRC for the bind/unbind 
372  * request for the interface SAPs. */
373 S16 NhLiCrgBndCfm ARGS((
374    Pst*                 pst,
375    SuId                 suId,
376    uint8_t                   status
377 ));
378 /** @brief Request from RRC to MAC to Unbind the interface SAPs. */
379 S16 NhLiCrgUbndReq ARGS((
380    Pst*                 pst,
381    SpId                 spId,
382    Reason               reason
383 ));
384 /** @brief Configuration Confirm from MAC to RRC. */
385 S16 NhLiCrgCfgCfm ARGS((
386    Pst*                 pst,
387    SuId                 suId,
388    CrgCfgTransId        transId,
389    uint8_t                   status
390 ));
391 #endif
392
393 #ifdef LCCRG
394 /** @brief Request from RRC to MAC to bind the interface SAPs. */
395 S16 cmPkCrgBndReq ARGS((
396    Pst*                 pst,
397    SuId                 suId,
398    SpId                 spId
399 ));
400 /** @brief Request from RRC to MAC to bind the interface SAPs. */
401 S16 cmUnpkCrgBndReq ARGS((
402    CrgBndReq            func,
403    Pst*                 pst,
404    Buffer               *mBuf
405 ));
406 /** @brief Confirmation from MAC to RRC for the bind/unbind 
407  * request for the interface SAPs. */
408 S16 cmPkCrgBndCfm ARGS((
409    Pst*                 pst,
410    SuId                 suId,
411    uint8_t                   status
412 ));
413 /** @brief Confirmation from MAC to RRC for the bind/unbind 
414  * request for the interface SAPs. */
415 S16 cmUnpkCrgBndCfm ARGS((
416    CrgBndCfm            func,
417    Pst*                 pst,
418    Buffer               *mBuf
419 ));
420 /** @brief Request from RRC to MAC to unbind the interface SAPs. */
421 S16 cmPkCrgUbndReq ARGS((
422    Pst*                 pst,
423    SpId                 spId,
424    Reason               reason
425 ));
426 /** @brief Request from RRC to MAC to unbind the interface SAPs. */
427 S16 cmUnpkCrgUbndReq ARGS((
428    CrgUbndReq           func,
429    Pst*                 pst,
430    Buffer               *mBuf
431 ));
432 /** @brief Configuration Confirm from MAC to RRC. */
433 S16 cmPkCrgCfgCfm ARGS((
434    Pst*                 pst,
435    SuId                 suId,
436    CrgCfgTransId        transId,
437    uint8_t                   status
438 ));
439 /** @brief Configuration Confirm from MAC to RRC. */
440 S16 cmUnpkCrgCfgCfm ARGS((
441    CrgCfgCfm            func,
442    Pst*                 pst,
443    Buffer               *mBuf
444 ));
445 S16 cmPkCrgCfgTransId ARGS((
446    CrgCfgTransId        *param,
447    Buffer               *mBuf
448 ));
449 S16 cmUnpkCrgCfgTransId ARGS((
450    CrgCfgTransId        *param,
451    Buffer               *mBuf
452 ));
453 S16 cmPkCrgBwCfg ARGS((
454    CrgBwCfg             *param,
455    Buffer               *mBuf
456 ));
457 S16 cmUnpkCrgBwCfg ARGS((
458    CrgBwCfg             *param,
459    Buffer               *mBuf
460 ));
461 S16 cmPkCrgRachCfg ARGS((
462    CrgRachCfg           *param,
463    Buffer               *mBuf
464 ));
465 S16 cmUnpkCrgRachCfg ARGS((
466    CrgRachCfg           *param,
467    Buffer               *mBuf
468 ));
469 S16 cmPkCrgUeUlHqCfg ARGS((
470    CrgUeUlHqCfg         *param,
471    Buffer               *mBuf
472 ));
473 S16 cmUnpkCrgUeUlHqCfg ARGS((
474    CrgUeUlHqCfg         *param,
475    Buffer               *mBuf
476 ));
477
478 #ifdef LTE_ADV
479 S16 cmPkCrgUeSecCellInfo ARGS((
480 CrgUeSecCellInfo *param,
481 Buffer *mBuf
482 ));
483
484 S16 cmUnpkCrgUeSecCellInfo ARGS((
485 CrgUeSecCellInfo *param,
486 Buffer *mBuf
487 ));
488 #endif /* LTE_ADV */
489
490 S16 cmPkCrgActvTime ARGS((
491    CrgActvTime          *param,
492    Buffer               *mBuf
493 ));
494 S16 cmUnpkCrgActvTime ARGS((
495    CrgActvTime          *param,
496    Buffer               *mBuf
497 ));
498 #endif
499
500 #ifdef DM
501 /** @brief Request from RRC to MAC to bind the interface SAPs. */
502 S16 DmUiCrgBndReq ARGS((
503    Pst*                 pst,
504    SuId                 suId,
505    SpId                 spId
506 ));
507 /** @brief Confirmation from MAC to RRC for the bind/unbind 
508  * request for the interface SAPs. */
509 S16 DmUiCrgBndCfm ARGS((
510    Pst*                 pst,
511    SuId                 suId,
512    uint8_t                   status
513 ));
514 /** @brief Request from RRC to MAC to unbind the interface SAPs. */
515 S16 DmUiCrgUbndReq ARGS((
516    Pst*                 pst,
517    SpId                 spId,
518    Reason               reason
519 ));
520 #endif
521
522 #ifdef __cplusplus
523 }
524 #endif
525 #endif /* __CRG_X__ */
526
527 /**********************************************************************
528   
529          End of file
530 **********************************************************************/