Merge develop-nr
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
@@ -29,26 +28,26 @@
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#include "mac_proto.h"
|
||||
#include "defs.h"
|
||||
#include "proto.h"
|
||||
|
||||
int
|
||||
nr_rrc_mac_config_req_ue(
|
||||
module_id_t module_id,
|
||||
int CC_idP,
|
||||
uint8_t gNB_index,
|
||||
int CC_idP,
|
||||
uint8_t gNB_index,
|
||||
NR_MIB_t *mibP,
|
||||
NR_MAC_CellGroupConfig_t *mac_cell_group_configP,
|
||||
NR_PhysicalCellGroupConfig_t *phy_cell_group_configP,
|
||||
NR_SpCellConfig_t *spcell_configP ){
|
||||
|
||||
NR_UE_MAC_INST *mac = get_mac_inst(module_id);
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
|
||||
ServingCellConfig_t *serving_cell_config = spcell_config->spCellConfigDedicated;
|
||||
// NR_ServingCellConfig_t *serving_cell_config = spcell_configP->spCellConfigDedicated;
|
||||
// TODO do something FAPI-like P5 L1/L2 config interface in config_si, config_mib, etc.
|
||||
|
||||
if(mib != NULL){
|
||||
|
||||
if(mibP != NULL){
|
||||
;
|
||||
}
|
||||
|
||||
if(mac_cell_group_configP != NULL){
|
||||
@@ -56,16 +55,16 @@ nr_rrc_mac_config_req_ue(
|
||||
mac->drx_Config = mac_cell_group_configP->drx_Config;
|
||||
}
|
||||
|
||||
if(mac_cell_group_configP->SchedulingRequestConfig != NULL ){
|
||||
mac->SchedulingRequestConfig = mac_cell_group_configP->SchedulingRequestConfig;
|
||||
if(mac_cell_group_configP->schedulingRequestConfig != NULL ){
|
||||
mac->schedulingRequestConfig = mac_cell_group_configP->schedulingRequestConfig;
|
||||
}
|
||||
|
||||
if(mac_cell_group_configP->BSR_Config != NULL ){
|
||||
mac->BSR_Config = mac_cell_group_configP->BSR_Config;
|
||||
if(mac_cell_group_configP->bsr_Config != NULL ){
|
||||
mac->bsr_Config = mac_cell_group_configP->bsr_Config;
|
||||
}
|
||||
|
||||
if(mac_cell_group_configP->TAG_Config != NULL ){
|
||||
mac->TAG_Config = mac_cell_group_configP->TAG_Config;
|
||||
if(mac_cell_group_configP->tag_Config != NULL ){
|
||||
mac->tag_Config = mac_cell_group_configP->tag_Config;
|
||||
}
|
||||
|
||||
if(mac_cell_group_configP->phr_Config != NULL ){
|
||||
@@ -82,7 +81,7 @@ nr_rrc_mac_config_req_ue(
|
||||
}
|
||||
|
||||
// TODO check
|
||||
/*
|
||||
#if 0
|
||||
if(serving_cell_config_configP != NULL ){
|
||||
//config_phy(NULL, spcell_config);
|
||||
mac->servCellIndex = spcell_config->servCellIndex;
|
||||
@@ -122,8 +121,8 @@ nr_rrc_mac_config_req_ue(
|
||||
|
||||
spcell_config->tag_Id = spcell_config.tag_Id;
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
//scell config not yet
|
||||
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file extern.h
|
||||
* \brief mac externs
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \version 1.0
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __MAC_EXTERN_H__
|
||||
#define __MAC_EXTERN_H__
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
//#include "stdio.h"
|
||||
#endif //USER_MODE
|
||||
//#include "PHY/defs.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "defs.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#ifdef PHY_EMUL
|
||||
//#include "SIMULATION/simulation_defs.h"
|
||||
#endif //PHY_EMUL
|
||||
//#include "PHY_INTERFACE/defs.h"
|
||||
//#include "RRC/LITE/defs.h"
|
||||
|
||||
extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
|
||||
//extern uint32_t EBSR_Level[63];
|
||||
extern const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE];
|
||||
//extern uint32_t Extended_BSR_TABLE[63]; ----currently not used
|
||||
|
||||
extern const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
|
||||
|
||||
extern const uint8_t cqi2fmt1x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
|
||||
|
||||
extern const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE];
|
||||
|
||||
extern UE_MAC_INST *UE_mac_inst;
|
||||
extern eNB_MAC_INST *eNB_mac_inst;
|
||||
extern eNB_RRC_INST *eNB_rrc_inst;
|
||||
extern UE_RRC_INST *UE_rrc_inst;
|
||||
extern UE_MAC_INST *ue_mac_inst;
|
||||
extern MAC_RLC_XFACE *Mac_rlc_xface;
|
||||
extern uint8_t Is_rrc_registered;
|
||||
|
||||
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
|
||||
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
|
||||
|
||||
|
||||
|
||||
//#ifndef USER_MODE
|
||||
//extern MAC_xface *mac_xface;
|
||||
extern RRC_XFACE *Rrc_xface;
|
||||
|
||||
extern uint8_t Is_rrc_registered;
|
||||
|
||||
#ifndef PHY_EMUL
|
||||
#ifndef PHYSIM
|
||||
#define NB_INST 1
|
||||
#else
|
||||
extern unsigned char NB_INST;
|
||||
#endif
|
||||
extern unsigned char NB_eNB_INST;
|
||||
extern unsigned char NB_UE_INST;
|
||||
extern unsigned char NB_RN_INST;
|
||||
extern unsigned short NODE_ID[1];
|
||||
extern void* bigphys_malloc(int);
|
||||
#else
|
||||
extern EMULATION_VARS *Emul_vars;
|
||||
#endif //PHY_EMUL
|
||||
|
||||
|
||||
extern int cqi_to_mcs[16];
|
||||
|
||||
extern uint32_t RRC_CONNECTION_FLAG;
|
||||
|
||||
extern uint8_t rb_table[33];
|
||||
|
||||
extern DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
|
||||
|
||||
extern DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
|
||||
extern DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
|
||||
extern DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
|
||||
extern DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
extern DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
|
||||
extern DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
|
||||
|
||||
extern DCI1A_5MHz_FDD_t DLSCH_alloc_pdu1A_fdd;
|
||||
extern DCI1A_5MHz_FDD_t RA_alloc_pdu_fdd;
|
||||
extern DCI1A_5MHz_FDD_t BCCH_alloc_pdu_fdd;
|
||||
|
||||
extern DCI1A_5MHz_FDD_t CCCH_alloc_pdu_fdd;
|
||||
extern DCI1_5MHz_FDD_t DLSCH_alloc_pdu_fdd;
|
||||
|
||||
extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu1;
|
||||
extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu2;
|
||||
extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
|
||||
|
||||
#endif //DEF_H
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifndef __LAYER2_MAC_DEFS_H__
|
||||
#define __LAYER2_MAC_DEFS_H__
|
||||
#ifndef __LAYER2_NR_MAC_DEFS_H__
|
||||
#define __LAYER2_NR_MAC_DEFS_H__
|
||||
|
||||
|
||||
|
||||
@@ -43,66 +43,37 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/LTE_TRANSPORT/defs.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "BCCH-BCH-Message.h"
|
||||
#include "RadioResourceConfigCommon.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "SchedulingInfoList.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "RACH-ConfigCommon.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "MobilityControlInfo.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#ifdef Rel14
|
||||
#include "SystemInformationBlockType1-v1310-IEs.h"
|
||||
#endif
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
#include "NR_DRX-Config.h"
|
||||
#include "NR_SchedulingRequestConfig.h"
|
||||
#include "NR_BSR-Config.h"
|
||||
#include "NR_TAG-Config.h"
|
||||
#include "NR_PHR-Config.h"
|
||||
#include "NR_RNTI-Value.h"
|
||||
|
||||
#include "NR_MIB.h"
|
||||
#include "NR_MAC-CellGroupConfig.h"
|
||||
#include "NR_PhysicalCellGroupConfig.h"
|
||||
#include "NR_SpCellConfig.h"
|
||||
|
||||
#include "NR_ServingCellConfig.h"
|
||||
|
||||
#define NB_NR_UE_MAC_INST 1
|
||||
|
||||
/*!\brief Top level UE MAC structure */
|
||||
typedef struct {
|
||||
|
||||
//// MAC config
|
||||
drx_Config_t *drx_config;
|
||||
SchedulingRequestConfig_t *SchedulingRequestConfig;
|
||||
BSR_Config_t *BSR_Config;
|
||||
TAG_Config_t *TAG_Config;
|
||||
phr_Config_t *phr_Config;
|
||||
cs_RNTI_t *cs_RNTI;
|
||||
ServCellIndex_t *servCellIndex;
|
||||
NR_DRX_Config_t *drx_Config; /* OPTIONAL */
|
||||
NR_SchedulingRequestConfig_t *schedulingRequestConfig; /* OPTIONAL */
|
||||
NR_BSR_Config_t *bsr_Config; /* OPTIONAL */
|
||||
NR_TAG_Config_t *tag_Config; /* OPTIONAL */
|
||||
NR_PHR_Config_t *phr_Config; /* OPTIONAL */
|
||||
|
||||
NR_RNTI_Value_t *cs_RNTI; /* OPTIONAL */
|
||||
|
||||
//// Serving cell config
|
||||
TDD_UL_DL_ConfigDedicated_t *tdd_UL_DL_ConfigurationDedicated;
|
||||
// init DL BWP
|
||||
BWP_DownlinkDedicated_t *init_DL_BWP;
|
||||
// DL BWP list, not default one
|
||||
BWP_Downlink_t **BWP_Downlink_list;
|
||||
int BWP_Downlink_count;
|
||||
//BWP_Id_t *firstActiveDownlinkBWP_Id;
|
||||
long *bwp_InactivityTimer;
|
||||
BWP_Id_t *defaultDownlinkBWP_Id;
|
||||
//struct UplinkConfig *uplinkConfig;
|
||||
//struct UplinkConfig *supplementaryUplink;
|
||||
PDSCH_ServingCellConfig_t *pdsch_ServingCellConfig;
|
||||
CSI_MeasConfig_t *csi_MeasConfig;
|
||||
//SRS_CarrierSwitching_t *carrierSwitching;
|
||||
//long *sCellDeactivationTimer /* OPTIONAL */;
|
||||
//struct CrossCarrierSchedulingConfig *crossCarrierSchedulingConfig /* OPTIONAL */;
|
||||
TAG_Id_t tag_Id;
|
||||
//long *ue_BeamLockFunction /* OPTIONAL */;
|
||||
//long *pathlossReferenceLinking /* OPTIONAL */;
|
||||
} NR_UE_MAC_INST_t;
|
||||
|
||||
} UE_MAC_INST;
|
||||
#include "proto.h"
|
||||
/*@}*/
|
||||
#endif /*__LAYER2_MAC_DEFS_H__ */
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
*/
|
||||
|
||||
UE_MAC_INST_t UE_mac_inst; //[NB_MODULE_MAX];
|
||||
#include "defs.h"
|
||||
|
||||
NR_UE_MAC_INST_t UE_mac_inst; //[NB_MODULE_MAX];
|
||||
|
||||
|
||||
|
||||
@@ -31,17 +31,15 @@
|
||||
|
||||
#include "defs.h"
|
||||
#include "proto.h"
|
||||
#include "extern.h"
|
||||
#include "assertions.h"
|
||||
|
||||
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
|
||||
|
||||
int
|
||||
nr_l2_init_ue(void)
|
||||
{
|
||||
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
|
||||
//LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
|
||||
|
||||
LOG_I(MAC, "[MAIN] init UE MAC functions \n");
|
||||
//LOG_I(MAC, "[MAIN] init UE MAC functions \n");
|
||||
|
||||
//init mac here
|
||||
nr_ue_mac_inst = (NR_UE_MAC_INST_t *)malloc(sizeof(NR_UE_MAC_INST_t)*NB_NR_UE_MAC_INST);
|
||||
@@ -50,6 +48,6 @@ nr_l2_init_ue(void)
|
||||
return (1);
|
||||
}
|
||||
|
||||
NR_UE_MAC_INST_t *get_mac_inst(Module_id_t Mod_idP){
|
||||
NR_UE_MAC_INST_t *get_mac_inst(module_id_t Mod_idP){
|
||||
return &nr_ue_mac_inst[(int)Mod_idP];
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
#include "mac_proto.h"
|
||||
#include "RRC/NR_UE/proto.h"
|
||||
#include "proto.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
|
||||
void
|
||||
nr_ue_decode_mib(
|
||||
@@ -46,4 +46,4 @@ nr_ue_decode_mib(
|
||||
NR_BCCH_BCH, (uint8_t *) pduP, pdu_len );
|
||||
|
||||
// frame calculation
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file LAYER2/MAC/proto.h
|
||||
* \brief MAC functions prototypes for eNB and UE
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
* \version 1.0
|
||||
*/
|
||||
#ifndef __LAYER2_MAC_PROTO_H__
|
||||
#define __LAYER2_MAC_PROTO_H__
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
/**\brief decode mib pdu in NR_UE, from if_module ul_ind with P7 tx_ind message
|
||||
\param module_id module id
|
||||
\param CC_id component carrier id
|
||||
\param gNB_index gNB index
|
||||
\param extra_bits extra bits for frame calculation
|
||||
\param ssb_index SSB index for frame calculation
|
||||
\param frameP pointer to frame for revising after frame calculation
|
||||
\param pduP pointer to pdu
|
||||
\param pdu_length length of pdu*/
|
||||
void nr_ue_decode_mib(module_id_t module_id, int CC_id, uint8_t gNB_index, uint8_t extra_bits, uint32_t ssb_index, uint32_t *frameP, void *pduP, uint16_t pdu_len);
|
||||
|
||||
|
||||
/**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
|
||||
\param module_id module id
|
||||
\param CC_id component carrier id
|
||||
\param gNB_index gNB index
|
||||
\param mibP pointer to RRC message MIB
|
||||
\param mac_cell_group_configP pointer to RRC message MAC-related in cell group config
|
||||
\param phy_cell_group_configP pointer to RRC message PHY-related in cell group config
|
||||
\param spcell_configP pointer to RRC message serving cell config*/
|
||||
int nr_rrc_mac_config_req_ue( module_id_t module_id, int CC_id, uint8_t gNB_index, NR_MIB_t *mibP, NR_MAC_CellGroupConfig_t *mac_cell_group_configP, NR_PhysicalCellGroupConfig_t *phy_cell_group_configP, NR_SpCellConfig_t *spcell_configP );
|
||||
|
||||
int nr_l2_init_ue(void);
|
||||
|
||||
NR_UE_MAC_INST_t *get_mac_inst(module_id_t Mod_idP);
|
||||
|
||||
#endif
|
||||
/** @}*/
|
||||
@@ -1,13 +1,7 @@
|
||||
|
||||
|
||||
#include "defs.h"
|
||||
#include "proto.h"
|
||||
#include "extern.h"
|
||||
#include "assertions.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#include "rrc_proto.h"
|
||||
|
||||
int nr_l3_init_ue(void){
|
||||
LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
|
||||
|
||||
+116
-71
@@ -34,30 +34,34 @@
|
||||
#include "rrc_list.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_proto.h"
|
||||
#include "rrc_vars.h"
|
||||
#include "LAYER2/NR_MAC_UE/proto.h"
|
||||
|
||||
// from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (encoded)
|
||||
int8_t nr_rrc_ue_decode_secondary_cellgroup_config(
|
||||
const uint8_t *buffer,
|
||||
const uint32_t size
|
||||
){
|
||||
NR_CellGroupConfig_t *cellGroupConfig = (NR_CellGroupConfig_t *)0;
|
||||
NR_CellGroupConfig_t *cellGroupConfig = NULL;
|
||||
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_CellGroupConfig, //might be added prefix later
|
||||
&asn_DEF_NR_CellGroupConfig, //might be added prefix later
|
||||
(void **)&cellGroupConfig,
|
||||
(uint8_t *)buffer,
|
||||
size, 0, 0);
|
||||
|
||||
if(NR_UE_rrc_inst->cell_group_config == (NR_CellGroupConfig_t *)0){
|
||||
if(NR_UE_rrc_inst->cell_group_config == NULL){
|
||||
NR_UE_rrc_inst->cell_group_config = cellGroupConfig;
|
||||
nr_rrc_ue_process_scg_config(cellGroupConfig);
|
||||
}else{
|
||||
nr_rrc_ue_process_scg_config(cellGroupConfig);
|
||||
//asn_DEF_CellGroupConfig.free_struct(asn_DEF_CellGroupConfig, cellGroupConfig, 0);
|
||||
SEQUENCE_free(&asn_DEF_CellGroupConfig, (void *)cellGroupConfig, 0);
|
||||
//asn_DEF_NR_CellGroupConfig.free_struct(asn_DEF_NR_CellGroupConfig, cellGroupConfig, 0);
|
||||
SEQUENCE_free(&asn_DEF_NR_CellGroupConfig, (void *)cellGroupConfig, 0);
|
||||
}
|
||||
|
||||
nr_rrc_mac_config_req_ue();
|
||||
//nr_rrc_mac_config_req_ue( module_id_t module_id, int CC_id, uint8_t gNB_index, NR_MIB_t *mibP, NR_MAC_CellGroupConfig_t *mac_cell_group_configP, NR_PhysicalCellGroupConfig_t *phy_cell_group_configP, NR_SpCellConfig_t *spcell_configP );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,79 +69,80 @@ int8_t nr_rrc_ue_decode_secondary_cellgroup_config(
|
||||
// RRCReconfiguration
|
||||
int8_t nr_rrc_ue_process_rrcReconfiguration(NR_RRCReconfiguration_t *rrcReconfiguration){
|
||||
|
||||
switch(rrcReconfiguration.criticalExtensions.present){
|
||||
case RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration:
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->radioBearerConfig != (NR_RadioBearerConfig_t *)0){
|
||||
if(NR_UE_rrc_inst->radio_bearer_config == (NR_RadioBearerConfig_t *)0){
|
||||
NR_UE_rrc_inst->radio_bearer_config = rrcReconfiguration->radioBearerConfig;
|
||||
switch(rrcReconfiguration->criticalExtensions.present){
|
||||
case NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration:
|
||||
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.radioBearerConfig != NULL){
|
||||
if(NR_UE_rrc_inst->radio_bearer_config == NULL){
|
||||
NR_UE_rrc_inst->radio_bearer_config = rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.radioBearerConfig;
|
||||
}else{
|
||||
nr_rrc_ue_process_radio_bearer_config(rrcReconfiguration->radioBearerConfig);
|
||||
nr_rrc_ue_process_radio_bearer_config(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.radioBearerConfig);
|
||||
}
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->secondaryCellGroup != (OCTET_STRING_t *)0){
|
||||
NR_CellGroupConfig_t *cellGroupConfig = (NR_CellGroupConfig_t *)0;
|
||||
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.secondaryCellGroup != NULL){
|
||||
NR_CellGroupConfig_t *cellGroupConfig = NULL;
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_CellGroupConfig, //might be added prefix later
|
||||
&asn_DEF_NR_CellGroupConfig, //might be added prefix later
|
||||
(void **)&cellGroupConfig,
|
||||
(uint8_t *)rrcReconfiguration->secondaryCellGroup->buffer,
|
||||
rrcReconfiguration->secondaryCellGroup.size, 0, 0);
|
||||
(uint8_t *)rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.secondaryCellGroup->buf,
|
||||
rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.secondaryCellGroup->size, 0, 0);
|
||||
|
||||
if(NR_UE_rrc_inst->cell_group_config == (NR_CellGroupConfig_t *)0){
|
||||
if(NR_UE_rrc_inst->cell_group_config == NULL){
|
||||
// first time receive the configuration, just use the memory allocated from uper_decoder. TODO this is not good implementation, need to maintain RRC_INST own structure every time.
|
||||
NR_UE_rrc_inst->cell_group_config = cellGroupConfig;
|
||||
nr_rrc_ue_process_scg_config(cellGroupConfig);
|
||||
}else{
|
||||
// after first time, update it and free the memory after.
|
||||
nr_rrc_ue_process_scg_config(cellGroupConfig);
|
||||
//asn_DEF_CellGroupConfig.free_struct(asn_DEF_CellGroupConfig, cellGroupConfig, 0);
|
||||
SEQUENCE_free(&asn_DEF_CellGroupConfig, (void *)cellGroupConfig, 0);
|
||||
//asn_DEF_NR_CellGroupConfig.free_struct(asn_DEF_NR_CellGroupConfig, cellGroupConfig, 0);
|
||||
SEQUENCE_free(&asn_DEF_NR_CellGroupConfig, (void *)cellGroupConfig, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->measConfig != (MeasConfig *)0){
|
||||
if(NR_UE_rrc_inst->meas_config == (NR_MeasConfig_t *)0){
|
||||
NR_UE_rrc_inst->meas_config = rrcReconfiguration->measConfig;
|
||||
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.measConfig != NULL){
|
||||
if(NR_UE_rrc_inst->meas_config == NULL){
|
||||
NR_UE_rrc_inst->meas_config = rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.measConfig;
|
||||
}else{
|
||||
// if some element need to be updated
|
||||
nr_rrc_ue_process_meas_config(rrcReconfiguration->measConfig);
|
||||
nr_rrc_ue_process_meas_config(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.measConfig);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->lateNonCriticalExtension != (OCTET_STRING_t *)0){
|
||||
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.lateNonCriticalExtension != NULL){
|
||||
// unuse now
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->nonCriticalExtension != (RRCReconfiguration_IEs__nonCriticalExtension *)0){
|
||||
if(rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration.nonCriticalExtension != NULL){
|
||||
// unuse now
|
||||
}
|
||||
break;
|
||||
case RRCReconfiguration__criticalExtensions_PR_NOTHING:
|
||||
case RRCReconfiguration__criticalExtensions_PR_criticalExtensionsFuture:
|
||||
case NR_RRCReconfiguration__criticalExtensions_PR_NOTHING:
|
||||
case NR_RRCReconfiguration__criticalExtensions_PR_criticalExtensionsFuture:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
nr_rrc_mac_config_req_ue();
|
||||
//nr_rrc_mac_config_req_ue();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t nr_rrc_ue_process_meas_config(NR_MeasConfig_t *meas_config){
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t nr_rrc_ue_process_scg_config(NR_CellGroupConfig_t *cell_group_config){
|
||||
int i;
|
||||
void *listobj;
|
||||
if(NR_UE_rrc_inst->cell_group_config==NULL){
|
||||
// initial list
|
||||
|
||||
if(cell_group_config->spCellConfig != NULL){
|
||||
if(cell_group_config->spCellConfig->spCellConfigDedicated != NULL){
|
||||
if(cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList != NULL){
|
||||
listobj = cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList;
|
||||
for(i=0; i<((struct NR_ServingCellConfig__downlinkBWP_ToAddModList)listobj)->list.count; ++i){
|
||||
RRC_LIST_MOD_ADD(NR_UE_rrc_inst.BWP_Downlink_list, ((struct NR_ServingCellConfig__downlinkBWP_ToAddModList)listobj)->list.array[i]);
|
||||
for(i=0; i<cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count; ++i){
|
||||
RRC_LIST_MOD_ADD(NR_UE_rrc_inst->BWP_Downlink_list, cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[i], bwp_Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,26 +155,31 @@ int8_t nr_rrc_ue_process_scg_config(NR_CellGroupConfig_t *cell_group_config){
|
||||
if(cell_group_config->spCellConfig->spCellConfigDedicated != NULL){
|
||||
// process element of list to be add by RRC message
|
||||
if(cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList != NULL){
|
||||
listobj = cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList;
|
||||
for(i=0; i<((struct NR_ServingCellConfig__downlinkBWP_ToAddModList)listobj)->list.count; ++i){
|
||||
RRC_LIST_MOD_ADD(NR_UE_rrc_inst.BWP_Downlink_list, ((struct NR_ServingCellConfig__downlinkBWP_ToAddModList)listobj)->list.array[i]);
|
||||
for(i=0; i<cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.count; ++i){
|
||||
RRC_LIST_MOD_ADD(NR_UE_rrc_inst->BWP_Downlink_list, cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[i], bwp_Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// process element of list to be release by RRC message
|
||||
if(cell_group_config->spCellConfig->spCellconfigDedicated->downlinkBWP_ToReleaseList != NULL){
|
||||
listobj = cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToReleaseList;
|
||||
for(i=0; i<((struct NR_ServingCellconfig__downlinkBWP_ToReleaseList)listobj)->list.count; ++i){
|
||||
RRC_LIST_MOD_REL(NR_UE_rrc_inst.BWP_Downlink_list, ((struct NR_ServingCellConfig__downlinkBWP_ToReleaseList)listlbj)->list.array[i]);
|
||||
if(cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToReleaseList != NULL){
|
||||
for(i=0; i<cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToReleaseList->list.count; ++i){
|
||||
NR_BWP_Downlink_t *freeP = NULL;
|
||||
RRC_LIST_MOD_REL(NR_UE_rrc_inst->BWP_Downlink_list, bwp_Id, *cell_group_config->spCellConfig->spCellConfigDedicated->downlinkBWP_ToReleaseList->list.array[i], freeP);
|
||||
if(freeP != NULL){
|
||||
SEQUENCE_free(&asn_DEF_NR_BWP_Downlink, (void *)freeP, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
int8_t nr_rrc_ue_process_radio_bearer_config(NR_RadioBearerConfig_t *radio_bearer_config){
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,13 +202,41 @@ int8_t openair_rrc_top_init_ue_nr(void){
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ControlResourceSet_list[2], 3); // for dl-bwp id=1
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ControlResourceSet_list[3], 3); // for dl-bwp id=2
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ControlResourceSet_list[4], 3); // for dl-bwp id=3
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SearchSpace_list, 10);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SlotFormatCombinationsPerCell_list, NR_maxNrofAggregatedCellsPerCellGroup);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->TCI_State_list, NR_maxNrofTCI_States);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->RateMatchPattern_list, NR_maxNrofRateMatchPatterns);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ZP_CSI_RS_Resource_list, NR_maxNrofZP_CSI_RS_Resources);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->Aperidic_ZP_CSI_RS_ResourceSet_list, NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SP_ZP_CSI_RS_ResourceSet_list, NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SearchSpace_list[0], 10);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SearchSpace_list[1], 10);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SearchSpace_list[2], 10);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SearchSpace_list[3], 10);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SearchSpace_list[4], 10);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SlotFormatCombinationsPerCell_list[0], NR_maxNrofAggregatedCellsPerCellGroup);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SlotFormatCombinationsPerCell_list[1], NR_maxNrofAggregatedCellsPerCellGroup);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SlotFormatCombinationsPerCell_list[2], NR_maxNrofAggregatedCellsPerCellGroup);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SlotFormatCombinationsPerCell_list[3], NR_maxNrofAggregatedCellsPerCellGroup);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SlotFormatCombinationsPerCell_list[4], NR_maxNrofAggregatedCellsPerCellGroup);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->TCI_State_list[0], NR_maxNrofTCI_States);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->TCI_State_list[1], NR_maxNrofTCI_States);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->TCI_State_list[2], NR_maxNrofTCI_States);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->TCI_State_list[3], NR_maxNrofTCI_States);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->TCI_State_list[4], NR_maxNrofTCI_States);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->RateMatchPattern_list[0], NR_maxNrofRateMatchPatterns);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->RateMatchPattern_list[1], NR_maxNrofRateMatchPatterns);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->RateMatchPattern_list[2], NR_maxNrofRateMatchPatterns);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->RateMatchPattern_list[3], NR_maxNrofRateMatchPatterns);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->RateMatchPattern_list[4], NR_maxNrofRateMatchPatterns);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ZP_CSI_RS_Resource_list[0], NR_maxNrofZP_CSI_RS_Resources);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ZP_CSI_RS_Resource_list[1], NR_maxNrofZP_CSI_RS_Resources);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ZP_CSI_RS_Resource_list[2], NR_maxNrofZP_CSI_RS_Resources);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ZP_CSI_RS_Resource_list[3], NR_maxNrofZP_CSI_RS_Resources);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->ZP_CSI_RS_Resource_list[4], NR_maxNrofZP_CSI_RS_Resources);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->Aperidic_ZP_CSI_RS_ResourceSet_list[0], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->Aperidic_ZP_CSI_RS_ResourceSet_list[1], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->Aperidic_ZP_CSI_RS_ResourceSet_list[2], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->Aperidic_ZP_CSI_RS_ResourceSet_list[3], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->Aperidic_ZP_CSI_RS_ResourceSet_list[4], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SP_ZP_CSI_RS_ResourceSet_list[0], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SP_ZP_CSI_RS_ResourceSet_list[1], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SP_ZP_CSI_RS_ResourceSet_list[2], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SP_ZP_CSI_RS_ResourceSet_list[3], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->SP_ZP_CSI_RS_ResourceSet_list[4], NR_maxNrofZP_CSI_RS_Sets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->NZP_CSI_RS_Resource_list, NR_maxNrofNZP_CSI_RS_Resources);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->NZP_CSI_RS_ResourceSet_list, NR_maxNrofNZP_CSI_RS_ResourceSets);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->CSI_IM_Resource_list, NR_maxNrofCSI_IM_Resources);
|
||||
@@ -207,29 +245,36 @@ int8_t openair_rrc_top_init_ue_nr(void){
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->CSI_ResourceConfig_list, NR_maxNrofCSI_ResourceConfigurations);
|
||||
RRC_LIST_INIT(NR_UE_rrc_inst->CSI_ReportConfig_list, NR_maxNrofCSI_ReportConfigurations);
|
||||
}else{
|
||||
NR_UE_rrc_inst = (NR_UE_RRC_INST_t *)0;
|
||||
NR_UE_rrc_inst = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int8_t nr_ue_process_rlc_bearer_list(NR_CellGroupConfig_t *cell_group_config){
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
int8_t nr_ue_process_secondary_cell_list(NR_CellGroupConfig_t *cell_group_config){
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
int8_t nr_ue_process_mac_cell_group_config(NR_MAC_CellGroupConfig_t *mac_cell_group_config){
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
int8_t nr_ue_process_physical_cell_group_config(NR_PhysicalCellGroupConfig_t *phy_cell_group_config){
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
int8_t nr_ue_process_spcell_config(NR_SpCellConfig_t *spcell_config){
|
||||
|
||||
return 0;
|
||||
};
|
||||
|
||||
/*brief decode BCCH-BCH (MIB) message*/
|
||||
@@ -258,7 +303,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
|
||||
|
||||
printf("\n");
|
||||
// free the memory
|
||||
SEQUENCE_free( &asn_DEF_BCCH_DL_SCH_Message, (void *)bcch_message, 1 );
|
||||
SEQUENCE_free( &asn_DEF_NR_BCCH_BCH_Message, (void *)bcch_message, 1 );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -280,8 +325,8 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
|
||||
const uint8_t *bufferP,
|
||||
const uint32_t buffer_len){
|
||||
// uper_decode by nr R15 rrc_connection_reconfiguration
|
||||
|
||||
NR_DL_DCCH_Message_t *nr_dl_dcch_msg = (NR_DL_DCCH_Message_t *)0;
|
||||
int32_t i;
|
||||
NR_DL_DCCH_Message_t *nr_dl_dcch_msg = NULL;
|
||||
|
||||
asn_dec_rval_t dec_rval = uper_decode( NULL,
|
||||
&asn_DEF_NR_DL_DCCH_Message,
|
||||
@@ -305,36 +350,36 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
|
||||
|
||||
if(nr_dl_dcch_msg != NULL){
|
||||
switch(nr_dl_dcch_msg->message.present){
|
||||
case DL_DCCH_MessageType_PR_c1:
|
||||
case NR_DL_DCCH_MessageType_PR_c1:
|
||||
|
||||
switch(nr_dl_dcch_msg->message.choice.c1.present){
|
||||
case DL_DCCH_MessageType__c1_PR_rrcReconfiguration:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_rrcReconfiguration:
|
||||
nr_rrc_ue_process_rrcReconfiguration(&nr_dl_dcch_msg->message.choice.c1.choice.rrcReconfiguration);
|
||||
break;
|
||||
|
||||
case DL_DCCH_MessageType__c1_PR_NOTHING:
|
||||
case DL_DCCH_MessageType__c1_PR_spare15:
|
||||
case DL_DCCH_MessageType__c1_PR_spare14:
|
||||
case DL_DCCH_MessageType__c1_PR_spare13:
|
||||
case DL_DCCH_MessageType__c1_PR_spare12:
|
||||
case DL_DCCH_MessageType__c1_PR_spare11:
|
||||
case DL_DCCH_MessageType__c1_PR_spare10:
|
||||
case DL_DCCH_MessageType__c1_PR_spare9:
|
||||
case DL_DCCH_MessageType__c1_PR_spare8:
|
||||
case DL_DCCH_MessageType__c1_PR_spare7:
|
||||
case DL_DCCH_MessageType__c1_PR_spare6:
|
||||
case DL_DCCH_MessageType__c1_PR_spare5:
|
||||
case DL_DCCH_MessageType__c1_PR_spare4:
|
||||
case DL_DCCH_MessageType__c1_PR_spare3:
|
||||
case DL_DCCH_MessageType__c1_PR_spare2:
|
||||
case DL_DCCH_MessageType__c1_PR_spare1:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_NOTHING:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare15:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare14:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare13:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare12:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare11:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare10:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare9:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare8:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare7:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare6:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare5:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare4:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare3:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare2:
|
||||
case NR_DL_DCCH_MessageType__c1_PR_spare1:
|
||||
default:
|
||||
// not support or unuse
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DL_DCCH_MessageType_PR_NOTHING:
|
||||
case DL_DCCH_MessageType_PR_messageClassExtension:
|
||||
case NR_DL_DCCH_MessageType_PR_NOTHING:
|
||||
case NR_DL_DCCH_MessageType_PR_messageClassExtension:
|
||||
default:
|
||||
// not support or unuse
|
||||
break;
|
||||
|
||||
@@ -35,16 +35,25 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "LAYER2/NR_MAC_UE/mac.h"
|
||||
#include "rrc_list.h"
|
||||
/*#include "NR_MeasConfig.h"
|
||||
#include "NR_asn_constant.h"
|
||||
#include "NR_MeasConfig.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "NR_RadioBearerConfig.h"
|
||||
#include "NR_RLC_Bearer_Config_t"
|
||||
#include "NR_RLC-Bearer-Config.h"
|
||||
#include "asn1_constants.h"
|
||||
#include "NR_SchedulingRequestToAddMod.h"*/
|
||||
#include "NR_SchedulingRequestToAddMod.h"
|
||||
#include "NR_MIB.h"
|
||||
#include "NR_BCCH-BCH-Message.h"
|
||||
#include "NR_DL-DCCH-Message.h"
|
||||
|
||||
#define NB_NR_UE_INST 1
|
||||
|
||||
typedef uint32_t channel_t;
|
||||
|
||||
typedef struct NR_UE_RRC_INST_s {
|
||||
|
||||
NR_MeasConfig_t *meas_config;
|
||||
@@ -103,7 +112,5 @@ typedef struct NR_UE_RRC_INST_s {
|
||||
|
||||
} NR_UE_RRC_INST_t;
|
||||
|
||||
#include "proto.h"
|
||||
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
+123
-10
@@ -33,8 +33,12 @@
|
||||
#ifndef _RRC_PROTO_H_
|
||||
#define _RRC_PROTO_H_
|
||||
|
||||
#include "rrc_defs.h"
|
||||
|
||||
#include "rrc_defs.h"
|
||||
#include "NR_RRCReconfiguration.h"
|
||||
#include "NR_MeasConfig.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "NR_RadioBearerConfig.h"
|
||||
//
|
||||
// main_rrc.c
|
||||
//
|
||||
@@ -46,7 +50,7 @@ int nr_l3_init_ue(void);
|
||||
//
|
||||
|
||||
/**\brief Initial the top level RRC structure instance*/
|
||||
uint8_t openair_rrc_top_init_ue_nr(void);
|
||||
int8_t openair_rrc_top_init_ue_nr(void);
|
||||
|
||||
|
||||
|
||||
@@ -60,20 +64,20 @@ int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const uint8_t *buffer, const
|
||||
|
||||
/**\brief Process NR RRC connection reconfiguration via SRB3
|
||||
\param rrcReconfiguration decoded rrc connection reconfiguration*/
|
||||
int8_t nr_rrc_ue_process_rrcReconfiguration(RRCReconfiguration_t *rrcReconfiguration);
|
||||
int8_t nr_rrc_ue_process_rrcReconfiguration(NR_RRCReconfiguration_t *rrcReconfiguration);
|
||||
|
||||
/**\prief Process measurement config from NR RRC connection reconfiguration message
|
||||
\param meas_config measurement configuration*/
|
||||
int8_t nr_rrc_ue_process_meas_config(MeasConfig_t *meas_config);
|
||||
int8_t nr_rrc_ue_process_meas_config(NR_MeasConfig_t *meas_config);
|
||||
|
||||
/**\prief Process secondary cell group config from NR RRC connection reconfiguration message or EN-DC primitives
|
||||
\param cell_group_config secondary cell group configuration*/
|
||||
//TODO check EN-DC function call flow.
|
||||
int8_t nr_rrc_ue_process_scg_config(CellGroupConfig_t *cell_group_config);
|
||||
int8_t nr_rrc_ue_process_scg_config(NR_CellGroupConfig_t *cell_group_config);
|
||||
|
||||
/**\prief Process radio bearer config from NR RRC connection reconfiguration message
|
||||
\param radio_bearer_config radio bearer configuration*/
|
||||
int8_t nr_rrc_ue_process_radio_bearer_config(RadioBearerConfig_t *radio_bearer_config);
|
||||
int8_t nr_rrc_ue_process_radio_bearer_config(NR_RadioBearerConfig_t *radio_bearer_config);
|
||||
|
||||
/**\brief decode NR BCCH-BCH (MIB) message
|
||||
\param module_idP module id
|
||||
@@ -83,9 +87,11 @@ int8_t nr_rrc_ue_process_radio_bearer_config(RadioBearerConfig_t *radio_bearer_c
|
||||
int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(const module_id_t module_id, const uint8_t gNB_index, uint8_t *const bufferP, const uint8_t buffer_len);
|
||||
|
||||
/**\brief Decode NR DCCH from gNB, sent from lower layer through SRB3
|
||||
\param buffer encoded DCCH bytes stream message
|
||||
\param size length of buffer*/
|
||||
int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(const uint8_t *buffer, const uint32_t size);
|
||||
\param module_id module id
|
||||
\param gNB_index gNB index
|
||||
\param buffer encoded DCCH bytes stream message
|
||||
\param size length of buffer*/
|
||||
int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(const module_id_t module_id, const uint8_t gNB_index, const uint8_t *buffer, const uint32_t size);
|
||||
|
||||
/**\brief interface between MAC and RRC thru SRB0 (RLC TM/no PDCP)
|
||||
\param module_id module id
|
||||
@@ -98,4 +104,111 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(const uint8_t *buffer, const uint32_t
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index, const uint32_t *frameP, const channel_t channel, const uint8_t* pduP, const sdu_size_t pdu_len);
|
||||
|
||||
/** @}*/
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file proto.h
|
||||
* \brief RRC functions prototypes for eNB and UE
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \email navid.nikaein@eurecom.fr
|
||||
* \version 1.0
|
||||
|
||||
*/
|
||||
/** \addtogroup _rrc
|
||||
* @{
|
||||
*/
|
||||
#ifndef _RRC_PROTO_H_
|
||||
#define _RRC_PROTO_H_
|
||||
|
||||
|
||||
#include "rrc_defs.h"
|
||||
#include "NR_RRCReconfiguration.h"
|
||||
#include "NR_MeasConfig.h"
|
||||
#include "NR_CellGroupConfig.h"
|
||||
#include "NR_RadioBearerConfig.h"
|
||||
//
|
||||
// main_rrc.c
|
||||
//
|
||||
/**\brief Layer 3 initialization*/
|
||||
int nr_l3_init_ue(void);
|
||||
|
||||
//
|
||||
// UE_rrc.c
|
||||
//
|
||||
|
||||
/**\brief Initial the top level RRC structure instance*/
|
||||
int8_t openair_rrc_top_init_ue_nr(void);
|
||||
|
||||
|
||||
|
||||
/**\brief Decode RRC Connection Reconfiguration, sent from E-UTRA RRC Connection Reconfiguration v1510 carring EN-DC config
|
||||
\param buffer encoded NR-RRC-Connection-Reconfiguration/Secondary-Cell-Group-Config message.
|
||||
\param size length of buffer*/
|
||||
//TODO check to use which one
|
||||
int8_t nr_rrc_ue_decode_rrcReconfiguration(const uint8_t *buffer, const uint32_t size);
|
||||
int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const uint8_t *buffer, const uint32_t size);
|
||||
|
||||
|
||||
/**\brief Process NR RRC connection reconfiguration via SRB3
|
||||
\param rrcReconfiguration decoded rrc connection reconfiguration*/
|
||||
int8_t nr_rrc_ue_process_rrcReconfiguration(NR_RRCReconfiguration_t *rrcReconfiguration);
|
||||
|
||||
/**\prief Process measurement config from NR RRC connection reconfiguration message
|
||||
\param meas_config measurement configuration*/
|
||||
int8_t nr_rrc_ue_process_meas_config(NR_MeasConfig_t *meas_config);
|
||||
|
||||
/**\prief Process secondary cell group config from NR RRC connection reconfiguration message or EN-DC primitives
|
||||
\param cell_group_config secondary cell group configuration*/
|
||||
//TODO check EN-DC function call flow.
|
||||
int8_t nr_rrc_ue_process_scg_config(NR_CellGroupConfig_t *cell_group_config);
|
||||
|
||||
/**\prief Process radio bearer config from NR RRC connection reconfiguration message
|
||||
\param radio_bearer_config radio bearer configuration*/
|
||||
int8_t nr_rrc_ue_process_radio_bearer_config(NR_RadioBearerConfig_t *radio_bearer_config);
|
||||
|
||||
/**\brief decode NR BCCH-BCH (MIB) message
|
||||
\param module_idP module id
|
||||
\param gNB_index gNB index
|
||||
\param sduP pointer to buffer of ASN message BCCH-BCH
|
||||
\param sdu_len length of buffer*/
|
||||
int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(const module_id_t module_id, const uint8_t gNB_index, uint8_t *const bufferP, const uint8_t buffer_len);
|
||||
|
||||
/**\brief Decode NR DCCH from gNB, sent from lower layer through SRB3
|
||||
\param module_id module id
|
||||
\param gNB_index gNB index
|
||||
\param buffer encoded DCCH bytes stream message
|
||||
\param size length of buffer*/
|
||||
int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(const module_id_t module_id, const uint8_t gNB_index, const uint8_t *buffer, const uint32_t size);
|
||||
|
||||
/**\brief interface between MAC and RRC thru SRB0 (RLC TM/no PDCP)
|
||||
\param module_id module id
|
||||
\param CC_id component carrier id
|
||||
\param gNB_index gNB index
|
||||
\param frameP pointer to frame for calculation
|
||||
\param channel indicator for channel of the pdu
|
||||
\param pduP pointer to pdu
|
||||
\param pdu_len data length of pdu*/
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index, const uint32_t *frameP, const channel_t channel, const uint8_t* pduP, const sdu_size_t pdu_len);
|
||||
|
||||
/** @}*/
|
||||
#endif
|
||||
|
||||
@@ -32,10 +32,7 @@
|
||||
#ifndef __OPENAIR_NR_RRC_VARS_H__
|
||||
#define __OPENAIR_NR_RRC_VARS_H__
|
||||
|
||||
#include "defs.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "rrc_defs.h"
|
||||
|
||||
NR_UE_RRC_INST_t *NR_UE_rrc_inst;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
//typedef char bool;
|
||||
#include <stdbool.h>
|
||||
#include "omg_constants.h"
|
||||
|
||||
#ifdef STANDALONE
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user