Merge remote-tracking branch 'origin/develop' into enhancement-ltem
Conflicts: openair1/PHY/INIT/lte_init.c openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c openair1/PHY/LTE_TRANSPORT/dci.c openair1/PHY/LTE_TRANSPORT/dci_tools.c openair1/PHY/LTE_TRANSPORT/dlsch_coding.c openair1/PHY/LTE_TRANSPORT/edci.c openair1/PHY/LTE_TRANSPORT/if4_tools.c openair1/PHY/LTE_TRANSPORT/prach.c openair1/PHY/LTE_TRANSPORT/print_stats.c openair1/PHY/LTE_TRANSPORT/pucch.c openair1/PHY/LTE_TRANSPORT/transport_eNB.h openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h openair1/PHY/impl_defs_lte.h openair1/SCHED/fapi_l1.c openair1/SCHED/phy_procedures_lte_eNb.c openair2/COMMON/rrc_messages_types.h openair2/ENB_APP/enb_config.c openair2/ENB_APP/enb_paramdef.h openair2/LAYER2/MAC/config.c openair2/LAYER2/MAC/defs.h openair2/LAYER2/MAC/eNB_scheduler.c openair2/LAYER2/MAC/eNB_scheduler_RA.c openair2/LAYER2/MAC/eNB_scheduler_bch.c openair2/LAYER2/MAC/eNB_scheduler_dlsch.c openair2/LAYER2/MAC/eNB_scheduler_primitives.c openair2/LAYER2/MAC/eNB_scheduler_ulsch.c openair2/LAYER2/MAC/pre_processor.c openair2/LAYER2/MAC/rar_tools.c openair2/LAYER2/MAC/ue_procedures.c openair2/PHY_INTERFACE/IF_Module.c openair2/RRC/LITE/rrc_common.c openair2/RRC/LTE/L2_interface_ue.c openair2/RRC/LTE/MESSAGES/asn1_msg.c openair2/RRC/LTE/rrc_eNB.c targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp targets/RT/USER/lte-enb.c targets/RT/USER/lte-ru.c
This commit is contained in:
Executable → Regular
+7
-17
@@ -19,21 +19,11 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __openair_TYPES_H__
|
||||
#define __openair_TYPES_H__
|
||||
/*
|
||||
* flexran_messages_def.h
|
||||
*
|
||||
* Created on: Apr 26, 2018
|
||||
* Author: R. Schmidt
|
||||
*/
|
||||
|
||||
//#ifdef USER_MODE
|
||||
//#include <stdint.h>
|
||||
//typedef int8_t s8; /* 8 bit signed integer */
|
||||
//typedef int16_t s16; /* 16 bit signed integer */
|
||||
//typedef int32_t s32; /* 32 bit signed integer */
|
||||
//typedef int64_t s64; /* 64 bit signed integer */
|
||||
|
||||
//typedef uint8_t u8; /* 8 bit unsigned integer */
|
||||
//typedef uint16_t u16; /* 16 bit unsigned integer */
|
||||
//typedef uint32_t u32; /* 32 bit unsigned integer */
|
||||
//typedef uint64_t u64; /* 64 bit unsigned integer */
|
||||
//#else
|
||||
//#include <linux/types.h>
|
||||
//#endif
|
||||
#endif /*__openair_TYPES_H__ */
|
||||
MESSAGE_DEF(SOFT_RESTART_MESSAGE, MESSAGE_PRIORITY_MED_PLUS, IttiMsgEmpty, soft_restart_message)
|
||||
@@ -25,3 +25,4 @@ MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_del
|
||||
MESSAGE_DEF(GTPV1U_ENB_DELETE_TUNNEL_RESP, MESSAGE_PRIORITY_MED, gtpv1u_enb_delete_tunnel_resp_t, Gtpv1uDeleteTunnelResp)
|
||||
MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_IND, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_ind_t, Gtpv1uTunnelDataInd)
|
||||
MESSAGE_DEF(GTPV1U_ENB_TUNNEL_DATA_REQ, MESSAGE_PRIORITY_MED, gtpv1u_enb_tunnel_data_req_t, Gtpv1uTunnelDataReq)
|
||||
MESSAGE_DEF(GTPV1U_ENB_S1_REQ, MESSAGE_PRIORITY_MED, Gtpv1uS1Req, gtpv1uS1Req)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#ifndef GTPV1_U_MESSAGES_TYPES_H_
|
||||
#define GTPV1_U_MESSAGES_TYPES_H_
|
||||
|
||||
#include "asn1_constants.h"
|
||||
#include "asn_constant.h"
|
||||
|
||||
|
||||
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
|
||||
@@ -33,6 +33,7 @@
|
||||
#define GTPV1U_ENB_DELETE_TUNNEL_RESP(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uDeleteTunnelResp
|
||||
#define GTPV1U_ENB_TUNNEL_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataInd
|
||||
#define GTPV1U_ENB_TUNNEL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.Gtpv1uTunnelDataReq
|
||||
#define GTPV1U_ENB_S1_REQ(mSGpTR) (mSGpTR)->ittiMsg.gtpv1uS1Req
|
||||
|
||||
#define GTPV1U_ALL_TUNNELS_TEID (teid_t)0xFFFFFFFF
|
||||
|
||||
@@ -98,4 +99,8 @@ typedef struct gtpv1u_enb_tunnel_data_req_s {
|
||||
rb_id_t rab_id;
|
||||
} gtpv1u_enb_tunnel_data_req_t;
|
||||
|
||||
typedef struct {
|
||||
in_addr_t enb_ip_address_for_S1u_S12_S4_up;
|
||||
tcp_udp_port_t enb_port_for_S1u_S12_S4_up;
|
||||
} Gtpv1uS1Req;
|
||||
#endif /* GTPV1_U_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -40,3 +40,5 @@ MESSAGE_DEF(RRC_MAC_CCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDat
|
||||
|
||||
MESSAGE_DEF(RRC_MAC_MCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataReq, rrc_mac_mcch_data_req)
|
||||
MESSAGE_DEF(RRC_MAC_MCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacMcchDataInd, rrc_mac_mcch_data_ind)
|
||||
|
||||
MESSAGE_DEF(RRC_MAC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacPcchDataReq, rrc_mac_pcch_data_req)
|
||||
|
||||
@@ -43,11 +43,13 @@
|
||||
|
||||
#define RRC_MAC_MCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_mcch_data_req
|
||||
#define RRC_MAC_MCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_mcch_data_ind
|
||||
#define RRC_MAC_PCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_pcch_data_req
|
||||
|
||||
// Some constants from "LAYER2/MAC/defs.h"
|
||||
#define BCCH_SDU_SIZE (512)
|
||||
#define CCCH_SDU_SIZE (512)
|
||||
#define MCCH_SDU_SIZE (512)
|
||||
#define PCCH_SDU_SIZE (512)
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Messages between RRC and MAC layers
|
||||
@@ -114,4 +116,10 @@ typedef struct RrcMacMcchDataInd_s {
|
||||
uint8_t mbsfn_sync_area;
|
||||
} RrcMacMcchDataInd;
|
||||
|
||||
typedef struct RrcMacPcchDataReq_s {
|
||||
uint32_t frame;
|
||||
uint32_t sdu_size;
|
||||
uint8_t sdu[PCCH_SDU_SIZE];
|
||||
uint8_t enb_index;
|
||||
} RrcMacPcchDataReq;
|
||||
#endif /* MAC_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "TDD-Config.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#endif
|
||||
@@ -244,9 +244,7 @@ typedef struct {
|
||||
LCHAN_DESC Lchan_desc[2]; /*!< \brief Logical Channel QoS Descriptor (MAC component) */
|
||||
uint8_t L3_info_type;
|
||||
uint8_t L3_info[16];
|
||||
//#ifndef CELLULAR
|
||||
unsigned short UE_eNB_index;
|
||||
//#endif
|
||||
} __attribute__ ((__packed__)) MAC_CONFIG_REQ;
|
||||
#define MAC_CONFIG_REQ_SIZE sizeof(MAC_CONFIG_REQ)
|
||||
|
||||
@@ -314,18 +312,12 @@ typedef struct {
|
||||
|
||||
#ifndef OPENAIR2_IN
|
||||
|
||||
#ifndef CELLULAR
|
||||
//#include "L3_rrc_defs.h"
|
||||
#endif
|
||||
|
||||
typedef struct { //RRC_INTERFACE_FUNCTIONS
|
||||
unsigned int Frame_index;
|
||||
unsigned short UE_index[NB_MODULES_MAX][NB_SIG_CNX_UE];
|
||||
uint8_t eNB_id[NB_MODULES_MAX][NB_CNX_UE];
|
||||
#ifndef CELLULAR
|
||||
// L2_ID UE_id[NB_MODULES_MAX][NB_CNX_CH];
|
||||
uint8_t UE_id[NB_MODULES_MAX][NB_CNX_CH][5];
|
||||
#endif
|
||||
void (*openair_rrc_top_init)(void);
|
||||
char (*openair_rrc_eNB_init)(uint8_t );
|
||||
char (*openair_rrc_UE_init)(uint8_t, uint8_t);
|
||||
@@ -364,7 +356,7 @@ typedef struct {
|
||||
TDD_Config_t *tdd_Config,
|
||||
uint8_t *SIwindowsize,
|
||||
uint16_t *SIperiod
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
MBMS_flag_t MBMS_Flag,
|
||||
struct MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
@@ -372,10 +364,20 @@ typedef struct {
|
||||
struct PMCH_InfoList_r9 *pmch_InfoList
|
||||
#endif
|
||||
);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t
|
||||
,uint32_t
|
||||
#endif
|
||||
);
|
||||
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
|
||||
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
|
||||
logical_chan_id_t channel_idP, tb_size_t tb_sizeP);
|
||||
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t sourceL2Id
|
||||
,uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
|
||||
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
|
||||
void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
|
||||
|
||||
@@ -38,4 +38,4 @@
|
||||
#include "sctp_messages_def.h"
|
||||
#include "udp_messages_def.h"
|
||||
#include "gtpv1_u_messages_def.h"
|
||||
|
||||
#include "flexran_messages_def.h"
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
#ifndef __openair_DEFS_H__
|
||||
#define __openair_DEFS_H__
|
||||
|
||||
#ifndef USER_MODE
|
||||
#include <linux/kernel.h>
|
||||
#endif //USER_MODE
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if !defined (msg)
|
||||
@@ -49,44 +43,7 @@
|
||||
#define PAGE_MASK 0xfffff000
|
||||
#define virt_to_phys(x) (x)
|
||||
|
||||
#else // USER_MODE
|
||||
#include <rtai.h>
|
||||
#define msg rt_printk
|
||||
|
||||
#ifdef BIGPHYSAREA
|
||||
|
||||
#define bigmalloc(x) (bigphys_malloc(x))
|
||||
#define bigmalloc16(x) (bigphys_malloc(x))
|
||||
|
||||
#define malloc16(x) (bigphys_malloc(x))
|
||||
#define free16(y,x)
|
||||
|
||||
#define bigfree(y,x)
|
||||
|
||||
#else // BIGPHYSAREA
|
||||
|
||||
#define bigmalloc(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0))
|
||||
#define bigmalloc16(x) (dma_alloc_coherent(pdev[0],(x),&dummy_dma_ptr,0))
|
||||
#define bigfree(y,x) (dma_free_coherent(pdev[0],(x),(void *)(y),dummy_dma_ptr))
|
||||
#define malloc16(x) (kmalloc(x,GFP_KERNEL))
|
||||
#define free16(y,x) (kfree(y))
|
||||
|
||||
#endif // BIGPHYSAREA
|
||||
|
||||
|
||||
#ifdef CBMIMO1
|
||||
#define openair_get_mbox() (*(unsigned int *)mbox)
|
||||
#else //CBMIMO1
|
||||
#define openair_get_mbox() (*(unsigned int *)PHY_vars->mbox>>1)
|
||||
#endif //CBMIMO1
|
||||
|
||||
|
||||
#endif // USERMODE
|
||||
|
||||
// #define bzero(s,n) (memset((s),0,(n)))
|
||||
|
||||
#define cmax(a,b) ((a>b) ? (a) : (b))
|
||||
#define cmin(a,b) ((a<b) ? (a) : (b))
|
||||
#endif // /*__openair_DEFS_H__ */
|
||||
|
||||
|
||||
|
||||
@@ -30,3 +30,4 @@
|
||||
// Messages between RRC and PDCP layers
|
||||
MESSAGE_DEF(RRC_DCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcDcchDataReq, rrc_dcch_data_req)
|
||||
MESSAGE_DEF(RRC_DCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcDcchDataInd, rrc_dcch_data_ind)
|
||||
MESSAGE_DEF(RRC_PCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcPcchDataReq, rrc_pcch_data_req)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
// Defines to access message fields.
|
||||
#define RRC_DCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_dcch_data_req
|
||||
#define RRC_DCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_dcch_data_ind
|
||||
#define RRC_PCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_pcch_data_req
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Messages between RRC and PDCP layers
|
||||
@@ -60,4 +61,13 @@ typedef struct RrcDcchDataInd_s {
|
||||
uint8_t eNB_index; // LG: needed in UE
|
||||
} RrcDcchDataInd;
|
||||
|
||||
typedef struct RrcPcchDataReq_s {
|
||||
uint32_t sdu_size;
|
||||
uint8_t *sdu_p;
|
||||
uint8_t mode;
|
||||
uint16_t rnti;
|
||||
uint8_t ue_index;
|
||||
uint8_t CC_id;
|
||||
} RrcPcchDataReq;
|
||||
|
||||
#endif /* PDCP_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -29,10 +29,8 @@
|
||||
#ifndef PHY_MESSAGES_TYPES_H_
|
||||
#define PHY_MESSAGES_TYPES_H_
|
||||
|
||||
#include "PHY/impl_defs_lte.h"
|
||||
#if ENABLE_RAL
|
||||
#include "ral_messages_types.h" //LG: MIH moved from repository/trunk to repository/extras
|
||||
#endif
|
||||
#include "PHY/defs_common.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
#define PHY_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.phy_configuration_req
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef CMAKER
|
||||
#include "asn1_constants.h"
|
||||
#include "asn_constant.h"
|
||||
#else
|
||||
#include "RRC/LITE/MESSAGES/asn1_constants.h"
|
||||
#include "RRC/LTE/MESSAGES/asn1_constants.h"
|
||||
#endif
|
||||
|
||||
#ifndef __PLATFORM_CONSTANTS_H__
|
||||
@@ -43,7 +43,6 @@
|
||||
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
|
||||
#endif
|
||||
|
||||
#ifdef USER_MODE
|
||||
#ifdef LARGE_SCALE
|
||||
# define NB_MODULES_MAX 128
|
||||
# define NB_NODE_MAX 128
|
||||
@@ -51,11 +50,6 @@
|
||||
# define NB_MODULES_MAX 32
|
||||
# define NB_NODE_MAX 32
|
||||
#endif
|
||||
#else
|
||||
# define NB_MODULES_MAX 1
|
||||
# define NB_NODE_MAX 1
|
||||
#endif //PHY_EMUL
|
||||
|
||||
|
||||
#ifdef JUMBO_FRAME
|
||||
# define MAX_IP_PACKET_SIZE 10000 // 9000
|
||||
@@ -73,20 +67,33 @@
|
||||
|
||||
# define MAX_MODULES NB_MODULES_MAX
|
||||
|
||||
#ifdef LARGE_SCALE
|
||||
#ifndef UE_EXPANSION
|
||||
# ifdef LARGE_SCALE
|
||||
# define MAX_MOBILES_PER_ENB 128
|
||||
//# define MAX_RG 2
|
||||
#else
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 128
|
||||
# define MAX_eNB 2
|
||||
# else
|
||||
# define MAX_MOBILES_PER_ENB 16
|
||||
//# define MAX_RG 2
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 16
|
||||
# define MAX_eNB 2
|
||||
# endif
|
||||
#else
|
||||
# define MAX_MOBILES_PER_ENB 256
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
# define MAX_eNB 2
|
||||
#endif
|
||||
|
||||
|
||||
#define MAX_MANAGED_ENB_PER_MOBILE 2
|
||||
|
||||
///NB-IOT
|
||||
#define NB_RB_MAX_NB_IOT (maxDRB_NB_r13 + 3) //MP: NB_IoT --> 2(DRB)+3(SRBs - 2 is not used) = 5
|
||||
|
||||
|
||||
#define DEFAULT_RAB_ID 1
|
||||
|
||||
#define NB_RB_MAX (maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#define NB_RB_MBMS_MAX (maxSessionPerPMCH*maxServiceCount)
|
||||
#else
|
||||
// Do not allocate unused memory
|
||||
@@ -132,9 +139,7 @@
|
||||
#define UNUSED_PARAM_MBMS_SESSION_ID 0
|
||||
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
|
||||
|
||||
#ifdef USER_MODE
|
||||
#define printk printf
|
||||
#endif
|
||||
|
||||
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
|
||||
|
||||
|
||||
@@ -30,13 +30,10 @@
|
||||
#ifndef __PLATFORM_TYPES_H__
|
||||
# define __PLATFORM_TYPES_H__
|
||||
|
||||
#ifdef USER_MODE
|
||||
#if !defined(NAS_NETLINK)
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#include "itti_types.h"
|
||||
#endif
|
||||
//-----------------------------------------------------------------------------
|
||||
// GENERIC TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -68,7 +65,8 @@ typedef int32_t sdu_size_t;
|
||||
typedef uint32_t frame_t;
|
||||
typedef int32_t sframe_t;
|
||||
typedef uint32_t sub_frame_t;
|
||||
typedef uint8_t module_id_t;
|
||||
typedef uint16_t module_id_t;
|
||||
typedef uint8_t slice_id_t;
|
||||
typedef uint8_t eNB_index_t;
|
||||
typedef uint16_t ue_id_t;
|
||||
typedef int16_t smodule_id_t;
|
||||
@@ -87,6 +85,10 @@ typedef boolean_t srb_flag_t;
|
||||
#define SRB_FLAG_NO FALSE
|
||||
#define SRB_FLAG_YES TRUE
|
||||
|
||||
typedef boolean_t sl_discovery_flag_t;
|
||||
#define SL_DISCOVERY_FLAG_NO FALSE
|
||||
#define SL_DISCOVERY_FLAG_YES TRUE
|
||||
|
||||
typedef enum link_direction_e {
|
||||
UNKNOWN_DIR = 0,
|
||||
DIR_UPLINK = 1,
|
||||
@@ -99,6 +101,21 @@ typedef enum rb_type_e {
|
||||
RADIO_ACCESS_BEARER = 2
|
||||
} rb_type_t;
|
||||
|
||||
typedef enum {
|
||||
CR_ROUND = 0,
|
||||
CR_SRB12 = 1,
|
||||
CR_HOL = 2,
|
||||
CR_LC = 3,
|
||||
CR_CQI = 4,
|
||||
CR_LCP = 5,
|
||||
CR_NUM = 6
|
||||
} sorting_criterion_t;
|
||||
|
||||
typedef enum {
|
||||
POL_FAIR = 0,
|
||||
POL_GREEDY = 1,
|
||||
POL_NUM = 2
|
||||
} accounting_policy_t;
|
||||
//-----------------------------------------------------------------------------
|
||||
// PHY TYPES
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -154,7 +171,9 @@ typedef enum ip_traffic_type_e {
|
||||
TRAFFIC_IPV4_TYPE_UNICAST = 5,
|
||||
TRAFFIC_IPV4_TYPE_MULTICAST = 6,
|
||||
TRAFFIC_IPV4_TYPE_BROADCAST = 7,
|
||||
TRAFFIC_IPV4_TYPE_UNKNOWN = 8
|
||||
TRAFFIC_IPV4_TYPE_UNKNOWN = 8,
|
||||
TRAFFIC_PC5S_SIGNALLING = 9,
|
||||
TRAFFIC_PC5S_SESSION_INIT = 10
|
||||
} ip_traffic_type_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -274,29 +293,8 @@ typedef struct protocol_ctxt_s {
|
||||
(CTXT_Pp)->module_id, \
|
||||
(CTXT_Pp)->rnti
|
||||
|
||||
#ifdef OAI_EMU
|
||||
#define CHECK_CTXT_ARGS(CTXT_Pp) \
|
||||
if ((CTXT_Pp)->enb_flag) {\
|
||||
AssertFatal (((CTXT_Pp)->module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),\
|
||||
"eNB module id is too low (%u/%d/%d)!\n",\
|
||||
(CTXT_Pp)->module_id,\
|
||||
oai_emulation.info.first_enb_local,\
|
||||
oai_emulation.info.nb_enb_local);\
|
||||
AssertFatal (((CTXT_Pp)->module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),\
|
||||
"eNB module id is too high (%u/%d)!\n",\
|
||||
(CTXT_Pp)->module_id,\
|
||||
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);\
|
||||
} else {\
|
||||
AssertFatal ((CTXT_Pp)->module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),\
|
||||
"UE module id is too high (%u/%d)!\n",\
|
||||
(CTXT_Pp)->module_id,\
|
||||
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);\
|
||||
AssertFatal ((CTXT_Pp)->module_id >= oai_emulation.info.first_ue_local,\
|
||||
"UE module id is too low (%u/%d)!\n",\
|
||||
(CTXT_Pp)->module_id,\
|
||||
oai_emulation.info.first_ue_local);\
|
||||
}
|
||||
#else
|
||||
#define CHECK_CTXT_ARGS(CTXT_Pp)
|
||||
#endif
|
||||
|
||||
#define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg)
|
||||
void exit_function(const char* file, const char* function, const int line, const char* s);
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef RAL_MESSAGES_TYPES_H_
|
||||
#define RAL_MESSAGES_TYPES_H_
|
||||
#include "asn1_constants.h"
|
||||
#include "asn_constant.h"
|
||||
#include "platform_types.h"
|
||||
#include "commonDef.h"
|
||||
/* 802.21 mappings with the RRC protocol :
|
||||
|
||||
@@ -54,6 +54,7 @@ MESSAGE_DEF(RRC_STATE_IND, MESSAGE_PRIORITY_MED, RrcStateInd,
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
MESSAGE_DEF(RRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, RrcConfigurationReq, rrc_configuration_req)
|
||||
MESSAGE_DEF(NBIOTRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, NbIoTRrcConfigurationReq, nbiotrrc_configuration_req)
|
||||
|
||||
// UE: NAS -> RRC messages
|
||||
MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req)
|
||||
|
||||
@@ -35,8 +35,14 @@
|
||||
#ifdef CMAKER
|
||||
#include "SystemInformationBlockType2.h"
|
||||
#else
|
||||
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
|
||||
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
|
||||
#endif
|
||||
#include "SL-OffsetIndicator-r12.h"
|
||||
#include "SubframeBitmapSL-r12.h"
|
||||
#include "SL-CP-Len-r12.h"
|
||||
#include "SL-PeriodComm-r12.h"
|
||||
#include "SL-DiscResourcePool-r12.h"
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Messages for RRC logging
|
||||
@@ -62,6 +68,8 @@ typedef UL_DCCH_Message_t RrcUlDcchMessage;
|
||||
|
||||
#define RRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_configuration_req
|
||||
|
||||
#define NBIOTRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nbiotrrc_configuration_req
|
||||
|
||||
#define NAS_KENB_REFRESH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_kenb_refresh_req
|
||||
#define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req
|
||||
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
|
||||
@@ -159,9 +167,11 @@ typedef struct RrcConfigurationReq_s {
|
||||
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
|
||||
uint16_t mcc[PLMN_LIST_MAX_SIZE];
|
||||
uint16_t mnc[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
|
||||
paging_drx_t default_drx;
|
||||
@@ -179,10 +189,12 @@ typedef struct RrcConfigurationReq_s {
|
||||
int nb_antenna_ports[MAX_NUM_CCs];
|
||||
|
||||
|
||||
|
||||
RadioResourceConfig radioresourceconfig[MAX_NUM_CCs];
|
||||
RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs];
|
||||
|
||||
#ifdef Rel14
|
||||
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
|
||||
|
||||
//MIB
|
||||
@@ -200,7 +212,7 @@ typedef struct RrcConfigurationReq_s {
|
||||
long si_Narrowband_r13 [MAX_NUM_CCs][32];
|
||||
long si_TBS_r13 [MAX_NUM_CCs][32];
|
||||
int scheduling_info_br_size [MAX_NUM_CCs];
|
||||
// end +kogo
|
||||
|
||||
|
||||
long si_WindowLength_BR_r13 [MAX_NUM_CCs];
|
||||
long si_RepetitionPattern_r13 [MAX_NUM_CCs];
|
||||
@@ -211,10 +223,9 @@ typedef struct RrcConfigurationReq_s {
|
||||
long si_HoppingConfigCommon_r13 [MAX_NUM_CCs];
|
||||
long* si_ValidityTime_r13 [MAX_NUM_CCs];
|
||||
|
||||
// +kogo
|
||||
|
||||
long systemInfoValueTagSi_r13 [MAX_NUM_CCs][10];
|
||||
int system_info_value_tag_SI_size [MAX_NUM_CCs];
|
||||
// end +kogo
|
||||
|
||||
BOOLEAN_t freqHoppingParametersDL_r13 [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingNB_r13 [MAX_NUM_CCs];
|
||||
@@ -224,23 +235,23 @@ typedef struct RrcConfigurationReq_s {
|
||||
long interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingOffset_r13 [MAX_NUM_CCs];
|
||||
|
||||
// +kogo -- rach_CE_LevelInfoList_r13
|
||||
|
||||
long firstPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long lastPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long ra_ResponseWindowSize_r13 [MAX_NUM_CCs][4];
|
||||
long mac_ContentionResolutionTimer_r13 [MAX_NUM_CCs][4];
|
||||
long rar_HoppingConfig_r13 [MAX_NUM_CCs][4];
|
||||
int rach_CE_LevelInfoList_r13_size [MAX_NUM_CCs];
|
||||
// end kogo
|
||||
|
||||
|
||||
// long pcch_defaultPagingCycle_br;
|
||||
|
||||
// +kogo -- rsrp_range_list
|
||||
|
||||
long rsrp_range [MAX_NUM_CCs][3];
|
||||
int rsrp_range_list_size [MAX_NUM_CCs];
|
||||
// end kogo
|
||||
|
||||
// +kogo -- prach parameters ce list
|
||||
|
||||
|
||||
long prach_config_index [MAX_NUM_CCs][4];
|
||||
long prach_freq_offset [MAX_NUM_CCs][4];
|
||||
long *prach_StartingSubframe_r13 [MAX_NUM_CCs][4];
|
||||
@@ -251,15 +262,14 @@ typedef struct RrcConfigurationReq_s {
|
||||
int prach_parameters_list_size [MAX_NUM_CCs];
|
||||
long max_available_narrow_band [MAX_NUM_CCs][4][2];
|
||||
int max_available_narrow_band_size [MAX_NUM_CCs][4];
|
||||
// end kogo
|
||||
|
||||
|
||||
// +kogo n1PUCCH_AN_InfoList_r13 list
|
||||
|
||||
|
||||
long pucch_info_value [MAX_NUM_CCs][4];
|
||||
int pucch_info_value_size [MAX_NUM_CCs];
|
||||
// end kogo
|
||||
|
||||
// +kogo
|
||||
|
||||
bool pcch_config_v1310 [MAX_NUM_CCs];
|
||||
long paging_narrowbands_r13 [MAX_NUM_CCs];
|
||||
long mpdcch_numrepetition_paging_r13 [MAX_NUM_CCs];
|
||||
@@ -294,8 +304,187 @@ typedef struct RrcConfigurationReq_s {
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
long prach_root[MAX_NUM_CCs];
|
||||
long prach_config_index[MAX_NUM_CCs];
|
||||
BOOLEAN_t prach_high_speed[MAX_NUM_CCs];
|
||||
long prach_zero_correlation[MAX_NUM_CCs];
|
||||
long prach_freq_offset[MAX_NUM_CCs];
|
||||
long pucch_delta_shift[MAX_NUM_CCs];
|
||||
long pucch_nRB_CQI[MAX_NUM_CCs];
|
||||
long pucch_nCS_AN[MAX_NUM_CCs];
|
||||
//#if (RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
long pucch_n1_AN[MAX_NUM_CCs];
|
||||
//#endif
|
||||
long pdsch_referenceSignalPower[MAX_NUM_CCs];
|
||||
long pdsch_p_b[MAX_NUM_CCs];
|
||||
long pusch_n_SB[MAX_NUM_CCs];
|
||||
long pusch_hoppingMode[MAX_NUM_CCs];
|
||||
long pusch_hoppingOffset[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_enable64QAM[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_groupHoppingEnabled[MAX_NUM_CCs];
|
||||
long pusch_groupAssignment[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_sequenceHoppingEnabled[MAX_NUM_CCs];
|
||||
long pusch_nDMRS1[MAX_NUM_CCs];
|
||||
long phich_duration[MAX_NUM_CCs];
|
||||
long phich_resource[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_enable[MAX_NUM_CCs];
|
||||
long srs_BandwidthConfig[MAX_NUM_CCs];
|
||||
long srs_SubframeConfig[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_ackNackST[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_MaxUpPts[MAX_NUM_CCs];
|
||||
long pusch_p0_Nominal[MAX_NUM_CCs];
|
||||
long pusch_alpha[MAX_NUM_CCs];
|
||||
long pucch_p0_Nominal[MAX_NUM_CCs];
|
||||
long msg3_delta_Preamble[MAX_NUM_CCs];
|
||||
long ul_CyclicPrefixLength[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
|
||||
long rach_numberOfRA_Preambles[MAX_NUM_CCs];
|
||||
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs];
|
||||
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];
|
||||
long rach_messageSizeGroupA[MAX_NUM_CCs];
|
||||
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
|
||||
long rach_powerRampingStep[MAX_NUM_CCs];
|
||||
long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs];
|
||||
long rach_preambleTransMax[MAX_NUM_CCs];
|
||||
long rach_raResponseWindowSize[MAX_NUM_CCs];
|
||||
long rach_macContentionResolutionTimer[MAX_NUM_CCs];
|
||||
long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs];
|
||||
long bcch_modificationPeriodCoeff[MAX_NUM_CCs];
|
||||
long pcch_defaultPagingCycle[MAX_NUM_CCs];
|
||||
long pcch_nB[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t300[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t301[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t310[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
|
||||
long ue_TransmissionMode[MAX_NUM_CCs];
|
||||
long ue_multiple_max[MAX_NUM_CCs];
|
||||
|
||||
//TTN - for D2D
|
||||
//SIB18
|
||||
e_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
|
||||
e_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
|
||||
e_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
|
||||
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
|
||||
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
|
||||
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
|
||||
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
|
||||
|
||||
//SIB19
|
||||
//for discRxPool
|
||||
SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
|
||||
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
|
||||
long discRxPool_numRetx[MAX_NUM_CCs];
|
||||
long discRxPool_numRepetition[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
|
||||
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
|
||||
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
|
||||
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
|
||||
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
|
||||
//for discRxPoolPS
|
||||
SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
|
||||
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
|
||||
long discRxPoolPS_numRetx[MAX_NUM_CCs];
|
||||
long discRxPoolPS_numRepetition[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_prb_Num[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_prb_Start[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_prb_End[MAX_NUM_CCs];
|
||||
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
|
||||
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
|
||||
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
|
||||
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
|
||||
} RrcConfigurationReq;
|
||||
|
||||
#define MAX_NUM_NBIOT_CELEVELS 3
|
||||
|
||||
typedef struct NbIoTRrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
lte_frame_type_t frame_type;
|
||||
uint8_t tdd_config;
|
||||
uint8_t tdd_config_s;
|
||||
lte_prefix_type_t prefix_type;
|
||||
lte_prefix_type_t prefix_type_UL;
|
||||
int16_t eutra_band;
|
||||
uint32_t downlink_frequency;
|
||||
int32_t uplink_frequency_offset;
|
||||
int16_t Nid_cell;// for testing, change later
|
||||
int16_t N_RB_DL;// for testing, change later
|
||||
//RACH
|
||||
long rach_raResponseWindowSize_NB;
|
||||
long rach_macContentionResolutionTimer_NB;
|
||||
long rach_powerRampingStep_NB;
|
||||
long rach_preambleInitialReceivedTargetPower_NB;
|
||||
long rach_preambleTransMax_CE_NB;
|
||||
//BCCH
|
||||
long bcch_modificationPeriodCoeff_NB;
|
||||
//PCCH
|
||||
long pcch_defaultPagingCycle_NB;
|
||||
long pcch_nB_NB;
|
||||
long pcch_npdcch_NumRepetitionPaging_NB;
|
||||
//NPRACH
|
||||
long nprach_CP_Length;
|
||||
long nprach_rsrp_range;
|
||||
long nprach_Periodicity[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_StartTime[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_SubcarrierOffset[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_NumSubcarriers[MAX_NUM_NBIOT_CELEVELS];
|
||||
long numRepetitionsPerPreambleAttempt_NB[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_SubcarrierMSG3_RangeStart;
|
||||
long maxNumPreambleAttemptCE_NB;
|
||||
long npdcch_NumRepetitions_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
long npdcch_StartSF_CSS_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
long npdcch_Offset_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
//NPDSCH
|
||||
long npdsch_nrs_Power;
|
||||
//NPUSCH
|
||||
long npusch_ack_nack_numRepetitions_NB;
|
||||
long npusch_srs_SubframeConfig_NB;
|
||||
long npusch_threeTone_CyclicShift_r13;
|
||||
long npusch_sixTone_CyclicShift_r13;
|
||||
BOOLEAN_t npusch_groupHoppingEnabled;
|
||||
long npusch_groupAssignmentNPUSCH_r13;
|
||||
|
||||
//DL_GapConfig
|
||||
long dl_GapThreshold_NB;
|
||||
long dl_GapPeriodicity_NB;
|
||||
long dl_GapDurationCoeff_NB;
|
||||
//Uplink power control Common
|
||||
long npusch_p0_NominalNPUSCH;
|
||||
long npusch_alpha;
|
||||
long deltaPreambleMsg3;
|
||||
//UE timers and constants
|
||||
long ue_TimersAndConstants_t300_NB;
|
||||
long ue_TimersAndConstants_t301_NB;
|
||||
long ue_TimersAndConstants_t310_NB;
|
||||
long ue_TimersAndConstants_t311_NB;
|
||||
long ue_TimersAndConstants_n310_NB;
|
||||
long ue_TimersAndConstants_n311_NB;
|
||||
} NbIoTRrcConfigurationReq;
|
||||
|
||||
|
||||
// UE: NAS -> RRC messages
|
||||
typedef kenb_refresh_req_t NasKenbRefreshReq;
|
||||
typedef cell_info_req_t NasCellSelectionReq;
|
||||
|
||||
@@ -20,45 +20,13 @@
|
||||
*/
|
||||
|
||||
#ifndef _RTOS_HEADER_H_
|
||||
# define _RTOS_HEADER_H_
|
||||
# if defined(RTAI) && !defined(USER_MODE)
|
||||
// CONVERSION BETWEEN POSIX PTHREAD AND RTAI FUNCTIONS
|
||||
/*
|
||||
# define pthread_mutex_init pthread_mutex_init_rt
|
||||
# define pthread_mutexattr_init pthread_mutexattr_init_rt
|
||||
# define pthread_mutex_lock pthread_mutex_lock_rt
|
||||
# define pthread_mutex_unlock pthread_mutex_unlock_rt
|
||||
# define pthread_mutex_destroy pthread_mutex_destroy_rt
|
||||
# define pthread_cond_init pthread_cond_init_rt
|
||||
# define pthread_cond_wait pthread_cond_wait_rt
|
||||
# define pthread_cond_signal pthread_cond_signal_rt
|
||||
# define pthread_cond_destroy pthread_cond_destroy_rt
|
||||
# define pthread_attr_init pthread_attr_init_rt
|
||||
# define pthread_attr_setschedparam pthread_attr_setschedparam_rt
|
||||
# define pthread_create pthread_create_rt
|
||||
# define pthread_cancel pthread_cancel_rt
|
||||
# define pthread_delete_np pthread_cancel_rt
|
||||
# define pthread_attr_setstacksize pthread_attr_setstacksize_rt
|
||||
# define pthread_self rt_whoami
|
||||
*/
|
||||
# include <asm/rtai.h>
|
||||
# include <rtai.h>
|
||||
# include <rtai_posix.h>
|
||||
# include <rtai_fifos.h>
|
||||
# include <rtai_sched.h>
|
||||
# ifdef CONFIG_PROC_FS
|
||||
# include <rtai_proc_fs.h>
|
||||
# endif
|
||||
# else
|
||||
# ifdef USER_MODE
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <math.h>
|
||||
# include <pthread.h>
|
||||
# include <assert.h>
|
||||
# define rtf_get read
|
||||
# define rtf_put write
|
||||
# endif
|
||||
# endif
|
||||
#define _RTOS_HEADER_H_
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#define rtf_get read
|
||||
#define rtf_put write
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,12 @@ MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMPLETE_LOG, MESSAGE_PRIORITY_MED, IttiMsgT
|
||||
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_setup_request_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_SETUP_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_setup_response_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_MODIFY_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_modify_request_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_modify_response_log)
|
||||
MESSAGE_DEF(S1AP_PAGING_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_paging_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_request_log)
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_response_log)
|
||||
MESSAGE_DEF(S1AP_ERROR_INDICATION_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_error_indication_log)
|
||||
|
||||
/* eNB application layer -> S1AP messages */
|
||||
MESSAGE_DEF(S1AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, s1ap_register_enb_req_t , s1ap_register_enb_req)
|
||||
@@ -54,6 +60,8 @@ MESSAGE_DEF(S1AP_UE_CTXT_MODIFICATION_RESP , MESSAGE_PRIORITY_MED, s1ap_ue_ctxt_
|
||||
MESSAGE_DEF(S1AP_UE_CTXT_MODIFICATION_FAIL , MESSAGE_PRIORITY_MED, s1ap_ue_ctxt_modification_fail_t , s1ap_ue_ctxt_modification_fail)
|
||||
MESSAGE_DEF(S1AP_E_RAB_SETUP_RESP , MESSAGE_PRIORITY_MED, s1ap_e_rab_setup_resp_t , s1ap_e_rab_setup_resp)
|
||||
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQUEST_FAIL , MESSAGE_PRIORITY_MED, s1ap_e_rab_setup_req_fail_t , s1ap_e_rab_setup_request_fail)
|
||||
MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESP , MESSAGE_PRIORITY_MED, s1ap_e_rab_modify_resp_t , s1ap_e_rab_modify_resp)
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE , MESSAGE_PRIORITY_MED, s1ap_e_rab_release_resp_t , s1ap_e_rab_release_resp)
|
||||
|
||||
/* S1AP -> RRC messages */
|
||||
MESSAGE_DEF(S1AP_DOWNLINK_NAS , MESSAGE_PRIORITY_MED, s1ap_downlink_nas_t , s1ap_downlink_nas )
|
||||
@@ -61,6 +69,8 @@ MESSAGE_DEF(S1AP_INITIAL_CONTEXT_SETUP_REQ , MESSAGE_PRIORITY_MED, s1ap_initial_
|
||||
MESSAGE_DEF(S1AP_UE_CTXT_MODIFICATION_REQ , MESSAGE_PRIORITY_MED, s1ap_ue_ctxt_modification_req_t , s1ap_ue_ctxt_modification_req)
|
||||
MESSAGE_DEF(S1AP_PAGING_IND , MESSAGE_PRIORITY_MED, s1ap_paging_ind_t , s1ap_paging_ind )
|
||||
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQ , MESSAGE_PRIORITY_MED, s1ap_e_rab_setup_req_t , s1ap_e_rab_setup_req )
|
||||
MESSAGE_DEF(S1AP_E_RAB_MODIFY_REQ , MESSAGE_PRIORITY_MED, s1ap_e_rab_modify_req_t , s1ap_e_rab_modify_req )
|
||||
MESSAGE_DEF(S1AP_E_RAB_RELEASE_COMMAND , MESSAGE_PRIORITY_MED, s1ap_e_rab_release_command_t , s1ap_e_rab_release_command)
|
||||
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMMAND, MESSAGE_PRIORITY_MED, s1ap_ue_release_command_t , s1ap_ue_release_command)
|
||||
|
||||
/* S1AP <-> RRC messages (can be initiated either by MME or eNB) */
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#define S1AP_UE_CTXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.s1ap_ue_ctxt_modification_fail
|
||||
#define S1AP_E_RAB_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_setup_resp
|
||||
#define S1AP_E_RAB_SETUP_FAIL(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_setup_req_fail
|
||||
#define S1AP_E_RAB_MODIFY_RESP(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_modify_resp
|
||||
|
||||
#define S1AP_DOWNLINK_NAS(mSGpTR) (mSGpTR)->ittiMsg.s1ap_downlink_nas
|
||||
#define S1AP_INITIAL_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_initial_context_setup_req
|
||||
@@ -48,9 +49,12 @@
|
||||
#define S1AP_UE_CONTEXT_RELEASE_COMMAND(mSGpTR) (mSGpTR)->ittiMsg.s1ap_ue_release_command
|
||||
#define S1AP_UE_CONTEXT_RELEASE_COMPLETE(mSGpTR) (mSGpTR)->ittiMsg.s1ap_ue_release_complete
|
||||
#define S1AP_E_RAB_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_setup_req
|
||||
#define S1AP_PAGIND_IND(mSGpTR) (mSGpTR)->ittiMsg.s1ap_paging_ind
|
||||
#define S1AP_E_RAB_MODIFY_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_modify_req
|
||||
#define S1AP_PAGING_IND(mSGpTR) (mSGpTR)->ittiMsg.s1ap_paging_ind
|
||||
|
||||
#define S1AP_UE_CONTEXT_RELEASE_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_ue_release_req
|
||||
#define S1AP_E_RAB_RELEASE_COMMAND(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_release_command
|
||||
#define S1AP_E_RAB_RELEASE_RESPONSE(mSGpTR) (mSGpTR)->ittiMsg.s1ap_e_rab_release_resp
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
/* Maximum number of e-rabs to be setup/deleted in a single message.
|
||||
@@ -175,6 +179,11 @@ typedef struct s1ap_gummei_s {
|
||||
uint16_t mme_group_id;
|
||||
} s1ap_gummei_t;
|
||||
|
||||
typedef struct s1ap_imsi_s {
|
||||
uint8_t buffer[S1AP_IMSI_LENGTH];
|
||||
uint8_t length;
|
||||
} s1ap_imsi_t;
|
||||
|
||||
typedef struct s_tmsi_s {
|
||||
uint8_t mme_code;
|
||||
uint32_t m_tmsi;
|
||||
@@ -189,7 +198,7 @@ typedef enum ue_paging_identity_presenceMask_e {
|
||||
typedef struct ue_paging_identity_s {
|
||||
ue_paging_identity_presenceMask_t presenceMask;
|
||||
union {
|
||||
char imsi[S1AP_IMSI_LENGTH];
|
||||
s1ap_imsi_t imsi;
|
||||
s_tmsi_t s_tmsi;
|
||||
} choice;
|
||||
} ue_paging_identity_t;
|
||||
@@ -260,11 +269,29 @@ typedef struct e_rab_setup_s {
|
||||
uint32_t gtp_teid;
|
||||
} e_rab_setup_t;
|
||||
|
||||
typedef struct e_rab_modify_s {
|
||||
/* Unique e_rab_id for the UE. */
|
||||
uint8_t e_rab_id;
|
||||
} e_rab_modify_t;
|
||||
|
||||
typedef enum S1ap_Cause_e {
|
||||
S1AP_CAUSE_NOTHING, /* No components present */
|
||||
S1AP_CAUSE_RADIO_NETWORK,
|
||||
S1AP_CAUSE_TRANSPORT,
|
||||
S1AP_CAUSE_NAS,
|
||||
S1AP_CAUSE_PROTOCOL,
|
||||
S1AP_CAUSE_MISC,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} s1ap_Cause_t;
|
||||
|
||||
typedef struct e_rab_failed_s {
|
||||
/* Unique e_rab_id for the UE. */
|
||||
uint8_t e_rab_id;
|
||||
/* Cause of the failure */
|
||||
// cause_t cause;
|
||||
s1ap_Cause_t cause;
|
||||
uint8_t cause_value;
|
||||
} e_rab_failed_t;
|
||||
|
||||
typedef enum s1ap_ue_ctxt_modification_present_s {
|
||||
@@ -298,12 +325,14 @@ typedef struct s1ap_register_enb_req_s {
|
||||
/* Tracking area code */
|
||||
uint16_t tac;
|
||||
|
||||
#define PLMN_LIST_MAX_SIZE 6
|
||||
/* Mobile Country Code
|
||||
* Mobile Network Code
|
||||
*/
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
uint16_t mcc[PLMN_LIST_MAX_SIZE];
|
||||
uint16_t mnc[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t mnc_digit_length[PLMN_LIST_MAX_SIZE];
|
||||
uint8_t num_plmn;
|
||||
|
||||
/* Default Paging DRX of the eNB as defined in TS 36.304 */
|
||||
paging_drx_t default_drx;
|
||||
@@ -315,6 +344,8 @@ typedef struct s1ap_register_enb_req_s {
|
||||
uint8_t nb_mme;
|
||||
/* List of MME to connect to */
|
||||
net_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
|
||||
uint8_t broadcast_plmn_num[S1AP_MAX_NB_MME_IP_ADDRESS];
|
||||
uint8_t broadcast_plmn_index[S1AP_MAX_NB_MME_IP_ADDRESS][PLMN_LIST_MAX_SIZE];
|
||||
|
||||
/* Number of SCTP streams used for a mme association */
|
||||
uint16_t sctp_in_streams;
|
||||
@@ -345,6 +376,10 @@ typedef struct s1ap_nas_first_req_s {
|
||||
/* UE id for initial connection to S1AP */
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
/* the chosen PLMN identity as index, see TS 36.331 6.2.2 RRC Connection
|
||||
* Setup Complete. This index here is zero-based, unlike the standard! */
|
||||
int selected_plmn_identity;
|
||||
|
||||
/* Establishment cause as sent by UE */
|
||||
rrc_establishment_cause_t establishment_cause;
|
||||
|
||||
@@ -460,6 +495,12 @@ typedef struct s1ap_initial_context_setup_req_s {
|
||||
e_rab_t e_rab_param[S1AP_MAX_E_RAB];
|
||||
} s1ap_initial_context_setup_req_t;
|
||||
|
||||
typedef struct tai_plmn_identity_s {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
} plmn_identity_t;
|
||||
|
||||
typedef struct s1ap_paging_ind_s {
|
||||
/* UE identity index value.
|
||||
* Specified in 3GPP TS 36.304
|
||||
@@ -472,6 +513,15 @@ typedef struct s1ap_paging_ind_s {
|
||||
/* Indicates origin of paging */
|
||||
cn_domain_t cn_domain;
|
||||
|
||||
/* PLMN_identity in TAI of Paging*/
|
||||
plmn_identity_t plmn_identity[256];
|
||||
|
||||
/* TAC in TAIList of Paging*/
|
||||
int16_t tac[256];
|
||||
|
||||
/* size of TAIList*/
|
||||
int16_t tai_size;
|
||||
|
||||
/* Optional fields */
|
||||
paging_drx_t paging_drx;
|
||||
|
||||
@@ -520,16 +570,6 @@ typedef struct s1ap_ue_release_command_s {
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
typedef enum S1ap_Cause_e {
|
||||
S1AP_CAUSE_NOTHING, /* No components present */
|
||||
S1AP_CAUSE_RADIO_NETWORK,
|
||||
S1AP_CAUSE_TRANSPORT,
|
||||
S1AP_CAUSE_NAS,
|
||||
S1AP_CAUSE_PROTOCOL,
|
||||
S1AP_CAUSE_MISC,
|
||||
/* Extensions may appear below */
|
||||
|
||||
} s1ap_Cause_t;
|
||||
// S1AP <-- RRC messages
|
||||
typedef struct s1ap_ue_release_req_s {
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
@@ -537,4 +577,78 @@ typedef struct s1ap_ue_release_req_s {
|
||||
long cause_value;
|
||||
} s1ap_ue_release_req_t, s1ap_ue_release_resp_t;
|
||||
|
||||
typedef struct s1ap_e_rab_modify_req_s {
|
||||
/* UE id for initial connection to S1AP */
|
||||
uint16_t ue_initial_id;
|
||||
|
||||
/* MME UE id */
|
||||
uint16_t mme_ue_s1ap_id;
|
||||
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
/* Number of e_rab to be modify in the list */
|
||||
uint8_t nb_e_rabs_tomodify;
|
||||
|
||||
/* E RAB modify request */
|
||||
e_rab_t e_rab_modify_params[S1AP_MAX_E_RAB];
|
||||
} s1ap_e_rab_modify_req_t;
|
||||
|
||||
typedef struct s1ap_e_rab_modify_resp_s {
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
/* Number of e_rab modify-ed in the list */
|
||||
uint8_t nb_of_e_rabs;
|
||||
/* list of e_rab modify-ed by RRC layers */
|
||||
e_rab_modify_t e_rabs[S1AP_MAX_E_RAB];
|
||||
|
||||
/* Number of e_rab failed to be modify in list */
|
||||
uint8_t nb_of_e_rabs_failed;
|
||||
/* list of e_rabs that failed to be modify */
|
||||
e_rab_failed_t e_rabs_failed[S1AP_MAX_E_RAB];
|
||||
} s1ap_e_rab_modify_resp_t;
|
||||
|
||||
typedef struct e_rab_release_s {
|
||||
/* Unique e_rab_id for the UE. */
|
||||
uint8_t e_rab_id;
|
||||
} e_rab_release_t;
|
||||
|
||||
typedef struct s1ap_e_rab_release_command_s {
|
||||
/* MME UE id */
|
||||
uint16_t mme_ue_s1ap_id;
|
||||
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
/* The NAS PDU should be forwarded by the RRC layer to the NAS layer */
|
||||
nas_pdu_t nas_pdu;
|
||||
|
||||
/* Number of e_rab to be released in the list */
|
||||
uint8_t nb_e_rabs_torelease;
|
||||
|
||||
/* E RAB release command */
|
||||
e_rab_release_t e_rab_release_params[S1AP_MAX_E_RAB];
|
||||
|
||||
} s1ap_e_rab_release_command_t;
|
||||
|
||||
typedef struct s1ap_e_rab_release_resp_s {
|
||||
/* MME UE id */
|
||||
uint16_t mme_ue_s1ap_id;
|
||||
|
||||
/* eNB ue s1ap id as initialized by S1AP layer */
|
||||
unsigned eNB_ue_s1ap_id:24;
|
||||
|
||||
/* Number of e_rab released in the list */
|
||||
uint8_t nb_of_e_rabs_released;
|
||||
|
||||
/* list of e_rabs released */
|
||||
e_rab_release_t e_rab_release[S1AP_MAX_E_RAB];
|
||||
|
||||
/* Number of e_rab failed to be released in list */
|
||||
uint8_t nb_of_e_rabs_failed;
|
||||
/* list of e_rabs that failed to be released */
|
||||
e_rab_failed_t e_rabs_failed[S1AP_MAX_E_RAB];
|
||||
|
||||
} s1ap_e_rab_release_resp_t;
|
||||
|
||||
#endif /* S1AP_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -19,11 +19,14 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ , MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req)
|
||||
MESSAGE_DEF(SCTP_NEW_ASSOCIATION_RESP, MESSAGE_PRIORITY_MED, sctp_new_association_resp_t , sctp_new_association_resp)
|
||||
MESSAGE_DEF(SCTP_NEW_ASSOCIATION_IND , MESSAGE_PRIORITY_MED, sctp_new_association_ind_t , sctp_new_association_ind)
|
||||
MESSAGE_DEF(SCTP_REGISTER_UPPER_LAYER, MESSAGE_PRIORITY_MED, sctp_listener_register_upper_layer_t, sctp_listener_register_upper_layer)
|
||||
MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t , sctp_data_req)
|
||||
MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t , sctp_data_ind)
|
||||
MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init)
|
||||
MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t , sctp_close_association)
|
||||
MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ , MESSAGE_PRIORITY_MED, sctp_new_association_req_t , sctp_new_association_req)
|
||||
MESSAGE_DEF(SCTP_NEW_ASSOCIATION_REQ_MULTI, MESSAGE_PRIORITY_MED, sctp_new_association_req_multi_t , sctp_new_association_req_multi)
|
||||
MESSAGE_DEF(SCTP_NEW_ASSOCIATION_RESP, MESSAGE_PRIORITY_MED, sctp_new_association_resp_t , sctp_new_association_resp)
|
||||
MESSAGE_DEF(SCTP_NEW_ASSOCIATION_IND , MESSAGE_PRIORITY_MED, sctp_new_association_ind_t , sctp_new_association_ind)
|
||||
MESSAGE_DEF(SCTP_REGISTER_UPPER_LAYER, MESSAGE_PRIORITY_MED, sctp_listener_register_upper_layer_t , sctp_listener_register_upper_layer)
|
||||
MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t , sctp_data_req)
|
||||
MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t , sctp_data_ind)
|
||||
MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init)
|
||||
MESSAGE_DEF(SCTP_INIT_MSG_MULTI_REQ, MESSAGE_PRIORITY_MED, sctp_init_t , sctp_init_multi)
|
||||
MESSAGE_DEF(SCTP_INIT_MSG_MULTI_CNF, MESSAGE_PRIORITY_MED, sctp_init_msg_multi_cnf_t , sctp_init_msg_multi_cnf)
|
||||
MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t , sctp_close_association)
|
||||
|
||||
@@ -22,13 +22,16 @@
|
||||
#ifndef SCTP_MESSAGES_TYPES_H_
|
||||
#define SCTP_MESSAGES_TYPES_H_
|
||||
|
||||
#define SCTP_NEW_ASSOCIATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req
|
||||
#define SCTP_NEW_ASSOCIATION_RESP(mSGpTR)(mSGpTR)->ittiMsg.sctp_new_association_resp
|
||||
#define SCTP_NEW_ASSOCIATION_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_ind
|
||||
#define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind
|
||||
#define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req
|
||||
#define SCTP_INIT_MSG(mSGpTR) (mSGpTR)->ittiMsg.sctp_init
|
||||
#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association
|
||||
#define SCTP_NEW_ASSOCIATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req
|
||||
#define SCTP_NEW_ASSOCIATION_REQ_MULTI(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req_multi
|
||||
#define SCTP_NEW_ASSOCIATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_resp
|
||||
#define SCTP_NEW_ASSOCIATION_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_ind
|
||||
#define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind
|
||||
#define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req
|
||||
#define SCTP_INIT_MSG(mSGpTR) (mSGpTR)->ittiMsg.sctp_init
|
||||
#define SCTP_INIT_MSG_MULTI_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_multi
|
||||
#define SCTP_INIT_MSG_MULTI_CNF(mSGpTR) (mSGpTR)->ittiMsg.sctp_init_msg_multi_cnf
|
||||
#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association
|
||||
|
||||
enum sctp_state_e {
|
||||
SCTP_STATE_CLOSED,
|
||||
@@ -56,6 +59,32 @@ typedef struct sctp_new_association_req_s {
|
||||
net_ip_address_t remote_address;
|
||||
} sctp_new_association_req_t;
|
||||
|
||||
typedef struct sctp_new_association_req_multi_s {
|
||||
/* Upper layer connexion identifier */
|
||||
uint16_t ulp_cnx_id;
|
||||
|
||||
/* The port to connect to */
|
||||
uint16_t port;
|
||||
/* Payload Protocol Identifier to use */
|
||||
uint32_t ppid;
|
||||
|
||||
/* Number of streams used for this association */
|
||||
uint16_t in_streams;
|
||||
uint16_t out_streams;
|
||||
|
||||
/* Local address to bind to */
|
||||
net_ip_address_t local_address;
|
||||
/* Remote address to connect to */
|
||||
net_ip_address_t remote_address;
|
||||
|
||||
/* Multi-socket descriptor */
|
||||
int multi_sd;
|
||||
} sctp_new_association_req_multi_t;
|
||||
|
||||
typedef struct sctp_init_msg_multi_cnf_s {
|
||||
int multi_sd;
|
||||
} sctp_init_msg_multi_cnf_t;
|
||||
|
||||
typedef struct sctp_new_association_ind_s {
|
||||
/* Assoc id of the new association */
|
||||
int32_t assoc_id;
|
||||
|
||||
@@ -40,6 +40,10 @@ SUB_TASK_DEF(TASK_L2L1, TASK_PDCP_ENB, 200)
|
||||
|
||||
/// Radio Resource Control task
|
||||
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200)
|
||||
|
||||
// Define here for now
|
||||
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200)
|
||||
|
||||
/// S1ap task
|
||||
/// RAL task for ENB
|
||||
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200)
|
||||
|
||||
@@ -19,3 +19,24 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/* eNB application layer -> X2AP messages */
|
||||
/* ITTI LOG messages */
|
||||
/* ENCODER */
|
||||
MESSAGE_DEF(X2AP_RESET_REQUST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_reset_request_log)
|
||||
MESSAGE_DEF(X2AP_RESOURCE_STATUS_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_response_log)
|
||||
MESSAGE_DEF(X2AP_RESOURCE_STATUS_FAILURE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_resource_status_failure_log)
|
||||
|
||||
/* Messages for X2AP logging */
|
||||
MESSAGE_DEF(X2AP_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , x2ap_setup_request_log)
|
||||
|
||||
|
||||
/* eNB application layer -> X2AP messages */
|
||||
MESSAGE_DEF(X2AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, x2ap_register_enb_req_t , x2ap_register_enb_req)
|
||||
|
||||
/* X2AP -> eNB application layer messages */
|
||||
MESSAGE_DEF(X2AP_REGISTER_ENB_CNF , MESSAGE_PRIORITY_MED, x2ap_register_enb_cnf_t , x2ap_register_enb_cnf)
|
||||
MESSAGE_DEF(X2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, x2ap_deregistered_enb_ind_t , x2ap_deregistered_enb_ind)
|
||||
|
||||
/* handover messages X2AP <-> RRC */
|
||||
MESSAGE_DEF(X2AP_HANDOVER_REQ , MESSAGE_PRIORITY_MED, x2ap_handover_req_t , x2ap_handover_req)
|
||||
MESSAGE_DEF(X2AP_HANDOVER_REQ_ACK , MESSAGE_PRIORITY_MED, x2ap_handover_req_ack_t , x2ap_handover_req_ack)
|
||||
|
||||
@@ -19,3 +19,162 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef X2AP_MESSAGES_TYPES_H_
|
||||
#define X2AP_MESSAGES_TYPES_H_
|
||||
|
||||
#include "PhysCellId.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
|
||||
#define X2AP_REGISTER_ENB_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_req
|
||||
#define X2AP_HANDOVER_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req
|
||||
#define X2AP_HANDOVER_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_handover_req_ack
|
||||
#define X2AP_REGISTER_ENB_CNF(mSGpTR) (mSGpTR)->ittiMsg.x2ap_register_enb_cnf
|
||||
#define X2AP_DEREGISTERED_ENB_IND(mSGpTR) (mSGpTR)->ittiMsg.x2ap_deregistered_enb_ind
|
||||
|
||||
|
||||
#define X2AP_MAX_NB_ENB_IP_ADDRESS 2
|
||||
|
||||
// eNB application layer -> X2AP messages
|
||||
typedef struct x2ap_register_enb_req_s {
|
||||
/* Unique eNB_id to identify the eNB within EPC.
|
||||
* For macro eNB ids this field should be 20 bits long.
|
||||
* For home eNB ids this field should be 28 bits long.
|
||||
*/
|
||||
uint32_t eNB_id;
|
||||
/* The type of the cell */
|
||||
enum cell_type_e cell_type;
|
||||
|
||||
/* Optional name for the cell
|
||||
* NOTE: the name can be NULL (i.e no name) and will be cropped to 150
|
||||
* characters.
|
||||
*/
|
||||
char *eNB_name;
|
||||
|
||||
/* Tracking area code */
|
||||
uint16_t tac;
|
||||
|
||||
/* Mobile Country Code
|
||||
* Mobile Network Code
|
||||
*/
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
|
||||
/*
|
||||
* CC Params
|
||||
*/
|
||||
int16_t eutra_band[MAX_NUM_CCs];
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs];
|
||||
uint32_t Nid_cell[MAX_NUM_CCs];
|
||||
int16_t N_RB_DL[MAX_NUM_CCs];
|
||||
lte_frame_type_t frame_type[MAX_NUM_CCs];
|
||||
uint32_t fdd_earfcn_DL[MAX_NUM_CCs];
|
||||
uint32_t fdd_earfcn_UL[MAX_NUM_CCs];
|
||||
int num_cc;
|
||||
|
||||
/* To be considered for TDD */
|
||||
//uint16_t tdd_EARFCN;
|
||||
//uint16_t tdd_Transmission_Bandwidth;
|
||||
|
||||
/* The local eNB IP address to bind */
|
||||
net_ip_address_t enb_x2_ip_address;
|
||||
|
||||
/* Nb of MME to connect to */
|
||||
uint8_t nb_x2;
|
||||
|
||||
/* List of target eNB to connect to for X2*/
|
||||
net_ip_address_t target_enb_x2_ip_address[X2AP_MAX_NB_ENB_IP_ADDRESS];
|
||||
|
||||
/* Number of SCTP streams used for associations */
|
||||
uint16_t sctp_in_streams;
|
||||
uint16_t sctp_out_streams;
|
||||
|
||||
/* eNB port for X2C*/
|
||||
uint32_t enb_port_for_X2C;
|
||||
} x2ap_register_enb_req_t;
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// X2AP -> eNB application layer messages
|
||||
typedef struct x2ap_register_enb_cnf_s {
|
||||
/* Nb of connected eNBs*/
|
||||
uint8_t nb_x2;
|
||||
} x2ap_register_enb_cnf_t;
|
||||
|
||||
typedef struct x2ap_deregistered_enb_ind_s {
|
||||
/* Nb of connected eNBs */
|
||||
uint8_t nb_x2;
|
||||
} x2ap_deregistered_enb_ind_t;
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// X2AP <-> RRC
|
||||
typedef struct x2ap_gummei_s {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_len;
|
||||
uint8_t mme_code;
|
||||
uint16_t mme_group_id;
|
||||
} x2ap_gummei_t;
|
||||
|
||||
typedef struct x2ap_lastvisitedcell_info_s {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_len;
|
||||
PhysCellId_t target_physCellId;
|
||||
cell_type_t cell_type;
|
||||
uint64_t time_UE_StayedInCell;
|
||||
}x2ap_lastvisitedcell_info_t;
|
||||
|
||||
//used for src
|
||||
typedef struct x2ap_handover_req_s {
|
||||
int source_rnti; /* TODO: to be fixed/remove */
|
||||
int source_x2id; /* TODO: to be fixed/remove */
|
||||
|
||||
unsigned old_eNB_ue_s1ap_id:24;
|
||||
|
||||
PhysCellId_t target_physCellId;
|
||||
|
||||
x2ap_gummei_t ue_gummei;
|
||||
|
||||
/*UE-ContextInformation */
|
||||
|
||||
/* MME UE id */
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
|
||||
security_capabilities_t security_capabilities;
|
||||
|
||||
uint8_t kenb[32]; // keNB or keNB*
|
||||
|
||||
/*next_hop_chaining_coun */
|
||||
long int kenb_ncc;
|
||||
|
||||
/* UE aggregate maximum bitrate */
|
||||
ambr_t ue_ambr;
|
||||
|
||||
uint8_t nb_e_rabs_tobesetup;
|
||||
|
||||
/* list of e_rab setup-ed by RRC layers */
|
||||
e_rab_setup_t e_rabs_tobesetup[S1AP_MAX_E_RAB];
|
||||
|
||||
/* ue_context_pP->ue_context.e_rab[i].param.sgw_addr; */
|
||||
|
||||
x2ap_lastvisitedcell_info_t lastvisitedcell_info;
|
||||
|
||||
/* TODO: this parameter has to be removed */
|
||||
int target_mod_id;
|
||||
} x2ap_handover_req_t;
|
||||
|
||||
typedef struct x2ap_handover_req_ack_s {
|
||||
int source_rnti; /* TODO: to be fixed/remove */
|
||||
int source_x2id; /* TODO: to be fixed/remove */
|
||||
/* TODO: this parameter has to be removed */
|
||||
int target_mod_id;
|
||||
uint8_t rrc_buffer[1024 /* arbitrary, big enough */];
|
||||
int rrc_buffer_size;
|
||||
|
||||
uint32_t mme_ue_s1ap_id;
|
||||
} x2ap_handover_req_ack_t;
|
||||
|
||||
#endif /* X2AP_MESSAGES_TYPES_H_ */
|
||||
|
||||
Reference in New Issue
Block a user