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 */
24 #define EVENT_RLC_UE_CREATE_REQ 210
25 #define EVENT_RLC_UE_CREATE_RSP 211 /*!< Config Confirm */
26 #define EVENT_UL_RRC_MSG_TRANS_TO_DU 212
27 #define EVENT_DL_RRC_MSG_TRANS_TO_RLC 213
28 #define EVENT_RRC_DELIVERY_MSG_TRANS_TO_DU 214
29 #define EVENT_RLC_UE_RECONFIG_REQ 215
30 #define EVENT_RLC_UE_RECONFIG_RSP 216
35 #define RB_TYPE_SRB 0 /* Signalling Radio Bearer */
36 #define RB_TYPE_DRB 1 /* Data Radio Bearer */
38 /* RLC Direction Config */
39 #define RLC_CFG_DIR_UL 1 /*!< Uplink direction */
40 #define RLC_CFG_DIR_DL 2 /*!< Downlink direction */
41 #define RLC_CFG_DIR_BOTH 3 /*!< Both Downlink and Uplink Direction*/
44 /* Logical Channel Type */
45 #define LCH_BCCH 1 /*!< BCCH Logical Channel */
46 #define LCH_PCCH 2 /*!< PCCH Logical Channel */
47 #define LCH_CCCH 3 /*!< CCCH Logical Channel */
48 #define LCH_DTCH 4 /*!< DTCH Logical Channel */
49 #define LCH_DCCH 5 /*!< DCCH Logical Channel */
54 RLC_CFG_REAS_NONE , /*!< No Failure */
55 RLC_CFG_REAS_RB_CREAT_FAIL , /*!< RB CB creation Failure */
56 RLC_CFG_REAS_UE_CREAT_FAIL , /*!< UE CB creation Failure */
57 RLC_CFG_REAS_CELL_CREAT_FAIL , /*!< CELL CB creation Failure */
58 RLC_CFG_REAS_RB_PRSNT , /*!< RB CB already present */
59 RLC_CFG_REAS_LCHTYPE_MIS , /*!< Logical channel type mismatch */
60 RLC_CFG_REAS_RB_UNKWN , /*!< RB Cb unknown */
61 RLC_CFG_REAS_UE_UNKWN , /*!< UE Cb unknown */
62 RLC_CFG_REAS_CELL_UNKWN , /*!< Cell Cb unknown */
63 RLC_CFG_REAS_RB_DEL_FAIL , /*!< RB Cb Deletion Failure */
64 RLC_CFG_REAS_UE_DEL_FAIL , /*!< UE Cb Deletion Failure */
65 RLC_CFG_REAS_RB_REEST_FAIL , /*!< RB Cb Re establish Failure */
66 RLC_CFG_REAS_RB_MODE_MIS , /*!< RB Cb Mode mismatch */
67 RLC_CFG_REAS_REEST_FAIL , /*!< RB Cb Re-establishment Failed */
68 RLC_CFG_REAS_RECFG_FAIL , /*!< RB Cb Re-configuration Failed */
69 RLC_CFG_REAS_INVALID_CFG , /*!< Invalid Configuration Type */
70 RLC_CFG_REAS_SAME_UEID , /*!< UE Ids match in ChngUeId Request */
71 RLC_CFG_REAS_CELL_DEL_FAIL , /*!< Cell Cb Deletion Failure */
72 RLC_CFG_REAS_INVALID_LCHID , /*!< Invalid LChId */
73 RLC_CFG_REAS_INVALID_DIR , /*!< Invalid Direction */
74 RLC_CFG_REAS_UE_EXISTS , /*!< UE ID already exists */
75 RLC_CFG_REAS_INVALID_SNLEN , /*!< Invalid SN Length */
76 RLC_CFG_REAS_SNLEN_MIS , /*!< SN Length mismatch */
77 RLC_CFG_REAS_INVALID_RGUSAP /*!< Invalid RGU SAP ID */
82 RLC_AM, //Acknowledged Mode
83 RLC_UM_BI_DIRECTIONAL, //UnAcknowledged Mode
84 RLC_UM_UNI_DIRECTIONAL_UL,
85 RLC_UM_UNI_DIRECTIONAL_DL
158 POLL_RETX_TMR_1000MS,
159 POLL_RETX_TMR_2000MS,
160 POLL_RETX_TMR_4000MS,
161 POLL_RETX_TMR_SPARE5,
162 POLL_RETX_TMR_SPARE4,
163 POLL_RETX_TMR_SPARE3,
164 POLL_RETX_TMR_SPARE2,
184 POLL_PDU_TMR_12288MS,
185 POLL_PDU_TMR_16384MS,
186 POLL_PDU_TMR_20480MS,
187 POLL_PDU_TMR_24576MS,
188 POLL_PDU_TMR_28672MS,
189 POLL_PDU_TMR_32768MS,
190 POLL_PDU_TMR_40960MS,
191 POLL_PDU_TMR_49152MS,
192 POLL_PDU_TMR_57344MS,
193 POLL_PDU_TMR_65536MS,
194 POLL_PDU_TMR_INFINITY,
195 POLL_PDU_TMR_SPARE_8,
196 POLL_PDU_TMR_SPARE_7,
197 POLL_PDU_TMR_SPARE_6,
198 POLL_PDU_TMR_SPARE_5,
199 POLL_PDU_TMR_SPARE_4,
200 POLL_PDU_TMR_SPARE_3,
201 POLL_PDU_TMR_SPARE_2,
410 typedef struct ulAmCfg
412 SnLenAm snLenUl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
413 TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
414 TStatProhTmr statProhTmr; /* T_status_prohibit Timer in msec*/
418 typedef struct dlAmCfg
420 SnLenAm snLenDl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
421 TpollReTxTmr pollRetxTmr; /* T_poll_retransmit Timer in msec */
422 PollPdu pollPdu; /* Used to trigger a poll for every pollPdu.*/
423 PollBytes pollByte; /* Poll_Byte in bytes. */
424 MaxRetxTh maxRetxTh; /* Max_Retx_Threshold */
428 typedef struct dlUmCfg
430 SnLenUm snLenDlUm; /* Sequence Number length in bits. Allowed values are 6 and 12 */
434 typedef struct ulUmCfg
436 SnLenUm snLenUlUm; /* Sequence Number length in bits. Allowed values are 6 and 12 */
437 TReAssembleTmr reAssemTmr; /* T_reassembling Timer in msec*/
441 typedef struct amBearerCfg
447 typedef struct umBiDirBearerCfg
453 typedef struct umUniDirUlBearerCfg
456 }UmUniDirUlBearerCfg;
458 typedef struct umUniDirDlBearerCfg
461 }UmUniDirDlBearerCfg;
463 /* Spec Ref: 38.331, 6.3.2 RLC-BearerConfig */
464 typedef struct rlcBearerCfg
466 ConfigType configType;
475 UmBiDirBearerCfg *umBiDirCfg;
476 UmUniDirUlBearerCfg *umUniDirUlCfg;
477 UmUniDirDlBearerCfg *umUniDirDlCfg;
481 typedef struct rlcUeCfg
486 RlcBearerCfg rlcLcCfg[MAX_NUM_LC];
487 UeCfgState rlcUeCfgState; /* InActive / Completed */
490 typedef struct rlcUeCfgRsp
495 FailureReason reason;
498 /* UL RRC Message from RLC to DU APP */
499 typedef struct ulRrcMsgInfo
501 uint16_t cellId; /* Cell Id */
502 uint16_t ueIdx; /* UE Index */
503 uint8_t lcId; /* Logical channel Id */
504 uint16_t msgLen; /* RRC message length (in bytes) */
505 uint8_t *rrcMsg; /* RRC Message (UL-DCCH Message) */
508 /* DL RRC Message from DU APP to RLC */
509 typedef struct dlRrcMsgInfo
511 uint16_t cellId; /* Cell Id */
512 uint16_t ueIdx; /* UE index */
513 uint8_t rbType; /* Radio Bearer Type */
514 uint8_t rbId; /* Radio Bearer Id */
515 uint8_t lcType; /* Logical channel type */
516 uint8_t lcId; /* Logical channel Id */
517 bool execDup; /* Execution duplication enabled */
518 bool deliveryStaRpt; /* Reporting of delivery status by RLC to DU-APP enabled */
519 uint16_t msgLen; /* RRC Message length */
520 uint8_t *rrcMsg; /* RRC Message (DL-DCCH Message) */
523 /* RRC delivery message from RLC to DU APP */
524 typedef struct rrcDeliveryStatus
526 uint16_t deliveryStatus;
527 uint16_t triggeringMessage;
530 typedef struct rrcDeliveryReportInfo
535 RrcDeliveryStatus rrcDeliveryStatus;
538 /* Function Pointers */
539 /* UE create Request from DU APP to RLC*/
540 typedef uint8_t (*DuRlcUeCreateReq) ARGS((
544 /* UE Cfg Response from RLC to DU APP*/
545 typedef uint8_t (*RlcDuUeCfgRsp) ARGS((
547 RlcUeCfgRsp *ueCfgRsp));
549 /* UL RRC Message from RLC to DU APP */
550 typedef uint8_t (*RlcUlRrcMsgToDuFunc) ARGS((
552 RlcUlRrcMsgInfo *ulRrcMsgInfo));
554 /* DL RRC Message from DU APP to RLC */
555 typedef uint8_t (*DuDlRrcMsgToRlcFunc) ARGS((
557 RlcDlRrcMsgInfo *dlRrcMsgInfo));
559 /* RRC delivery message from RLC to DU APP */
560 typedef uint8_t (*RlcRrcDeliveryReportToDuFunc) ARGS((
562 RrcDeliveryReport *rrcDeliveryReport));
564 typedef uint8_t (*DuRlcUeReconfigReq) ARGS((
568 /* Pack/Unpack function declarations */
569 uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
570 uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf);
571 uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfgRsp);
572 uint8_t unpackRlcUeCfgRsp(RlcDuUeCfgRsp func, Pst *pst, Buffer *mBuf);
573 uint8_t packRlcUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
574 uint8_t unpackRlcUlRrcMsgToDu(RlcUlRrcMsgToDuFunc func, Pst *pst, Buffer *mBuf);
575 uint8_t packDlRrcMsgToRlc(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo);
576 uint8_t unpackDlRrcMsgToRlc(DuDlRrcMsgToRlcFunc func, Pst *pst, Buffer *mBuf);
577 uint8_t packRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDeliveryReport);
578 uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func,Pst *pst, Buffer *mBuf);
579 uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg);
580 uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf);
582 /* Event Handler function declarations */
583 uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
584 uint8_t DuProcRlcUeCfgRsp(Pst *pst, RlcUeCfgRsp *cfgRsp);
585 uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
586 uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo);
587 uint8_t DuProcRlcRrcDeliveryReport(Pst *pst, RrcDeliveryReport *rrcDeliveryReport);
588 uint8_t RlcProcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg);
590 #endif /* RLC_INF_H */
592 /**********************************************************************
594 **********************************************************************/