push EN-DC RRC configuration initizalization
This commit is contained in:
@@ -0,0 +1,485 @@
|
||||
|
||||
/*
|
||||
* 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 config.c
|
||||
* \brief UE and eNB configuration performed by RRC or as a consequence of RRC procedures
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \version 0.1
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
int
|
||||
nr_rrc_mac_config_req_ue(
|
||||
module_id_t Mod_idP,
|
||||
int CC_idP,
|
||||
uint8_t eNB_index,
|
||||
){
|
||||
|
||||
// TODO do something FAPI-like P5 L1/L2 config interface in config_si, config_mib, etc.
|
||||
|
||||
int i;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_I(MAC, "[CONFIG][UE %d] Configuring MAC/PHY from eNB %d\n",
|
||||
Mod_idP, eNB_index);
|
||||
|
||||
if (tdd_Config != NULL) {
|
||||
UE_mac_inst[Mod_idP].tdd_Config = tdd_Config;
|
||||
}
|
||||
|
||||
|
||||
if (tdd_Config && SIwindowsize && SIperiod) {
|
||||
phy_config_sib1_ue(Mod_idP, 0, eNB_index, tdd_Config,
|
||||
*SIwindowsize, *SIperiod);
|
||||
}
|
||||
|
||||
if (radioResourceConfigCommon != NULL) {
|
||||
UE_mac_inst[Mod_idP].radioResourceConfigCommon =
|
||||
radioResourceConfigCommon;
|
||||
phy_config_sib2_ue(Mod_idP, 0, eNB_index,
|
||||
radioResourceConfigCommon, ul_CarrierFreq,
|
||||
ul_Bandwidth, additionalSpectrumEmission,
|
||||
mbsfn_SubframeConfigList);
|
||||
}
|
||||
// SRB2_lchan_config->choice.explicitValue.ul_SpecificParameters->logicalChannelGroup
|
||||
if (logicalChannelConfig != NULL) {
|
||||
LOG_I(MAC,
|
||||
"[CONFIG][UE %d] Applying RRC logicalChannelConfig from eNB%d\n",
|
||||
Mod_idP, eNB_index);
|
||||
UE_mac_inst[Mod_idP].logicalChannelConfig[logicalChannelIdentity] =
|
||||
logicalChannelConfig;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.Bj[logicalChannelIdentity] = 0; // initilize the bucket for this lcid
|
||||
|
||||
AssertFatal(logicalChannelConfig->ul_SpecificParameters != NULL,
|
||||
"[UE %d] LCID %ld NULL ul_SpecificParameters\n",
|
||||
Mod_idP, logicalChannelIdentity);
|
||||
UE_mac_inst[Mod_idP].scheduling_info.bucket_size[logicalChannelIdentity] = logicalChannelConfig->ul_SpecificParameters->prioritisedBitRate * logicalChannelConfig->ul_SpecificParameters->bucketSizeDuration; // set the max bucket size
|
||||
if (logicalChannelConfig->ul_SpecificParameters->
|
||||
logicalChannelGroup != NULL) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.
|
||||
LCGID[logicalChannelIdentity] =
|
||||
*logicalChannelConfig->ul_SpecificParameters->
|
||||
logicalChannelGroup;
|
||||
LOG_D(MAC,
|
||||
"[CONFIG][UE %d] LCID %ld is attached to the LCGID %ld\n",
|
||||
Mod_idP, logicalChannelIdentity,
|
||||
*logicalChannelConfig->
|
||||
ul_SpecificParameters->logicalChannelGroup);
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.
|
||||
LCGID[logicalChannelIdentity] = MAX_NUM_LCGID;
|
||||
}
|
||||
UE_mac_inst[Mod_idP].
|
||||
scheduling_info.LCID_buffer_remain[logicalChannelIdentity] = 0;
|
||||
}
|
||||
|
||||
if (mac_MainConfig != NULL) {
|
||||
LOG_I(MAC,
|
||||
"[CONFIG][UE%d] Applying RRC macMainConfig from eNB%d\n",
|
||||
Mod_idP, eNB_index);
|
||||
UE_mac_inst[Mod_idP].macConfig = mac_MainConfig;
|
||||
UE_mac_inst[Mod_idP].measGapConfig = measGapConfig;
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config) {
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->periodicBSR_Timer) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
|
||||
(uint16_t) *
|
||||
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
|
||||
#ifndef Rel14
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
#else
|
||||
(uint16_t) PeriodicBSR_Timer_r12_infinity;
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->maxHARQ_Tx) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.maxHARQ_Tx =
|
||||
(uint16_t) * mac_MainConfig->ul_SCH_Config->maxHARQ_Tx;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.maxHARQ_Tx =
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
|
||||
}
|
||||
phy_config_harq_ue(Mod_idP, 0, eNB_index,
|
||||
UE_mac_inst[Mod_idP].
|
||||
scheduling_info.maxHARQ_Tx);
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t) mac_MainConfig->ul_SCH_Config->
|
||||
retxBSR_Timer;
|
||||
} else {
|
||||
#ifndef Rel14
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t)
|
||||
MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
|
||||
#else
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t) RetxBSR_Timer_r12_sf2560;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
|
||||
if (mac_MainConfig->ext1
|
||||
&& mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.sr_ProhibitTimer =
|
||||
(uint16_t) * mac_MainConfig->ext1->sr_ProhibitTimer_r9;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.sr_ProhibitTimer = 0;
|
||||
}
|
||||
|
||||
if (mac_MainConfig->ext2
|
||||
&& mac_MainConfig->ext2->mac_MainConfig_v1020) {
|
||||
if (mac_MainConfig->ext2->
|
||||
mac_MainConfig_v1020->extendedBSR_Sizes_r10) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.
|
||||
extendedBSR_Sizes_r10 =
|
||||
(uint16_t) *
|
||||
mac_MainConfig->ext2->
|
||||
mac_MainConfig_v1020->extendedBSR_Sizes_r10;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.
|
||||
extendedBSR_Sizes_r10 = (uint16_t) 0;
|
||||
}
|
||||
if (mac_MainConfig->ext2->mac_MainConfig_v1020->
|
||||
extendedPHR_r10) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.extendedPHR_r10 =
|
||||
(uint16_t) *
|
||||
mac_MainConfig->ext2->mac_MainConfig_v1020->
|
||||
extendedPHR_r10;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.extendedPHR_r10 =
|
||||
(uint16_t) 0;
|
||||
}
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.extendedBSR_Sizes_r10 =
|
||||
(uint16_t) 0;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.extendedPHR_r10 =
|
||||
(uint16_t) 0;
|
||||
}
|
||||
#endif
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_SF =
|
||||
MAC_UE_BSR_TIMER_NOT_RUNNING;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_SF =
|
||||
MAC_UE_BSR_TIMER_NOT_RUNNING;
|
||||
|
||||
UE_mac_inst[Mod_idP].BSR_reporting_active = BSR_TRIGGER_NONE;
|
||||
|
||||
LOG_D(MAC, "[UE %d]: periodic BSR %d (SF), retx BSR %d (SF)\n",
|
||||
Mod_idP,
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_SF,
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_SF);
|
||||
|
||||
UE_mac_inst[Mod_idP].scheduling_info.drx_config =
|
||||
mac_MainConfig->drx_Config;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.phr_config =
|
||||
mac_MainConfig->phr_Config;
|
||||
|
||||
if (mac_MainConfig->phr_Config) {
|
||||
UE_mac_inst[Mod_idP].PHR_state =
|
||||
mac_MainConfig->phr_Config->present;
|
||||
UE_mac_inst[Mod_idP].PHR_reconfigured = 1;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicPHR_Timer =
|
||||
mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.prohibitPHR_Timer =
|
||||
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.PathlossChange =
|
||||
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].PHR_reconfigured = 0;
|
||||
UE_mac_inst[Mod_idP].PHR_state =
|
||||
MAC_MainConfig__phr_Config_PR_setup;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicPHR_Timer =
|
||||
MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.prohibitPHR_Timer =
|
||||
MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.PathlossChange =
|
||||
MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB1;
|
||||
}
|
||||
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicPHR_SF =
|
||||
get_sf_perioidicPHR_Timer(UE_mac_inst[Mod_idP].
|
||||
scheduling_info.periodicPHR_Timer);
|
||||
UE_mac_inst[Mod_idP].scheduling_info.prohibitPHR_SF =
|
||||
get_sf_prohibitPHR_Timer(UE_mac_inst[Mod_idP].
|
||||
scheduling_info.prohibitPHR_Timer);
|
||||
UE_mac_inst[Mod_idP].scheduling_info.PathlossChange_db =
|
||||
get_db_dl_PathlossChange(UE_mac_inst[Mod_idP].
|
||||
scheduling_info.PathlossChange);
|
||||
UE_mac_inst[Mod_idP].PHR_reporting_active = 0;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] config PHR (%d): periodic %d (SF) prohibit %d (SF) pathlosschange %d (db) \n",
|
||||
Mod_idP,
|
||||
(mac_MainConfig->phr_Config) ? mac_MainConfig->
|
||||
phr_Config->present : -1,
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicPHR_SF,
|
||||
UE_mac_inst[Mod_idP].scheduling_info.prohibitPHR_SF,
|
||||
UE_mac_inst[Mod_idP].scheduling_info.PathlossChange_db);
|
||||
}
|
||||
|
||||
|
||||
if (physicalConfigDedicated != NULL) {
|
||||
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
|
||||
physicalConfigDedicated);
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
|
||||
|
||||
phy_config_dedicated_scell_ue(Mod_idP, eNB_index,
|
||||
sCellToAddMod_r10, 1);
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10; // using SCell index 0
|
||||
}
|
||||
#endif
|
||||
|
||||
if (measObj != NULL) {
|
||||
if (measObj[0] != NULL) {
|
||||
UE_mac_inst[Mod_idP].n_adj_cells =
|
||||
measObj[0]->measObject.choice.
|
||||
measObjectEUTRA.cellsToAddModList->list.count;
|
||||
LOG_I(MAC, "Number of adjacent cells %d\n",
|
||||
UE_mac_inst[Mod_idP].n_adj_cells);
|
||||
|
||||
for (i = 0; i < UE_mac_inst[Mod_idP].n_adj_cells; i++) {
|
||||
UE_mac_inst[Mod_idP].adj_cell_id[i] =
|
||||
measObj[0]->measObject.choice.
|
||||
measObjectEUTRA.cellsToAddModList->list.array[i]->
|
||||
physCellId;
|
||||
LOG_I(MAC, "Cell %d : Nid_cell %d\n", i,
|
||||
UE_mac_inst[Mod_idP].adj_cell_id[i]);
|
||||
}
|
||||
|
||||
phy_config_meas_ue(Mod_idP, 0, eNB_index,
|
||||
UE_mac_inst[Mod_idP].n_adj_cells,
|
||||
UE_mac_inst[Mod_idP].adj_cell_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mobilityControlInfo != NULL) {
|
||||
|
||||
LOG_D(MAC, "[UE%d] MAC Reset procedure triggered by RRC eNB %d \n",
|
||||
Mod_idP, eNB_index);
|
||||
ue_mac_reset(Mod_idP, eNB_index);
|
||||
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.
|
||||
rach_ConfigCommon) {
|
||||
memcpy((void *)
|
||||
&UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
rach_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.rach_ConfigCommon,
|
||||
sizeof(RACH_ConfigCommon_t));
|
||||
}
|
||||
|
||||
memcpy((void *) &UE_mac_inst[Mod_idP].
|
||||
radioResourceConfigCommon->prach_Config.prach_ConfigInfo,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.prach_Config.prach_ConfigInfo,
|
||||
sizeof(PRACH_ConfigInfo_t));
|
||||
UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
prach_Config.rootSequenceIndex =
|
||||
mobilityControlInfo->radioResourceConfigCommon.
|
||||
prach_Config.rootSequenceIndex;
|
||||
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.
|
||||
pdsch_ConfigCommon) {
|
||||
memcpy((void *)
|
||||
&UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
pdsch_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.pdsch_ConfigCommon,
|
||||
sizeof(PDSCH_ConfigCommon_t));
|
||||
}
|
||||
// not a pointer: mobilityControlInfo->radioResourceConfigCommon.pusch_ConfigCommon
|
||||
memcpy((void *) &UE_mac_inst[Mod_idP].
|
||||
radioResourceConfigCommon->pusch_ConfigCommon,
|
||||
(void *) &mobilityControlInfo->
|
||||
radioResourceConfigCommon.pusch_ConfigCommon,
|
||||
sizeof(PUSCH_ConfigCommon_t));
|
||||
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.phich_Config) {
|
||||
/* memcpy((void *)&UE_mac_inst[Mod_idP].radioResourceConfigCommon->phich_Config,
|
||||
(void *)mobilityControlInfo->radioResourceConfigCommon.phich_Config,
|
||||
sizeof(PHICH_Config_t)); */
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.
|
||||
pucch_ConfigCommon) {
|
||||
memcpy((void *)
|
||||
&UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
pucch_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.pucch_ConfigCommon,
|
||||
sizeof(PUCCH_ConfigCommon_t));
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->
|
||||
radioResourceConfigCommon.soundingRS_UL_ConfigCommon) {
|
||||
memcpy((void *)
|
||||
&UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
soundingRS_UL_ConfigCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.soundingRS_UL_ConfigCommon,
|
||||
sizeof(SoundingRS_UL_ConfigCommon_t));
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->
|
||||
radioResourceConfigCommon.uplinkPowerControlCommon) {
|
||||
memcpy((void *)
|
||||
&UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
uplinkPowerControlCommon,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.uplinkPowerControlCommon,
|
||||
sizeof(UplinkPowerControlCommon_t));
|
||||
}
|
||||
//configure antennaInfoCommon somewhere here..
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.p_Max) {
|
||||
//to be configured
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->radioResourceConfigCommon.tdd_Config) {
|
||||
UE_mac_inst[Mod_idP].tdd_Config =
|
||||
mobilityControlInfo->radioResourceConfigCommon.tdd_Config;
|
||||
}
|
||||
|
||||
if (mobilityControlInfo->
|
||||
radioResourceConfigCommon.ul_CyclicPrefixLength) {
|
||||
memcpy((void *)
|
||||
&UE_mac_inst[Mod_idP].radioResourceConfigCommon->
|
||||
ul_CyclicPrefixLength,
|
||||
(void *) mobilityControlInfo->
|
||||
radioResourceConfigCommon.ul_CyclicPrefixLength,
|
||||
sizeof(UL_CyclicPrefixLength_t));
|
||||
}
|
||||
// store the previous rnti in case of failure, and set thenew rnti
|
||||
UE_mac_inst[Mod_idP].crnti_before_ho = UE_mac_inst[Mod_idP].crnti;
|
||||
UE_mac_inst[Mod_idP].crnti =
|
||||
((mobilityControlInfo->
|
||||
newUE_Identity.buf[0]) | (mobilityControlInfo->
|
||||
newUE_Identity.buf[1] << 8));
|
||||
LOG_I(MAC, "[UE %d] Received new identity %x from %d\n", Mod_idP,
|
||||
UE_mac_inst[Mod_idP].crnti, eNB_index);
|
||||
UE_mac_inst[Mod_idP].rach_ConfigDedicated =
|
||||
malloc(sizeof(*mobilityControlInfo->rach_ConfigDedicated));
|
||||
|
||||
if (mobilityControlInfo->rach_ConfigDedicated) {
|
||||
memcpy((void *) UE_mac_inst[Mod_idP].rach_ConfigDedicated,
|
||||
(void *) mobilityControlInfo->rach_ConfigDedicated,
|
||||
sizeof(*mobilityControlInfo->rach_ConfigDedicated));
|
||||
}
|
||||
|
||||
phy_config_afterHO_ue(Mod_idP, 0, eNB_index, mobilityControlInfo,
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
if (mbsfn_SubframeConfigList != NULL) {
|
||||
LOG_I(MAC,
|
||||
"[UE %d][CONFIG] Received %d subframe allocation pattern for MBSFN\n",
|
||||
Mod_idP, mbsfn_SubframeConfigList->list.count);
|
||||
UE_mac_inst[Mod_idP].num_sf_allocation_pattern =
|
||||
mbsfn_SubframeConfigList->list.count;
|
||||
|
||||
for (i = 0; i < mbsfn_SubframeConfigList->list.count; i++) {
|
||||
LOG_I(MAC,
|
||||
"[UE %d] Configuring MBSFN_SubframeConfig %d from received SIB2 \n",
|
||||
Mod_idP, i);
|
||||
UE_mac_inst[Mod_idP].mbsfn_SubframeConfig[i] =
|
||||
mbsfn_SubframeConfigList->list.array[i];
|
||||
// LOG_I("[UE %d] MBSFN_SubframeConfig[%d] pattern is %ld\n", Mod_idP,
|
||||
// UE_mac_inst[Mod_idP].mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
}
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n",
|
||||
Mod_idP, mbsfn_AreaInfoList->list.count);
|
||||
UE_mac_inst[Mod_idP].num_active_mbsfn_area =
|
||||
mbsfn_AreaInfoList->list.count;
|
||||
|
||||
for (i = 0; i < mbsfn_AreaInfoList->list.count; i++) {
|
||||
UE_mac_inst[Mod_idP].mbsfn_AreaInfo[i] =
|
||||
mbsfn_AreaInfoList->list.array[i];
|
||||
LOG_I(MAC,
|
||||
"[UE %d] MBSFN_AreaInfo[%d]: MCCH Repetition Period = %ld\n",
|
||||
Mod_idP, i,
|
||||
UE_mac_inst[Mod_idP].mbsfn_AreaInfo[i]->
|
||||
mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
phy_config_sib13_ue(Mod_idP, 0, eNB_index, i,
|
||||
UE_mac_inst[Mod_idP].
|
||||
mbsfn_AreaInfo[i]->mbsfn_AreaId_r9);
|
||||
}
|
||||
}
|
||||
|
||||
if (pmch_InfoList != NULL) {
|
||||
|
||||
// LOG_I(MAC,"DUY: lcid when entering rrc_mac config_req is %02d\n",(pmch_InfoList->list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9));
|
||||
|
||||
LOG_I(MAC, "[UE %d] Configuring PMCH_config from MCCH MESSAGE \n",
|
||||
Mod_idP);
|
||||
|
||||
for (i = 0; i < pmch_InfoList->list.count; i++) {
|
||||
UE_mac_inst[Mod_idP].pmch_Config[i] =
|
||||
&pmch_InfoList->list.array[i]->pmch_Config_r9;
|
||||
LOG_I(MAC, "[UE %d] PMCH[%d]: MCH_Scheduling_Period = %ld\n",
|
||||
Mod_idP, i,
|
||||
UE_mac_inst[Mod_idP].
|
||||
pmch_Config[i]->mch_SchedulingPeriod_r9);
|
||||
}
|
||||
|
||||
UE_mac_inst[Mod_idP].mcch_status = 1;
|
||||
}
|
||||
#endif
|
||||
#ifdef CBA
|
||||
|
||||
if (cba_rnti) {
|
||||
UE_mac_inst[Mod_idP].cba_rnti[num_active_cba_groups - 1] =
|
||||
cba_rnti;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] configure CBA group %d RNTI %x for eNB %d (total active cba group %d)\n",
|
||||
Mod_idP, Mod_idP % num_active_cba_groups, cba_rnti,
|
||||
eNB_index, num_active_cba_groups);
|
||||
phy_config_cba_rnti(Mod_idP, CC_idP, eNB_flagP, eNB_index,
|
||||
cba_rnti, num_active_cba_groups - 1,
|
||||
num_active_cba_groups);
|
||||
}
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
|
||||
return (0);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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__
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "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_RRC_INST *UE_rrc_inst;
|
||||
extern UE_MAC_INST *UE_mac_inst;
|
||||
|
||||
|
||||
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 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 int cqi_to_mcs[16];
|
||||
|
||||
extern uint32_t RRC_CONNECTION_FLAG;
|
||||
|
||||
extern uint8_t rb_table[34];
|
||||
|
||||
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
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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 main.c
|
||||
* \brief top init of Layer 2
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \version 1.0
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#include "defs.h"
|
||||
#include "proto.h"
|
||||
#include "extern.h"
|
||||
#include "assertions.h"
|
||||
|
||||
|
||||
int
|
||||
nr_l2_init_ue(void)
|
||||
{
|
||||
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
|
||||
|
||||
LOG_I(MAC, "[MAIN] init UE MAC functions \n");
|
||||
|
||||
//init mac here
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,522 @@
|
||||
/*
|
||||
* 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 RRC/LITE/defs.h
|
||||
* \brief RRC struct definitions and function prototypes
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2010 - 2014
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifndef __OPENAIR_NR_RRC_DEFS_H__
|
||||
#define __OPENAIR_NR_RRC_DEFS_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "collection/tree.h"
|
||||
#include "rrc_types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
|
||||
#include "COMMON/platform_constants.h"
|
||||
#include "COMMON/platform_types.h"
|
||||
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
|
||||
#include "SystemInformationBlockType1.h"
|
||||
#include "SystemInformation.h"
|
||||
#include "RRCConnectionReconfiguration.h"
|
||||
#include "RRCConnectionReconfigurationComplete.h"
|
||||
#include "RRCConnectionSetup.h"
|
||||
#include "RRCConnectionSetupComplete.h"
|
||||
#include "RRCConnectionRequest.h"
|
||||
#include "RRCConnectionReestablishmentRequest.h"
|
||||
#include "BCCH-DL-SCH-Message.h"
|
||||
#include "BCCH-BCH-Message.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#include "MCCH-Message.h"
|
||||
#include "MBSFNAreaConfiguration-r9.h"
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#include "AS-Config.h"
|
||||
#include "AS-Context.h"
|
||||
#include "UE-EUTRA-Capability.h"
|
||||
#include "MeasResults.h"
|
||||
|
||||
/* for ImsiMobileIdentity_t */
|
||||
#include "MobileIdentity.h"
|
||||
|
||||
/* correct Rel(8|10)/Rel14 differences
|
||||
* the code is in favor of Rel14, those defines do the translation
|
||||
*/
|
||||
#if !defined(Rel14)
|
||||
# define CipheringAlgorithm_r12_t e_SecurityAlgorithmConfig__cipheringAlgorithm
|
||||
# define CipheringAlgorithm_r12_eea0 SecurityAlgorithmConfig__cipheringAlgorithm_eea0
|
||||
# define CipheringAlgorithm_r12_eea1 SecurityAlgorithmConfig__cipheringAlgorithm_eea1
|
||||
# define CipheringAlgorithm_r12_eea2 SecurityAlgorithmConfig__cipheringAlgorithm_eea2
|
||||
# define CipheringAlgorithm_r12_spare1 SecurityAlgorithmConfig__cipheringAlgorithm_spare1
|
||||
# define Alpha_r12_al0 UplinkPowerControlCommon__alpha_al0
|
||||
# define Alpha_r12_al04 UplinkPowerControlCommon__alpha_al04
|
||||
# define Alpha_r12_al05 UplinkPowerControlCommon__alpha_al05
|
||||
# define Alpha_r12_al06 UplinkPowerControlCommon__alpha_al06
|
||||
# define Alpha_r12_al07 UplinkPowerControlCommon__alpha_al07
|
||||
# define Alpha_r12_al08 UplinkPowerControlCommon__alpha_al08
|
||||
# define Alpha_r12_al09 UplinkPowerControlCommon__alpha_al09
|
||||
# define Alpha_r12_al1 UplinkPowerControlCommon__alpha_al1
|
||||
# define PreambleTransMax_n3 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3
|
||||
# define PreambleTransMax_n4 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4
|
||||
# define PreambleTransMax_n5 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5
|
||||
# define PreambleTransMax_n6 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6
|
||||
# define PreambleTransMax_n7 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7
|
||||
# define PreambleTransMax_n8 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8
|
||||
# define PreambleTransMax_n10 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10
|
||||
# define PreambleTransMax_n20 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20
|
||||
# define PreambleTransMax_n50 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50
|
||||
# define PreambleTransMax_n100 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100
|
||||
# define PreambleTransMax_n200 RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200
|
||||
# define PeriodicBSR_Timer_r12_sf5 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf5
|
||||
# define PeriodicBSR_Timer_r12_sf10 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf10
|
||||
# define PeriodicBSR_Timer_r12_sf16 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf16
|
||||
# define PeriodicBSR_Timer_r12_sf20 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf20
|
||||
# define PeriodicBSR_Timer_r12_sf32 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf32
|
||||
# define PeriodicBSR_Timer_r12_sf40 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf40
|
||||
# define PeriodicBSR_Timer_r12_sf64 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf64
|
||||
# define PeriodicBSR_Timer_r12_sf80 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf80
|
||||
# define PeriodicBSR_Timer_r12_sf128 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf128
|
||||
# define PeriodicBSR_Timer_r12_sf160 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf160
|
||||
# define PeriodicBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf320
|
||||
# define PeriodicBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf640
|
||||
# define PeriodicBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf1280
|
||||
# define PeriodicBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_sf2560
|
||||
# define PeriodicBSR_Timer_r12_infinity MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
# define RetxBSR_Timer_r12_sf320 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf320
|
||||
# define RetxBSR_Timer_r12_sf640 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf640
|
||||
# define RetxBSR_Timer_r12_sf1280 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf1280
|
||||
# define RetxBSR_Timer_r12_sf2560 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560
|
||||
# define RetxBSR_Timer_r12_sf5120 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf5120
|
||||
# define RetxBSR_Timer_r12_sf10240 MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf10240
|
||||
#endif
|
||||
|
||||
// This corrects something generated by asn1c which is different between Rel8 and Rel10
|
||||
#if !defined(Rel10) && !defined(Rel14)
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member SystemInformation_r8_IEs_sib_TypeAndInfo_Member
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib2
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib3
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib4 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib4
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib5 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib5
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib6 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib6
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib7 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib7
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib8 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib8
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib9 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib9
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib10
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib11
|
||||
#endif
|
||||
|
||||
|
||||
#define NB_SIG_CNX_CH 1
|
||||
#define NB_CNX_CH MAX_MOBILES_PER_ENB
|
||||
#define NB_SIG_CNX_UE 2 //MAX_MANAGED_RG_PER_MOBILE
|
||||
#define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
|
||||
|
||||
/*
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib12_v920
|
||||
#define SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920 SystemInformation_r8_IEs_sib_TypeAndInfo_Member_PR_sib13_v920
|
||||
#endif
|
||||
*/
|
||||
//#include "L3_rrc_defs.h"
|
||||
#ifndef NO_RRM
|
||||
#include "L3_rrc_interface.h"
|
||||
#include "rrc_rrm_msg.h"
|
||||
#include "rrc_rrm_interface.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
#endif
|
||||
|
||||
/* TODO: be sure this include is correct.
|
||||
* It solves a problem of compilation of the RRH GW,
|
||||
* issue #186.
|
||||
*/
|
||||
#if !defined(ENABLE_ITTI)
|
||||
# include "as_message.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
# include "commonDef.h"
|
||||
#endif
|
||||
|
||||
//--------
|
||||
typedef unsigned int uid_t;
|
||||
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((NUMBER_OF_UE_MAX/8)/sizeof(unsigned int)) + 1)
|
||||
typedef struct uid_linear_allocator_s {
|
||||
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
|
||||
} uid_allocator_t;
|
||||
|
||||
//--------
|
||||
|
||||
|
||||
|
||||
#define PROTOCOL_RRC_CTXT_UE_FMT PROTOCOL_CTXT_FMT
|
||||
#define PROTOCOL_RRC_CTXT_UE_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
|
||||
|
||||
#define PROTOCOL_RRC_CTXT_FMT PROTOCOL_CTXT_FMT
|
||||
#define PROTOCOL_RRC_CTXT_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
|
||||
/** @defgroup _rrc RRC
|
||||
* @ingroup _oai2
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#define UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!!
|
||||
#define UE_INDEX_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1
|
||||
|
||||
typedef enum {
|
||||
RRC_OK=0,
|
||||
RRC_ConnSetup_failed,
|
||||
RRC_PHY_RESYNCH,
|
||||
RRC_Handover_failed,
|
||||
RRC_HO_STARTED
|
||||
} RRC_status_t;
|
||||
|
||||
typedef enum UE_STATE_e {
|
||||
RRC_INACTIVE=0,
|
||||
RRC_IDLE,
|
||||
RRC_SI_RECEIVED,
|
||||
RRC_CONNECTED,
|
||||
RRC_RECONFIGURED,
|
||||
RRC_HO_EXECUTION
|
||||
} UE_STATE_t;
|
||||
|
||||
typedef enum HO_STATE_e {
|
||||
HO_IDLE=0,
|
||||
HO_MEASURMENT,
|
||||
HO_PREPARE,
|
||||
HO_CMD, // initiated by the src eNB
|
||||
HO_COMPLETE // initiated by the target eNB
|
||||
} HO_STATE_t;
|
||||
|
||||
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG
|
||||
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; }
|
||||
#define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n )
|
||||
#define RRM_CALLOC(t,n) (t *) malloc16( sizeof(t) * n)
|
||||
#define RRM_CALLOC2(t,s) (t *) malloc16( s )
|
||||
|
||||
#define MAX_MEAS_OBJ 6
|
||||
#define MAX_MEAS_CONFIG 6
|
||||
#define MAX_MEAS_ID 6
|
||||
|
||||
#define PAYLOAD_SIZE_MAX 1024
|
||||
#define RRC_BUF_SIZE 255
|
||||
#define UNDEF_SECURITY_MODE 0xff
|
||||
#define NO_SECURITY_MODE 0x20
|
||||
|
||||
#define CBA_OFFSET 0xfff4
|
||||
// #define NUM_MAX_CBA_GROUP 4 // in the platform_constants
|
||||
|
||||
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
|
||||
#if defined(USRP_REC_PLAY)
|
||||
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 1
|
||||
#else
|
||||
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 3
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
unsigned short transport_block_size; /*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned short max_transport_blocks; /*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
|
||||
unsigned long Guaranteed_bit_rate; /*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
|
||||
unsigned long Max_bit_rate; /*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
|
||||
uint8_t Delay_class; /*!< \brief Delay class offered by MAC layer scheduling*/
|
||||
uint8_t Target_bler; /*!< \brief Target Average Transport Block Error rate*/
|
||||
uint8_t Lchan_t; /*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
|
||||
} __attribute__ ((__packed__)) LCHAN_DESC;
|
||||
|
||||
#define LCHAN_DESC_SIZE sizeof(LCHAN_DESC)
|
||||
|
||||
typedef struct UE_RRC_INFO_s {
|
||||
UE_STATE_t State;
|
||||
uint8_t SIB1systemInfoValueTag;
|
||||
uint32_t SIStatus;
|
||||
uint32_t SIcnt;
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
uint8_t MCCHStatus[8]; // MAX_MBSFN_AREA
|
||||
#endif
|
||||
uint8_t SIwindowsize; //!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
|
||||
uint8_t handoverTarget;
|
||||
HO_STATE_t ho_state;
|
||||
uint16_t SIperiod; //!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
|
||||
unsigned short UE_index;
|
||||
uint32_t T300_active;
|
||||
uint32_t T300_cnt;
|
||||
uint32_t T304_active;
|
||||
uint32_t T304_cnt;
|
||||
uint32_t T310_active;
|
||||
uint32_t T310_cnt;
|
||||
uint32_t N310_cnt;
|
||||
uint32_t N311_cnt;
|
||||
rnti_t rnti;
|
||||
} __attribute__ ((__packed__)) UE_RRC_INFO;
|
||||
|
||||
typedef struct UE_S_TMSI_s {
|
||||
boolean_t presence;
|
||||
mme_code_t mme_code;
|
||||
m_tmsi_t m_tmsi;
|
||||
} __attribute__ ((__packed__)) UE_S_TMSI;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
typedef enum e_rab_satus_e {
|
||||
E_RAB_STATUS_NEW,
|
||||
E_RAB_STATUS_DONE, // from the eNB perspective
|
||||
E_RAB_STATUS_ESTABLISHED, // get the reconfigurationcomplete form UE
|
||||
E_RAB_STATUS_FAILED,
|
||||
E_RAB_STATUS_TORELEASE // to release DRB between eNB and UE
|
||||
} e_rab_status_t;
|
||||
|
||||
typedef struct e_rab_param_s {
|
||||
e_rab_t param;
|
||||
uint8_t status;
|
||||
uint8_t xid; // transaction_id
|
||||
s1ap_Cause_t cause;
|
||||
uint8_t cause_value;
|
||||
} __attribute__ ((__packed__)) e_rab_param_t;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Intermediate structure for Handover management. Associated per-UE in eNB_RRC_INST */
|
||||
typedef struct HANDOVER_INFO_s {
|
||||
uint8_t ho_prepare;
|
||||
uint8_t ho_complete;
|
||||
uint8_t modid_s; //module_idP of serving cell
|
||||
uint8_t modid_t; //module_idP of target cell
|
||||
uint8_t ueid_s; //UE index in serving cell
|
||||
uint8_t ueid_t; //UE index in target cell
|
||||
AS_Config_t as_config; /* these two parameters are taken from 36.331 section 10.2.2: HandoverPreparationInformation-r8-IEs */
|
||||
AS_Context_t as_context; /* They are mandatory for HO */
|
||||
uint8_t buf[RRC_BUF_SIZE]; /* ASN.1 encoded handoverCommandMessage */
|
||||
int size; /* size of above message in bytes */
|
||||
} HANDOVER_INFO;
|
||||
|
||||
#define RRC_HEADER_SIZE_MAX 64
|
||||
#define RRC_BUFFER_SIZE_MAX 1024
|
||||
typedef struct {
|
||||
char Payload[RRC_BUFFER_SIZE_MAX];
|
||||
char Header[RRC_HEADER_SIZE_MAX];
|
||||
char payload_size;
|
||||
} RRC_BUFFER;
|
||||
#define RRC_BUFFER_SIZE sizeof(RRC_BUFFER)
|
||||
|
||||
typedef struct RB_INFO_s {
|
||||
uint16_t Rb_id; //=Lchan_id
|
||||
LCHAN_DESC Lchan_desc[2];
|
||||
// MAC_MEAS_REQ_ENTRY *Meas_entry;
|
||||
} RB_INFO;
|
||||
|
||||
typedef struct SRB_INFO_s {
|
||||
uint16_t Srb_id; //=Lchan_id
|
||||
RRC_BUFFER Rx_buffer;
|
||||
RRC_BUFFER Tx_buffer;
|
||||
LCHAN_DESC Lchan_desc[2];
|
||||
unsigned int Trans_id;
|
||||
uint8_t Active;
|
||||
} SRB_INFO;
|
||||
|
||||
typedef struct RB_INFO_TABLE_ENTRY_s {
|
||||
RB_INFO Rb_info;
|
||||
uint8_t Active;
|
||||
uint32_t Next_check_frame;
|
||||
uint8_t Status;
|
||||
} RB_INFO_TABLE_ENTRY;
|
||||
|
||||
typedef struct SRB_INFO_TABLE_ENTRY_s {
|
||||
SRB_INFO Srb_info;
|
||||
uint8_t Active;
|
||||
uint8_t Status;
|
||||
uint32_t Next_check_frame;
|
||||
} SRB_INFO_TABLE_ENTRY;
|
||||
|
||||
typedef struct MEAS_REPORT_LIST_s {
|
||||
MeasId_t measId;
|
||||
uint32_t numberOfReportsSent;
|
||||
} MEAS_REPORT_LIST;
|
||||
|
||||
typedef struct HANDOVER_INFO_UE_s {
|
||||
PhysCellId_t targetCellId;
|
||||
uint8_t measFlag;
|
||||
} HANDOVER_INFO_UE;
|
||||
typedef uid_t ue_uid_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t *MIB;
|
||||
uint8_t sizeof_MIB;
|
||||
uint8_t *SIB1;
|
||||
uint8_t sizeof_SIB1;
|
||||
uint8_t *SIB23;
|
||||
uint8_t sizeof_SIB23;
|
||||
#ifdef Rel14
|
||||
uint8_t *SIB1_BR;
|
||||
uint8_t sizeof_SIB1_BR;
|
||||
uint8_t *SIB23_BR;
|
||||
uint8_t sizeof_SIB23_BR;
|
||||
#endif
|
||||
int physCellId;
|
||||
int Ncp;
|
||||
int p_eNB;
|
||||
uint32_t dl_CarrierFreq;
|
||||
uint32_t ul_CarrierFreq;
|
||||
uint32_t pbch_repetition;
|
||||
BCCH_BCH_Message_t mib;
|
||||
BCCH_DL_SCH_Message_t siblock1;
|
||||
BCCH_DL_SCH_Message_t systemInformation;
|
||||
// SystemInformation_t systemInformation;
|
||||
SystemInformationBlockType1_t *sib1;
|
||||
SystemInformationBlockType2_t *sib2;
|
||||
SystemInformationBlockType3_t *sib3;
|
||||
#ifdef Rel14
|
||||
SystemInformationBlockType1_t *sib1_BR;
|
||||
SystemInformationBlockType2_t *sib2_BR;
|
||||
SystemInformationBlockType2_t *sib3_BR;
|
||||
#endif
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
SystemInformationBlockType13_r9_t *sib13;
|
||||
uint8_t MBMS_flag;
|
||||
uint8_t num_mbsfn_sync_area;
|
||||
uint8_t **MCCH_MESSAGE; // MAX_MBSFN_AREA
|
||||
uint8_t sizeof_MCCH_MESSAGE[8];// MAX_MBSFN_AREA
|
||||
MCCH_Message_t mcch;
|
||||
MBSFNAreaConfiguration_r9_t *mcch_message;
|
||||
SRB_INFO MCCH_MESS[8];// MAX_MBSFN_AREA
|
||||
#endif
|
||||
SRB_INFO SI;
|
||||
SRB_INFO Srb0;
|
||||
uint8_t *paging[NUMBER_OF_UE_MAX];
|
||||
uint32_t sizeof_paging[NUMBER_OF_UE_MAX];
|
||||
} rrc_eNB_carrier_data_t;
|
||||
|
||||
#define MAX_UE_CAPABILITY_SIZE 255
|
||||
typedef struct OAI_UECapability_s {
|
||||
uint8_t sdu[MAX_UE_CAPABILITY_SIZE];
|
||||
uint8_t sdu_size;
|
||||
UE_EUTRA_Capability_t *UE_EUTRA_Capability;
|
||||
} OAI_UECapability_t;
|
||||
|
||||
typedef struct NR_UE_RRC_INST_s {
|
||||
nr_rrc_state_t rrc_state;
|
||||
nr_rrc_sub_state_t rrc_sub_state;
|
||||
#if 0
|
||||
OAI_UECapability_t *UECap;
|
||||
uint8_t *UECapability;
|
||||
uint8_t UECapability_size;
|
||||
UE_RRC_INFO Info[NB_SIG_CNX_UE];
|
||||
SRB_INFO Srb0[NB_SIG_CNX_UE];
|
||||
SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
|
||||
SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
|
||||
HANDOVER_INFO_UE HandoverInfoUe;
|
||||
uint8_t *SIB1[NB_CNX_UE];
|
||||
uint8_t sizeof_SIB1[NB_CNX_UE];
|
||||
uint8_t *SI[NB_CNX_UE];
|
||||
uint8_t sizeof_SI[NB_CNX_UE];
|
||||
uint8_t SIB1Status[NB_CNX_UE];
|
||||
uint8_t SIStatus[NB_CNX_UE];
|
||||
SystemInformationBlockType1_t *sib1[NB_CNX_UE];
|
||||
SystemInformation_t *si[NB_CNX_UE]; //!< Temporary storage for an SI message. Decoding happens in decode_SI().
|
||||
SystemInformationBlockType2_t *sib2[NB_CNX_UE];
|
||||
SystemInformationBlockType3_t *sib3[NB_CNX_UE];
|
||||
SystemInformationBlockType4_t *sib4[NB_CNX_UE];
|
||||
SystemInformationBlockType5_t *sib5[NB_CNX_UE];
|
||||
SystemInformationBlockType6_t *sib6[NB_CNX_UE];
|
||||
SystemInformationBlockType7_t *sib7[NB_CNX_UE];
|
||||
SystemInformationBlockType8_t *sib8[NB_CNX_UE];
|
||||
SystemInformationBlockType9_t *sib9[NB_CNX_UE];
|
||||
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
|
||||
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
uint8_t MBMS_flag;
|
||||
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
|
||||
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
|
||||
uint8_t MCCH_MESSAGEStatus[NB_CNX_UE];
|
||||
MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE];
|
||||
SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
|
||||
SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
|
||||
#endif
|
||||
#ifdef CBA
|
||||
uint8_t num_active_cba_groups;
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
#endif
|
||||
uint8_t num_srb;
|
||||
struct SRB_ToAddMod *SRB1_config[NB_CNX_UE];
|
||||
struct SRB_ToAddMod *SRB2_config[NB_CNX_UE];
|
||||
struct DRB_ToAddMod *DRB_config[NB_CNX_UE][8];
|
||||
rb_id_t *defaultDRB; // remember the ID of the default DRB
|
||||
MeasObjectToAddMod_t *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ];
|
||||
struct ReportConfigToAddMod *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG];
|
||||
struct QuantityConfig *QuantityConfig[NB_CNX_UE];
|
||||
struct MeasIdToAddMod *MeasId[NB_CNX_UE][MAX_MEAS_ID];
|
||||
MEAS_REPORT_LIST *measReportList[NB_CNX_UE][MAX_MEAS_ID];
|
||||
uint32_t measTimer[NB_CNX_UE][MAX_MEAS_ID][6]; // 6 neighboring cells
|
||||
RSRP_Range_t s_measure;
|
||||
struct MeasConfig__speedStatePars *speedStatePars;
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated[NB_CNX_UE];
|
||||
struct SPS_Config *sps_Config[NB_CNX_UE];
|
||||
MAC_MainConfig_t *mac_MainConfig[NB_CNX_UE];
|
||||
MeasGapConfig_t *measGapConfig[NB_CNX_UE];
|
||||
double filter_coeff_rsrp; // [7] ???
|
||||
double filter_coeff_rsrq; // [7] ???
|
||||
float rsrp_db[7];
|
||||
float rsrq_db[7];
|
||||
float rsrp_db_filtered[7];
|
||||
float rsrq_db_filtered[7];
|
||||
#if defined(ENABLE_SECURITY)
|
||||
/* KeNB as computed from parameters within USIM card */
|
||||
uint8_t kenb[32];
|
||||
uint8_t nh[32];
|
||||
int8_t nh_ncc;
|
||||
#endif
|
||||
|
||||
/* Used integrity/ciphering algorithms */
|
||||
CipheringAlgorithm_r12_t ciphering_algorithm;
|
||||
e_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
|
||||
#endif
|
||||
|
||||
MeasConfig_t meas_config;
|
||||
CellGroupConfig_t cell_group_config;
|
||||
RadioBearerConfig_t radio_bearer_config;
|
||||
|
||||
} NR_UE_RRC_INST_t;
|
||||
|
||||
typedef struct UE_PF_PO_s {
|
||||
boolean_t enable_flag; /* flag indicate whether current object is used */
|
||||
uint16_t ue_index_value; /* UE index value */
|
||||
uint8_t PF_min; /* minimal value of Paging Frame (PF) */
|
||||
uint8_t PO; /* Paging Occasion (PO) */
|
||||
uint32_t T; /* DRX cycle */
|
||||
} UE_PF_PO_t;
|
||||
|
||||
#include "proto.h"
|
||||
|
||||
#endif
|
||||
/** @} */
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
|
||||
#include "defs.h"
|
||||
#include "proto.h"
|
||||
#include "extern.h"
|
||||
#include "assertions.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int nr_l3_init_ue(void){
|
||||
LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
|
||||
|
||||
openair_rrc_top_init_ue_nr();
|
||||
|
||||
return 1;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "defs.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*/
|
||||
uint8_t openair_rrc_top_init_ue_nr(void);
|
||||
|
||||
/**\brief Decode 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_dcch(const uint8_t *buffer, const uint32_t size);
|
||||
|
||||
/**\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(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);
|
||||
|
||||
/**\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);
|
||||
|
||||
/**\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);
|
||||
|
||||
/** @}*/
|
||||
@@ -0,0 +1,294 @@
|
||||
/*
|
||||
* 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 rrc_UE.c
|
||||
* \brief rrc procedures for UE
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2011 - 2014
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr and raymond.knopp@eurecom.fr
|
||||
*/
|
||||
|
||||
#define RRC_UE
|
||||
#define RRC_UE_C
|
||||
|
||||
|
||||
// header files for RRC message for NR might be change to add prefix in from of the file name.
|
||||
#include "assertions.h"
|
||||
#include "hashtable.h"
|
||||
#include "asn1_conversions.h"
|
||||
#include "defs.h"
|
||||
#include "PHY/TOOLS/dB_routines.h"
|
||||
#include "extern.h"
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
#ifndef CELLULAR
|
||||
#include "RRC/LITE/MESSAGES/asn1_msg.h"
|
||||
#endif
|
||||
#include "RRCConnectionRequest.h"
|
||||
#include "RRCConnectionReconfiguration.h"
|
||||
#include "UL-CCCH-Message.h"
|
||||
#include "DL-CCCH-Message.h"
|
||||
#include "UL-DCCH-Message.h"
|
||||
#include "DL-DCCH-Message.h"
|
||||
#include "BCCH-DL-SCH-Message.h"
|
||||
#include "PCCH-Message.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#include "MCCH-Message.h"
|
||||
#endif
|
||||
#include "MeasConfig.h"
|
||||
#include "MeasGapConfig.h"
|
||||
#include "MeasObjectEUTRA.h"
|
||||
#include "TDD-Config.h"
|
||||
#include "UECapabilityEnquiry.h"
|
||||
#include "UE-CapabilityRequest.h"
|
||||
#include "RRC/NAS/nas_config.h"
|
||||
#include "RRC/NAS/rb_config.h"
|
||||
#if ENABLE_RAL
|
||||
#include "rrc_UE_ral.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_SECURITY)
|
||||
# include "UTIL/OSA/osa_defs.h"
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
#include "intertask_interface.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// from NR SRB3
|
||||
uint8_t nr_rrc_ue_decode_dcch(
|
||||
const uint8_t *buffer,
|
||||
const uint32_t size
|
||||
){
|
||||
// uper_decode by nr R15 rrc_connection_reconfiguration
|
||||
|
||||
NR_RRC_DL_DCCH_Message_t *nr_dl_dcch_msg = (NR_RRC_DL_DCCH_Message_t *)0;
|
||||
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_NR_RRC_DL_DCCH_Message, //might be added prefix later
|
||||
(void**)&nr_dl_dcch_msg,
|
||||
(uint8_t *)buffer,
|
||||
size, 0, 0);
|
||||
|
||||
if(nr_dl_dcch_msg != NULL){
|
||||
switch(nr_dl_dcch_msg->message.present){
|
||||
case DL_DCCH_MessageType_PR_c1:
|
||||
|
||||
switch(nr_dl_dcch_msg->message.choice.c1.present){
|
||||
case 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:
|
||||
default:
|
||||
// not support or unuse
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case DL_DCCH_MessageType_PR_NOTHING:
|
||||
case DL_DCCH_MessageType_PR_messageClassExtension:
|
||||
default:
|
||||
// not support or unuse
|
||||
break;
|
||||
}
|
||||
|
||||
// release memory allocation
|
||||
free(nr_dl_dcch_msg);
|
||||
}else{
|
||||
// log..
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (encoded)
|
||||
// TODO check to use this or downer one
|
||||
uint8_t nr_rrc_ue_decode_rrcReconfiguration(
|
||||
const uint8_t *buffer,
|
||||
const uint32_t size
|
||||
){
|
||||
RRCReconfiguration_t *rrcReconfiguration;
|
||||
|
||||
// decoding
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_RRCReconfiguration,
|
||||
(void **)&rrcReconfiguration,
|
||||
(uint8_t *)buffer,
|
||||
size);
|
||||
|
||||
nr_rrc_ue_process_rrcReconfiguration(rrcReconfiguration); // after decoder
|
||||
|
||||
free(rrcReconfiguration);
|
||||
|
||||
}
|
||||
// from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (encoded)
|
||||
// TODO check to use this or upper one
|
||||
uint8_t nr_rrc_ue_decode_secondary_cellgroup_config(
|
||||
const uint8_t *buffer,
|
||||
const uint32_t size
|
||||
){
|
||||
CellGroupConfig_t *cellGroupConfig = (CellGroupConfig_t *)0;
|
||||
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_CellGroupConfig, //might be added prefix later
|
||||
(void **)&cellGroupConfig,
|
||||
(uint8_t *)buffer,
|
||||
size, 0, 0);
|
||||
|
||||
nr_rrc_ue_process_scg_config(cellGroupConfig);
|
||||
|
||||
free(cellGroupConfig);
|
||||
}
|
||||
|
||||
|
||||
// from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (decoded)
|
||||
// RRCReconfiguration
|
||||
uint8_t nr_rrc_ue_process_rrcReconfiguration(RRCReconfiguration_t *rrcReconfiguration){
|
||||
|
||||
switch(rrcReconfiguration.criticalExtensions.present){
|
||||
case RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration:
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->radioBearerConfig != (RadioBearerConfig_t *)0){
|
||||
nr_rrc_ue_process_radio_bearer_config(rrcReconfiguration->radioBearerConfig);
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->secondaryCellGroup != (OCTET_STRING_t *)0){
|
||||
CellGroupConfig_t *cellGroupConfig = (CellGroupConfig_t *)0;
|
||||
// TODO check if this deocder is need for decode "SecondaryCellGroup" of use type "CellGroupConfig" directly
|
||||
uper_decode(NULL,
|
||||
&asn_DEF_CellGroupConfig, //might be added prefix later
|
||||
(void **)&cellGroupConfig,
|
||||
(uint8_t *)rrcReconfiguration->secondaryCellGroup->buffer,
|
||||
rrcReconfiguration->secondaryCellGroup.size, 0, 0);
|
||||
|
||||
nr_rrc_ue_process_scg_config(cellGroupConfig);
|
||||
|
||||
free(cellGroupConfig);
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->measConfig != (MeasConfig *)0){
|
||||
nr_rrc_ue_process_meas_config(rrcReconfiguration.criticalExtensions.rrcReconfiguration->measConfig);
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->lateNonCriticalExtension != (OCTET_STRING_t *)0){
|
||||
// unuse now
|
||||
}
|
||||
|
||||
if(rrcReconfiguration.criticalExtensions.rrcReconfiguration->nonCriticalExtension != (RRCReconfiguration_IEs__nonCriticalExtension *)0){
|
||||
// unuse now
|
||||
}
|
||||
break;
|
||||
case RRCReconfiguration__criticalExtensions_PR_NOTHING:
|
||||
case RRCReconfiguration__criticalExtensions_PR_criticalExtensionsFuture:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// process
|
||||
}
|
||||
|
||||
uint8_t nr_rrc_ue_process_meas_config(MeasConfig_t *meas_config){
|
||||
// copy into nr_rrc inst
|
||||
memcpy( (void *)NR_UE_rrc_inst->measConfig,
|
||||
(void *)meas_config,
|
||||
sizeof(MeasConfig_t));
|
||||
// process it
|
||||
}
|
||||
uint8_t nr_rrc_ue_process_scg_config(CellGroupConfig_t *cell_group_config){
|
||||
// copy into nr_rrc inst
|
||||
|
||||
nr_ue_process_rlc_bearer_list();
|
||||
nr_ue_process_mac_cell_group_config();
|
||||
nr_ue_process_physical_cell_group_config();
|
||||
nr_ue_process_spcell_config();
|
||||
nr_ue_process_spcell_list();
|
||||
|
||||
memcpy( (void *)NR_UE_rrc_inst->cellGroupConfig,
|
||||
(void *)cellGroupConfig,
|
||||
sizeof(cellGroupConfig_t));
|
||||
// process it
|
||||
}
|
||||
uint8_t nr_rrc_ue_process_radio_bearer_config(RadioBearerConfig_t *radio_bearer_config){
|
||||
// copy into nr_rrc inst
|
||||
memcpy( (void *)NR_UE_rrc_inst->radioBearerConfig,
|
||||
(void *)radio_bearer_config,
|
||||
sizeof(RadioBearerConfig_t));
|
||||
// process it
|
||||
}
|
||||
|
||||
|
||||
uint8_t openair_rrc_top_init_ue_nr(void){
|
||||
|
||||
if(NB_NR_UE_INST > 0){
|
||||
NR_UE_rrc_inst = (NR_UE_RRC_INST_t *)malloc(NB_NR_UE_INST * sizeof(NR_UE_RRC_INST_t));
|
||||
memset(NR_UE_rrc_inst, 0, NB_NR_UE_INST * sizeof(NR_UE_RRC_INST_t));
|
||||
|
||||
// fill UE-NR-Capability @ UE-CapabilityRAT-Container here.
|
||||
|
||||
|
||||
}else{
|
||||
NR_UE_rrc_inst = (NR_UE_RRC_INST_t *)0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
uint8_t nr_ue_process_rlc_bearer_list(){
|
||||
};
|
||||
|
||||
uint8_t nr_ue_process_mac_cell_group_config(){
|
||||
};
|
||||
|
||||
uint8_t nr_ue_process_physical_cell_group_config(){
|
||||
};
|
||||
|
||||
uint8_t nr_ue_process_spcell_config(){
|
||||
};
|
||||
|
||||
uint8_t nr_ue_process_spcell_list(){
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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 rrc_types.h
|
||||
* \brief rrc types and subtypes
|
||||
* \author Navid Nikaein and Raymond Knopp
|
||||
* \date 2011 - 2014
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifndef NR_RRC_TYPES_H_
|
||||
#define NR_RRC_TYPES_H_
|
||||
|
||||
typedef enum nr_rrc_state_e {
|
||||
//RRC_STATE_INACTIVE=0,
|
||||
//RRC_STATE_IDLE,
|
||||
//RRC_STATE_CONNECTED,
|
||||
|
||||
//RRC_STATE_FIRST = RRC_STATE_INACTIVE,
|
||||
//RRC_STATE_LAST = RRC_STATE_CONNECTED,
|
||||
RRC_STATE_IDLE = 0,
|
||||
RRC_STATE_INACTIVE,
|
||||
RRC_STATE_CONNECTED,
|
||||
|
||||
RRC_STATE_FIRST = RRC_STATE_IDLE,
|
||||
RRC_STATE_LAST = RRC_STATE_CONNECTED
|
||||
|
||||
} nr_rrc_state_t;
|
||||
|
||||
typedef enum nr_rrc_sub_state_e {
|
||||
//RRC_SUB_STATE_INACTIVE=0,
|
||||
|
||||
//RRC_SUB_STATE_IDLE_SEARCHING,
|
||||
//RRC_SUB_STATE_IDLE_RECEIVING_SIB,
|
||||
//RRC_SUB_STATE_IDLE_SIB_COMPLETE,
|
||||
//RRC_SUB_STATE_IDLE_CONNECTING,
|
||||
//RRC_SUB_STATE_IDLE,
|
||||
|
||||
//RRC_SUB_STATE_CONNECTED,
|
||||
|
||||
//RRC_SUB_STATE_INACTIVE_FIRST = RRC_SUB_STATE_INACTIVE,
|
||||
//RRC_SUB_STATE_INACTIVE_LAST = RRC_SUB_STATE_INACTIVE,
|
||||
|
||||
//RRC_SUB_STATE_IDLE_FIRST = RRC_SUB_STATE_IDLE_SEARCHING,
|
||||
//RRC_SUB_STATE_IDLE_LAST = RRC_SUB_STATE_IDLE,
|
||||
|
||||
//RRC_SUB_STATE_CONNECTED_FIRST = RRC_SUB_STATE_CONNECTED,
|
||||
//RRC_SUB_STATE_CONNECTED_LAST = RRC_SUB_STATE_CONNECTED,
|
||||
} nr_rrc_sub_state_t;
|
||||
|
||||
#endif /* RRC_TYPES_H_ */
|
||||
@@ -0,0 +1,248 @@
|
||||
/*
|
||||
* 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 vars.hles
|
||||
* \brief rrc variables
|
||||
* \author Raymond Knopp and Navid Nikaein
|
||||
* \date 2013
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
*/
|
||||
|
||||
|
||||
#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"
|
||||
|
||||
UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
pthread_mutex_t ue_pf_po_mutex;
|
||||
NR_UE_RRC_INST_t *NR_UE_rrc_inst;
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#define MAX_U32 0xFFFFFFFF
|
||||
|
||||
uint8_t DRB2LCHAN[8];
|
||||
|
||||
long logicalChannelGroup0 = 0;
|
||||
long logicalChannelSR_Mask_r9=0;
|
||||
|
||||
struct LogicalChannelConfig__ul_SpecificParameters LCSRB1 = {1,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity,
|
||||
0,
|
||||
&logicalChannelGroup0
|
||||
};
|
||||
struct LogicalChannelConfig__ul_SpecificParameters LCSRB2 = {3,
|
||||
LogicalChannelConfig__ul_SpecificParameters__prioritisedBitRate_infinity,
|
||||
0,
|
||||
&logicalChannelGroup0
|
||||
};
|
||||
|
||||
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
struct LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = {
|
||||
logicalChannelSR_Mask_r9: &logicalChannelSR_Mask_r9
|
||||
};
|
||||
#endif
|
||||
|
||||
// These are the default SRB configurations from 36.331 (Chapter 9, p. 176-179 in v8.6)
|
||||
LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB1
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
,
|
||||
ext1: &logicalChannelSR_Mask_r9_ext1
|
||||
#endif
|
||||
};
|
||||
|
||||
LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters: &LCSRB2
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
,
|
||||
ext1: &logicalChannelSR_Mask_r9_ext1
|
||||
#endif
|
||||
};
|
||||
|
||||
//CONSTANTS
|
||||
rlc_info_t Rlc_info_um,Rlc_info_am_config;
|
||||
uint16_t RACH_FREQ_ALLOC;
|
||||
//uint8_t NB_RACH;
|
||||
LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
|
||||
MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
|
||||
MAC_AVG_T BCCH_MEAS_AVG, CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
|
||||
|
||||
// timers
|
||||
uint16_t T300[8] = {100,200,300,400,600,1000,1500,2000};
|
||||
uint16_t T310[8] = {0,50,100,200,500,1000,2000};
|
||||
uint16_t N310[8] = {1,2,3,4,6,8,10,20};
|
||||
uint16_t N311[8] = {1,2,3,4,6,8,10,20};
|
||||
uint32_t T304[8] = {50,100,150,200,500,1000,2000,MAX_U32};
|
||||
|
||||
// TimeToTrigger enum mapping table (36.331 TimeToTrigger IE)
|
||||
uint32_t timeToTrigger_ms[16] = {0,40,64,80,100,128,160,256,320,480,512,640,1024,1280,2560,5120};
|
||||
|
||||
/* 36.133 Section 9.1.4 RSRP Measurement Report Mapping, Table: 9.1.4-1 */
|
||||
float RSRP_meas_mapping[98] = {
|
||||
-140,
|
||||
-139,
|
||||
-138,
|
||||
-137,
|
||||
-136,
|
||||
-135,
|
||||
-134,
|
||||
-133,
|
||||
-132,
|
||||
-131,
|
||||
-130,
|
||||
-129,
|
||||
-128,
|
||||
-127,
|
||||
-126,
|
||||
-125,
|
||||
-124,
|
||||
-123,
|
||||
-122,
|
||||
-121,
|
||||
-120,
|
||||
-119,
|
||||
-118,
|
||||
-117,
|
||||
-116,
|
||||
-115,
|
||||
-114,
|
||||
-113,
|
||||
-112,
|
||||
-111,
|
||||
-110,
|
||||
-109,
|
||||
-108,
|
||||
-107,
|
||||
-106,
|
||||
-105,
|
||||
-104,
|
||||
-103,
|
||||
-102,
|
||||
-101,
|
||||
-100,
|
||||
-99,
|
||||
-98,
|
||||
-97,
|
||||
-96,
|
||||
-95,
|
||||
-94,
|
||||
-93,
|
||||
-92,
|
||||
-91,
|
||||
-90,
|
||||
-89,
|
||||
-88,
|
||||
-87,
|
||||
-86,
|
||||
-85,
|
||||
-84,
|
||||
-83,
|
||||
-82,
|
||||
-81,
|
||||
-80,
|
||||
-79,
|
||||
-78,
|
||||
-77,
|
||||
-76,
|
||||
-75,
|
||||
-74,
|
||||
-73,
|
||||
-72,
|
||||
-71,
|
||||
-70,
|
||||
-69,
|
||||
-68,
|
||||
-67,
|
||||
-66,
|
||||
-65,
|
||||
-64,
|
||||
-63,
|
||||
-62,
|
||||
-61,
|
||||
-60,
|
||||
-59,
|
||||
-58,
|
||||
-57,
|
||||
-56,
|
||||
-55,
|
||||
-54,
|
||||
-53,
|
||||
-52,
|
||||
-51,
|
||||
-50,
|
||||
-49,
|
||||
-48,
|
||||
-47,
|
||||
-46,
|
||||
-45,
|
||||
-44,
|
||||
-43
|
||||
};
|
||||
|
||||
float RSRQ_meas_mapping[35] = {
|
||||
-19,
|
||||
-18.5,
|
||||
-18,
|
||||
-17.5,
|
||||
-17,
|
||||
-16.5,
|
||||
-16,
|
||||
-15.5,
|
||||
-15,
|
||||
-14.5,
|
||||
-14,
|
||||
-13.5,
|
||||
-13,
|
||||
-12.5,
|
||||
-12,
|
||||
-11.5,
|
||||
-11,
|
||||
-10.5,
|
||||
-10,
|
||||
-9.5,
|
||||
-9,
|
||||
-8.5,
|
||||
-8,
|
||||
-7.5,
|
||||
-7,
|
||||
-6.5,
|
||||
-6,
|
||||
-5.5,
|
||||
-5,
|
||||
-4.5,
|
||||
-4,
|
||||
-3.5,
|
||||
-3,
|
||||
-2.5,
|
||||
-2
|
||||
};
|
||||
|
||||
// only used for RRC connection re-establishment procedure TS36.331 5.3.7
|
||||
// [0]: current C-RNTI, [1]: prior C-RNTI
|
||||
// insert one when eNB received RRCConnectionReestablishmentRequest message
|
||||
// delete one when eNB received RRCConnectionReestablishmentComplete message
|
||||
uint16_t reestablish_rnti_map[NUMBER_OF_UE_MAX][2] = {{0}};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user