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 /* Defines APIs exchanged between du_app and cl module of RLC */
23 /* Macro for Ue Context */
24 #define MAX_NUM_LOGICAL_CHANNELS 11
25 #define EVENT_RLC_UL_UE_CREATE_REQ 210
26 #define EVENT_RLC_UL_UE_CREATE_RSP 211 /*!< Config Confirm */
31 #define RB_TYPE_SRB 0 /* Signalling Radio Bearer */
32 #define RB_TYPE_DRB 1 /* Data Radio Bearer */
34 /* RLC Direction Config */
35 #define RLC_CFG_DIR_UL 1 /*!< Uplink direction */
36 #define RLC_CFG_DIR_DL 2 /*!< Downlink direction */
37 #define RLC_CFG_DIR_BOTH 3 /*!< Both Downlink and Uplink Direction*/
40 /* Logical Channel Type */
41 #define LCH_BCCH 1 /*!< BCCH Logical Channel */
42 #define LCH_PCCH 2 /*!< PCCH Logical Channel */
43 #define LCH_CCCH 3 /*!< CCCH Logical Channel */
44 #define LCH_DTCH 4 /*!< DTCH Logical Channel */
45 #define LCH_DCCH 5 /*!< DCCH Logical Channel */
50 RLC_CFG_REAS_NONE , /*!< No Failure */
51 RLC_CFG_REAS_RB_CREAT_FAIL , /*!< RB CB creation Failure */
52 RLC_CFG_REAS_UE_CREAT_FAIL , /*!< UE CB creation Failure */
53 RLC_CFG_REAS_CELL_CREAT_FAIL , /*!< CELL CB creation Failure */
54 RLC_CFG_REAS_RB_PRSNT , /*!< RB CB already present */
55 RLC_CFG_REAS_LCHTYPE_MIS , /*!< Logical channel type mismatch */
56 RLC_CFG_REAS_RB_UNKWN , /*!< RB Cb unknown */
57 RLC_CFG_REAS_UE_UNKWN , /*!< UE Cb unknown */
58 RLC_CFG_REAS_CELL_UNKWN , /*!< Cell Cb unknown */
59 RLC_CFG_REAS_RB_DEL_FAIL , /*!< RB Cb Deletion Failure */
60 RLC_CFG_REAS_UE_DEL_FAIL , /*!< UE Cb Deletion Failure */
61 RLC_CFG_REAS_RB_REEST_FAIL , /*!< RB Cb Re establish Failure */
62 RLC_CFG_REAS_RB_MODE_MIS , /*!< RB Cb Mode mismatch */
63 RLC_CFG_REAS_REEST_FAIL , /*!< RB Cb Re-establishment Failed */
64 RLC_CFG_REAS_RECFG_FAIL , /*!< RB Cb Re-configuration Failed */
65 RLC_CFG_REAS_INVALID_CFG , /*!< Invalid Configuration Type */
66 RLC_CFG_REAS_SAME_UEID , /*!< UE Ids match in ChngUeId Request */
67 RLC_CFG_REAS_CELL_DEL_FAIL , /*!< Cell Cb Deletion Failure */
68 RLC_CFG_REAS_INVALID_LCHID , /*!< Invalid LChId */
69 RLC_CFG_REAS_INVALID_DIR , /*!< Invalid Direction */
70 RLC_CFG_REAS_UE_EXISTS , /*!< UE ID already exists */
71 RLC_CFG_REAS_INVALID_SNLEN , /*!< Invalid SN Length */
72 RLC_CFG_REAS_SNLEN_MIS , /*!< SN Length mismatch */
73 RLC_CFG_REAS_INVALID_RGUSAP /*!< Invalid RGU SAP ID */
78 RLC_AM, //Acknowledged Mode
79 RLC_UM_BI_DIRECTIONAL, //UnAcknowledged Mode
80 RLC_UM_UNI_DIRECTIONAL_UL,
81 RLC_UM_UNI_DIRECTIONAL_DL
154 POLL_RETX_TMR_1000MS,
155 POLL_RETX_TMR_2000MS,
156 POLL_RETX_TMR_4000MS,
157 POLL_RETX_TMR_SPARE5,
158 POLL_RETX_TMR_SPARE4,
159 POLL_RETX_TMR_SPARE3,
160 POLL_RETX_TMR_SPARE2,
180 POLL_PDU_TMR_12288MS,
181 POLL_PDU_TMR_16384MS,
182 POLL_PDU_TMR_20480MS,
183 POLL_PDU_TMR_24576MS,
184 POLL_PDU_TMR_28672MS,
185 POLL_PDU_TMR_32768MS,
186 POLL_PDU_TMR_40960MS,
187 POLL_PDU_TMR_49152MS,
188 POLL_PDU_TMR_57344MS,
189 POLL_PDU_TMR_65536MS,
190 POLL_PDU_TMR_INFINITY,
191 POLL_PDU_TMR_SPARE_8,
192 POLL_PDU_TMR_SPARE_7,
193 POLL_PDU_TMR_SPARE_6,
194 POLL_PDU_TMR_SPARE_5,
195 POLL_PDU_TMR_SPARE_4,
196 POLL_PDU_TMR_SPARE_3,
197 POLL_PDU_TMR_SPARE_2,
406 typedef struct ulAmCfg
408 SnLenAm snLenUl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
409 TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
410 TStatProhTmr statProhTmr; /* T_status_prohibit Timer in msec*/
414 typedef struct dlAmCfg
416 SnLenAm snLenDl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
417 TpollReTxTmr pollRetxTmr; /* T_poll_retransmit Timer in msec */
418 PollPdu pollPdu; /* Used to trigger a poll for every pollPdu.*/
419 PollBytes pollByte; /* Poll_Byte in bytes. */
420 MaxRetxTh maxRetxTh; /* Max_Retx_Threshold */
424 typedef struct dlUmCfg
426 SnLenUm snLenDlUm; /* Sequence Number length in bits. Allowed values are 6 and 12 */
430 typedef struct ulUmCfg
432 SnLenUm snLenUlUm; /* Sequence Number length in bits. Allowed values are 6 and 12 */
433 TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
437 typedef struct amBearerCfg
443 typedef struct umBiDirBearerCfg
449 typedef struct umUniDirUlBearerCfg
452 }UmUniDirUlBearerCfg;
454 typedef struct umUniDirDlBearerCfg
457 }UmUniDirDlBearerCfg;
459 /* Spec Ref: 38.331, 6.3.2 RLC-BearerConfig */
460 typedef struct rlcBearerCfg
470 UmBiDirBearerCfg umBiDirCfg;
471 UmUniDirUlBearerCfg umUniDirUlCfg;
472 UmUniDirDlBearerCfg umUniDirDlCfg;
476 typedef struct rlcUeCfg
481 RlcBearerCfg rlcBearerCfg[MAX_NUM_LOGICAL_CHANNELS];
484 typedef struct rlcUeCfgRsp
489 FailureReason reason;
492 /* Function Pointers */
493 /* UE create Request from DU APP to RLC*/
494 typedef uint8_t (*DuRlcUlUeCreateReq) ARGS((
498 /* UE create Response from RLC to DU APP*/
499 typedef uint8_t (*RlcUlDuUeCreateRsp) ARGS((
501 RlcUeCfgRsp *ueCfgRsp));
503 /* Function Declarations */
504 uint8_t packDuRlcUlUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
505 uint8_t unpackRlcUlUeCreateReq(DuRlcUlUeCreateReq func, Pst *pst, Buffer *mBuf);
506 uint8_t RlcUlProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
507 uint8_t packRlcUlDuUeCreateRsp(Pst *pst, RlcUeCfgRsp *ueCfgRsp);
508 uint8_t unpackRlcUlUeCreateRsp(RlcUlDuUeCreateRsp func, Pst *pst, Buffer *mBuf);
509 uint8_t DuProcRlcUlUeCreateRsp(Pst *pst, RlcUeCfgRsp *cfgRsp);
511 #endif /* RLC_INF_H */
513 /**********************************************************************
515 **********************************************************************/