Commit e8c5e8bf authored by matzakos's avatar matzakos

Continue unfinished merge of Merge-L1-Onnet branch with develop branch....

Continue unfinished merge of Merge-L1-Onnet branch with develop branch. Pending conflicts to resolve.
parent a6484368
......@@ -42,6 +42,20 @@ openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
openair1/SIMULATION/LTE_PHY/dlsim.c
openair2/COMMON/mac_rrc_primitives.h
openair2/COMMON/platform_types.h
openair2/COMMON/rrc_messages_types.h
openair2/ENB_APP/enb_config.c (done but not so sure)
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config_ue.c
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_mch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/mac.h
openair2/LAYER2/MAC/mac_proto.h
openair2/LAYER2/MAC/pre_processor.c
......@@ -52,20 +66,6 @@ openair2/COMMON/platform_types.h
deleted by them: openair1/PHY/TOOLS/file_output.c
deleted by them: openair1/SCHED/pusch_pc.c
both modified: openair2/COMMON/rrc_messages_types.h
both modified: openair2/ENB_APP/enb_config.c
both modified: openair2/ENB_APP/enb_paramdef.h
both modified: openair2/ENB_APP/flexran_agent_ran_api.c
both modified: openair2/LAYER2/MAC/config.c
both modified: openair2/LAYER2/MAC/config_ue.c
both modified: openair2/LAYER2/MAC/eNB_scheduler.c
both modified: openair2/LAYER2/MAC/eNB_scheduler_RA.c
both modified: openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
both modified: openair2/LAYER2/MAC/eNB_scheduler_mch.c
both modified: openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
both modified: openair2/LAYER2/MAC/mac.h
both modified: openair2/LAYER2/MAC/mac_proto.h
both modified: openair2/LAYER2/MAC/pre_processor.c
both modified: openair2/LAYER2/MAC/ra_procedures.c
both modified: openair2/LAYER2/MAC/ue_procedures.c
both modified: openair2/LAYER2/PDCP_v10.1.0/pdcp.c
......@@ -154,8 +154,8 @@ openair2/COMMON/platform_types.h
both modified: openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
both modified: openair1/SIMULATION/LTE_PHY/dlsim.c
both modified: openair2/COMMON/mac_rrc_primitives.h
both modified: openair2/COMMON/platform_types.h #We have done up to here
both modified: openair2/COMMON/rrc_messages_types.h
both modified: openair2/COMMON/platform_types.h
both modified: openair2/COMMON/rrc_messages_types.h
both modified: openair2/ENB_APP/enb_config.c
both modified: openair2/ENB_APP/enb_paramdef.h
both modified: openair2/ENB_APP/flexran_agent_ran_api.c
......@@ -166,9 +166,9 @@ openair2/COMMON/platform_types.h
both modified: openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
both modified: openair2/LAYER2/MAC/eNB_scheduler_mch.c
both modified: openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
both modified: openair2/LAYER2/MAC/mac.h
both modified: openair2/LAYER2/MAC/mac.h
both modified: openair2/LAYER2/MAC/mac_proto.h
both modified: openair2/LAYER2/MAC/pre_processor.c
both modified: openair2/LAYER2/MAC/pre_processor.c #We have done up to here
both modified: openair2/LAYER2/MAC/ra_procedures.c
both modified: openair2/LAYER2/MAC/ue_procedures.c
both modified: openair2/LAYER2/PDCP_v10.1.0/pdcp.c
......
......@@ -26,7 +26,7 @@
* Author: winckel and Navid Nikaein
*/
#ifndef RRC_MESSAGES_TYPES_H_
#ifndef RRC_MESSAGES_TYPES_H_<<>
#define RRC_MESSAGES_TYPES_H_
#include "as_message.h"
......@@ -37,19 +37,12 @@
#else
#include "RRC/LTE/MESSAGES/LTE_SystemInformationBlockType2.h"
#endif
<<<<<<< HEAD
#include "SL-OffsetIndicator-r12.h"
#include "SubframeBitmapSL-r12.h"
#include "SL-CP-Len-r12.h"
#include "SL-PeriodComm-r12.h"
#include "SL-DiscResourcePool-r12.h"
=======
#include "LTE_SL-OffsetIndicator-r12.h"
#include "LTE_SubframeBitmapSL-r12.h"
#include "LTE_SL-CP-Len-r12.h"
#include "LTE_SL-PeriodComm-r12.h"
#include "LTE_SL-DiscResourcePool-r12.h"
>>>>>>> main/develop
//-------------------------------------------------------------------------------------------//
......@@ -183,20 +176,6 @@ typedef struct RrcConfigurationReq_s {
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
long ue_TransmissionMode[MAX_NUM_CCs];
<<<<<<< HEAD
//TTN - for D2D
//SIB18
e_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
e_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
e_SL_CP_Len_r12 rxPool_data_CP_Len[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long rxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
=======
long ue_multiple_max[MAX_NUM_CCs];
//TTN - for D2D
......@@ -210,70 +189,40 @@ typedef struct RrcConfigurationReq_s {
LTE_SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long rxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
LTE_SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
>>>>>>> main/develop
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//SIB19
//for discRxPool
<<<<<<< HEAD
SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
=======
LTE_SL_CP_Len_r12_t discRxPool_cp_Len[MAX_NUM_CCs];
e_LTE_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod[MAX_NUM_CCs];
>>>>>>> main/develop
long discRxPool_numRetx[MAX_NUM_CCs];
long discRxPool_numRepetition[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPool_ResourceConfig_prb_End[MAX_NUM_CCs];
<<<<<<< HEAD
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
=======
LTE_SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPool_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
LTE_SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
>>>>>>> main/develop
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
//for discRxPoolPS
<<<<<<< HEAD
SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
=======
LTE_SL_CP_Len_r12_t discRxPoolPS_cp_Len[MAX_NUM_CCs];
e_LTE_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod[MAX_NUM_CCs];
>>>>>>> main/develop
long discRxPoolPS_numRetx[MAX_NUM_CCs];
long discRxPoolPS_numRepetition[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Num[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_Start[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_prb_End[MAX_NUM_CCs];
<<<<<<< HEAD
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
=======
LTE_SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_offsetIndicator_choice[MAX_NUM_CCs];
LTE_SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present[MAX_NUM_CCs];
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[MAX_NUM_CCs];
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[MAX_NUM_CCs];
>>>>>>> main/develop
} RrcConfigurationReq;
#define MAX_NUM_NBIOT_CELEVELS 3
......
......@@ -91,70 +91,7 @@ void RCconfig_flexran() {
*rach_preamblesGroupAConfig, *rach_messagePowerOffsetGroupB, *pcch_nB;
long long int downlink_frequency;
int32_t tdd_config, tdd_config_s, eutra_band, uplink_frequency_offset,
<<<<<<< HEAD
Nid_cell_mbsfn, N_RB_DL, nb_antenna_ports, prach_root, prach_config_index,
prach_zero_correlation, prach_freq_offset, pucch_delta_shift,
pucch_nRB_CQI, pucch_nCS_AN, pucch_n1_AN, pdsch_referenceSignalPower,
pdsch_p_b, pusch_n_SB, pusch_hoppingOffset, pusch_groupAssignment,
pusch_nDMRS1, srs_BandwidthConfig, srs_SubframeConfig, pusch_p0_Nominal,
pucch_p0_Nominal, msg3_delta_Preamble, rach_numberOfRA_Preambles,
rach_sizeOfRA_PreamblesGroupA, rach_messageSizeGroupA,
rach_powerRampingStep, rach_preambleInitialReceivedTargetPower,
rach_preambleTransMax, rach_raResponseWindowSize,
rach_macContentionResolutionTimer, rach_maxHARQ_Msg3Tx,
pcch_defaultPagingCycle, bcch_modificationPeriodCoeff,
ue_TimersAndConstants_t300, ue_TimersAndConstants_t301,
ue_TimersAndConstants_t310, ue_TimersAndConstants_t311,
ue_TimersAndConstants_n310, ue_TimersAndConstants_n311,
ue_TransmissionMode;
e_SL_CP_Len_r12 rxPool_sc_CP_Len;
e_SL_PeriodComm_r12 rxPool_sc_Period;
e_SL_CP_Len_r12 rxPool_data_CP_Len;
long rxPool_ResourceConfig_prb_Num;
long rxPool_ResourceConfig_prb_Start;
long rxPool_ResourceConfig_prb_End;
SL_OffsetIndicator_r12_PR rxPool_ResourceConfig_offsetIndicator_present;
long rxPool_ResourceConfig_offsetIndicator_choice;
SubframeBitmapSL_r12_PR rxPool_ResourceConfig_subframeBitmap_present;
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
long rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
long rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19
//for discRxPool
SL_CP_Len_r12_t discRxPool_cp_Len;
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPool_discPeriod;
long discRxPool_numRetx;
long discRxPool_numRepetition;
long discRxPool_ResourceConfig_prb_Num;
long discRxPool_ResourceConfig_prb_Start;
long discRxPool_ResourceConfig_prb_End;
SL_OffsetIndicator_r12_PR discRxPool_ResourceConfig_offsetIndicator_present;
long discRxPool_ResourceConfig_offsetIndicator_choice;
SubframeBitmapSL_r12_PR discRxPool_ResourceConfig_subframeBitmap_present;
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
long discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//for discRxPoolPS
SL_CP_Len_r12_t discRxPoolPS_cp_Len;
e_SL_DiscResourcePool_r12__discPeriod_r12 discRxPoolPS_discPeriod;
long discRxPoolPS_numRetx;
long discRxPoolPS_numRepetition;
long discRxPoolPS_ResourceConfig_prb_Num;
long discRxPoolPS_ResourceConfig_prb_Start;
long discRxPoolPS_ResourceConfig_prb_End;
SL_OffsetIndicator_r12_PR discRxPoolPS_ResourceConfig_offsetIndicator_present;
long discRxPoolPS_ResourceConfig_offsetIndicator_choice;
SubframeBitmapSL_r12_PR discRxPoolPS_ResourceConfig_subframeBitmap_present;
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
long discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
=======
Nid_cell_mbsfn, N_RB_DL, nb_antenna_ports, prach_root, prach_config_index,
prach_zero_correlation, prach_freq_offset, pucch_delta_shift,
pucch_nRB_CQI, pucch_nCS_AN, pucch_n1_AN, pdsch_referenceSignalPower,
......@@ -211,7 +148,7 @@ void RCconfig_flexran() {
char *discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
>>>>>>> main/develop
/* get number of eNBs */
paramdef_t ENBSParams[] = ENBSPARAMS_DESC;
config_get(ENBSParams, sizeof(ENBSParams)/sizeof(paramdef_t), NULL);
......@@ -293,50 +230,6 @@ void RCconfig_flexran() {
}
<<<<<<< HEAD
/*void UE_config_stub_pnf(void) {
int j;
paramdef_t L1_Params[] = L1PARAMS_DESC;
paramlist_def_t L1_ParamList = {CONFIG_STRING_L1_LIST,NULL,0};
config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL);
if (L1_ParamList.numelt > 0) {
for (j=0; j<L1_ParamList.numelt; j++){
//nb_L1_CC = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr); // Number of component carriers is of no use for the
// phy_stub mode UE pnf. Maybe we can completely skip it.
if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "local_mac") == 0) {
sf_ahead = 4; // Need 4 subframe gap between RX and TX
}
// Panos: Right now that we have only one UE (thread) it is ok to put the eth_params in the UE_mac_inst.
// Later I think we have to change that to attribute eth_params to a global element for all the UEs.
else if (strcmp(*(L1_ParamList.paramarray[j][L1_TRANSPORT_N_PREFERENCE_IDX].strptr), "nfapi") == 0) {
stub_eth_params.local_if_name = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr));
stub_eth_params.my_addr = strdup(*(L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr));
stub_eth_params.remote_addr = strdup(*(L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr));
stub_eth_params.my_portc = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr);
stub_eth_params.remote_portc = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr);
stub_eth_params.my_portd = *(L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr);
stub_eth_params.remote_portd = *(L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr);
stub_eth_params.transp_preference = ETH_UDP_MODE;
sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2
//configure_nfapi_pnf(UE_mac_inst[0].eth_params_n.remote_addr, UE_mac_inst[0].eth_params_n.remote_portc, UE_mac_inst[0].eth_params_n.my_addr, UE_mac_inst[0].eth_params_n.my_portd, UE_mac_inst[0].eth_params_n.remote_portd);
configure_nfapi_pnf(stub_eth_params.remote_addr, stub_eth_params.remote_portc, stub_eth_params.my_addr, stub_eth_params.my_portd, stub_eth_params.remote_portd);
}
else { // other midhaul
}
}
}
else {
}
}*/
=======
>>>>>>> main/develop
void RCconfig_L1(void) {
int i,j;
paramdef_t L1_Params[] = L1PARAMS_DESC;
......@@ -349,12 +242,8 @@ void RCconfig_L1(void) {
RC.nb_L1_CC = malloc((1+RC.nb_L1_inst)*sizeof(int));
}
<<<<<<< HEAD
config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL);
=======
config_getlist( &L1_ParamList,L1_Params,sizeof(L1_Params)/sizeof(paramdef_t), NULL);
>>>>>>> main/develop
if (L1_ParamList.numelt > 0) {
for (j = 0; j < RC.nb_L1_inst; j++) {
RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr);
......@@ -400,12 +289,6 @@ void RCconfig_L1(void) {
RC.eNB[j][0]->eth_params_n .remote_portd);
} else { // other midhaul
}
<<<<<<< HEAD
else { // other midhaul
//printf("Panos-D: RCconfig_L1 12 \n");
}
=======
>>>>>>> main/develop
}// j=0..num_inst
LOG_I(ENB_APP,"Initializing northbound interface for L1\n");
......@@ -580,21 +463,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
int32_t ue_TimersAndConstants_n310 = 0;
int32_t ue_TimersAndConstants_n311 = 0;
int32_t ue_TransmissionMode = 0;
<<<<<<< HEAD
//TTN - for D2D
//SIB18
const char* rxPool_sc_CP_Len = NULL;
const char* rxPool_sc_Period = NULL;
const char* rxPool_data_CP_Len = NULL;
libconfig_int rxPool_ResourceConfig_prb_Num = 0;
libconfig_int rxPool_ResourceConfig_prb_Start = 0;
libconfig_int rxPool_ResourceConfig_prb_End = 0;
const char* rxPool_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int rxPool_ResourceConfig_offsetIndicator_choice = 0;
const char* rxPool_ResourceConfig_subframeBitmap_present = NULL;
const char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
=======
int32_t ue_multiple_max = 0;
//TTN - for D2D
//SIB18
......@@ -608,44 +477,10 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
libconfig_int rxPool_ResourceConfig_offsetIndicator_choice = 0;
const char *rxPool_ResourceConfig_subframeBitmap_present = NULL;
char *rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
>>>>>>> main/develop
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
//SIB19
//For discRxPool
<<<<<<< HEAD
const char* discRxPool_cp_Len = NULL;
const char* discRxPool_discPeriod = NULL;
libconfig_int discRxPool_numRetx = 0;
libconfig_int discRxPool_numRepetition = 0;
libconfig_int discRxPool_ResourceConfig_prb_Num = 0;
libconfig_int discRxPool_ResourceConfig_prb_Start = 0;
libconfig_int discRxPool_ResourceConfig_prb_End = 0;
const char* discRxPool_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice = 0;
const char* discRxPool_ResourceConfig_subframeBitmap_present = NULL;
const char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
//For discRxPoolPS
const char* discRxPoolPS_cp_Len = NULL;
const char* discRxPoolPS_discPeriod = NULL;
libconfig_int discRxPoolPS_numRetx = 0;
libconfig_int discRxPoolPS_numRepetition = 0;
libconfig_int discRxPoolPS_ResourceConfig_prb_Num = 0;
libconfig_int discRxPoolPS_ResourceConfig_prb_Start = 0;
libconfig_int discRxPoolPS_ResourceConfig_prb_End = 0;
const char* discRxPoolPS_ResourceConfig_offsetIndicator_present = NULL;
libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice = 0;
const char* discRxPoolPS_ResourceConfig_subframeBitmap_present = NULL;
const char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
=======
const char *discRxPool_cp_Len = NULL;
const char *discRxPool_discPeriod = NULL;
libconfig_int discRxPool_numRetx = 0;
......@@ -673,7 +508,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
char *discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf = NULL;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size = 0;
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
>>>>>>> main/develop
int32_t srb1_timer_poll_retransmit = 0;
int32_t srb1_timer_reordering = 0;
int32_t srb1_timer_status_prohibit = 0;
......@@ -687,6 +522,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
paramdef_t ENBParams[] = ENBPARAMS_DESC;
paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0};
checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK;
paramdef_t CCsParams[] = CCPARAMS_DESC;
paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS,NULL,0};
paramdef_t SRB1Params[] = SRB1PARAMS_DESC;
......@@ -777,285 +613,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
RRC_CONFIGURATION_REQ(msg_p).mnc[l]);
}
<<<<<<< HEAD
}
else if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "cudu") == 0) {
rrc->eth_params_s.local_if_name = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_IF_NAME_IDX].strptr));
rrc->eth_params_s.my_addr = strdup(*(ENBParamList.paramarray[i][ENB_LOCAL_S_ADDRESS_IDX].strptr));
rrc->eth_params_s.remote_addr = strdup(*(ENBParamList.paramarray[i][ENB_REMOTE_S_ADDRESS_IDX].strptr));
rrc->eth_params_s.my_portc = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTC_IDX].uptr);
rrc->eth_params_s.remote_portc = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTC_IDX].uptr);
rrc->eth_params_s.my_portd = *(ENBParamList.paramarray[i][ENB_LOCAL_S_PORTD_IDX].uptr);
rrc->eth_params_s.remote_portd = *(ENBParamList.paramarray[i][ENB_REMOTE_S_PORTD_IDX].uptr);
rrc->eth_params_s.transp_preference = ETH_UDP_MODE;
}
else { // other midhaul
}
// search if in active list
for (k=0; k <num_enbs ; k++) {
if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[k], *(ENBParamList.paramarray[i][ENB_ENB_NAME_IDX].strptr) )== 0) {
char enbpath[MAX_OPTNAME_SIZE + 8];
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_id;
/*
if (strcmp(*(ENBParamList.paramarray[i][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_MACRO_ENB;
} else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) {
enb_properties_loc.properties[enb_properties_loc_index]->cell_type = CELL_HOME_ENB;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
lib_config_file_name_pP, i, cell_type);
}
enb_properties_loc.properties[enb_properties_loc_index]->eNB_name = strdup(enb_name);
*/
RRC_CONFIGURATION_REQ (msg_p).tac = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].strptr) );
RRC_CONFIGURATION_REQ (msg_p).mcc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX].strptr) );
RRC_CONFIGURATION_REQ (msg_p).mnc = (uint16_t)atoi( *(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr) );
RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length = strlen(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr));
AssertFatal((RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 2) ||
(RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length == 3),
"BAD MNC DIGIT LENGTH %d",
RRC_CONFIGURATION_REQ (msg_p).mnc_digit_length);
// Parse optional physical parameters
sprintf(enbpath,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k),
config_getlist( &CCsParamList,NULL,0,enbpath);
LOG_I(RRC,"num component carriers %d \n", num_component_carriers);
if ( CCsParamList.numelt> 0) {
char ccspath[MAX_OPTNAME_SIZE*2 + 16];
//enb_properties_loc.properties[enb_properties_loc_index]->nb_cc = num_component_carriers;
for (j = 0; j < CCsParamList.numelt ;j++) {
sprintf(ccspath,"%s.%s.[%i]",enbpath,ENB_CONFIG_STRING_COMPONENT_CARRIERS,j);
LOG_I(RRC, "enb_config::RCconfig_RRC() parameter number: %d, total number of parameters: %d, ccspath: %s \n \n", j, sizeof(CCsParams)/sizeof(paramdef_t), ccspath);
config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath);
//printf("Component carrier %d\n",component_carrier);
nb_cc++;
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config;
AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!",
RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6);
RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s;
AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!",
RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8);
if (!prefix_type)
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE);
else if (strcmp(prefix_type, "NORMAL") == 0) {
RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL;
} else if (strcmp(prefix_type, "EXTENDED") == 0) {
RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
RC.config_file_name, i, prefix_type);
}
#ifdef Rel14
if (!pbch_repetition)
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PBCH_REPETITION);
else if (strcmp(pbch_repetition, "TRUE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 1;
} else if (strcmp(pbch_repetition, "FALSE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 0;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n",
RC.config_file_name, i, pbch_repetition);
}
#endif
RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band;
RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency;
RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset;
RRC_CONFIGURATION_REQ (msg_p).Nid_cell[j]= Nid_cell;
if (Nid_cell>503) {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n",
RC.config_file_name, i, Nid_cell);
}
RRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL;
if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n",
RC.config_file_name, i, N_RB_DL);
}
if (strcmp(frame_type, "FDD") == 0) {
RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD;
} else if (strcmp(frame_type, "TDD") == 0) {
RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = TDD;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
RC.config_file_name, i, frame_type);
}
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = tdd_config;
AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!",
RC.config_file_name, i, tdd_config, TDD_Config__subframeAssignment_sa6);
RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = tdd_config_s;
AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!",
RC.config_file_name, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8);
if (!prefix_type)
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE);
else if (strcmp(prefix_type, "NORMAL") == 0) {
RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL;
} else if (strcmp(prefix_type, "EXTENDED") == 0) {
RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
RC.config_file_name, i, prefix_type);
}
RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band;
// printf( "\teutra band:\t%d\n",RRC_CONFIGURATION_REQ (msg_p).eutra_band);
RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) downlink_frequency;
//printf( "\tdownlink freq:\t%u\n",RRC_CONFIGURATION_REQ (msg_p).downlink_frequency);
RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset;
if (config_check_band_frequencies(j,
RRC_CONFIGURATION_REQ (msg_p).eutra_band[j],
RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j],
RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j],
RRC_CONFIGURATION_REQ (msg_p).frame_type[j])) {
AssertFatal(0, "error calling enb_check_band_frequencies\n");
}
if ((nb_antenna_ports <1) || (nb_antenna_ports > 2))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n",
RC.config_file_name, i, nb_antenna_ports);
RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports;
RRC_CONFIGURATION_REQ (msg_p).prach_root[j] = prach_root;
if ((prach_root <0) || (prach_root > 1023))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n",
RC.config_file_name, i, prach_root);
RRC_CONFIGURATION_REQ (msg_p).prach_config_index[j] = prach_config_index;
if ((prach_config_index <0) || (prach_config_index > 63))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n",
RC.config_file_name, i, prach_config_index);
if (!prach_high_speed)
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
else if (strcmp(prach_high_speed, "ENABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = TRUE;
} else if (strcmp(prach_high_speed, "DISABLE") == 0) {
RRC_CONFIGURATION_REQ (msg_p).prach_high_speed[j] = FALSE;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
RC.config_file_name, i, prach_high_speed);
RRC_CONFIGURATION_REQ (msg_p).prach_zero_correlation[j] =prach_zero_correlation;
if ((prach_zero_correlation <0) || (prach_zero_correlation > 15))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
RC.config_file_name, i, prach_zero_correlation);
RRC_CONFIGURATION_REQ (msg_p).prach_freq_offset[j] = prach_freq_offset;
if ((prach_freq_offset <0) || (prach_freq_offset > 94))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
RC.config_file_name, i, prach_freq_offset);
RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[j] = pucch_delta_shift-1;
if ((pucch_delta_shift <1) || (pucch_delta_shift > 3))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n",
RC.config_file_name, i, pucch_delta_shift);
RRC_CONFIGURATION_REQ (msg_p).pucch_nRB_CQI[j] = pucch_nRB_CQI;
if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n",
RC.config_file_name, i, pucch_nRB_CQI);
RRC_CONFIGURATION_REQ (msg_p).pucch_nCS_AN[j] = pucch_nCS_AN;
if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
RC.config_file_name, i, pucch_nCS_AN);
#if !defined(Rel10) && !defined(Rel14)
RRC_CONFIGURATION_REQ (msg_p).pucch_n1_AN[j] = pucch_n1_AN;
if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
RC.config_file_name, i, pucch_n1_AN);
=======
// Parse optional physical parameters
config_getlist( &CCsParamList,NULL,0,enbpath);
LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt);
......@@ -1107,7 +664,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n",
RC.config_file_name, i, pbch_repetition);
}
>>>>>>> main/develop
#endif
RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = eutra_band;
......@@ -1714,751 +1270,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
break;
#endif
<<<<<<< HEAD
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n",
RC.config_file_name, i, rach_preambleTransMax);
break;
}
RRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize[j] = (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2;
if ((rach_raResponseWindowSize<0)||(rach_raResponseWindowSize==9)||(rach_raResponseWindowSize>10))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n",
RC.config_file_name, i, rach_preambleTransMax);
RRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer[j] = (rach_macContentionResolutionTimer/8)-1;
if ((rach_macContentionResolutionTimer<8) || (rach_macContentionResolutionTimer>64) || ((rach_macContentionResolutionTimer&7)!=0))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n",
RC.config_file_name, i, rach_preambleTransMax);
RRC_CONFIGURATION_REQ (msg_p).rach_maxHARQ_Msg3Tx[j] = rach_maxHARQ_Msg3Tx;
if ((rach_maxHARQ_Msg3Tx<0) || (rach_maxHARQ_Msg3Tx>8))
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n",
RC.config_file_name, i, rach_preambleTransMax);
switch (pcch_defaultPagingCycle) {
case 32:
RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf32;
break;
case 64:
RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf64;
break;
case 128:
RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf128;
break;
case 256:
RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf256;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n",
RC.config_file_name, i, pcch_defaultPagingCycle);
break;
}
if (strcmp(pcch_nB, "fourT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_fourT;
} else if (strcmp(pcch_nB, "twoT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_twoT;
} else if (strcmp(pcch_nB, "oneT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneT;
} else if (strcmp(pcch_nB, "halfT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_halfT;
} else if (strcmp(pcch_nB, "quarterT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_quarterT;
} else if (strcmp(pcch_nB, "oneEighthT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneEighthT;
} else if (strcmp(pcch_nB, "oneSixteenthT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneSixteenthT;
} else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) {
RRC_CONFIGURATION_REQ (msg_p).pcch_nB[j] = PCCH_Config__nB_oneThirtySecondT;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
RC.config_file_name, i, pcch_defaultPagingCycle);
switch (bcch_modificationPeriodCoeff) {
case 2:
RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n2;
break;
case 4:
RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n4;
break;
case 8:
RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n8;
break;
case 16:
RRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff[j] = BCCH_Config__modificationPeriodCoeff_n16;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16",
RC.config_file_name, i, bcch_modificationPeriodCoeff);
break;
}
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = ue_TimersAndConstants_t300;
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = ue_TimersAndConstants_t301;
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = ue_TimersAndConstants_t310;
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = ue_TimersAndConstants_t311;
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = ue_TimersAndConstants_n310;
RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = ue_TimersAndConstants_n311;
switch (ue_TransmissionMode) {
case 1:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm1;
break;
case 2:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm2;
break;
case 3:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm3;
break;
case 4:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm4;
break;
case 5:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm5;
break;
case 6:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm6;
break;
case 7:
RRC_CONFIGURATION_REQ (msg_p).ue_TransmissionMode[j] = AntennaInfoDedicated__transmissionMode_tm7;
break;
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7",
RC.config_file_name, i, ue_TransmissionMode);
break;
}
//TTN - for D2D
//SIB18
if (strcmp(rxPool_sc_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(rxPool_sc_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_CP_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_CP_Len choice: normal,extended!\n",
RC.config_file_name, i, rxPool_sc_CP_Len);
if (strcmp(rxPool_sc_Period,"sf40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf40;
} else if (strcmp(rxPool_sc_Period,"sf60")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf60;
} else if (strcmp(rxPool_sc_Period,"sf70")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf70;
} else if (strcmp(rxPool_sc_Period,"sf80")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf80;
} else if (strcmp(rxPool_sc_Period,"sf120")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf120;
} else if (strcmp(rxPool_sc_Period,"sf140")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf140;
} else if (strcmp(rxPool_sc_Period,"sf160")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf160;
} else if (strcmp(rxPool_sc_Period,"sf240")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf240;
} else if (strcmp(rxPool_sc_Period,"sf280")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf280;
} else if (strcmp(rxPool_sc_Period,"sf320")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_sf320;
} else if (strcmp(rxPool_sc_Period,"spare6")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare6;
} else if (strcmp(rxPool_sc_Period,"spare5")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare5;
} else if (strcmp(rxPool_sc_Period,"spare4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare4;
} else if (strcmp(rxPool_sc_Period,"spare3")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare3;
} else if (strcmp(rxPool_sc_Period,"spare2")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare2;
} else if (strcmp(rxPool_sc_Period,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_sc_Period[j] = SL_PeriodComm_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_sc_Period choice: sf40,sf60,sf70,sf80,sf120,sf140,sf160,sf240,sf280,sf320,spare6,spare5,spare4,spare3,spare2,spare!\n",
RC.config_file_name, i, rxPool_sc_Period);
if (strcmp(rxPool_data_CP_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(rxPool_data_CP_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_data_CP_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_data_CP_Len choice: normal,extended!\n",
RC.config_file_name, i, rxPool_data_CP_Len);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Num[j] = rxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_Start[j] = rxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_prb_End[j] = rxPool_ResourceConfig_prb_End;
if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(rxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, rxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_offsetIndicator_choice[j] = rxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(rxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, rxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19 - for discRxPool
if (strcmp(discRxPool_cp_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(discRxPool_cp_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_cp_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_cp_Len choice: normal,extended!\n",
RC.config_file_name, i, discRxPool_cp_Len);
if (strcmp(discRxPool_discPeriod,"rf32")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32;
} else if (strcmp(discRxPool_discPeriod,"rf64")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64;
} else if (strcmp(discRxPool_discPeriod,"rf128")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128;
} else if (strcmp(discRxPool_discPeriod,"rf256")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256;
} else if (strcmp(discRxPool_discPeriod,"rf512")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512;
} else if (strcmp(discRxPool_discPeriod,"rf1024")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
} else if (strcmp(discRxPool_discPeriod,"rf16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
} else if (strcmp(discRxPool_discPeriod,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
RC.config_file_name, i, discRxPool_discPeriod);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRetx[j] = discRxPool_numRetx;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_numRepetition[j] = discRxPool_numRepetition;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Num[j] = discRxPool_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_Start[j] = discRxPool_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_prb_End[j] = discRxPool_ResourceConfig_prb_End;
if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(discRxPool_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, discRxPool_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_offsetIndicator_choice[j] = discRxPool_ResourceConfig_offsetIndicator_choice;
if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(discRxPool_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPool_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, discRxPool_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
//SIB19 - For discRxPoolPS
if (strcmp(discRxPoolPS_cp_Len,"normal")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_normal;
} else if (strcmp(discRxPoolPS_cp_Len,"extended")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_cp_Len[j] = SL_CP_Len_r12_extended;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_cp_Len choice: normal,extended!\n",
RC.config_file_name, i, discRxPoolPS_cp_Len);
if (strcmp(discRxPoolPS_discPeriod,"rf32")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf32;
} else if (strcmp(discRxPoolPS_discPeriod,"rf64")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf64;
} else if (strcmp(discRxPoolPS_discPeriod,"rf128")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf128;
} else if (strcmp(discRxPoolPS_discPeriod,"rf256")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf256;
} else if (strcmp(discRxPoolPS_discPeriod,"rf512")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf512;
} else if (strcmp(discRxPoolPS_discPeriod,"rf1024")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf1024;
} else if (strcmp(discRxPoolPS_discPeriod,"rf16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_rf16_v1310;
} else if (strcmp(discRxPoolPS_discPeriod,"spare")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_discPeriod[j] = SL_DiscResourcePool_r12__discPeriod_r12_spare;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_discPeriod choice: rf32,rf64,rf128,rf512,rf1024,rf16,spare!\n",
RC.config_file_name, i, discRxPoolPS_discPeriod);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRetx[j] = discRxPoolPS_numRetx;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_numRepetition[j] = discRxPoolPS_numRepetition;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Num[j] = discRxPoolPS_ResourceConfig_prb_Num;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_Start[j] = discRxPoolPS_ResourceConfig_prb_Start;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_prb_End[j] = discRxPoolPS_ResourceConfig_prb_End;
if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_NOTHING;
} else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prSmall")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_small_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_offsetIndicator_present,"prLarge")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_present[j] = SL_OffsetIndicator_r12_PR_large_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_offsetIndicator_present choice: prNothing,prSmal,prLarge!\n",
RC.config_file_name, i, discRxPoolPS_ResourceConfig_offsetIndicator_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_offsetIndicator_choice[j] = discRxPoolPS_ResourceConfig_offsetIndicator_choice;
if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prNothing")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_NOTHING;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs4")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs4_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs8")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs8_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs12")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs12_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs16")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs16_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs30")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs30_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs40")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs40_r12;
} else if (strcmp(discRxPoolPS_ResourceConfig_subframeBitmap_present,"prBs42")==0) {
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_present[j] = SubframeBitmapSL_r12_PR_bs42_r12;
} else
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for discRxPoolPS_ResourceConfig_subframeBitmap_present choice: prNothing,prBs4,prBs8,prBs12,prBs16,prBs30,prBs40,prBs42!\n",
RC.config_file_name, i, discRxPoolPS_ResourceConfig_subframeBitmap_present);
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
RRC_CONFIGURATION_REQ (msg_p).discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused[j] = discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
}
}
char srb1path[MAX_OPTNAME_SIZE*2 + 8];
sprintf(srb1path,"%s.%s",enbpath,ENB_CONFIG_STRING_SRB1);
int npar = config_get( SRB1Params,sizeof(SRB1Params)/sizeof(paramdef_t), srb1path);
if (npar == sizeof(SRB1Params)/sizeof(paramdef_t)) {
switch (srb1_max_retx_threshold) {
case 1:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t1;
break;
case 2:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t2;
break;
case 3:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t3;
break;
case 4:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t4;
break;
case 6:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t6;
break;
case 8:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8;
break;
case 16:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t16;
break;
case 32:
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t32;
break;
default:
AssertFatal (0,
"Bad config value when parsing eNB configuration file %s, enb %d srb1_max_retx_threshold %u!\n",
RC.config_file_name, i, srb1_max_retx_threshold);
}
switch (srb1_poll_pdu) {
case 4:
rrc->srb1_poll_pdu = PollPDU_p4;
break;
case 8:
rrc->srb1_poll_pdu = PollPDU_p8;
break;
case 16:
rrc->srb1_poll_pdu = PollPDU_p16;
break;
case 32:
rrc->srb1_poll_pdu = PollPDU_p32;
break;
case 64:
rrc->srb1_poll_pdu = PollPDU_p64;
break;
case 128:
rrc->srb1_poll_pdu = PollPDU_p128;
break;
case 256:
rrc->srb1_poll_pdu = PollPDU_p256;
break;
default:
if (srb1_poll_pdu >= 10000)
rrc->srb1_poll_pdu = PollPDU_pInfinity;
else
AssertFatal (0,
"Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_pdu %u!\n",
RC.config_file_name, i, srb1_poll_pdu);
}
rrc->srb1_poll_byte = srb1_poll_byte;
switch (srb1_poll_byte) {
case 25:
rrc->srb1_poll_byte = PollByte_kB25;
break;
case 50:
rrc->srb1_poll_byte = PollByte_kB50;
break;
case 75:
rrc->srb1_poll_byte = PollByte_kB75;
break;
case 100:
rrc->srb1_poll_byte = PollByte_kB100;
break;
case 125:
rrc->srb1_poll_byte = PollByte_kB125;
break;
case 250:
rrc->srb1_poll_byte = PollByte_kB250;
break;
case 375:
rrc->srb1_poll_byte = PollByte_kB375;
break;
case 500:
rrc->srb1_poll_byte = PollByte_kB500;
break;
case 750:
rrc->srb1_poll_byte = PollByte_kB750;
break;
case 1000:
rrc->srb1_poll_byte = PollByte_kB1000;
break;
case 1250:
rrc->srb1_poll_byte = PollByte_kB1250;
break;
case 1500:
rrc->srb1_poll_byte = PollByte_kB1500;
break;
case 2000:
rrc->srb1_poll_byte = PollByte_kB2000;
break;
case 3000:
rrc->srb1_poll_byte = PollByte_kB3000;
break;
default:
if (srb1_poll_byte >= 10000)
rrc->srb1_poll_byte = PollByte_kBinfinity;
else
AssertFatal (0,
"Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_byte %u!\n",
RC.config_file_name, i, srb1_poll_byte);
}
if (srb1_timer_poll_retransmit <= 250) {
rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 5)/5;
} else if (srb1_timer_poll_retransmit <= 500) {
rrc->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 300)/50 + 50;
} else {
AssertFatal (0,
"Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_poll_retransmit %u!\n",
RC.config_file_name, i, srb1_timer_poll_retransmit);
}
if (srb1_timer_status_prohibit <= 250) {
rrc->srb1_timer_status_prohibit = srb1_timer_status_prohibit/5;
} else if ((srb1_timer_poll_retransmit >= 300) && (srb1_timer_poll_retransmit <= 500)) {
rrc->srb1_timer_status_prohibit = (srb1_timer_status_prohibit - 300)/50 + 51;
} else {
AssertFatal (0,
"Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_status_prohibit %u!\n",
RC.config_file_name, i, srb1_timer_status_prohibit);
}
switch (srb1_timer_reordering) {
case 0:
rrc->srb1_timer_reordering = T_Reordering_ms0;
break;
case 5:
rrc->srb1_timer_reordering = T_Reordering_ms5;
break;
case 10:
rrc->srb1_timer_reordering = T_Reordering_ms10;
break;
case 15:
rrc->srb1_timer_reordering = T_Reordering_ms15;
break;
case 20:
rrc->srb1_timer_reordering = T_Reordering_ms20;
break;
case 25:
rrc->srb1_timer_reordering = T_Reordering_ms25;
break;
case 30:
rrc->srb1_timer_reordering = T_Reordering_ms30;
break;
case 35:
rrc->srb1_timer_reordering = T_Reordering_ms35;
break;
case 40:
rrc->srb1_timer_reordering = T_Reordering_ms40;
break;
case 45:
rrc->srb1_timer_reordering = T_Reordering_ms45;
break;
case 50:
rrc->srb1_timer_reordering = T_Reordering_ms50;
break;
case 55:
rrc->srb1_timer_reordering = T_Reordering_ms55;
break;
case 60:
rrc->srb1_timer_reordering = T_Reordering_ms60;
break;
case 65:
rrc->srb1_timer_reordering = T_Reordering_ms65;
break;
case 70:
rrc->srb1_timer_reordering = T_Reordering_ms70;
break;
case 75:
rrc->srb1_timer_reordering = T_Reordering_ms75;
break;
case 80:
rrc->srb1_timer_reordering = T_Reordering_ms80;
break;
case 85:
rrc->srb1_timer_reordering = T_Reordering_ms85;
break;
case 90:
rrc->srb1_timer_reordering = T_Reordering_ms90;
break;
case 95:
rrc->srb1_timer_reordering = T_Reordering_ms95;
break;
case 100:
rrc->srb1_timer_reordering = T_Reordering_ms100;
break;
case 110:
rrc->srb1_timer_reordering = T_Reordering_ms110;
break;
case 120:
rrc->srb1_timer_reordering = T_Reordering_ms120;
break;
case 130:
rrc->srb1_timer_reordering = T_Reordering_ms130;
break;
case 140:
rrc->srb1_timer_reordering = T_Reordering_ms140;
break;
case 150:
rrc->srb1_timer_reordering = T_Reordering_ms150;
break;
case 160:
rrc->srb1_timer_reordering = T_Reordering_ms160;
break;
case 170:
rrc->srb1_timer_reordering = T_Reordering_ms170;
break;
case 180:
rrc->srb1_timer_reordering = T_Reordering_ms180;
break;
case 190:
rrc->srb1_timer_reordering = T_Reordering_ms190;
break;
case 200:
rrc->srb1_timer_reordering = T_Reordering_ms200;
break;
default:
AssertFatal (0,
"Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_reordering %u!\n",
RC.config_file_name, i, srb1_timer_reordering);
}
} else {
rrc->srb1_timer_poll_retransmit = T_PollRetransmit_ms80;
rrc->srb1_timer_reordering = T_Reordering_ms35;
rrc->srb1_timer_status_prohibit = T_StatusProhibit_ms0;
rrc->srb1_poll_pdu = PollPDU_p4;
rrc->srb1_poll_byte = PollByte_kBinfinity;
rrc->srb1_max_retx_threshold = UL_AM_RLC__maxRetxThreshold_t8;
}
/*
// Network Controller
subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG);
if (subsetting != NULL) {
if ( (
config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME,
(const char **)&flexran_agent_interface_name)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS,
(const char **)&flexran_agent_ipv4_address)
&& config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT,
&flexran_agent_port)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE,
(const char **)&flexran_agent_cache)
)
) {
enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name);
cidr = flexran_agent_ipv4_address;
address = strtok(cidr, "/");
//enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address = strdup(address);
if (address) {
IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" );
}
enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_port = flexran_agent_port;
enb_properties_loc.properties[enb_properties_loc_index]->flexran_agent_cache = strdup(flexran_agent_cache);
}
}
*/
break;
}
=======
default:
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n",
......@@ -3195,7 +2006,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
break;
}
>>>>>>> main/develop
}
}
......
......@@ -346,10 +346,7 @@ typedef enum {
#define ENB_CONFIG_STRING_UETIMERS_N310 "ue_TimersAndConstants_n310"
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
<<<<<<< HEAD
=======
#define ENB_CONFIG_STRING_UE_MULTIPLE_MAX "ue_multiple_max"
>>>>>>> main/develop
//TTN - for D2D
//SIB18
......@@ -394,11 +391,7 @@ typedef enum {
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_BUF "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_buf"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_size"
#define ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED "DISCRXPOOLPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused"
<<<<<<< HEAD
=======
>>>>>>> main/develop
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* component carriers configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
......@@ -588,10 +581,7 @@ typedef enum {
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
<<<<<<< HEAD
=======
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
>>>>>>> main/develop
{ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN, NULL, 0, strptr:(char **)&rxPool_sc_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_SC_PRIOD, NULL, 0, strptr:(char **)&rxPool_sc_Period, defstrval:"sf40", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN, NULL, 0, strptr:(char **)&rxPool_data_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \
......
......@@ -157,17 +157,10 @@ rlc_buffer_occupancy_t flexran_get_tx_queue_size(mid_t mod_id, mid_t ue_id, logi
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
<<<<<<< HEAD
#ifdef Rel14
,0,0
#endif
);
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
>>>>>>> main/develop
return rlc_status.bytes_in_buffer;
}
......@@ -177,17 +170,10 @@ rlc_buffer_occupancy_t flexran_get_num_pdus_buffer(mid_t mod_id, mid_t ue_id, lo
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id,rnti, mod_id, frame, subframe, ENB_FLAG_YES,MBMS_FLAG_NO, channel_id, 0
<<<<<<< HEAD
#ifdef Rel14
,0,0
#endif
);
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
>>>>>>> main/develop
return rlc_status.pdus_in_buffer;
}
......@@ -197,17 +183,11 @@ frame_t flexran_get_hol_delay(mid_t mod_id, mid_t ue_id, logical_chan_id_t chann
frame_t frame = flexran_get_current_frame(mod_id);
sub_frame_t subframe = flexran_get_current_subframe(mod_id);
mac_rlc_status_resp_t rlc_status = mac_rlc_status_ind(mod_id, rnti, mod_id, frame, subframe, ENB_FLAG_YES, MBMS_FLAG_NO, channel_id, 0
<<<<<<< HEAD
#ifdef Rel14
,0,0
#endif
);
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
>>>>>>> main/develop
return rlc_status.head_sdu_creation_time;
}
......
......@@ -516,12 +516,7 @@ config_sib2(int Mod_idP,
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
<<<<<<< HEAD
PRACH_ParametersCE_r13_t *p;
=======
LTE_PRACH_ParametersCE_r13_t *p;
>>>>>>> main/develop
cfg->emtc_config.prach_ce_level_0_enable.value = 0;
cfg->emtc_config.prach_ce_level_0_enable.tl.tag=NFAPI_EMTC_CONFIG_PRACH_CE_LEVEL_0_ENABLE_TAG;
cfg->num_tlv++;
......@@ -1031,8 +1026,6 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
}
#endif
<<<<<<< HEAD
=======
LOG_D(MAC, "%s() %s:%d RC.mac[Mod_idP]->if_inst->PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.mac[Mod_idP]->if_inst->PHY_config_req);
......@@ -1047,7 +1040,6 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
printf("Waiting for PHY_config_req\n");
}
}
>>>>>>> main/develop
LOG_E(MAC, "%s() %s:%d RC.mac[Mod_idP]->if_inst->PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.mac[Mod_idP]->if_inst->PHY_config_req);
......@@ -1062,7 +1054,6 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
usleep(100 * 1000);
printf("Waiting for PHY_config_req\n");
}
<<<<<<< HEAD
}
if (radioResourceConfigCommon != NULL) {
......@@ -1078,11 +1069,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
}
return(0);
=======
RC.mac[Mod_idP]->scheduler_mode = global_scheduler_mode;
return(0);
>>>>>>> main/develop
}
......@@ -140,22 +140,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
#ifdef CBA
, uint8_t num_active_cba_groups, uint16_t cba_rnti
#endif
<<<<<<< HEAD
#if defined(Rel14)
,config_action_t config_action,
const uint32_t * const sourceL2Id,
const uint32_t * const destinationL2Id,
const uint32_t * const groupL2Id,
SL_Preconfiguration_r12_t *SL_Preconfiguration_r12,
uint32_t directFrameNumber_r12,
long directSubframeNumber_r12,
long *sl_Bandwidth_r12
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
>>>>>>> main/develop
,const uint32_t * const destinationL2Id,
const uint32_t * const groupL2Id,
SL_Preconfiguration_r12_t *SL_Preconfiguration_r12,
uint32_t directFrameNumber_r12,
long directSubframeNumber_r12,
long *sl_Bandwidth_r12
#endif
)
{
......@@ -251,15 +244,9 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
}
if(nfapi_mode!=3)
<<<<<<< HEAD
phy_config_harq_ue(Mod_idP, 0, eNB_index,
UE_mac_inst[Mod_idP].
scheduling_info.maxHARQ_Tx);
=======
phy_config_harq_ue(Mod_idP, 0, eNB_index,
UE_mac_inst[Mod_idP].
scheduling_info.maxHARQ_Tx);
>>>>>>> main/develop
if (mac_MainConfig->ul_SCH_Config->retxBSR_Timer) {
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
......@@ -377,15 +364,9 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
if (physicalConfigDedicated != NULL) {
<<<<<<< HEAD
if(nfapi_mode!=3)
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
physicalConfigDedicated);
=======
if(nfapi_mode!=3)
phy_config_dedicated_ue(Mod_idP, 0, eNB_index,
physicalConfigDedicated);
>>>>>>> main/develop
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
......@@ -466,15 +447,9 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
sizeof(LTE_PUSCH_ConfigCommon_t));
if (mobilityControlInfo->radioResourceConfigCommon.phich_Config) {
<<<<<<< HEAD
// memcpy((void *)&UE_mac_inst[Mod_idP].radioResourceConfigCommon->phich_Config,
//(void *)mobilityControlInfo->radioResourceConfigCommon.phich_Config,
//sizeof(PHICH_Config_t));
=======
/* memcpy((void *)&UE_mac_inst[Mod_idP].radioResourceConfigCommon->phich_Config,
(void *)mobilityControlInfo->radioResourceConfigCommon.phich_Config,
sizeof(LTE_PHICH_Config_t)); */
>>>>>>> main/develop
}
if (mobilityControlInfo->radioResourceConfigCommon.
......
......@@ -90,64 +90,6 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
uint16_t srsPeriodicity, srsOffset;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
<<<<<<< HEAD
soundingRS_UL_ConfigCommon = &cc[CC_id].radioResourceConfigCommon->soundingRS_UL_ConfigCommon;
// check if SRS is enabled in this frame/subframe
if (soundingRS_UL_ConfigCommon) {
srs_SubframeConfig = soundingRS_UL_ConfigCommon->choice.setup.srs_SubframeConfig;
if (cc[CC_id].tdd_Config == NULL) { // FDD
deltaTSFC = deltaTSFCTabType1[srs_SubframeConfig][0];
TSFC = deltaTSFCTabType1[srs_SubframeConfig][1];
} else { // TDD
deltaTSFC = deltaTSFCTabType2[srs_SubframeConfig][0];
TSFC = deltaTSFCTabType2[srs_SubframeConfig][1];
}
// Sounding reference signal subframes are the subframes satisfying ns/2 mod TSFC (- deltaTSFC
uint16_t tmp = (subframeP % TSFC);
if ((1 << tmp) & deltaTSFC) {
// This is an SRS subframe, loop over UEs
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE)
continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated != NULL,
"physicalConfigDedicated is null for UE %d\n", UE_id);
if ((soundingRS_UL_ConfigDedicated = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->soundingRS_UL_ConfigDedicated) != NULL) {
if (soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
get_srs_pos(&cc[CC_id],soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex,&srsPeriodicity, &srsOffset);
if (((10 * frameP + subframeP) % srsPeriodicity) == srsOffset) {
// Program SRS
ul_req->srs_present = 1;
nfapi_ul_config_request_pdu_t * ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_SRS_PDU_TYPE;
ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_srs_pdu));
ul_config_pdu->srs_pdu.srs_pdu_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SRS_PDU_REL8_TAG;
ul_config_pdu->srs_pdu.srs_pdu_rel8.size = (uint8_t)sizeof(nfapi_ul_config_srs_pdu);
ul_config_pdu->srs_pdu.srs_pdu_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->srs_pdu.srs_pdu_rel8.srs_bandwidth = soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth;
ul_config_pdu->srs_pdu.srs_pdu_rel8.frequency_domain_position = soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition;
ul_config_pdu->srs_pdu.srs_pdu_rel8.srs_hopping_bandwidth = soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth;;
ul_config_pdu->srs_pdu.srs_pdu_rel8.transmission_comb = soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
ul_config_pdu->srs_pdu.srs_pdu_rel8.i_srs = soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
ul_config_pdu->srs_pdu.srs_pdu_rel8.sounding_reference_cyclic_shift = soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift; // ul_config_pdu->srs_pdu.srs_pdu_rel10.antenna_port = ;//
// ul_config_pdu->srs_pdu.srs_pdu_rel13.number_of_combs = ;//
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
RC.mac[module_idP]->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req->number_of_pdus++;
} // if (((10*frameP+subframeP) % srsPeriodicity) == srsOffset)
} // if (soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup)
} // if ((soundingRS_UL_ConfigDedicated = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->soundingRS_UL_ConfigDedicated)!=NULL)
} // for (UE_id ...
} // if((1<<tmp) & deltaTSFC)
} // SRS config
}
=======
soundingRS_UL_ConfigCommon = &cc[CC_id].radioResourceConfigCommon->soundingRS_UL_ConfigCommon;
// check if SRS is enabled in this frame/subframe
if (soundingRS_UL_ConfigCommon) {
......@@ -208,86 +150,11 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
} // SRS config
}
>>>>>>> main/develop
}
void
schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
{
<<<<<<< HEAD
eNB_MAC_INST *eNB = RC.mac[module_idP];
UE_list_t *UE_list = &eNB->UE_list;
COMMON_channels_t *cc;
nfapi_ul_config_request_body_t *ul_req;
int CC_id, UE_id;
struct CQI_ReportPeriodic *cqi_ReportPeriodic;
uint16_t Npd, N_OFFSET_CQI;
int H;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
cc = &eNB->common_channels[CC_id];
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (UE_list->active[UE_id] != TRUE)
continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
AssertFatal(UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated
!= NULL,
"physicalConfigDedicated is null for UE %d\n",
UE_id);
if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig) {
if ((cqi_ReportPeriodic = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic) != NULL
&& (cqi_ReportPeriodic->present != CQI_ReportPeriodic_PR_release)) {
//Rel8 Periodic CQI/PMI/RI reporting
get_csi_params(cc, cqi_ReportPeriodic, &Npd,
&N_OFFSET_CQI, &H);
if ((((frameP * 10) + subframeP) % Npd) == N_OFFSET_CQI) { // CQI opportunity
UE_list->UE_sched_ctrl[UE_id].feedback_cnt[CC_id] = (((frameP * 10) + subframeP) / Npd) % H;
// Program CQI
nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
memset((void *) ul_config_pdu, 0,
sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc,get_tmode(module_idP, CC_id, UE_id),cqi_ReportPeriodic);
ul_req->number_of_pdus++;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
#if defined(Rel10) || defined(Rel14)
// PUT rel10-13 UCI options here
#endif
} else
if ((cqi_ReportPeriodic->choice.setup.ri_ConfigIndex)
&& ((((frameP * 10) + subframeP) % ((H * Npd) << (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex / 161))) == N_OFFSET_CQI + (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex % 161))) { // RI opportunity
// Program RI
nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
memset((void *) ul_config_pdu, 0,
sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = (cc->p_eNB == 2) ? 1 : 2;
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
ul_req->number_of_pdus++;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
}
} // if ((cqi_ReportPeriodic = cqi_ReportConfig->cqi_ReportPeriodic)!=NULL) {
} // if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig)
} // for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) {
} // for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
=======
eNB_MAC_INST *eNB = RC.mac[module_idP];
UE_list_t *UE_list = &eNB->UE_list;
COMMON_channels_t *cc;
......@@ -365,7 +232,6 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
} // if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig)
} // for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) {
} // for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
>>>>>>> main/develop
}
void
......
......@@ -175,11 +175,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
module_idP, frameP, subframeP, CC_id, ra->Msg3_frame,
ra->Msg3_subframe);
<<<<<<< HEAD
LOG_I(MAC,
=======
LOG_D(MAC,
>>>>>>> main/develop
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d,%d) for rnti: %d\n",
frameP, subframeP, ra->Msg3_frame, ra->Msg3_subframe,
ra->msg3_nb_rb, ra->msg3_first_rb, ra->msg3_round, ra->rnti);
......@@ -1018,11 +1014,7 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
#endif
{
// This is normal LTE case
<<<<<<< HEAD
LOG_I(MAC, "Generate_Msg4 1 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
=======
LOG_D(MAC, "generate_Msg4 1 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
>>>>>>> main/develop
if ((ra->Msg4_frame == frameP) && (ra->Msg4_subframe == subframeP)) {
// Get RRCConnectionSetup for Piggyback
......@@ -1039,11 +1031,6 @@ generate_Msg4(module_id_t module_idP, int CC_idP, frame_t frameP,
AssertFatal(rrc_sdu_length > 0,
"[MAC][eNB Scheduler] CCCH not allocated, rrc_sdu_length: %d\n", rrc_sdu_length);
<<<<<<< HEAD
=======
>>>>>>> main/develop
LOG_D(MAC,
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RNTI %x)\n",
module_idP, CC_idP, frameP, subframeP, ra->rnti);
......@@ -1295,11 +1282,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu];
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
<<<<<<< HEAD
LOG_I(MAC,
=======
LOG_D(MAC,
>>>>>>> main/develop
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 for harq_pid %d was acknowledged (round %d), UE_id: %d \n",
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id);
......@@ -1350,11 +1333,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
ra->rnti, round, frameP, subframeP);
// DLSCH Config
//DJP - fix this pdu_index = -1
<<<<<<< HEAD
LOG_I(MAC, "Panos:D: check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n");
=======
LOG_D(MAC, "check_Msg4_retransmission() before fill_nfapi_dlsch_config() with pdu_index = -1 \n");
>>>>>>> main/develop
fill_nfapi_dlsch_config(mac, dl_req_body, ra->msg4_TBsize,
-1
/* retransmission, no pdu_index */
......
......@@ -866,21 +866,12 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
TBS - ta_len - header_length_total - sdu_length_total - 3
<<<<<<< HEAD
#ifdef Rel14
,0, 0
#endif
);
sdu_lengths[0] = 0;
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
sdu_lengths[0] = 0;
>>>>>>> main/develop
if (rlc_status.bytes_in_buffer > 0) {
LOG_D(MAC, "[eNB %d] SFN/SF %d.%d, DL-DCCH->DLSCH CC_id %d, Requesting %d bytes from RLC (RRC message)\n",
......@@ -890,21 +881,11 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH,
TBS, //not used
(char *)&dlsch_buffer[0]
<<<<<<< HEAD
#ifdef Rel14
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
>>>>>>> main/develop
,0, 0
#endif
);
<<<<<<< HEAD
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
T_INT(subframeP), T_INT(harq_pid), T_INT(DCCH),
T_INT(sdu_lengths[0]));
=======
pthread_mutex_lock(&rrc_release_freelist);
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)){
uint16_t release_total = 0;
......@@ -960,7 +941,6 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
T_INT(subframeP), T_INT(harq_pid), T_INT(DCCH),
T_INT(sdu_lengths[0]));
>>>>>>> main/develop
LOG_D(MAC, "[eNB %d][DCCH] CC_id %d Got %d bytes from RLC\n",
module_idP, CC_id, sdu_lengths[0]);
......@@ -995,17 +975,10 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
if (TBS - ta_len - header_length_total - sdu_length_total - 3 > 0) {
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
TBS - ta_len - header_length_total - sdu_length_total - 3
<<<<<<< HEAD
#ifdef Rel14
,0, 0
#endif
);
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
>>>>>>> main/develop
// DCCH SDU
sdu_lengths[num_sdus] = 0;
......@@ -1018,11 +991,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]
<<<<<<< HEAD
#ifdef Rel14
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
>>>>>>> main/develop
,0, 0
#endif
);
......@@ -1077,17 +1046,10 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
MBMS_FLAG_NO,
lcid,
TBS - ta_len - header_length_total - sdu_length_total - 3
<<<<<<< HEAD
#ifdef Rel14
,0, 0
#endif
);
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0, 0
#endif
);
>>>>>>> main/develop
......@@ -1102,11 +1064,7 @@ schedule_ue_spec(module_id_t module_idP, int slice_idxP,
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid,
TBS, //not used
(char *)&dlsch_buffer[sdu_length_total]
<<<<<<< HEAD
#ifdef Rel14
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
>>>>>>> main/develop
,0, 0
#endif
);
......
......@@ -633,11 +633,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
MTCH,
TBS - header_len_mcch - header_len_msi -
sdu_length_total - header_len_mtch
<<<<<<< HEAD
#ifdef Rel14
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
>>>>>>> main/develop
,0, 0
#endif
);
......@@ -656,22 +652,13 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP, 0, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_YES, MTCH, 0, //not used
(char *)
&mch_buffer[sdu_length_total]
<<<<<<< HEAD
#ifdef Rel14
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
>>>>>>> main/develop
,0,
0
#endif
);
<<<<<<< HEAD
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]);
=======
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(MAX_MOBILES_PER_ENB+1)), (char*)&mch_buffer[sdu_length_total]);
>>>>>>> main/develop
LOG_I(MAC,
"[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",
module_idP, CC_id, sdu_lengths[num_sdus], MTCH);
......
......@@ -602,15 +602,6 @@ rx_sdu(const module_id_t enb_mod_idP,
// prepare transmission of Msg4
ra->state = MSG4;
<<<<<<< HEAD
// Program Msg4 PDCCH+DLSCH/MPDCCH transmission 4 subframes from now, // Check if this is ok for BL/CE, or if the rule is different
ra->Msg4_frame = frameP + ((subframeP > 5) ? 1 : 0);
ra->Msg4_subframe = (subframeP + 4) % 10;
LOG_D(MAC, " Received Msg4, SFN/SF:%d.%d \n", ra->Msg4_frame, ra->Msg4_subframe);
=======
if(mac->common_channels[CC_idP].tdd_Config!=NULL){
switch(mac->common_channels[CC_idP].tdd_Config->subframeAssignment){
case 1:
......@@ -625,7 +616,6 @@ rx_sdu(const module_id_t enb_mod_idP,
ra->Msg4_frame = frameP + ((subframeP > 5) ? 1 : 0);
ra->Msg4_subframe = (subframeP + 4) % 10;
}
>>>>>>> main/develop
UE_list->UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
} // if process is active
......
......@@ -59,23 +59,15 @@
#include "LTE_MBSFN-SubframeConfigList.h"
#include "LTE_PMCH-InfoList-r9.h"
#endif
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
#ifdef Rel14
#include "SystemInformationBlockType1-v1310-IEs.h"
#include "SystemInformationBlockType18-r12.h"
#include "SL-Preconfiguration-r12.h"
#endif
#include "RadioResourceConfigCommonSIB.h"
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "LTE_SCellToAddMod-r10.h"
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#include "LTE_SystemInformationBlockType1-v1310-IEs.h"
#include "LTE_SystemInformationBlockType18-r12.h"
#include "SL-Preconfiguration-r12.h"
#endif
#include "LTE_RadioResourceConfigCommonSIB.h"
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
#include "nfapi_interface.h"
#include "PHY_INTERFACE/IF_Module.h"
......@@ -96,11 +88,7 @@
#define PCCH_PAYLOAD_SIZE_MAX 128
#define RAR_PAYLOAD_SIZE_MAX 128
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
#define SCH_PAYLOAD_SIZE_MAX 4096
=======
#define SCH_PAYLOAD_SIZE_MAX 8192
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
#define DCH_PAYLOAD_SIZE_MAX 4096
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
......@@ -338,10 +326,6 @@ typedef struct {
uint8_t Buffer_size0:6;
} __attribute__ ((__packed__)) BSR_LONG;
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
// Panos:
=======
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
/*!\brief mac control element: sidelink buffer status report */
typedef struct {
uint8_t DST_1:4;
......@@ -464,13 +448,9 @@ typedef struct {
/*!\brief LCID of Carrier component activation/deactivation */
#define CC_ACT_DEACT 27
//TTN (for D2D)
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
/*!\brief Value of MIB-SL / SRB0 logical channel */
#define MIBSLCH 8 // (fake)
#define SL_DISCOVERY 9 //LCID (fake)
=======
#define SL_DISCOVERY 8 //LCID (fake)
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
#define MAX_NUM_DEST 10
#endif
......@@ -518,20 +498,14 @@ typedef struct {
uint16_t Pdu_size;
} __attribute__ ((__packed__)) ULSCH_PDU;
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
=======
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
/*! \brief Uplink SCH PDU Structure */
typedef struct {
int8_t payload[DCH_PAYLOAD_SIZE_MAX]; /*!< \brief SACH payload */
uint16_t Pdu_size;
} __attribute__ ((__packed__)) ULDCH_PDU;
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
//Panos: Not sure if we need that here anymore
#include "PHY/impl_defs_top.h"
=======
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
/*!\brief RA process state*/
typedef enum {
......@@ -1516,248 +1490,89 @@ typedef struct {
/*!\brief Top level UE MAC structure */
typedef struct {
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
//SL source L2Id
uint32_t sourceL2Id;
//SL groupL2Id
uint32_t groupL2Id;
//SL destinationL2Id
uint32_t destinationL2Id;
//LCID
uint32_t LCID;
} SL_INFO;
typedef struct {
uint16_t Node_id;
/// RX frame counter
frame_t rxFrame;
/// RX subframe counter
sub_frame_t rxSubframe;
/// TX frame counter
frame_t txFrame;
/// TX subframe counter
sub_frame_t txSubframe;
/// C-RNTI of UE
uint16_t crnti;
/// C-RNTI of UE before HO
rnti_t crnti_before_ho; ///user id (rnti) of connected UEs
/// uplink active flag
uint8_t ul_active;
/// pointer to RRC PHY configuration
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
/// pointer to RACH_ConfigDedicated (NULL when not active, i.e. upon HO completion or T304 expiry)
struct RACH_ConfigDedicated *rach_ConfigDedicated;
/// pointer to RRC PHY configuration
struct PhysicalConfigDedicated *physicalConfigDedicated;
#if defined(Rel10) || defined(Rel14)
/// pointer to RRC PHY configuration SCEll
struct PhysicalConfigDedicatedSCell_r10
*physicalConfigDedicatedSCell_r10;
#endif
#if defined(Rel14)
/// Preconfiguration for Sidelink
struct SL_Preconfiguration_r12 *SL_Preconfiguration;
/// RX Pool for Sidelink from SIB18
SL_CommRxPoolList_r12_t commRxPool_r12;
/// TX Pool Normal for Sidelink from SIB18
struct SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
/// TX Pool Exceptional for Sidelink from SIB18
struct SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
/// Common Sync Config for Sidelink from SIB18
struct SL_SyncConfigList_r12 *commSyncConfig_r12;
/// Dedicated Sync TX control for Sidelink
struct SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
/// Dedicated Discovery TX control for Sidelink
struct SL_DiscConfig_r12 *sl_DiscConfig_r12;
/// Dedicated TX config for Sidelink
struct SL_CommConfig_r12 *sl_CommConfig_r12;
//SL sourceL2ID
uint32_t sourceL2Id;
//SL groupL2Id
uint32_t groupL2Id;
//SL destinationL2Id
uint32_t destinationL2Id;
uint8_t numCommFlows;
//list of (SLID, G, D)s
SL_INFO sl_info[MAX_NUM_LCID];
#endif
/// pointer to TDD Configuration (NULL for FDD)
TDD_Config_t *tdd_Config;
/// Number of adjacent cells to measure
uint8_t n_adj_cells;
/// Array of adjacent physical cell ids
uint32_t adj_cell_id[6];
/// Pointer to RRC MAC configuration
MAC_MainConfig_t *macConfig;
/// Pointer to RRC Measurement gap configuration
MeasGapConfig_t *measGapConfig;
/// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
/// Scheduling Information
UE_SCHEDULING_INFO scheduling_info;
/// Outgoing CCCH pdu for PHY
CCCH_PDU CCCH_pdu;
/// Outgoing RAR pdu for PHY
RAR_PDU RAR_pdu;
/// Incoming DLSCH pdu for PHY
DLSCH_PDU DLSCH_pdu[NUMBER_OF_UE_MAX][2];
#ifdef Rel14
int sltx_active;
SLSCH_t slsch;
SLDCH_t sldch;
SLSS_t slss;
ULSCH_PDU slsch_pdu;
int slsch_lcid;
uint32_t directFrameNumber_r12;
long directSubframeNumber_r12;
long sl_Bandwidth_r12;
#endif
/// number of attempt for rach
uint8_t RA_attempt_number;
/// Random-access procedure flag
uint8_t RA_active;
/// Random-access window counter
int8_t RA_window_cnt;
/// Random-access Msg3 size in bytes
uint8_t RA_Msg3_size;
/// Random-access prachMaskIndex
uint8_t RA_prachMaskIndex;
/// Flag indicating Preamble set (A,B) used for first Msg3 transmission
uint8_t RA_usedGroupA;
/// Random-access Resources
PRACH_RESOURCES_t RA_prach_resources;
/// Random-access PREAMBLE_TRANSMISSION_COUNTER
uint8_t RA_PREAMBLE_TRANSMISSION_COUNTER;
/// Random-access backoff counter
int16_t RA_backoff_cnt;
/// Random-access variable for window calculation (frame of last change in window counter)
uint32_t RA_tx_frame;
/// Random-access variable for window calculation (subframe of last change in window counter)
uint8_t RA_tx_subframe;
/// Random-access Group B maximum path-loss
/// Random-access variable for backoff (frame of last change in backoff counter)
uint32_t RA_backoff_frame;
/// Random-access variable for backoff (subframe of last change in backoff counter)
uint8_t RA_backoff_subframe;
/// Random-access Group B maximum path-loss
uint16_t RA_maxPL;
/// Random-access Contention Resolution Timer active flag
uint8_t RA_contention_resolution_timer_active;
/// Random-access Contention Resolution Timer count value
uint8_t RA_contention_resolution_cnt;
/// power headroom reporitng reconfigured
uint8_t PHR_reconfigured;
/// power headroom state as configured by the higher layers
uint8_t PHR_state;
/// power backoff due to power management (as allowed by P-MPRc) for this cell
uint8_t PHR_reporting_active;
/// power backoff due to power management (as allowed by P-MPRc) for this cell
uint8_t power_backoff_db[NUMBER_OF_eNB_MAX];
/// BSR report falg management
uint8_t BSR_reporting_active;
/// retxBSR-Timer expires flag
uint8_t retxBSRTimer_expires_flag;
/// periodBSR-Timer expires flag
uint8_t periodBSRTimer_expires_flag;
/// MBSFN_Subframe Configuration
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#if defined(Rel10) || defined(Rel14)
/// number of active MBSFN area
uint8_t num_active_mbsfn_area;
/// MBSFN Area Info
struct MBSFN_AreaInfo_r9 *mbsfn_AreaInfo[MAX_MBSFN_AREA];
/// PMCH Config
struct PMCH_Config_r9 *pmch_Config[MAX_PMCH_perMBSFN];
/// MCCH status
uint8_t mcch_status;
/// MSI status
uint8_t msi_status; // could be an array if there are >1 MCH in one MBSFN area
=======
uint16_t Node_id;
/// RX frame counter
frame_t rxFrame;
/// RX subframe counter
sub_frame_t rxSubframe;
/// TX frame counter
frame_t txFrame;
/// TX subframe counter
sub_frame_t txSubframe;
/// C-RNTI of UE
uint16_t crnti;
/// C-RNTI of UE before HO
rnti_t crnti_before_ho; ///user id (rnti) of connected UEs
/// uplink active flag
uint8_t ul_active;
/// pointer to RRC PHY configuration
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
/// pointer to RACH_ConfigDedicated (NULL when not active, i.e. upon HO completion or T304 expiry)
struct LTE_RACH_ConfigDedicated *rach_ConfigDedicated;
/// pointer to RRC PHY configuration
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/// pointer to RRC PHY configuration SCEll
struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
/// Preconfiguration for Sidelink
struct LTE_SL_Preconfiguration_r12 *SL_Preconfiguration;
/// RX Pool for Sidelink from SIB18
LTE_SL_CommRxPoolList_r12_t commRxPool_r12;
/// TX Pool Normal for Sidelink from SIB18
struct LTE_SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
/// TX Pool Exceptional for Sidelink from SIB18
struct LTE_SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
/// Common Sync Config for Sidelink from SIB18
struct LTE_SL_SyncConfigList_r12 *commSyncConfig_r12;
/// Dedicated Sync TX control for Sidelink
struct LTE_SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
/// Dedicated Discovery TX control for Sidelink
struct LTE_SL_DiscConfig_r12 *sl_DiscConfig_r12;
/// Dedicated TX config for Sidelink
struct LTE_SL_CommConfig_r12 *sl_CommConfig_r12;
//SL sourceL2ID
uint32_t sourceL2Id;
//SL groupL2Id
uint32_t groupL2Id;
//SL destinationL2Id
uint32_t destinationL2Id;
//List of destinations
uint32_t destinationList[MAX_NUM_DEST];
uint8_t numCommFlows;
uint32_t SL_LCID[MAX_NUM_LCID];
#endif
/// pointer to TDD Configuration (NULL for FDD)
LTE_TDD_Config_t *tdd_Config;
/// Number of adjacent cells to measure
uint8_t n_adj_cells;
/// Array of adjacent physical cell ids
uint32_t adj_cell_id[6];
/// Pointer to RRC MAC configuration
LTE_MAC_MainConfig_t *macConfig;
/// Pointer to RRC Measurement gap configuration
LTE_MeasGapConfig_t *measGapConfig;
/// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
LTE_LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
/// Scheduling Information
UE_SCHEDULING_INFO scheduling_info;
/// Outgoing CCCH pdu for PHY
CCCH_PDU CCCH_pdu;
/// Outgoing RAR pdu for PHY
RAR_PDU RAR_pdu;
/// Incoming DLSCH pdu for PHY
DLSCH_PDU DLSCH_pdu[MAX_MOBILES_PER_ENB][2];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int sltx_active;
SLSCH_t slsch;
SLDCH_t sldch;
ULSCH_PDU slsch_pdu;
int slsch_lcid;
#endif
uint16_t Node_id;
/// RX frame counter
frame_t rxFrame;
/// RX subframe counter
sub_frame_t rxSubframe;
/// TX frame counter
frame_t txFrame;
/// TX subframe counter
sub_frame_t txSubframe;
/// C-RNTI of UE
uint16_t crnti;
/// C-RNTI of UE before HO
rnti_t crnti_before_ho; ///user id (rnti) of connected UEs
/// uplink active flag
uint8_t ul_active;
/// pointer to RRC PHY configuration
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
/// pointer to RACH_ConfigDedicated (NULL when not active, i.e. upon HO completion or T304 expiry)
struct LTE_RACH_ConfigDedicated *rach_ConfigDedicated;
/// pointer to RRC PHY configuration
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
/// pointer to RRC PHY configuration SCEll
struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
/// Preconfiguration for Sidelink
struct LTE_SL_Preconfiguration_r12 *SL_Preconfiguration;
/// RX Pool for Sidelink from SIB18
LTE_SL_CommRxPoolList_r12_t commRxPool_r12;
/// TX Pool Normal for Sidelink from SIB18
struct LTE_SL_CommTxPoolList_r12 *commTxPoolNormalCommon_r12;
/// TX Pool Exceptional for Sidelink from SIB18
struct LTE_SL_CommTxPoolList_r12 *commTxPoolExceptional_r12;
/// Common Sync Config for Sidelink from SIB18
struct LTE_SL_SyncConfigList_r12 *commSyncConfig_r12;
/// Dedicated Sync TX control for Sidelink
struct LTE_SL_SyncTxControl_r12 *sl_SyncTxControl_r12;
/// Dedicated Discovery TX control for Sidelink
struct LTE_SL_DiscConfig_r12 *sl_DiscConfig_r12;
/// Dedicated TX config for Sidelink
struct LTE_SL_CommConfig_r12 *sl_CommConfig_r12;
//SL sourceL2ID
uint32_t sourceL2Id;
//SL groupL2Id
uint32_t groupL2Id;
//SL destinationL2Id
uint32_t destinationL2Id;
//List of destinations
uint32_t destinationList[MAX_NUM_DEST];
uint8_t numCommFlows;
//list of (SLID, G, D)s
SL_INFO sl_info[MAX_NUM_LCID];
#endif
/// pointer to TDD Configuration (NULL for FDD)
LTE_TDD_Config_t *tdd_Config;
/// Number of adjacent cells to measure
uint8_t n_adj_cells;
/// Array of adjacent physical cell ids
uint32_t adj_cell_id[6];
/// Pointer to RRC MAC configuration
LTE_MAC_MainConfig_t *macConfig;
/// Pointer to RRC Measurement gap configuration
LTE_MeasGapConfig_t *measGapConfig;
/// Pointers to LogicalChannelConfig indexed by LogicalChannelIdentity. Note NULL means LCHAN is inactive.
LTE_LogicalChannelConfig_t *logicalChannelConfig[MAX_NUM_LCID];
/// Scheduling Information
UE_SCHEDULING_INFO scheduling_info;
/// Outgoing CCCH pdu for PHY
CCCH_PDU CCCH_pdu;
/// Outgoing RAR pdu for PHY
RAR_PDU RAR_pdu;
/// Incoming DLSCH pdu for PHY
DLSCH_PDU DLSCH_pdu[MAX_MOBILES_PER_ENB][2];
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int sltx_active;
SLSCH_t slsch;
SLDCH_t sldch;
SLSS_t slss;
ULSCH_PDU slsch_pdu;
int slsch_lcid;
uint32_t directFrameNumber_r12;
long directSubframeNumber_r12;
long sl_Bandwidth_r12;
#endif
/// number of attempt for rach
uint8_t RA_attempt_number;
/// Random-access procedure flag
......@@ -1798,7 +1613,7 @@ typedef struct {
/// power backoff due to power management (as allowed by P-MPRc) for this cell
uint8_t PHR_reporting_active;
/// power backoff due to power management (as allowed by P-MPRc) for this cell
uint8_t power_backoff_db[MAX_eNB];
uint8_t power_backoff_db[NUMBER_OF_eNB_MAX];
/// BSR report falg management
uint8_t BSR_reporting_active;
/// retxBSR-Timer expires flag
......@@ -1810,7 +1625,7 @@ typedef struct {
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
/// number of subframe allocation pattern available for MBSFN sync area
uint8_t num_sf_allocation_pattern;
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
/// number of active MBSFN area
uint8_t num_active_mbsfn_area;
/// MBSFN Area Info
......@@ -1830,28 +1645,19 @@ typedef struct {
uint8_t pmch_lcids[28];
uint16_t pmch_stop_mtch[28];
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
#endif
//#ifdef CBA
/// CBA RNTI for each group
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
/// last SFN for CBA channel access
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
//#endif
/// total UE scheduler processing time
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
time_stats_t ue_scheduler; // total
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
time_stats_t tx_ulsch_sdu;
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
time_stats_t rx_dlsch_sdu;
=======
//#ifdef CBA
/// CBA RNTI for each group
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
/// last SFN for CBA channel access
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
//#endif
/// total UE scheduler processing time
time_stats_t ue_scheduler; // total
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
time_stats_t tx_ulsch_sdu;
/// UE DLSCH rx processing time inlcuding RLC interface (mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind) and mac header parser
time_stats_t rx_dlsch_sdu ;
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
/// UE query for MCH subframe processing time
time_stats_t ue_query_mch;
/// UE MCH rx processing time
......@@ -1860,15 +1666,6 @@ typedef struct {
time_stats_t rx_si;
/// UE PCCH rx processing time including RLC interface (mac_rrc_data_ind)
time_stats_t rx_p;
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
/// Panos: Mutex for nfapi UL_INFO
pthread_mutex_t UL_INFO_mutex;
/// Panos: UE_Mode variable should be used in the case of Phy_stub operation since we won't have access to PHY_VARS_UE
/// where the UE_mode originally is for the full stack operation mode. The transitions between the states of the UE_Mode
/// will be triggered within phy_stub_ue.c in this case
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
/// Panos: Phy_stub mode: Boolean variable to distinguish whether a Msg3 or a regular ULSCH data pdu should be generated
=======
/// Mutex for nfapi UL_INFO
pthread_mutex_t UL_INFO_mutex;
/// UE_Mode variable should be used in the case of Phy_stub operation since we won't have access to PHY_VARS_UE
......@@ -1876,7 +1673,6 @@ typedef struct {
/// will be triggered within phy_stub_ue.c in this case
UE_MODE_t UE_mode[NUMBER_OF_CONNECTED_eNB_MAX];
/// Phy_stub mode: Boolean variable to distinguish whether a Msg3 or a regular ULSCH data pdu should be generated
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
/// after the reception of NFAPI_UL_CONFIG_ULSCH_PDU_TYPE.
uint8_t first_ULSCH_Tx;
uint8_t SI_Decoded;
......@@ -1892,11 +1688,7 @@ typedef struct {
uint8_t n_adj_cells;
} neigh_cell_id_t;
<<<<<<< HEAD:openair2/LAYER2/MAC/defs.h
#include "proto.h"
=======
typedef struct {
volatile uint8_t flag;
rnti_t rnti;
......@@ -1915,6 +1707,5 @@ typedef struct {
#include "mac_proto.h"
>>>>>>> main/develop:openair2/LAYER2/MAC/mac.h
/*@}*/
#endif /*__LAYER2_MAC_DEFS_H__ */
......@@ -550,11 +550,7 @@ void ue_send_sl_sdu(module_id_t module_idP,
sl_discovery_flag_t sl_discovery_flag
);
<<<<<<< HEAD:openair2/LAYER2/MAC/proto.h
#if defined(Rel10) || defined(Rel14)
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
>>>>>>> main/develop:openair2/LAYER2/MAC/mac_proto.h
/* \brief Called by PHY to transfer MCH transport block to ue MAC.
@param Mod_id Index of module instance
@param frame Frame index
......@@ -592,11 +588,7 @@ void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t * ulsch_buffer, uint16_t buflen,
uint8_t * access_mode);
<<<<<<< HEAD:openair2/LAYER2/MAC/proto.h
/* \brief Called by PHY to get sdu for PSBCH/SSS/PSS transmission.
=======
/* \brief Called by PHY to get sdu for PSBCH/SSS/PSS transmission.
>>>>>>> main/develop:openair2/LAYER2/MAC/mac_proto.h
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
......@@ -604,11 +596,7 @@ void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
*/
SLSS_t *ue_get_slss(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
<<<<<<< HEAD:openair2/LAYER2/MAC/proto.h
/* \brief Called by PHY to get sdu for PSDCH transmission.
=======
/* \brief Called by PHY to get sdu for PSDCH transmission.
>>>>>>> main/develop:openair2/LAYER2/MAC/mac_proto.h
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
......@@ -616,21 +604,13 @@ SLSS_t *ue_get_slss(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_
*/
SLDCH_t *ue_get_sldch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
<<<<<<< HEAD:openair2/LAYER2/MAC/proto.h
/* \brief Called by PHY to get sdu for PSSCH transmission.
=======
/* \brief Called by PHY to get sdu for PSSCH transmission.
>>>>>>> main/develop:openair2/LAYER2/MAC/mac_proto.h
@param Mod_id Instance id of UE in machine
@param frame_tx TX frame index
@param subframe_tx TX subframe index
@returns pointer to SLSCH_t descriptor
*/
<<<<<<< HEAD:openair2/LAYER2/MAC/proto.h
SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe, int slsch_test);
=======
SLSCH_t *ue_get_slsch(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_t subframe);
>>>>>>> main/develop:openair2/LAYER2/MAC/mac_proto.h
/* \brief Function called by PHY to retrieve information to be transmitted using the RA procedure. If the UE is not in PUSCH mode for a particular eNB index, this is assumed to be an Msg3 and MAC attempts to retrieves the CCCH message from RRC. If the UE is in PUSCH mode for a particular eNB index and PUCCH format 0 (Scheduling Request) is not activated, the MAC may use this resource for random-access to transmit a BSR along with the C-RNTI control element (see 5.1.4 from 36.321)
@param Mod_id Index of UE instance
......@@ -1077,27 +1057,18 @@ int rrc_mac_config_req_ue(module_id_t module_idP,
,
uint8_t num_active_cba_groups, uint16_t cba_rnti
#endif
<<<<<<< HEAD:openair2/LAYER2/MAC/proto.h
#if defined(Rel14)
,config_action_t config_action,
const uint32_t * const sourceL2Id,
const uint32_t * const destinationL2Id,
const uint32_t * const groupL2Id,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id,
const uint32_t * const groupL2Id,
SL_Preconfiguration_r12_t *SL_Preconfiguration_r12_t,
uint32_t directFrame_r12,
long directSubframe_r12,
long *sl_Bandwidth_r12
#endif
);
=======
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,config_action_t config_action
,const uint32_t * const sourceL2Id
,const uint32_t * const destinationL2Id
#endif
);
>>>>>>> main/develop:openair2/LAYER2/MAC/mac_proto.h
uint16_t getRIV(uint16_t N_RB_DL, uint16_t RBstart, uint16_t Lcrbs);
......
......@@ -105,50 +105,7 @@ store_dlsch_buffer(module_id_t Mod_id,
if (!ue_dl_slice_membership(Mod_id, UE_id, slice_idx))
continue;
<<<<<<< HEAD
UE_template =
&UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id];
// clear logical channel interface variables
UE_template->dl_buffer_total = 0;
UE_template->dl_pdus_total = 0;
for (i = 0; i < MAX_NUM_LCID; i++) {
UE_template->dl_buffer_info[i] = 0;
UE_template->dl_pdus_in_buffer[i] = 0;
UE_template->dl_buffer_head_sdu_creation_time[i] = 0;
UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = 0;
}
rnti = UE_RNTI(Mod_id, UE_id);
for (i = 0; i < MAX_NUM_LCID; i++) { // loop over all the logical channels
rlc_status =
mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
ENB_FLAG_YES, MBMS_FLAG_NO, i, 0
#ifdef Rel14
,0, 0
#endif
);
UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer;
UE_template->dl_buffer_head_sdu_creation_time[i] =
rlc_status.head_sdu_creation_time;
UE_template->dl_buffer_head_sdu_creation_time_max =
cmax(UE_template->dl_buffer_head_sdu_creation_time_max,
rlc_status.head_sdu_creation_time);
UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] =
rlc_status.head_sdu_remaining_size_to_send;
UE_template->dl_buffer_head_sdu_is_segmented[i] =
rlc_status.head_sdu_is_segmented;
UE_template->dl_buffer_total += UE_template->dl_buffer_info[i]; //storing the total dlsch buffer
UE_template->dl_pdus_total +=
UE_template->dl_pdus_in_buffer[i];
=======
UE_template = &UE_list->UE_template[UE_PCCID(Mod_id, UE_id)][UE_id];
>>>>>>> main/develop
// clear logical channel interface variables
UE_template->dl_buffer_total = 0;
......@@ -232,100 +189,6 @@ assign_rbs_required(module_id_t Mod_id,
eNB_UE_STATS *eNB_UE_stats, *eNB_UE_stats_i, *eNB_UE_stats_j;
int N_RB_DL;
<<<<<<< HEAD
// clear rb allocations across all CC_id
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (UE_list->active[UE_id] != TRUE)
continue;
if (!ue_slice_membership(UE_id, slice_id))
continue;
pCCid = UE_PCCID(Mod_id, UE_id);
//update CQI information across component carriers
for (n = 0; n < UE_list->numactiveCCs[UE_id]; n++) {
CC_id = UE_list->ordered_CCids[n][UE_id];
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
eNB_UE_stats->dlsch_mcs1 =cmin(cqi_to_mcs[UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id]],
slice_maxmcs[slice_id]);
}
// provide the list of CCs sorted according to MCS
for (i = 0; i < UE_list->numactiveCCs[UE_id]; i++) {
eNB_UE_stats_i =
&UE_list->eNB_UE_stats[UE_list->
ordered_CCids[i][UE_id]][UE_id];
for (j = i + 1; j < UE_list->numactiveCCs[UE_id]; j++) {
DevAssert(j < MAX_NUM_CCs);
eNB_UE_stats_j =
&UE_list->
eNB_UE_stats[UE_list->ordered_CCids[j][UE_id]][UE_id];
if (eNB_UE_stats_j->dlsch_mcs1 >
eNB_UE_stats_i->dlsch_mcs1) {
tmp = UE_list->ordered_CCids[i][UE_id];
UE_list->ordered_CCids[i][UE_id] =
UE_list->ordered_CCids[j][UE_id];
UE_list->ordered_CCids[j][UE_id] = tmp;
}
}
}
if (UE_list->UE_template[pCCid][UE_id].dl_buffer_total > 0) {
LOG_D(MAC, "[preprocessor] assign RB for UE %d\n", UE_id);
for (i = 0; i < UE_list->numactiveCCs[UE_id]; i++) {
CC_id = UE_list->ordered_CCids[i][UE_id];
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
if (eNB_UE_stats->dlsch_mcs1 == 0) {
nb_rbs_required[CC_id][UE_id] = 4; // don't let the TBS get too small
} else {
nb_rbs_required[CC_id][UE_id] = min_rb_unit[CC_id];
}
TBS =
get_TBS_DL(eNB_UE_stats->dlsch_mcs1,
nb_rbs_required[CC_id][UE_id]);
LOG_D(MAC,
"[preprocessor] start RB assignement for UE %d CC_id %d dl buffer %d (RB unit %d, MCS %d, TBS %d) \n",
UE_id, CC_id,
UE_list->UE_template[pCCid][UE_id].dl_buffer_total,
nb_rbs_required[CC_id][UE_id],
eNB_UE_stats->dlsch_mcs1, TBS);
N_RB_DL =
to_prb(RC.mac[Mod_id]->common_channels[CC_id].
mib->message.dl_Bandwidth);
UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]= flexran_nb_rbs_allowed_slice(slice_percentage[slice_id],N_RB_DL);
/* calculating required number of RBs for each UE */
while (TBS <
UE_list->UE_template[pCCid][UE_id].
dl_buffer_total) {
nb_rbs_required[CC_id][UE_id] += min_rb_unit[CC_id];
if (nb_rbs_required[CC_id][UE_id] > UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]) {
TBS = get_TBS_DL(eNB_UE_stats->dlsch_mcs1, UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id]);
nb_rbs_required[CC_id][UE_id] = UE_list->UE_sched_ctrl[UE_id].max_rbs_allowed_slice[CC_id][slice_id];
break;
}
TBS =
get_TBS_DL(eNB_UE_stats->dlsch_mcs1,
nb_rbs_required[CC_id][UE_id]);
} // end of while
LOG_D(MAC,
"[eNB %d] Frame %d: UE %d on CC %d: RB unit %d, nb_required RB %d (TBS %d, mcs %d)\n",
Mod_id, frameP, UE_id, CC_id, min_rb_unit[CC_id],
nb_rbs_required[CC_id][UE_id], TBS,
eNB_UE_stats->dlsch_mcs1);
}
}
=======
// clear rb allocations across all CC_id
for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_list->active[UE_id] != TRUE) continue;
......@@ -403,7 +266,6 @@ assign_rbs_required(module_id_t Mod_id,
sli->pre_processor_results[slice_idx].mcs[CC_id][UE_id] = eNB_UE_stats->dlsch_mcs1;
}
>>>>>>> main/develop
}
}
}
......@@ -1505,16 +1367,11 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
rnti = UE_RNTI(module_idP, UE_id);
<<<<<<< HEAD
if (ue_sched_ctl->ta_timer == 0) {
=======
if (rnti == NOT_A_RNTI)
continue;
if (UE_list->active[UE_id] != TRUE)
continue;
>>>>>>> main/develop
if (!ue_dl_slice_membership(module_idP, UE_id, slice_idx))
continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment