Merge remote-tracking branch 'origin/x2' into develop_integration_2018_w39
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
+154
-17
@@ -65,6 +65,8 @@ extern void set_parallel_conf(char* parallel_conf);
|
||||
extern void set_worker_conf(char* worker_conf);
|
||||
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
|
||||
extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
extern uint32_t to_earfcn_DL(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw);
|
||||
extern uint32_t to_earfcn_UL(int eutra_bandP, uint32_t ul_CarrierFreq, uint32_t bw);
|
||||
|
||||
void RCconfig_flexran() {
|
||||
uint16_t i;
|
||||
@@ -2172,7 +2174,7 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
|
||||
}
|
||||
|
||||
int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
int j, k, l;
|
||||
int I, J, j, k, l;
|
||||
int enb_id;
|
||||
char *address = NULL;
|
||||
char *cidr = NULL;
|
||||
@@ -2181,21 +2183,104 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0};
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
|
||||
/*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
} else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 1;
|
||||
} else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 2;
|
||||
} else {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
#endif */
|
||||
|
||||
/* define CC params */
|
||||
|
||||
int32_t Nid_cell = 0;
|
||||
|
||||
char *frame_type, *prefix_type, *pbch_repetition, *prach_high_speed,
|
||||
*pusch_hoppingMode, *pusch_enable64QAM, *pusch_groupHoppingEnabled,
|
||||
*pusch_sequenceHoppingEnabled, *phich_duration, *phich_resource,
|
||||
*srs_enable, *srs_ackNackST, *srs_MaxUpPts, *pusch_alpha,
|
||||
*pucch_deltaF_Format1, *pucch_deltaF_Format1b, *pucch_deltaF_Format2,
|
||||
*pucch_deltaF_Format2a, *pucch_deltaF_Format2b,
|
||||
*rach_preamblesGroupAConfig, *rach_messagePowerOffsetGroupB, *pcch_nB;
|
||||
long long int downlink_frequency;
|
||||
int32_t tdd_config, tdd_config_s, eutra_band, uplink_frequency_offset,
|
||||
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, ue_multiple_max;
|
||||
|
||||
const char* rxPool_sc_CP_Len;
|
||||
const char* rxPool_sc_Period;
|
||||
const char* rxPool_data_CP_Len;
|
||||
libconfig_int rxPool_ResourceConfig_prb_Num;
|
||||
libconfig_int rxPool_ResourceConfig_prb_Start;
|
||||
libconfig_int rxPool_ResourceConfig_prb_End;
|
||||
const char* rxPool_ResourceConfig_offsetIndicator_present;
|
||||
libconfig_int rxPool_ResourceConfig_offsetIndicator_choice;
|
||||
const char* rxPool_ResourceConfig_subframeBitmap_present;
|
||||
char* rxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
libconfig_int rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
//SIB19
|
||||
//for discRxPool
|
||||
const char* discRxPool_cp_Len;
|
||||
const char* discRxPool_discPeriod;
|
||||
libconfig_int discRxPool_numRetx;
|
||||
libconfig_int discRxPool_numRepetition;
|
||||
libconfig_int discRxPool_ResourceConfig_prb_Num;
|
||||
libconfig_int discRxPool_ResourceConfig_prb_Start;
|
||||
libconfig_int discRxPool_ResourceConfig_prb_End;
|
||||
const char* discRxPool_ResourceConfig_offsetIndicator_present;
|
||||
libconfig_int discRxPool_ResourceConfig_offsetIndicator_choice;
|
||||
const char* discRxPool_ResourceConfig_subframeBitmap_present;
|
||||
char* discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
libconfig_int discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
//for discRxPoolPS
|
||||
const char* discRxPoolPS_cp_Len;
|
||||
const char* discRxPoolPS_discPeriod;
|
||||
libconfig_int discRxPoolPS_numRetx;
|
||||
libconfig_int discRxPoolPS_numRepetition;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_prb_Num;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_prb_Start;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_prb_End;
|
||||
const char* discRxPoolPS_ResourceConfig_offsetIndicator_present;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_offsetIndicator_choice;
|
||||
const char* discRxPoolPS_ResourceConfig_subframeBitmap_present;
|
||||
char* discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size;
|
||||
libconfig_int discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused;
|
||||
|
||||
checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK;
|
||||
paramdef_t CCsParams[] = CCPARAMS_DESC;
|
||||
paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS, NULL, 0};
|
||||
|
||||
/* map parameter checking array instances to parameter definition array instances */
|
||||
for (I = 0; I < (sizeof(CCsParams) / sizeof(paramdef_t)); I++) {
|
||||
CCsParams[I].chkPptr = &(config_check_CCparams[I]);
|
||||
}
|
||||
/*#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
} else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 1;
|
||||
} else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 2;
|
||||
} else {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
#endif */
|
||||
|
||||
AssertFatal(i < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt,
|
||||
"Failed to parse config file %s, %uth attribute %s \n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_ACTIVE_ENBS);
|
||||
@@ -2226,7 +2311,9 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
paramlist_def_t X2ParamList = {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS,NULL,0};
|
||||
paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
|
||||
paramdef_t NETParams[] = NETPARAMS_DESC;
|
||||
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
|
||||
/* TODO: fix the size - if set lower we have a crash (MAX_OPTNAME_SIZE was 64 when this code was written) */
|
||||
/* this is most probably a problem with the config module */
|
||||
char aprefix[MAX_OPTNAME_SIZE*80 + 8];
|
||||
/* Some default/random parameters */
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id;
|
||||
|
||||
@@ -2249,6 +2336,56 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
(X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3),
|
||||
"BAD MNC DIGIT LENGTH %d",
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length);
|
||||
|
||||
/* CC params */
|
||||
sprintf(aprefix, "%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, k);
|
||||
config_getlist(&CCsParamList, NULL, 0, aprefix);
|
||||
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).num_cc = CCsParamList.numelt;
|
||||
|
||||
if (CCsParamList.numelt > 0) {
|
||||
|
||||
//char ccspath[MAX_OPTNAME_SIZE*2 + 16];
|
||||
|
||||
for (J = 0; J < CCsParamList.numelt ; J++) {
|
||||
|
||||
sprintf(aprefix, "%s.[%i].%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, k, ENB_CONFIG_STRING_COMPONENT_CARRIERS, J);
|
||||
config_get(CCsParams, sizeof(CCsParams)/sizeof(paramdef_t), aprefix);
|
||||
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).eutra_band[J] = eutra_band;
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).downlink_frequency[J] = (uint32_t) downlink_frequency;
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).uplink_frequency_offset[J] = (unsigned int) uplink_frequency_offset;
|
||||
X2AP_REGISTER_ENB_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, k, Nid_cell);
|
||||
}
|
||||
|
||||
X2AP_REGISTER_ENB_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, k, N_RB_DL);
|
||||
}
|
||||
|
||||
if (strcmp(frame_type, "FDD") == 0) {
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = FDD;
|
||||
} else if (strcmp(frame_type, "TDD") == 0) {
|
||||
X2AP_REGISTER_ENB_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, k, frame_type);
|
||||
}
|
||||
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_DL[J] = to_earfcn_DL(eutra_band, downlink_frequency, N_RB_DL);
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_UL[J] = to_earfcn_UL(eutra_band, downlink_frequency + uplink_frequency_offset, N_RB_DL);
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k);
|
||||
config_getlist( &X2ParamList,X2Params,sizeof(X2Params)/sizeof(paramdef_t),aprefix);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user