diff --git a/openair2/COMMON/rrc_messages_types.h b/openair2/COMMON/rrc_messages_types.h index 91ac072384..0267095f7b 100644 --- a/openair2/COMMON/rrc_messages_types.h +++ b/openair2/COMMON/rrc_messages_types.h @@ -83,15 +83,85 @@ typedef struct RrcStateInd_s { Rrc_Sub_State_t sub_state; } RrcStateInd; +typedef struct RadioResourceConfig_s { + long prach_root; + long prach_config_index; + BOOLEAN_t prach_high_speed; + long prach_zero_correlation; + long prach_freq_offset; + long pucch_delta_shift; + long pucch_nRB_CQI; + long pucch_nCS_AN; +#if !defined(Rel10) && !defined(Rel14) + long pucch_n1_AN; +#endif + long pdsch_referenceSignalPower; + long pdsch_p_b; + long pusch_n_SB; + long pusch_hoppingMode; + long pusch_hoppingOffset; + BOOLEAN_t pusch_enable64QAM; + BOOLEAN_t pusch_groupHoppingEnabled; + long pusch_groupAssignment; + BOOLEAN_t pusch_sequenceHoppingEnabled; + long pusch_nDMRS1; + long phich_duration; + long phich_resource; + BOOLEAN_t srs_enable; + long srs_BandwidthConfig; + long srs_SubframeConfig; + BOOLEAN_t srs_ackNackST; + BOOLEAN_t srs_MaxUpPts; + long pusch_p0_Nominal; + long pusch_alpha; + long pucch_p0_Nominal; + long msg3_delta_Preamble; + long ul_CyclicPrefixLength; + e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1; + e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b; + e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2; + e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a; + e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b; + long rach_numberOfRA_Preambles; + BOOLEAN_t rach_preamblesGroupAConfig; + long rach_sizeOfRA_PreamblesGroupA; + long rach_messageSizeGroupA; + e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB; + long rach_powerRampingStep; + long rach_preambleInitialReceivedTargetPower; + long rach_preambleTransMax; + long rach_raResponseWindowSize; + long rach_macContentionResolutionTimer; + long rach_maxHARQ_Msg3Tx; + long bcch_modificationPeriodCoeff; + long pcch_defaultPagingCycle; + long pcch_nB; + long ue_TimersAndConstants_t300; + long ue_TimersAndConstants_t301; + long ue_TimersAndConstants_t310; + long ue_TimersAndConstants_t311; + long ue_TimersAndConstants_n310; + long ue_TimersAndConstants_n311; + long ue_TransmissionMode; +#ifdef Rel14 + //SIB2 BR Options + long* preambleTransMax_CE_r13; + BOOLEAN_t prach_ConfigCommon_v1310; + BOOLEAN_t* mpdcch_startSF_CSS_RA_r13; + long mpdcch_startSF_CSS_RA_r13_val; + long* prach_HoppingOffset_r13; +#endif +} RadioResourceConfig; + // eNB: ENB_APP -> RRC messages typedef struct RrcConfigurationReq_s { - uint32_t cell_identity; + uint32_t cell_identity; - uint16_t tac; + uint16_t tac; - uint16_t mcc; - uint16_t mnc; - uint8_t mnc_digit_length; + uint16_t mcc; + uint16_t mnc; + uint8_t mnc_digit_length; paging_drx_t default_drx; @@ -107,102 +177,44 @@ typedef struct RrcConfigurationReq_s { int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later int nb_antenna_ports[MAX_NUM_CCs]; - long prach_root[MAX_NUM_CCs]; - long prach_config_index[MAX_NUM_CCs]; - BOOLEAN_t prach_high_speed[MAX_NUM_CCs]; - long prach_zero_correlation[MAX_NUM_CCs]; - long prach_freq_offset[MAX_NUM_CCs]; - long pucch_delta_shift[MAX_NUM_CCs]; - long pucch_nRB_CQI[MAX_NUM_CCs]; - long pucch_nCS_AN[MAX_NUM_CCs]; -#if !defined(Rel10) && !defined(Rel14) - long pucch_n1_AN[MAX_NUM_CCs]; -#endif - long pdsch_referenceSignalPower[MAX_NUM_CCs]; - long pdsch_p_b[MAX_NUM_CCs]; - long pusch_n_SB[MAX_NUM_CCs]; - long pusch_hoppingMode[MAX_NUM_CCs]; - long pusch_hoppingOffset[MAX_NUM_CCs]; - BOOLEAN_t pusch_enable64QAM[MAX_NUM_CCs]; - BOOLEAN_t pusch_groupHoppingEnabled[MAX_NUM_CCs]; - long pusch_groupAssignment[MAX_NUM_CCs]; - BOOLEAN_t pusch_sequenceHoppingEnabled[MAX_NUM_CCs]; - long pusch_nDMRS1[MAX_NUM_CCs]; - long phich_duration[MAX_NUM_CCs]; - long phich_resource[MAX_NUM_CCs]; - BOOLEAN_t srs_enable[MAX_NUM_CCs]; - long srs_BandwidthConfig[MAX_NUM_CCs]; - long srs_SubframeConfig[MAX_NUM_CCs]; - BOOLEAN_t srs_ackNackST[MAX_NUM_CCs]; - BOOLEAN_t srs_MaxUpPts[MAX_NUM_CCs]; - long pusch_p0_Nominal[MAX_NUM_CCs]; - long pusch_alpha[MAX_NUM_CCs]; - long pucch_p0_Nominal[MAX_NUM_CCs]; - long msg3_delta_Preamble[MAX_NUM_CCs]; - long ul_CyclicPrefixLength[MAX_NUM_CCs]; - e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs]; - e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs]; - e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs]; - e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs]; - e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs]; - long rach_numberOfRA_Preambles[MAX_NUM_CCs]; - BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs]; - long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs]; - long rach_messageSizeGroupA[MAX_NUM_CCs]; - e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs]; - long rach_powerRampingStep[MAX_NUM_CCs]; - long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs]; - long rach_preambleTransMax[MAX_NUM_CCs]; - long rach_raResponseWindowSize[MAX_NUM_CCs]; - long rach_macContentionResolutionTimer[MAX_NUM_CCs]; - long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs]; - long bcch_modificationPeriodCoeff[MAX_NUM_CCs]; - long pcch_defaultPagingCycle[MAX_NUM_CCs]; - long pcch_nB[MAX_NUM_CCs]; - long ue_TimersAndConstants_t300[MAX_NUM_CCs]; - long ue_TimersAndConstants_t301[MAX_NUM_CCs]; - long ue_TimersAndConstants_t310[MAX_NUM_CCs]; - long ue_TimersAndConstants_t311[MAX_NUM_CCs]; - long ue_TimersAndConstants_n310[MAX_NUM_CCs]; - long ue_TimersAndConstants_n311[MAX_NUM_CCs]; - long ue_TransmissionMode[MAX_NUM_CCs]; + RadioResourceConfig radioresourceconfig[MAX_NUM_CCs]; + + +#ifdef Rel14 + + RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs]; //MIB - long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs]; + long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs]; //SIB1 BR options - uint16_t* hyperSFN_r13[MAX_NUM_CCs]; - long* eDRX_Allowed_r13[MAX_NUM_CCs]; - BOOLEAN_t cellSelectionInfoCE_r13[MAX_NUM_CCs]; - long q_RxLevMinCE_r13[MAX_NUM_CCs]; - long* q_QualMinRSRQ_CE_r13[MAX_NUM_CCs]; - BOOLEAN_t bandwidthReducedAccessRelatedInfo_r13[MAX_NUM_CCs]; - long si_WindowLength_BR_r13[MAX_NUM_CCs]; - long si_RepetitionPattern_r13[MAX_NUM_CCs]; - BOOLEAN_t fdd_DownlinkOrTddSubframeBitmapBR_r13[MAX_NUM_CCs]; - uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13[MAX_NUM_CCs]; - uint16_t fdd_UplinkSubframeBitmapBR_r13[MAX_NUM_CCs]; - long startSymbolBR_r13[MAX_NUM_CCs]; - long si_HoppingConfigCommon_r13[MAX_NUM_CCs]; - long* si_ValidityTime_r13[MAX_NUM_CCs]; - BOOLEAN_t freqHoppingParametersDL_r13[MAX_NUM_CCs]; - long* mpdcch_pdsch_HoppingNB_r13[MAX_NUM_CCs]; - BOOLEAN_t interval_DLHoppingConfigCommonModeA_r13[MAX_NUM_CCs]; - long interval_DLHoppingConfigCommonModeA_r13_val[MAX_NUM_CCs]; - BOOLEAN_t interval_DLHoppingConfigCommonModeB_r13[MAX_NUM_CCs]; - long interval_DLHoppingConfigCommonModeB_r13_val[MAX_NUM_CCs]; - long* mpdcch_pdsch_HoppingOffset_r13[MAX_NUM_CCs]; + uint16_t* hyperSFN_r13[MAX_NUM_CCs]; + long* eDRX_Allowed_r13[MAX_NUM_CCs]; + BOOLEAN_t cellSelectionInfoCE_r13[MAX_NUM_CCs]; + long q_RxLevMinCE_r13[MAX_NUM_CCs]; + long* q_QualMinRSRQ_CE_r13[MAX_NUM_CCs]; + BOOLEAN_t bandwidthReducedAccessRelatedInfo_r13[MAX_NUM_CCs]; + long si_WindowLength_BR_r13[MAX_NUM_CCs]; + long si_RepetitionPattern_r13[MAX_NUM_CCs]; + BOOLEAN_t fdd_DownlinkOrTddSubframeBitmapBR_r13[MAX_NUM_CCs]; + uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13[MAX_NUM_CCs]; + uint16_t fdd_UplinkSubframeBitmapBR_r13[MAX_NUM_CCs]; + long startSymbolBR_r13[MAX_NUM_CCs]; + long si_HoppingConfigCommon_r13[MAX_NUM_CCs]; + long* si_ValidityTime_r13[MAX_NUM_CCs]; + BOOLEAN_t freqHoppingParametersDL_r13[MAX_NUM_CCs]; + long* mpdcch_pdsch_HoppingNB_r13[MAX_NUM_CCs]; + BOOLEAN_t interval_DLHoppingConfigCommonModeA_r13[MAX_NUM_CCs]; + long interval_DLHoppingConfigCommonModeA_r13_val[MAX_NUM_CCs]; + BOOLEAN_t interval_DLHoppingConfigCommonModeB_r13[MAX_NUM_CCs]; + long interval_DLHoppingConfigCommonModeB_r13_val[MAX_NUM_CCs]; + long* mpdcch_pdsch_HoppingOffset_r13[MAX_NUM_CCs]; - //SIB2 BR Options - long* preambleTransMax_CE_r13[MAX_NUM_CCs]; - BOOLEAN_t prach_ConfigCommon_v1310[MAX_NUM_CCs]; - BOOLEAN_t* mpdcch_startSF_CSS_RA_r13[MAX_NUM_CCs]; - long mpdcch_startSF_CSS_RA_r13_val[MAX_NUM_CCs]; - long* prach_HoppingOffset_r13[MAX_NUM_CCs]; +#endif } RrcConfigurationReq; // UE: NAS -> RRC messages diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 39c181319a..41a1255d14 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -299,14 +299,14 @@ #define CONFIG_STRING_RU_MAX_RXGAIN "max_rxgain" #define CONFIG_STRING_RU_IF_COMPRESSION "if_compression" -#define ENB_CONFIG_STRING_BR "br_parameters" +#define ENB_CONFIG_STRING_BR "br_parameters" #define ENB_CONFIG_STRING_schedulingInfoSIB1 "schedulingInfoSIB1_BR_r13" -#define ENB_CONFIG_STRING_HYPERSFN "hyperSFN_r13" -#define ENB_CONFIG_STRING_EDRX_ALLOWED "eDRX_Allowed_r13" +#define ENB_CONFIG_STRING_HYPERSFN "hyperSFN_r13" +#define ENB_CONFIG_STRING_EDRX_ALLOWED "eDRX_Allowed_r13" #define ENB_CONFIG_STRING_CELLSELECTIONINFOCE "cellSelectionInfoCE_r13" -#define ENB_CONFIG_STRING_Q_RXLEVMINCE "q_RxLevMinCE_r13" -#define ENB_CONFIG_STRING_Q_QUALMINRSRQ_CE "q_QualMinRSRQ_CE_r13" +#define ENB_CONFIG_STRING_Q_RXLEVMINCE "q_RxLevMinCE_r13" +#define ENB_CONFIG_STRING_Q_QUALMINRSRQ_CE "q_QualMinRSRQ_CE_r13" #define ENB_CONFIG_STRING_BRAccessRelatedInfo "bandwidthReducedAccessRelatedInfo_r13" #define ENB_CONFIG_STRING_SI_WINDOWLENGTH_BR "si_WindowLength_BR_r13" @@ -314,9 +314,9 @@ #define ENB_CONFIG_STRING_FDD_DLORTDD_SFB_BR "fdd_DownlinkOrTddSubframeBitmapBR_r13" #define ENB_CONFIG_STRING_FDD_DLORTDDSFB_BR_VAL "fdd_DownlinkOrTddSubframeBitmapBR_val_r13" #define ENB_CONFIG_STRING_FDD_ULSUBFRAMEBITMAPBR "fdd_UplinkSubframeBitmapBR_r13" -#define ENB_CONFIG_STRING_STARTSYMBOLBR "startSymbolBR_r13" +#define ENB_CONFIG_STRING_STARTSYMBOLBR "startSymbolBR_r13" #define ENB_CONFIG_STRING_SI_HOPPINGCONFIGCOMMON "si_HoppingConfigCommon_r13" -#define ENB_CONFIG_STRING_SI_VALIDITYTIME "si_ValidityTime_r13" +#define ENB_CONFIG_STRING_SI_VALIDITYTIME "si_ValidityTime_r13" #define ENB_CONFIG_STRING_FREQHOPPINGPARAMETERSDL "freqHoppingParametersDL_r13" #define ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPINGNB "mpdcch_pdsch_HoppingNB_r13" #define ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEA "interval_DLHoppingConfigCommonModeA_r13" @@ -565,15 +565,15 @@ void RCconfig_RU() { } if ( !( - config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_TX, &nb_tx) - && config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_RX, &nb_rx) - && config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_TX, &att_tx) - && config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_RX, &att_rx) - && config_setting_lookup_string(setting_ru, CONFIG_STRING_RU_LOCAL_RF,(const char **)&local_rf) - )) { + config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_TX, &nb_tx) + && config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_NB_RX, &nb_rx) + && config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_TX, &att_tx) + && config_setting_lookup_int(setting_ru, CONFIG_STRING_RU_ATT_RX, &att_rx) + && config_setting_lookup_string(setting_ru, CONFIG_STRING_RU_LOCAL_RF,(const char **)&local_rf) + )) { AssertFatal (0, - "Failed to parse configuration file %s, RU %d config !\n", - RC.config_file_name, j); + "Failed to parse configuration file %s, RU %d config !\n", + RC.config_file_name, j); continue; // FIXME will prevent segfaults below, not sure what happens at function exit... } @@ -728,9 +728,9 @@ void RCconfig_L1() { printf("RU %d: Transport %s\n",j,tr_n_preference); if (!(config_setting_lookup_string(setting_l1, CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, (const char **)&tr_n_preference))) { - AssertFatal (0, - "Failed to parse configuration file %s, L1 %d config !\n", - RC.config_file_name, j); + AssertFatal (0, + "Failed to parse configuration file %s, L1 %d config !\n", + RC.config_file_name, j); } if (strcmp(tr_n_preference, "local_mac") == 0) { @@ -914,7 +914,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { config_setting_t *setting_otg = NULL; config_setting_t *subsetting_otg = NULL; #if defined(Rel14) - config_setting_t *setting_br13 = NULL; + config_setting_t *setting_br13 = NULL; #endif // REL14 int parse_errors = 0; int num_enbs = 0; @@ -958,7 +958,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { libconfig_int rx_gain = 0; libconfig_int prach_root = 0; libconfig_int prach_config_index = 0; - const char* prach_high_speed = NULL; + const char* prach_high_speed = NULL; libconfig_int prach_zero_correlation = 0; libconfig_int prach_freq_offset = 0; libconfig_int pucch_delta_shift = 0; @@ -1076,32 +1076,32 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { config_destroy(&cfg); AssertFatal (0, "Failed to parse eNB configuration file %s!\n", RC.config_file_name); } - } - else { - config_destroy(&cfg); - AssertFatal(0, "No eNB configuration file provided!\n"); - } + } + else { + config_destroy(&cfg); + AssertFatal(0, "No eNB configuration file provided!\n"); + } #if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) if ( (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) { if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { - asn_debug = 0; - asn1_xer_print = 0; - } - else if (strcasecmp(astring, ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { - asn_debug = 1; - asn1_xer_print = 1; - } - else if (strcasecmp(astring, ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { - asn_debug = 1; - asn1_xer_print = 2; - } - else { - asn_debug = 0; - asn1_xer_print = 0; - } - } + asn_debug = 0; + asn1_xer_print = 0; + } + else if (strcasecmp(astring, ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { + asn_debug = 1; + asn1_xer_print = 1; + } + else if (strcasecmp(astring, ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { + asn_debug = 1; + asn1_xer_print = 2; + } + else { + asn_debug = 0; + asn1_xer_print = 0; + } + } #endif @@ -1169,7 +1169,7 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { && config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_LOCAL_S_PORTD, &local_s_portd) && config_setting_lookup_int (setting_enb, ENB_CONFIG_STRING_REMOTE_S_PORTD, &remote_s_portd) ) - ) { + ) { AssertFatal (0, "Failed to parse eNB configuration file %s, %u th enb\n", RC.config_file_name, i); @@ -1364,31 +1364,31 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { "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).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); + 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 @@ -1411,16 +1411,16 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { 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); + 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); } @@ -1441,16 +1441,16 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { 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); + 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); } @@ -1483,14 +1483,14 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = nb_antenna_ports; - RRC_CONFIGURATION_REQ (msg_p).prach_root[j] = prach_root; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_root = 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; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_config_index = prach_config_index; if ((prach_config_index <0) || (prach_config_index > 63)) AssertFatal (0, @@ -1502,24 +1502,24 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { "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).radioresourceconfig[j].prach_high_speed = TRUE; + } + else if (strcmp(prach_high_speed, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].prach_high_speed = 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; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_zero_correlation =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; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_freq_offset = prach_freq_offset; if ((prach_freq_offset <0) || (prach_freq_offset > 94)) AssertFatal (0, @@ -1527,1188 +1527,2252 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { RC.config_file_name, i, prach_freq_offset); - RRC_CONFIGURATION_REQ (msg_p).pucch_delta_shift[j] = pucch_delta_shift-1; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_delta_shift = 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; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_nRB_CQI = 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); + 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; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_nCS_AN = 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 ((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; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_n1_AN = 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); + 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); #endif - RRC_CONFIGURATION_REQ (msg_p).pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pdsch_referenceSignalPower = pdsch_referenceSignalPower; - if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) + if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", + RC.config_file_name, i, pdsch_referenceSignalPower); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pdsch_p_b = pdsch_p_b; + + if ((pdsch_p_b <0) || (pdsch_p_b > 3)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", + RC.config_file_name, i, pdsch_p_b); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_n_SB = pusch_n_SB; + + if ((pusch_n_SB <1) || (pusch_n_SB > 4)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", + RC.config_file_name, i, pusch_n_SB); + + if (!pusch_hoppingMode) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); + else if (strcmp(pusch_hoppingMode, "interSubFrame") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_hoppingMode = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; + } + else if (strcmp(pusch_hoppingMode, "intraAndInterSubFrame") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_hoppingMode = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, pusch_hoppingMode); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_hoppingOffset = pusch_hoppingOffset; + + if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", + RC.config_file_name, i, pusch_hoppingMode); + + if (!pusch_enable64QAM) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); + else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_enable64QAM = TRUE; + } + else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_enable64QAM = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_enable64QAM); + + if (!pusch_groupHoppingEnabled) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); + else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = TRUE; + } + else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_groupHoppingEnabled); + + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupAssignment = pusch_groupAssignment; + + if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", + RC.config_file_name, i, pusch_groupAssignment); + + if (!pusch_sequenceHoppingEnabled) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); + else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = TRUE; + } + else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_sequenceHoppingEnabled); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_nDMRS1 = pusch_nDMRS1; //cyclic_shift in RRC! + + if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n", + RC.config_file_name, i, pusch_nDMRS1); + + if (strcmp(phich_duration, "NORMAL") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_duration = PHICH_Config__phich_Duration_normal; + } + else if (strcmp(phich_duration, "EXTENDED") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_duration = PHICH_Config__phich_Duration_extended; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", + RC.config_file_name, i, phich_duration); + + if (strcmp(phich_resource, "ONESIXTH") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_resource = PHICH_Config__phich_Resource_oneSixth; + } + else if (strcmp(phich_resource, "HALF") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_resource = PHICH_Config__phich_Resource_half; + } + else if (strcmp(phich_resource, "ONE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_resource = PHICH_Config__phich_Resource_one; + } + else if (strcmp(phich_resource, "TWO") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_resource = PHICH_Config__phich_Resource_two; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", + RC.config_file_name, i, phich_resource); + + printf("phich.resource %d (%s), phich.duration %d (%s)\n", + (int)RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_resource, phich_resource, + (int)RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].phich_duration, phich_duration); + + if (strcmp(srs_enable, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].srs_enable = TRUE; + } + else if (strcmp(srs_enable, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].srs_enable = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_enable); + + if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable == TRUE) { + if (!(config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, &srs_BandwidthConfig) + && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, &srs_SubframeConfig) + && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, &srs_ackNackST) + && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_SRS_MAXUPPTS, &srs_MaxUpPts) + )) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown values for srs_BandwidthConfig, srs_SubframeConfig, srs_ackNackST, srs_MaxUpPts\n", + RC.config_file_name, i); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_BandwidthConfig = srs_BandwidthConfig; + + if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7)) + AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", + RC.config_file_name, i, srs_BandwidthConfig); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_SubframeConfig = srs_SubframeConfig; + + if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15)) AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", - RC.config_file_name, i, pdsch_referenceSignalPower); + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n", + RC.config_file_name, i, srs_SubframeConfig); - RRC_CONFIGURATION_REQ (msg_p).pdsch_p_b[j] = pdsch_p_b; - - if ((pdsch_p_b <0) || (pdsch_p_b > 3)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", - RC.config_file_name, i, pdsch_p_b); - - RRC_CONFIGURATION_REQ (msg_p).pusch_n_SB[j] = pusch_n_SB; - - if ((pusch_n_SB <1) || (pusch_n_SB > 4)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", - RC.config_file_name, i, pusch_n_SB); - - if (!pusch_hoppingMode) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); - else if (strcmp(pusch_hoppingMode, "interSubFrame") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; - } - else if (strcmp(pusch_hoppingMode, "intraAndInterSubFrame") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", - RC.config_file_name, i, pusch_hoppingMode); - - RRC_CONFIGURATION_REQ (msg_p).pusch_hoppingOffset[j] = pusch_hoppingOffset; - - if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", - RC.config_file_name, i, pusch_hoppingMode); - - if (!pusch_enable64QAM) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); - else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_enable64QAM[j] = TRUE; - } - else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_enable64QAM[j] = FALSE; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_enable64QAM); - - if (!pusch_groupHoppingEnabled) - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); - else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_groupHoppingEnabled[j] = TRUE; - } - else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_groupHoppingEnabled[j] = FALSE; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_groupHoppingEnabled); - - - RRC_CONFIGURATION_REQ (msg_p).pusch_groupAssignment[j] = pusch_groupAssignment; - - if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", - RC.config_file_name, i, pusch_groupAssignment); - - if (!pusch_sequenceHoppingEnabled) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", - RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); - else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_sequenceHoppingEnabled[j] = TRUE; - } - else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_sequenceHoppingEnabled[j] = FALSE; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", - RC.config_file_name, i, pusch_sequenceHoppingEnabled); - - RRC_CONFIGURATION_REQ (msg_p).pusch_nDMRS1[j] = pusch_nDMRS1; //cyclic_shift in RRC! - - if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n", - RC.config_file_name, i, pusch_nDMRS1); - - if (strcmp(phich_duration, "NORMAL") == 0) { - RRC_CONFIGURATION_REQ(msg_p).phich_duration[j] = PHICH_Config__phich_Duration_normal; - } - else if (strcmp(phich_duration, "EXTENDED") == 0) { - RRC_CONFIGURATION_REQ(msg_p).phich_duration[j] = PHICH_Config__phich_Duration_extended; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", - RC.config_file_name, i, phich_duration); - - if (strcmp(phich_resource, "ONESIXTH") == 0) { - RRC_CONFIGURATION_REQ(msg_p).phich_resource[j] = PHICH_Config__phich_Resource_oneSixth; - } - else if (strcmp(phich_resource, "HALF") == 0) { - RRC_CONFIGURATION_REQ(msg_p).phich_resource[j] = PHICH_Config__phich_Resource_half; - } - else if (strcmp(phich_resource, "ONE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).phich_resource[j] = PHICH_Config__phich_Resource_one; - } - else if (strcmp(phich_resource, "TWO") == 0) { - RRC_CONFIGURATION_REQ(msg_p).phich_resource[j] = PHICH_Config__phich_Resource_two; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", - RC.config_file_name, i, phich_resource); - - printf("phich.resource %d (%s), phich.duration %d (%s)\n", - RRC_CONFIGURATION_REQ(msg_p).phich_resource[j], phich_resource, - RRC_CONFIGURATION_REQ(msg_p).phich_duration[j], phich_duration); - - if (strcmp(srs_enable, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).srs_enable[j] = TRUE; - } - else if (strcmp(srs_enable, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).srs_enable[j] = FALSE; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_enable); - - if (RRC_CONFIGURATION_REQ (msg_p).srs_enable[j] == TRUE) { - if (!(config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, &srs_BandwidthConfig) - && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, &srs_SubframeConfig) - && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, &srs_ackNackST) - && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_SRS_MAXUPPTS, &srs_MaxUpPts) - )) - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown values for srs_BandwidthConfig, srs_SubframeConfig, srs_ackNackST, srs_MaxUpPts\n", - RC.config_file_name, i); - - RRC_CONFIGURATION_REQ (msg_p).srs_BandwidthConfig[j] = srs_BandwidthConfig; - - if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7)) - AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", - RC.config_file_name, i, srs_BandwidthConfig); - - RRC_CONFIGURATION_REQ (msg_p).srs_SubframeConfig[j] = srs_SubframeConfig; - - if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n", - RC.config_file_name, i, srs_SubframeConfig); - - if (strcmp(srs_ackNackST, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).srs_ackNackST[j] = TRUE; - } - else if (strcmp(srs_ackNackST, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).srs_ackNackST[j] = FALSE; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_ackNackST); - - if (strcmp(srs_MaxUpPts, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).srs_MaxUpPts[j] = TRUE; - } - else if (strcmp(srs_MaxUpPts, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).srs_MaxUpPts[j] = FALSE; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, srs_MaxUpPts); - } - - RRC_CONFIGURATION_REQ(msg_p).pusch_p0_Nominal[j] = pusch_p0_Nominal; - - if ((pusch_p0_Nominal < -126) || (pusch_p0_Nominal > 24)) - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", - RC.config_file_name, i, pusch_p0_Nominal); - -#ifndef Rel14 - if (strcmp(pusch_alpha, "AL0") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al0; - } - else if (strcmp(pusch_alpha, "AL04") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al04; - } - else if (strcmp(pusch_alpha, "AL05") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al05; - } - else if (strcmp(pusch_alpha, "AL06") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al06; - } - else if (strcmp(pusch_alpha, "AL07") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al07; - } - else if (strcmp(pusch_alpha, "AL08") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al08; - } - else if (strcmp(pusch_alpha, "AL09") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al09; - } - else if (strcmp(pusch_alpha, "AL1") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = UplinkPowerControlCommon__alpha_al1; - } -#else - if (strcmp(pusch_alpha, "AL0") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al0; - } - else if (strcmp(pusch_alpha, "AL04") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al04; - } - else if (strcmp(pusch_alpha, "AL05") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al05; - } - else if (strcmp(pusch_alpha, "AL06") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al06; - } - else if (strcmp(pusch_alpha, "AL07") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al07; - } - else if (strcmp(pusch_alpha, "AL08") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al08; - } - else if (strcmp(pusch_alpha, "AL09") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al09; - } - else if (strcmp(pusch_alpha, "AL1") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pusch_alpha[j] = Alpha_r12_al1; - } -#endif - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", - RC.config_file_name, i, pusch_alpha); - - RRC_CONFIGURATION_REQ(msg_p).pucch_p0_Nominal[j] = pucch_p0_Nominal; - - if ((pucch_p0_Nominal < -127) || (pucch_p0_Nominal > -96)) - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", - RC.config_file_name, i, pucch_p0_Nominal); - - RRC_CONFIGURATION_REQ(msg_p).msg3_delta_Preamble[j] = msg3_delta_Preamble; - - if ((msg3_delta_Preamble < -1) || (msg3_delta_Preamble > 6)) - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n", - RC.config_file_name, i, msg3_delta_Preamble); - - - if (strcmp(pucch_deltaF_Format1, "deltaF_2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; - } - else if (strcmp(pucch_deltaF_Format1, "deltaF0") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; - } - else if (strcmp(pucch_deltaF_Format1, "deltaF2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format1[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format1); - - if (strcmp(pucch_deltaF_Format1b, "deltaF1") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; - } - else if (strcmp(pucch_deltaF_Format1b, "deltaF3") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; - } - else if (strcmp(pucch_deltaF_Format1b, "deltaF5") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format1b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", - RC.config_file_name, i, pucch_deltaF_Format1b); - - - if (strcmp(pucch_deltaF_Format2, "deltaF_2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; - } - else if (strcmp(pucch_deltaF_Format2, "deltaF0") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; - } - else if (strcmp(pucch_deltaF_Format2, "deltaF1") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; - } - else if (strcmp(pucch_deltaF_Format2, "deltaF2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2); - - if (strcmp(pucch_deltaF_Format2a, "deltaF_2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; - } - else if (strcmp(pucch_deltaF_Format2a, "deltaF0") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; - } - else if (strcmp(pucch_deltaF_Format2a, "deltaF2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2a[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2a); - - if (strcmp(pucch_deltaF_Format2b, "deltaF_2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; - } - else if (strcmp(pucch_deltaF_Format2b, "deltaF0") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; - } - else if (strcmp(pucch_deltaF_Format2b, "deltaF2") == 0) { - RRC_CONFIGURATION_REQ(msg_p).pucch_deltaF_Format2b[j] = DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", - RC.config_file_name, i, pucch_deltaF_Format2b); - - - - - RRC_CONFIGURATION_REQ(msg_p).rach_numberOfRA_Preambles[j] = (rach_numberOfRA_Preambles / 4) - 1; - - if ((rach_numberOfRA_Preambles < 4) || (rach_numberOfRA_Preambles > 64) || ((rach_numberOfRA_Preambles & 3) != 0)) - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n", - RC.config_file_name, i, rach_numberOfRA_Preambles); - - if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).rach_preamblesGroupAConfig[j] = TRUE; - - if (!(config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, &rach_sizeOfRA_PreamblesGroupA) - && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, &rach_messageSizeGroupA) - && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, &rach_messagePowerOffsetGroupB))) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d rach_sizeOfRA_PreamblesGroupA, messageSizeGroupA,messagePowerOffsetGroupB!\n", - RC.config_file_name, i); - - RRC_CONFIGURATION_REQ (msg_p).rach_sizeOfRA_PreamblesGroupA[j] = (rach_sizeOfRA_PreamblesGroupA/4)-1; - - if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n", - RC.config_file_name, i, rach_sizeOfRA_PreamblesGroupA); - - - switch (rach_messageSizeGroupA) { - case 56: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; - break; - - case 144: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; - break; - - case 208: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; - break; - - case 256: - RRC_CONFIGURATION_REQ (msg_p).rach_messageSizeGroupA[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n", - RC.config_file_name, i, rach_messageSizeGroupA); - break; - } - - if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { - RRC_CONFIGURATION_REQ (msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; - } - - else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { - RRC_CONFIGURATION_REQ(msg_p).rach_messagePowerOffsetGroupB[j] = RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", - RC.config_file_name, i, rach_messagePowerOffsetGroupB); - - } - else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0) { - RRC_CONFIGURATION_REQ(msg_p).rach_preamblesGroupAConfig[j] = FALSE; - } - else - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", - RC.config_file_name, i, rach_preamblesGroupAConfig); - - RRC_CONFIGURATION_REQ (msg_p).rach_preambleInitialReceivedTargetPower[j] = (rach_preambleInitialReceivedTargetPower+120)/2; - - if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", - RC.config_file_name, i, rach_preambleInitialReceivedTargetPower); - - - RRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep[j] = rach_powerRampingStep/2; - - if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0)) - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n", - RC.config_file_name, i, rach_powerRampingStep); - - - - switch (rach_preambleTransMax) { -#ifndef Rel14 - case 3: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; - break; - - case 4: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4; - break; - - case 5: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5; - break; - - case 6: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6; - break; - - case 7: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7; - break; - - case 8: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8; - break; - - case 10: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; - break; - - case 20: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20; - break; - - case 50: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50; - break; - - case 100: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100; - break; - - case 200: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200; - break; - -#else - - case 3: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n3; - break; - - case 4: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n4; - break; - - case 5: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n5; - break; - - case 6: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n6; - break; - - case 7: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n7; - break; - - case 8: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n8; - break; - - case 10: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n10; - break; - - case 20: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n20; - break; - - case 50: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n50; - break; - - case 100: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n100; - break; - - case 200: - RRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax[j] = PreambleTransMax_n200; - break; -#endif - - 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; + if (strcmp(srs_ackNackST, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].srs_ackNackST = TRUE; } + else if (strcmp(srs_ackNackST, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].srs_ackNackST = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_ackNackST); - RRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize[j] = (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2; + if (strcmp(srs_MaxUpPts, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].srs_MaxUpPts = TRUE; + } + else if (strcmp(srs_MaxUpPts, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].srs_MaxUpPts = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_MaxUpPts); + } - if ((rach_raResponseWindowSize<0)||(rach_raResponseWindowSize==9)||(rach_raResponseWindowSize>10)) + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_p0_Nominal = pusch_p0_Nominal; + + if ((pusch_p0_Nominal < -126) || (pusch_p0_Nominal > 24)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", + RC.config_file_name, i, pusch_p0_Nominal); + +#ifndef Rel14 + if (strcmp(pusch_alpha, "AL0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al0; + } + else if (strcmp(pusch_alpha, "AL04") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al04; + } + else if (strcmp(pusch_alpha, "AL05") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al05; + } + else if (strcmp(pusch_alpha, "AL06") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al06; + } + else if (strcmp(pusch_alpha, "AL07") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al07; + } + else if (strcmp(pusch_alpha, "AL08") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al08; + } + else if (strcmp(pusch_alpha, "AL09") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al09; + } + else if (strcmp(pusch_alpha, "AL1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = UplinkPowerControlCommon__alpha_al1; + } +#else + if (strcmp(pusch_alpha, "AL0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al0; + } + else if (strcmp(pusch_alpha, "AL04") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al04; + } + else if (strcmp(pusch_alpha, "AL05") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al05; + } + else if (strcmp(pusch_alpha, "AL06") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al06; + } + else if (strcmp(pusch_alpha, "AL07") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al07; + } + else if (strcmp(pusch_alpha, "AL08") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al08; + } + else if (strcmp(pusch_alpha, "AL09") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al09; + } + else if (strcmp(pusch_alpha, "AL1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pusch_alpha = Alpha_r12_al1; + } +#endif + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", + RC.config_file_name, i, pusch_alpha); + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_p0_Nominal = pucch_p0_Nominal; + + if ((pucch_p0_Nominal < -127) || (pucch_p0_Nominal > -96)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", + RC.config_file_name, i, pucch_p0_Nominal); + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].msg3_delta_Preamble = msg3_delta_Preamble; + + if ((msg3_delta_Preamble < -1) || (msg3_delta_Preamble > 6)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n", + RC.config_file_name, i, msg3_delta_Preamble); + + + if (strcmp(pucch_deltaF_Format1, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format1 = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format1, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format1= DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; + } + else if (strcmp(pucch_deltaF_Format1, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format1= DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format1); + + if (strcmp(pucch_deltaF_Format1b, "deltaF1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format1b= DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; + } + else if (strcmp(pucch_deltaF_Format1b, "deltaF3") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format1b= DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; + } + else if (strcmp(pucch_deltaF_Format1b, "deltaF5") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format1b= DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", + RC.config_file_name, i, pucch_deltaF_Format1b); + + + if (strcmp(pucch_deltaF_Format2, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format2, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; + } + else if (strcmp(pucch_deltaF_Format2, "deltaF1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; + } + else if (strcmp(pucch_deltaF_Format2, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2); + + if (strcmp(pucch_deltaF_Format2a, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2a= DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format2a, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2a= DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; + } + else if (strcmp(pucch_deltaF_Format2a, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2a= DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2a); + + if (strcmp(pucch_deltaF_Format2b, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2b= DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format2b, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2b= DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; + } + else if (strcmp(pucch_deltaF_Format2b, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pucch_deltaF_Format2b= DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2b); + + + + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].rach_numberOfRA_Preambles= (rach_numberOfRA_Preambles / 4) - 1; + + if ((rach_numberOfRA_Preambles < 4) || (rach_numberOfRA_Preambles > 64) || ((rach_numberOfRA_Preambles & 3) != 0)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n", + RC.config_file_name, i, rach_numberOfRA_Preambles); + + if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= TRUE; + + if (!(config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, &rach_sizeOfRA_PreamblesGroupA) + && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, &rach_messageSizeGroupA) + && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, &rach_messagePowerOffsetGroupB))) 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); + "Failed to parse eNB configuration file %s, enb %d rach_sizeOfRA_PreamblesGroupA, messageSizeGroupA,messagePowerOffsetGroupB!\n", + RC.config_file_name, i); + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_sizeOfRA_PreamblesGroupA= (rach_sizeOfRA_PreamblesGroupA/4)-1; - RRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer[j] = (rach_macContentionResolutionTimer/8)-1; - - if ((rach_macContentionResolutionTimer<8) || (rach_macContentionResolutionTimer>64) || ((rach_macContentionResolutionTimer&7)!=0)) + if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=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); + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n", + RC.config_file_name, i, rach_sizeOfRA_PreamblesGroupA); - switch (pcch_defaultPagingCycle) { - case 32: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf32; + switch (rach_messageSizeGroupA) { + case 56: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; break; - case 64: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf64; + case 144: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; break; - case 128: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf128; + case 208: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; break; case 256: - RRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle[j] = PCCH_Config__defaultPagingCycle_rf256; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; 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); + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n", + RC.config_file_name, i, rach_messageSizeGroupA); 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; + if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; } - - switch (ue_TimersAndConstants_t300) { - case 100: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms100; - break; - - case 200: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms200; - break; - - case 300: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms300; - break; - - case 400: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms400; - break; - - case 600: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms600; - break; - - case 1000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms1000; - break; - - case 1500: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms1500; - break; - - case 2000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300[j] = UE_TimersAndConstants__t300_ms2000; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t300 choice: 100,200,300,400,600,1000,1500,2000 ", - RC.config_file_name, i, ue_TimersAndConstants_t300); - break; - + else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; } - switch (ue_TimersAndConstants_t301) { - case 100: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms100; - break; - - case 200: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms200; - break; - - case 300: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms300; - break; - - case 400: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms400; - break; - - case 600: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms600; - break; - - case 1000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms1000; - break; - - case 1500: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms1500; - break; - - case 2000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301[j] = UE_TimersAndConstants__t301_ms2000; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t301 choice: 100,200,300,400,600,1000,1500,2000 ", - RC.config_file_name, i, ue_TimersAndConstants_t301); - break; - + else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; } - switch (ue_TimersAndConstants_t310) { - case 0: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms0; - break; - - case 50: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms50; - break; - - case 100: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms100; - break; - - case 200: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms200; - break; - - case 500: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms500; - break; - - case 1000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms1000; - break; - - case 2000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310[j] = UE_TimersAndConstants__t310_ms2000; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t310 choice: 0,50,100,200,500,1000,1500,2000 ", - RC.config_file_name, i, ue_TimersAndConstants_t310); - break; - + else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; } - switch (ue_TimersAndConstants_t311) { - case 1000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms1000; - break; - - case 3110: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms3000; - break; - - case 5000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms5000; - break; - - case 10000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms10000; - break; - - case 15000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms15000; - break; - - case 20000: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms20000; - break; - - case 31100: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311[j] = UE_TimersAndConstants__t311_ms30000; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t311 choice: 1000,3000,5000,10000,150000,20000,30000", - RC.config_file_name, i, ue_TimersAndConstants_t311); - break; - + else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; } - switch (ue_TimersAndConstants_n310) { - case 1: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n1; - break; - - case 2: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n2; - break; - - case 3: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n3; - break; - - case 4: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n4; - break; - - case 6: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n6; - break; - - case 8: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n8; - break; - - case 10: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n10; - break; - - case 20: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310[j] = UE_TimersAndConstants__n310_n20; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_n310 choice: 1,2,3,4,6,6,8,10,20", - RC.config_file_name, i, ue_TimersAndConstants_n311); - break; - + else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; } - switch (ue_TimersAndConstants_n311) { - case 1: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n1; - break; - - case 2: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n2; - break; - - case 3: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n3; - break; - - case 4: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n4; - break; - - case 5: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n5; - break; - - case 6: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n6; - break; - - case 8: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n8; - break; - - case 10: - RRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311[j] = UE_TimersAndConstants__n311_n10; - break; - - default: - AssertFatal (0, - "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t311 choice: 1,2,3,4,5,6,8,10", - RC.config_file_name, i, ue_TimersAndConstants_t311); - break; - + else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; } - 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; + else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; } - - setting_br13 = config_setting_get_member(setting_enb, ENB_CONFIG_STRING_BR); - if (setting_br13 != NULL) - { - int hyperSFN_r13; - int eDRX_Allowed_r13; - int q_RxLevMinCE_r13; - int q_QualMinRSRQ_CE_r13; - int si_WindowLength_BR_r13; - int si_RepetitionPattern_r13; - uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13; - int startSymbolBR_r13; - int si_HoppingConfigCommon_r13; - int si_ValidityTime_r13; - int mpdcch_pdsch_HoppingNB_r13; - int interval_DLHoppingConfigCommonModeA_r13_val; - int interval_DLHoppingConfigCommonModeB_r13_val; - int mpdcch_pdsch_HoppingOffset_r13; - int preambleTransMax_CE_r13; - int mpdcch_startSF_CSS_RA_r13_val; - int prach_HoppingOffset_r13; - int schedulingInfoSIB1_BR_r13; - char* cellSelectionInfoCE_r13 = NULL; - char* bandwidthReducedAccessRelatedInfo_r13 = NULL; - char* fdd_DownlinkOrTddSubframeBitmapBR_r13 = NULL; - char* fdd_UplinkSubframeBitmapBR_r13 = NULL; - char* freqHoppingParametersDL_r13 = NULL; - char* interval_DLHoppingConfigCommonModeA_r13 = NULL; - char* interval_DLHoppingConfigCommonModeB_r13 = NULL; - char* prach_ConfigCommon_v1310 = NULL; - char* mpdcch_startSF_CSS_RA_r13; + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", + RC.config_file_name, i, rach_messagePowerOffsetGroupB); + + } + else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, rach_preamblesGroupAConfig); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleInitialReceivedTargetPower= (rach_preambleInitialReceivedTargetPower+120)/2; + + if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", + RC.config_file_name, i, rach_preambleInitialReceivedTargetPower); - if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_schedulingInfoSIB1, &schedulingInfoSIB1_BR_r13)) - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d schedulingInfoSIB1_BR_r13!\n", - RC.config_file_name, i); - RRC_CONFIGURATION_REQ(msg_p).schedulingInfoSIB1_BR_r13[j] = schedulingInfoSIB1_BR_r13; - + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_powerRampingStep= rach_powerRampingStep/2; - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_HYPERSFN, &hyperSFN_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).hyperSFN_r13[j] = calloc(1, sizeof(uint16_t)); - *RRC_CONFIGURATION_REQ(msg_p).hyperSFN_r13[j] = (uint16_t)hyperSFN_r13; - } - else - RRC_CONFIGURATION_REQ(msg_p).hyperSFN_r13[j] = NULL; + if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n", + RC.config_file_name, i, rach_powerRampingStep); - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_EDRX_ALLOWED, &eDRX_Allowed_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).eDRX_Allowed_r13[j] = calloc(1, sizeof(long)); - *RRC_CONFIGURATION_REQ(msg_p).eDRX_Allowed_r13[j] = eDRX_Allowed_r13; - } - else - RRC_CONFIGURATION_REQ(msg_p).eDRX_Allowed_r13[j] = NULL; - if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_CELLSELECTIONINFOCE, &cellSelectionInfoCE_r13) && !strcmp(cellSelectionInfoCE_r13, "ENABLE")) - { - RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[j] = TRUE; - if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_Q_RXLEVMINCE, &q_RxLevMinCE_r13)) - { - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d q_RxLevMinCE_r13!\n", - RC.config_file_name, i); - } - RRC_CONFIGURATION_REQ(msg_p).q_RxLevMinCE_r13[j] = q_RxLevMinCE_r13; + switch (rach_preambleTransMax) { +#ifndef Rel14 + _ case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; + break; - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_Q_QUALMINRSRQ_CE, &q_QualMinRSRQ_CE_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[j] = calloc(1, sizeof(long)); - *RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[j] = q_QualMinRSRQ_CE_r13; + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4; + break; - } - else - RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[j] = NULL; + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5; + break; - } - else - RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[j] = FALSE; + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6; + break; - if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_BRAccessRelatedInfo, &bandwidthReducedAccessRelatedInfo_r13) && !strcmp(bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) - { - RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[j] = TRUE; - if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_WINDOWLENGTH_BR, &si_WindowLength_BR_r13) || - !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_REPETITIONPATTERN, &si_RepetitionPattern_r13) || - !config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDD_SFB_BR, &fdd_DownlinkOrTddSubframeBitmapBR_r13) || - !config_setting_lookup_int64(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDDSFB_BR_VAL, &fdd_DownlinkOrTddSubframeBitmapBR_val_r13) || - !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_FDD_ULSUBFRAMEBITMAPBR, &fdd_UplinkSubframeBitmapBR_r13) || - !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_STARTSYMBOLBR, &startSymbolBR_r13) || - !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_HOPPINGCONFIGCOMMON, &si_HoppingConfigCommon_r13)) - { - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d si_WindowLength_BR_r13, si_RepetitionPattern_r13, fdd_DownlinkOrTddSubframeBitmapBR_r13, fdd_UplinkSubframeBitmapBR_r13!\n", - RC.config_file_name, i); + case 7: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7; + break; - } - RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[j] = si_WindowLength_BR_r13; - RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[j] = si_RepetitionPattern_r13; - if (!strcmp(fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) - RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = FALSE; - else - RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = TRUE; - RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[j] = fdd_DownlinkOrTddSubframeBitmapBR_val_r13; - RRC_CONFIGURATION_REQ(msg_p).fdd_UplinkSubframeBitmapBR_r13[j] = fdd_UplinkSubframeBitmapBR_r13; - RRC_CONFIGURATION_REQ(msg_p).si_HoppingConfigCommon_r13[j] = si_HoppingConfigCommon_r13; - RRC_CONFIGURATION_REQ(msg_p).startSymbolBR_r13[j] = startSymbolBR_r13; + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8; + break; - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_Q_QUALMINRSRQ_CE, &si_ValidityTime_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[j] = calloc(1, sizeof(long)); - *RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[j] = si_ValidityTime_r13; + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; + break; - } - else - RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[j] = NULL; + case 20: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20; + break; - } - else - RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[j] = FALSE; + case 50: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50; + break; - if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_FREQHOPPINGPARAMETERSDL, &freqHoppingParametersDL_r13) && !strcmp(freqHoppingParametersDL_r13, "ENABLE")) - { - RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[j] = TRUE; - if (!config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB, &interval_DLHoppingConfigCommonModeA_r13) || - !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB_VAL, &interval_DLHoppingConfigCommonModeA_r13_val) || - !config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB, &interval_DLHoppingConfigCommonModeB_r13) || - !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB_VAL, &interval_DLHoppingConfigCommonModeB_r13_val)) - { - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d si_WindowLength_BR_r13, si_RepetitionPattern_r13, fdd_DownlinkOrTddSubframeBitmapBR_r13, fdd_UplinkSubframeBitmapBR_r13!\n", - RC.config_file_name, i); + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100; + break; - } - if (!strcmp(interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13")) - RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[j] = FALSE; - else - RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[j] = TRUE; - RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13_val[j] = interval_DLHoppingConfigCommonModeA_r13_val; + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200; + break; - if (!strcmp(interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13")) - RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[j] = FALSE; - else - RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[j] = TRUE; - RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13_val[j] = interval_DLHoppingConfigCommonModeB_r13_val; +#else - - + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n3; + break; - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPINGNB, &mpdcch_pdsch_HoppingNB_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[j] = calloc(1, sizeof(long)); - *RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[j] = mpdcch_pdsch_HoppingNB_r13; + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n4; + break; - } - else - RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[j] = NULL; + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n5; + break; - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPINGOFFSET, &mpdcch_pdsch_HoppingOffset_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[j] = calloc(1, sizeof(long)); - *RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[j] = mpdcch_pdsch_HoppingOffset_r13; - } - else - RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[j] = NULL; + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n6; + break; - } - else - RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[j] = FALSE; + case 7: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n7; + break; - /////SIB2 Parameters + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n8; + break; - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PREAMBLETRANSMAX_CE_R13, &preambleTransMax_CE_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).preambleTransMax_CE_r13[j] = calloc(1, sizeof(long)); - *RRC_CONFIGURATION_REQ(msg_p).preambleTransMax_CE_r13[j] = preambleTransMax_CE_r13; + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n10; + break; - } - else - RRC_CONFIGURATION_REQ(msg_p).preambleTransMax_CE_r13[j] = NULL; + case 20: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n20; + break; - if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PRACH_CONFIGCOMMON_V1310, &prach_ConfigCommon_v1310) && !strcmp(prach_ConfigCommon_v1310, "ENABLE")) - { - RRC_CONFIGURATION_REQ(msg_p).prach_ConfigCommon_v1310[j] = TRUE; + case 50: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n50; + break; - if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_MPDCCH_STARTSF_CSS_RA_R13, &mpdcch_startSF_CSS_RA_r13)) - { - if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_MPDCCH_STARTSF_CSS_RA_R13_VAL, &mpdcch_startSF_CSS_RA_r13_val)) - { - AssertFatal(0, - "Failed to parse eNB configuration file %s, enb %d mpdcch_startSF_CSS_RA_r13_val!\n", - RC.config_file_name, i); + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n100; + break; - } - RRC_CONFIGURATION_REQ(msg_p).mpdcch_startSF_CSS_RA_r13[j] = calloc(1, sizeof(BOOLEAN_t)); - if (!strcmp(mpdcch_startSF_CSS_RA_r13, "tdd-r13")) - *RRC_CONFIGURATION_REQ(msg_p).mpdcch_startSF_CSS_RA_r13[j] = FALSE; - else - *RRC_CONFIGURATION_REQ(msg_p).mpdcch_startSF_CSS_RA_r13[j] = TRUE; + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= PreambleTransMax_n200; + break; +#endif - RRC_CONFIGURATION_REQ(msg_p).mpdcch_startSF_CSS_RA_r13_val[j] = mpdcch_startSF_CSS_RA_r13_val; - - } - else - RRC_CONFIGURATION_REQ(msg_p).mpdcch_startSF_CSS_RA_r13[j] = NULL; + 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; + } - if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PRACH_HOPPINGOFFSET_R13, &prach_HoppingOffset_r13)) - { - RRC_CONFIGURATION_REQ(msg_p).prach_HoppingOffset_r13[j] = calloc(1, sizeof(long)); - *RRC_CONFIGURATION_REQ(msg_p).prach_HoppingOffset_r13[j] = prach_HoppingOffset_r13; + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_raResponseWindowSize= (rach_raResponseWindowSize==10)?7:rach_raResponseWindowSize-2; - } - else - RRC_CONFIGURATION_REQ(msg_p).prach_HoppingOffset_r13[j] = NULL; - - } - else - RRC_CONFIGURATION_REQ(msg_p).prach_ConfigCommon_v1310[j] = TRUE; - } - else - RRC_CONFIGURATION_REQ(msg_p).schedulingInfoSIB1_BR_r13[j] = 0; - } + 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).radioresourceconfig[j].rach_macContentionResolutionTimer= (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).radioresourceconfig[j].rach_maxHARQ_Msg3Tx= 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).radioresourceconfig[j].pcch_defaultPagingCycle= PCCH_Config__defaultPagingCycle_rf32; + break; + + case 64: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_defaultPagingCycle= PCCH_Config__defaultPagingCycle_rf64; + break; + + case 128: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_defaultPagingCycle= PCCH_Config__defaultPagingCycle_rf128; + break; + + case 256: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_defaultPagingCycle= 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).radioresourceconfig[j].pcch_nB = PCCH_Config__nB_fourT; + } + else if (strcmp(pcch_nB, "twoT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pcch_nB = PCCH_Config__nB_twoT; + } + else if (strcmp(pcch_nB, "oneT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pcch_nB = PCCH_Config__nB_oneT; + } + else if (strcmp(pcch_nB, "halfT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pcch_nB = PCCH_Config__nB_halfT; + } + else if (strcmp(pcch_nB, "quarterT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pcch_nB = PCCH_Config__nB_quarterT; + } + else if (strcmp(pcch_nB, "oneEighthT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pcch_nB = PCCH_Config__nB_oneEighthT; + } + else if (strcmp(pcch_nB, "oneSixteenthT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pcch_nB = PCCH_Config__nB_oneSixteenthT; + } + else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig[j].pcch_nB = 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).radioresourceconfig[j].bcch_modificationPeriodCoeff = BCCH_Config__modificationPeriodCoeff_n2; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff = BCCH_Config__modificationPeriodCoeff_n4; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff = BCCH_Config__modificationPeriodCoeff_n8; + break; + + case 16: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= 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; + } + + + switch (ue_TimersAndConstants_t300) { + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms200; + break; + + case 300: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms300; + break; + + case 400: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms400; + break; + + case 600: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms600; + break; + + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms1000; + break; + + case 1500: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms1500; + break; + + case 2000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t300= UE_TimersAndConstants__t300_ms2000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t300 choice: 100,200,300,400,600,1000,1500,2000 ", + RC.config_file_name, i, ue_TimersAndConstants_t300); + break; + + } + + switch (ue_TimersAndConstants_t301) { + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms200; + break; + + case 300: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms300; + break; + + case 400: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms400; + break; + + case 600: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms600; + break; + + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms1000; + break; + + case 1500: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms1500; + break; + + case 2000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms2000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t301 choice: 100,200,300,400,600,1000,1500,2000 ", + RC.config_file_name, i, ue_TimersAndConstants_t301); + break; + + } + + switch (ue_TimersAndConstants_t310) { + case 0: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms0; + break; + + case 50: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms50; + break; + + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms200; + break; + + case 500: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms500; + break; + + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms1000; + break; + + case 2000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms2000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t310 choice: 0,50,100,200,500,1000,1500,2000 ", + RC.config_file_name, i, ue_TimersAndConstants_t310); + break; + + } + + switch (ue_TimersAndConstants_t311) { + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms1000; + break; + + case 3110: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms3000; + break; + + case 5000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms5000; + break; + + case 10000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms10000; + break; + + case 15000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms15000; + break; + + case 20000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms20000; + break; + + case 31100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms30000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t311 choice: 1000,3000,5000,10000,150000,20000,30000", + RC.config_file_name, i, ue_TimersAndConstants_t311); + break; + + } + + switch (ue_TimersAndConstants_n310) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n1; + break; + + case 2: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n2; + break; + + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n3; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n4; + break; + + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n6; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n8; + break; + + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n10; + break; + + case 20: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n20; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_n310 choice: 1,2,3,4,6,6,8,10,20", + RC.config_file_name, i, ue_TimersAndConstants_n311); + break; + + } + + switch (ue_TimersAndConstants_n311) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n1; + break; + + case 2: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n2; + break; + + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n3; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n4; + break; + + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n5; + break; + + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n6; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n8; + break; + + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n10; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t311 choice: 1,2,3,4,5,6,8,10", + RC.config_file_name, i, ue_TimersAndConstants_t311); + break; + + } + + switch (ue_TransmissionMode) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm1; + break; + case 2: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm2; + break; + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm3; + break; + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm4; + break; + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm5; + break; + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm6; + break; + case 7: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_TransmissionMode= 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; + } +#ifdef Rel14 + setting_br13 = config_setting_get_member(setting_enb, ENB_CONFIG_STRING_BR); + + if (setting_br13 != NULL) { + + // Rel8 RadioResourceConfigCommon Parameters + if (!(config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_FRAME_TYPE, &frame_type) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PRACH_ROOT, &prach_root) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, &prach_config_index) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PRACH_HIGH_SPEED, &prach_high_speed) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, &prach_zero_correlation) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, &prach_freq_offset) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, &pucch_delta_shift) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUCCH_NRB_CQI, &pucch_nRB_CQI) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUCCH_NCS_AN, &pucch_nCS_AN) +#if !defined(Rel10) && !defined(Rel14) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUCCH_N1_AN, &pucch_n1_AN) +#endif + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PDSCH_RS_EPRE, &pdsch_referenceSignalPower) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PDSCH_PB, &pdsch_p_b) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUSCH_N_SB, &pusch_n_SB) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, &pusch_hoppingMode) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, &pusch_hoppingOffset) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, &pusch_enable64QAM) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, &pusch_groupHoppingEnabled) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, &pusch_groupAssignment) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, &pusch_sequenceHoppingEnabled) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUSCH_NDMRS1, &pusch_nDMRS1) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PHICH_DURATION, &phich_duration) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PHICH_RESOURCE, &phich_resource) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_SRS_ENABLE, &srs_enable) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, &pusch_p0_Nominal) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUSCH_ALPHA, &pusch_alpha) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, &pucch_p0_Nominal) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, &msg3_delta_Preamble) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, &pucch_deltaF_Format1) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, &pucch_deltaF_Format1b) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, &pucch_deltaF_Format2) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, &pucch_deltaF_Format2a) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, &pucch_deltaF_Format2b) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, &rach_numberOfRA_Preambles) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, &rach_preamblesGroupAConfig) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, &rach_powerRampingStep) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, &rach_preambleInitialReceivedTargetPower) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, &rach_preambleTransMax) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, &rach_raResponseWindowSize) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, &rach_macContentionResolutionTimer) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, &rach_maxHARQ_Msg3Tx) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, &bcch_modificationPeriodCoeff) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, &pcch_defaultPagingCycle) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PCCH_NB, &pcch_nB) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, &bcch_modificationPeriodCoeff) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_UETIMERS_T300, &ue_TimersAndConstants_t300) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_UETIMERS_T301, &ue_TimersAndConstants_t301) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_UETIMERS_T310, &ue_TimersAndConstants_t310) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_UETIMERS_T311, &ue_TimersAndConstants_t311) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_UETIMERS_N310, &ue_TimersAndConstants_n310) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_UETIMERS_N311, &ue_TimersAndConstants_n311) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, &ue_TransmissionMode) + )) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, Component Carrier %d!\n", + RC.config_file_name, nb_cc++); + continue; // FIXME this prevents segfaults below, not sure what happens after function exit + } + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].prach_root = 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).radioresourceconfig_BR[j].prach_config_index = 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).radioresourceconfig_BR[j].prach_high_speed = TRUE; + } + else if (strcmp(prach_high_speed, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].prach_high_speed = 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).radioresourceconfig_BR[j].prach_zero_correlation =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).radioresourceconfig_BR[j].prach_freq_offset = 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).radioresourceconfig_BR[j].pucch_delta_shift = 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).radioresourceconfig_BR[j].pucch_nRB_CQI = 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).radioresourceconfig_BR[j].pucch_nCS_AN = 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).radioresourceconfig_BR[j].pucch_n1_AN = 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); + +#endif + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pdsch_referenceSignalPower = pdsch_referenceSignalPower; + + if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", + RC.config_file_name, i, pdsch_referenceSignalPower); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pdsch_p_b = pdsch_p_b; + + if ((pdsch_p_b <0) || (pdsch_p_b > 3)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", + RC.config_file_name, i, pdsch_p_b); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pusch_n_SB = pusch_n_SB; + + if ((pusch_n_SB <1) || (pusch_n_SB > 4)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", + RC.config_file_name, i, pusch_n_SB); + + if (!pusch_hoppingMode) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); + else if (strcmp(pusch_hoppingMode, "interSubFrame") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_hoppingMode = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; + } + else if (strcmp(pusch_hoppingMode, "intraAndInterSubFrame") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_hoppingMode = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", + RC.config_file_name, i, pusch_hoppingMode); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pusch_hoppingOffset = pusch_hoppingOffset; + + if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", + RC.config_file_name, i, pusch_hoppingMode); + + if (!pusch_enable64QAM) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); + else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_enable64QAM = TRUE; + } + else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_enable64QAM = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_enable64QAM); + + if (!pusch_groupHoppingEnabled) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); + else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_groupHoppingEnabled = TRUE; + } + else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_groupHoppingEnabled = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_groupHoppingEnabled); + + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pusch_groupAssignment = pusch_groupAssignment; + + if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", + RC.config_file_name, i, pusch_groupAssignment); + + if (!pusch_sequenceHoppingEnabled) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", + RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); + else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_sequenceHoppingEnabled = TRUE; + } + else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_sequenceHoppingEnabled = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n", + RC.config_file_name, i, pusch_sequenceHoppingEnabled); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pusch_nDMRS1 = pusch_nDMRS1; //cyclic_shift in RRC! + + if ((pusch_nDMRS1 <0) || (pusch_nDMRS1>7)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n", + RC.config_file_name, i, pusch_nDMRS1); + + if (strcmp(phich_duration, "NORMAL") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_duration = PHICH_Config__phich_Duration_normal; + } + else if (strcmp(phich_duration, "EXTENDED") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_duration = PHICH_Config__phich_Duration_extended; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n", + RC.config_file_name, i, phich_duration); + + if (strcmp(phich_resource, "ONESIXTH") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_resource = PHICH_Config__phich_Resource_oneSixth; + } + else if (strcmp(phich_resource, "HALF") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_resource = PHICH_Config__phich_Resource_half; + } + else if (strcmp(phich_resource, "ONE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_resource = PHICH_Config__phich_Resource_one; + } + else if (strcmp(phich_resource, "TWO") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_resource = PHICH_Config__phich_Resource_two; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n", + RC.config_file_name, i, phich_resource); + + printf("phich.resource %d (%s), phich.duration %d (%s)\n", + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_resource, phich_resource, + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].phich_duration, phich_duration); + + if (strcmp(srs_enable, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].srs_enable = TRUE; + } + else if (strcmp(srs_enable, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].srs_enable = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_enable); + + if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].srs_enable == TRUE) { + if (!(config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, &srs_BandwidthConfig) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, &srs_SubframeConfig) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, &srs_ackNackST) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_SRS_MAXUPPTS, &srs_MaxUpPts) + )) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown values for srs_BandwidthConfig, srs_SubframeConfig, srs_ackNackST, srs_MaxUpPts\n", + RC.config_file_name, i); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].srs_BandwidthConfig = srs_BandwidthConfig; + + if ((srs_BandwidthConfig < 0) || (srs_BandwidthConfig >7)) + AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n", + RC.config_file_name, i, srs_BandwidthConfig); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].srs_SubframeConfig = srs_SubframeConfig; + + if ((srs_SubframeConfig<0) || (srs_SubframeConfig>15)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n", + RC.config_file_name, i, srs_SubframeConfig); + + if (strcmp(srs_ackNackST, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].srs_ackNackST = TRUE; + } + else if (strcmp(srs_ackNackST, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].srs_ackNackST = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_ackNackST); + + if (strcmp(srs_MaxUpPts, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].srs_MaxUpPts = TRUE; + } + else if (strcmp(srs_MaxUpPts, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].srs_MaxUpPts = FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, srs_MaxUpPts); + } + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_p0_Nominal = pusch_p0_Nominal; + + if ((pusch_p0_Nominal < -126) || (pusch_p0_Nominal > 24)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n", + RC.config_file_name, i, pusch_p0_Nominal); + +#ifndef Rel14 + if (strcmp(pusch_alpha, "AL0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al0; + } + else if (strcmp(pusch_alpha, "AL04") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al04; + } + else if (strcmp(pusch_alpha, "AL05") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al05; + } + else if (strcmp(pusch_alpha, "AL06") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al06; + } + else if (strcmp(pusch_alpha, "AL07") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al07; + } + else if (strcmp(pusch_alpha, "AL08") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al08; + } + else if (strcmp(pusch_alpha, "AL09") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al09; + } + else if (strcmp(pusch_alpha, "AL1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = UplinkPowerControlCommon__alpha_al1; + } +#else + if (strcmp(pusch_alpha, "AL0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al0; + } + else if (strcmp(pusch_alpha, "AL04") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al04; + } + else if (strcmp(pusch_alpha, "AL05") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al05; + } + else if (strcmp(pusch_alpha, "AL06") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al06; + } + else if (strcmp(pusch_alpha, "AL07") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al07; + } + else if (strcmp(pusch_alpha, "AL08") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al08; + } + else if (strcmp(pusch_alpha, "AL09") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al09; + } + else if (strcmp(pusch_alpha, "AL1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pusch_alpha = Alpha_r12_al1; + } +#endif + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n", + RC.config_file_name, i, pusch_alpha); + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_p0_Nominal = pucch_p0_Nominal; + + if ((pucch_p0_Nominal < -127) || (pucch_p0_Nominal > -96)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n", + RC.config_file_name, i, pucch_p0_Nominal); + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].msg3_delta_Preamble = msg3_delta_Preamble; + + if ((msg3_delta_Preamble < -1) || (msg3_delta_Preamble > 6)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n", + RC.config_file_name, i, msg3_delta_Preamble); + + + if (strcmp(pucch_deltaF_Format1, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format1 = DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format1, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format1= DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF0; + } + else if (strcmp(pucch_deltaF_Format1, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format1= DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format1); + + if (strcmp(pucch_deltaF_Format1b, "deltaF1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format1b= DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF1; + } + else if (strcmp(pucch_deltaF_Format1b, "deltaF3") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format1b= DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; + } + else if (strcmp(pucch_deltaF_Format1b, "deltaF5") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format1b= DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n", + RC.config_file_name, i, pucch_deltaF_Format1b); + + + if (strcmp(pucch_deltaF_Format2, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format2, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; + } + else if (strcmp(pucch_deltaF_Format2, "deltaF1") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF1; + } + else if (strcmp(pucch_deltaF_Format2, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2= DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2); + + if (strcmp(pucch_deltaF_Format2a, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2a= DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format2a, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2a= DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; + } + else if (strcmp(pucch_deltaF_Format2a, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2a= DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2a); + + if (strcmp(pucch_deltaF_Format2b, "deltaF_2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2b= DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF_2; + } + else if (strcmp(pucch_deltaF_Format2b, "deltaF0") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2b= DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; + } + else if (strcmp(pucch_deltaF_Format2b, "deltaF2") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pucch_deltaF_Format2b= DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n", + RC.config_file_name, i, pucch_deltaF_Format2b); + + + + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].rach_numberOfRA_Preambles= (rach_numberOfRA_Preambles / 4) - 1; + + if ((rach_numberOfRA_Preambles < 4) || (rach_numberOfRA_Preambles > 64) || ((rach_numberOfRA_Preambles & 3) != 0)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n", + RC.config_file_name, i, rach_numberOfRA_Preambles); + + if (strcmp(rach_preamblesGroupAConfig, "ENABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].rach_preamblesGroupAConfig= TRUE; + + if (!(config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, &rach_sizeOfRA_PreamblesGroupA) + && config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, &rach_messageSizeGroupA) + && config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, &rach_messagePowerOffsetGroupB))) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d rach_sizeOfRA_PreamblesGroupA, messageSizeGroupA,messagePowerOffsetGroupB!\n", + RC.config_file_name, i); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_sizeOfRA_PreamblesGroupA= (rach_sizeOfRA_PreamblesGroupA/4)-1; + + if ((rach_numberOfRA_Preambles <4) || (rach_numberOfRA_Preambles>60) || ((rach_numberOfRA_Preambles&3)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n", + RC.config_file_name, i, rach_sizeOfRA_PreamblesGroupA); + + + switch (rach_messageSizeGroupA) { + case 56: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b56; + break; + + case 144: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b144; + break; + + case 208: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b208; + break; + + case 256: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messageSizeGroupA= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messageSizeGroupA_b256; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n", + RC.config_file_name, i, rach_messageSizeGroupA); + break; + } + + if (strcmp(rach_messagePowerOffsetGroupB,"minusinfinity")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_minusinfinity; + } + + else if (strcmp(rach_messagePowerOffsetGroupB,"dB0")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB0; + } + + else if (strcmp(rach_messagePowerOffsetGroupB,"dB5")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB5; + } + + else if (strcmp(rach_messagePowerOffsetGroupB,"dB8")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB8; + } + + else if (strcmp(rach_messagePowerOffsetGroupB,"dB10")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB10; + } + + else if (strcmp(rach_messagePowerOffsetGroupB,"dB12")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB12; + } + + else if (strcmp(rach_messagePowerOffsetGroupB,"dB15")==0) { + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB15; + } + + else if (strcmp(rach_messagePowerOffsetGroupB,"dB18")==0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].rach_messagePowerOffsetGroupB= RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n", + RC.config_file_name, i, rach_messagePowerOffsetGroupB); + + } + else if (strcmp(rach_preamblesGroupAConfig, "DISABLE") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].rach_preamblesGroupAConfig= FALSE; + } + else + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n", + RC.config_file_name, i, rach_preamblesGroupAConfig); + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleInitialReceivedTargetPower= (rach_preambleInitialReceivedTargetPower+120)/2; + + if ((rach_preambleInitialReceivedTargetPower<-120) || (rach_preambleInitialReceivedTargetPower>-90) || ((rach_preambleInitialReceivedTargetPower&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n", + RC.config_file_name, i, rach_preambleInitialReceivedTargetPower); + + + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_powerRampingStep= rach_powerRampingStep/2; + + if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0)) + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n", + RC.config_file_name, i, rach_powerRampingStep); + + + + switch (rach_preambleTransMax) { +#ifndef Rel14 + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4; + break; + + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5; + break; + + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6; + break; + + case 7: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8; + break; + + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; + break; + + case 20: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20; + break; + + case 50: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50; + break; + + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200; + break; + +#else + + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n3; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n4; + break; + + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n5; + break; + + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n6; + break; + + case 7: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n7; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n8; + break; + + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n10; + break; + + case 20: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n20; + break; + + case 50: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n50; + break; + + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].rach_preambleTransMax= PreambleTransMax_n200; + break; +#endif + + 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).radioresourceconfig_BR[j].rach_raResponseWindowSize= (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).radioresourceconfig_BR[j].rach_macContentionResolutionTimer= (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).radioresourceconfig_BR[j].rach_maxHARQ_Msg3Tx= 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).radioresourceconfig_BR[j].pcch_defaultPagingCycle= PCCH_Config__defaultPagingCycle_rf32; + break; + + case 64: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pcch_defaultPagingCycle= PCCH_Config__defaultPagingCycle_rf64; + break; + + case 128: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pcch_defaultPagingCycle= PCCH_Config__defaultPagingCycle_rf128; + break; + + case 256: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].pcch_defaultPagingCycle= 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).radioresourceconfig_BR[j].pcch_nB= PCCH_Config__nB_fourT; + } + else if (strcmp(pcch_nB, "twoT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pcch_nB= PCCH_Config__nB_twoT; + } + else if (strcmp(pcch_nB, "oneT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pcch_nB= PCCH_Config__nB_oneT; + } + else if (strcmp(pcch_nB, "halfT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pcch_nB= PCCH_Config__nB_halfT; + } + else if (strcmp(pcch_nB, "quarterT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pcch_nB= PCCH_Config__nB_quarterT; + } + else if (strcmp(pcch_nB, "oneEighthT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pcch_nB= PCCH_Config__nB_oneEighthT; + } + else if (strcmp(pcch_nB, "oneSixteenthT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pcch_nB= PCCH_Config__nB_oneSixteenthT; + } + else if (strcmp(pcch_nB, "oneThirtySecondT") == 0) { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].pcch_nB= 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).radioresourceconfig_BR[j].bcch_modificationPeriodCoeff = BCCH_Config__modificationPeriodCoeff_n2; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].bcch_modificationPeriodCoeff = BCCH_Config__modificationPeriodCoeff_n4; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].bcch_modificationPeriodCoeff = BCCH_Config__modificationPeriodCoeff_n8; + break; + + case 16: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].bcch_modificationPeriodCoeff = 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; + } + + + switch (ue_TimersAndConstants_t300) { + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms200; + break; + + case 300: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms300; + break; + + case 400: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms400; + break; + + case 600: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms600; + break; + + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms1000; + break; + + case 1500: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms1500; + break; + + case 2000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t300 = UE_TimersAndConstants__t300_ms2000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t300 choice: 100,200,300,400,600,1000,1500,2000 ", + RC.config_file_name, i, ue_TimersAndConstants_t300); + break; + + } + + switch (ue_TimersAndConstants_t301) { + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301 = UE_TimersAndConstants__t301_ms100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301 = UE_TimersAndConstants__t301_ms200; + break; + + case 300: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms300; + break; + + case 400: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms400; + break; + + case 600: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms600; + break; + + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms1000; + break; + + case 1500: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms1500; + break; + + case 2000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t301= UE_TimersAndConstants__t301_ms2000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t301 choice: 100,200,300,400,600,1000,1500,2000 ", + RC.config_file_name, i, ue_TimersAndConstants_t301); + break; + + } + + switch (ue_TimersAndConstants_t310) { + case 0: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms0; + break; + + case 50: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms50; + break; + + case 100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms100; + break; + + case 200: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms200; + break; + + case 500: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms500; + break; + + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms1000; + break; + + case 2000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t310= UE_TimersAndConstants__t310_ms2000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t310 choice: 0,50,100,200,500,1000,1500,2000 ", + RC.config_file_name, i, ue_TimersAndConstants_t310); + break; + + } + + switch (ue_TimersAndConstants_t311) { + case 1000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms1000; + break; + + case 3110: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms3000; + break; + + case 5000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms5000; + break; + + case 10000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms10000; + break; + + case 15000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms15000; + break; + + case 20000: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms20000; + break; + + case 31100: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_t311= UE_TimersAndConstants__t311_ms30000; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t311 choice: 1000,3000,5000,10000,150000,20000,30000", + RC.config_file_name, i, ue_TimersAndConstants_t311); + break; + + } + + switch (ue_TimersAndConstants_n310) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n1; + break; + + case 2: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n2; + break; + + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n3; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n4; + break; + + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n6; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n8; + break; + + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n10; + break; + + case 20: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n310= UE_TimersAndConstants__n310_n20; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_n310 choice: 1,2,3,4,6,6,8,10,20", + RC.config_file_name, i, ue_TimersAndConstants_n311); + break; + + } + + switch (ue_TimersAndConstants_n311) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n1; + break; + + case 2: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n2; + break; + + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n3; + break; + + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n4; + break; + + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n5; + break; + + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n6; + break; + + case 8: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n8; + break; + + case 10: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TimersAndConstants_n311= UE_TimersAndConstants__n311_n10; + break; + + default: + AssertFatal (0, + "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TimersAndConstants_t311 choice: 1,2,3,4,5,6,8,10", + RC.config_file_name, i, ue_TimersAndConstants_t311); + break; + + } + + switch (ue_TransmissionMode) { + case 1: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm1; + break; + case 2: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm2; + break; + case 3: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm3; + break; + case 4: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm4; + break; + case 5: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm5; + break; + case 6: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TransmissionMode= AntennaInfoDedicated__transmissionMode_tm6; + break; + case 7: + RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[j].ue_TransmissionMode= 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; + } + + int hyperSFN_r13; + int eDRX_Allowed_r13; + int q_RxLevMinCE_r13; + int q_QualMinRSRQ_CE_r13; + int si_WindowLength_BR_r13; + int si_RepetitionPattern_r13; + uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13; + int startSymbolBR_r13; + int si_HoppingConfigCommon_r13; + int si_ValidityTime_r13; + int mpdcch_pdsch_HoppingNB_r13; + int interval_DLHoppingConfigCommonModeA_r13_val; + int interval_DLHoppingConfigCommonModeB_r13_val; + int mpdcch_pdsch_HoppingOffset_r13; + int preambleTransMax_CE_r13; + int mpdcch_startSF_CSS_RA_r13_val; + int prach_HoppingOffset_r13; + int schedulingInfoSIB1_BR_r13; + char* cellSelectionInfoCE_r13 = NULL; + char* bandwidthReducedAccessRelatedInfo_r13 = NULL; + char* fdd_DownlinkOrTddSubframeBitmapBR_r13 = NULL; + char* fdd_UplinkSubframeBitmapBR_r13 = NULL; + char* freqHoppingParametersDL_r13 = NULL; + char* interval_DLHoppingConfigCommonModeA_r13 = NULL; + char* interval_DLHoppingConfigCommonModeB_r13 = NULL; + char* prach_ConfigCommon_v1310 = NULL; + char* mpdcch_startSF_CSS_RA_r13; + + + if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_schedulingInfoSIB1, &schedulingInfoSIB1_BR_r13)) + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d schedulingInfoSIB1_BR_r13!\n", + RC.config_file_name, i); + RRC_CONFIGURATION_REQ(msg_p).schedulingInfoSIB1_BR_r13[j]= schedulingInfoSIB1_BR_r13; + + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_HYPERSFN, &hyperSFN_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).hyperSFN_r13[j]= calloc(1, sizeof(uint16_t)); + *RRC_CONFIGURATION_REQ(msg_p).hyperSFN_r13[j]= (uint16_t)hyperSFN_r13; + } + else + RRC_CONFIGURATION_REQ(msg_p).hyperSFN_r13[j]= NULL; + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_EDRX_ALLOWED, &eDRX_Allowed_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).eDRX_Allowed_r13[j]= calloc(1, sizeof(long)); + *RRC_CONFIGURATION_REQ(msg_p).eDRX_Allowed_r13[j]= eDRX_Allowed_r13; + } + else + RRC_CONFIGURATION_REQ(msg_p).eDRX_Allowed_r13[j]= NULL; + + if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_CELLSELECTIONINFOCE, &cellSelectionInfoCE_r13) && !strcmp(cellSelectionInfoCE_r13, "ENABLE")) + { + RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[j]= TRUE; + if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_Q_RXLEVMINCE, &q_RxLevMinCE_r13)) + { + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d q_RxLevMinCE_r13!\n", + RC.config_file_name, i); + + } + RRC_CONFIGURATION_REQ(msg_p).q_RxLevMinCE_r13[j]= q_RxLevMinCE_r13; + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_Q_QUALMINRSRQ_CE, &q_QualMinRSRQ_CE_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[j]= calloc(1, sizeof(long)); + *RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[j]= q_QualMinRSRQ_CE_r13; + + } + else + RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[j]= NULL; + + } + else + RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[j]= FALSE; + + if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_BRAccessRelatedInfo, &bandwidthReducedAccessRelatedInfo_r13) && !strcmp(bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) + { + RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[j] = TRUE; + if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_WINDOWLENGTH_BR, &si_WindowLength_BR_r13) || + !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_REPETITIONPATTERN, &si_RepetitionPattern_r13) || + !config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDD_SFB_BR, &fdd_DownlinkOrTddSubframeBitmapBR_r13) || + !config_setting_lookup_int64(setting_br13, ENB_CONFIG_STRING_FDD_DLORTDDSFB_BR_VAL, &fdd_DownlinkOrTddSubframeBitmapBR_val_r13) || + !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_FDD_ULSUBFRAMEBITMAPBR, &fdd_UplinkSubframeBitmapBR_r13) || + !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_STARTSYMBOLBR, &startSymbolBR_r13) || + !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_SI_HOPPINGCONFIGCOMMON, &si_HoppingConfigCommon_r13)) + { + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d si_WindowLength_BR_r13, si_RepetitionPattern_r13, fdd_DownlinkOrTddSubframeBitmapBR_r13, fdd_UplinkSubframeBitmapBR_r13!\n", + RC.config_file_name, i); + + } + RRC_CONFIGURATION_REQ(msg_p).si_WindowLength_BR_r13[j] = si_WindowLength_BR_r13; + RRC_CONFIGURATION_REQ(msg_p).si_RepetitionPattern_r13[j] = si_RepetitionPattern_r13; + if (!strcmp(fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) + RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = FALSE; + else + RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[j] = TRUE; + RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[j] = fdd_DownlinkOrTddSubframeBitmapBR_val_r13; + RRC_CONFIGURATION_REQ(msg_p).fdd_UplinkSubframeBitmapBR_r13[j] = fdd_UplinkSubframeBitmapBR_r13; + RRC_CONFIGURATION_REQ(msg_p).si_HoppingConfigCommon_r13[j] = si_HoppingConfigCommon_r13; + RRC_CONFIGURATION_REQ(msg_p).startSymbolBR_r13[j] = startSymbolBR_r13; + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_Q_QUALMINRSRQ_CE, &si_ValidityTime_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[j] = calloc(1, sizeof(long)); + *RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[j] = si_ValidityTime_r13; + + } + else + RRC_CONFIGURATION_REQ(msg_p).si_ValidityTime_r13[j] = NULL; + + } + else + RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[j] = FALSE; + + if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_FREQHOPPINGPARAMETERSDL, &freqHoppingParametersDL_r13) && !strcmp(freqHoppingParametersDL_r13, "ENABLE")) + { + RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[j] = TRUE; + if (!config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB, &interval_DLHoppingConfigCommonModeA_r13) || + !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB_VAL, &interval_DLHoppingConfigCommonModeA_r13_val) || + !config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB, &interval_DLHoppingConfigCommonModeB_r13) || + !config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_INTERVAL_DLHOPPINGCONFIGCOMMONMODEB_VAL, &interval_DLHoppingConfigCommonModeB_r13_val)) + { + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d si_WindowLength_BR_r13, si_RepetitionPattern_r13, fdd_DownlinkOrTddSubframeBitmapBR_r13, fdd_UplinkSubframeBitmapBR_r13!\n", + RC.config_file_name, i); + + } + if (!strcmp(interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13")) + RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[j] = FALSE; + else + RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[j] = TRUE; + RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13_val[j] = interval_DLHoppingConfigCommonModeA_r13_val; + + if (!strcmp(interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13")) + RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[j] = FALSE; + else + RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[j] = TRUE; + RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13_val[j] = interval_DLHoppingConfigCommonModeB_r13_val; + + + + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPINGNB, &mpdcch_pdsch_HoppingNB_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[j] = calloc(1, sizeof(long)); + *RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[j] = mpdcch_pdsch_HoppingNB_r13; + + } + else + RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[j] = NULL; + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPINGOFFSET, &mpdcch_pdsch_HoppingOffset_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[j] = calloc(1, sizeof(long)); + *RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[j] = mpdcch_pdsch_HoppingOffset_r13; + } + else + RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingOffset_r13[j] = NULL; + + } + else + RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[j] = FALSE; + + /////SIB2 Parameters + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PREAMBLETRANSMAX_CE_R13, &preambleTransMax_CE_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].preambleTransMax_CE_r13 = calloc(1, sizeof(long)); + *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].preambleTransMax_CE_r13 = preambleTransMax_CE_r13; + } + else + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].preambleTransMax_CE_r13 = NULL; + + if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_PRACH_CONFIGCOMMON_V1310, &prach_ConfigCommon_v1310) && !strcmp(prach_ConfigCommon_v1310, "ENABLE")) + { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].prach_ConfigCommon_v1310 = TRUE; + + if (config_setting_lookup_string(setting_br13, ENB_CONFIG_STRING_MPDCCH_STARTSF_CSS_RA_R13, &mpdcch_startSF_CSS_RA_r13)) + { + if (!config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_MPDCCH_STARTSF_CSS_RA_R13_VAL, &mpdcch_startSF_CSS_RA_r13_val)) + { + AssertFatal(0, + "Failed to parse eNB configuration file %s, enb %d mpdcch_startSF_CSS_RA_r13_val!\n", + RC.config_file_name, i); + + } + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(BOOLEAN_t)); + if (!strcmp(mpdcch_startSF_CSS_RA_r13, "tdd-r13")) + *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].mpdcch_startSF_CSS_RA_r13 = FALSE; + else + *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].mpdcch_startSF_CSS_RA_r13 = TRUE; + + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].mpdcch_startSF_CSS_RA_r13_val = mpdcch_startSF_CSS_RA_r13_val; + + } + else + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].mpdcch_startSF_CSS_RA_r13 = NULL; + + if (config_setting_lookup_int(setting_br13, ENB_CONFIG_STRING_PRACH_HOPPINGOFFSET_R13, &prach_HoppingOffset_r13)) + { + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].prach_HoppingOffset_r13 = calloc(1, sizeof(long)); + *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].prach_HoppingOffset_r13 = prach_HoppingOffset_r13; + + } + else + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].prach_HoppingOffset_r13 = NULL; + + } + else + RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[j].prach_ConfigCommon_v1310 = TRUE; + } + else + RRC_CONFIGURATION_REQ(msg_p).schedulingInfoSIB1_BR_r13[j] = 0; + } +#endif } - + setting_srb1 = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_SRB1); if (setting_srb1 != NULL) { @@ -2870,27 +3934,27 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { } 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); - } + 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); + 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) { @@ -3021,15 +4085,15 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { 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); - } + 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; + } + 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; } @@ -3038,28 +4102,28 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { 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" ); - } + 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); - } + 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); + } } */ @@ -3068,695 +4132,695 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) { setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG); if (setting_otg != NULL) { - num_otg_elements = config_setting_length(setting_otg); - printf("num otg elements %d \n", num_otg_elements); - enb_properties_loc.properties[enb_properties_loc_index]->num_otg_elements = 0; + num_otg_elements = config_setting_length(setting_otg); + printf("num otg elements %d \n", num_otg_elements); + enb_properties_loc.properties[enb_properties_loc_index]->num_otg_elements = 0; - for (j = 0; j < num_otg_elements; j++) { - subsetting_otg=config_setting_get_elem(setting_otg, j); + for (j = 0; j < num_otg_elements; j++) { + subsetting_otg=config_setting_get_elem(setting_otg, j); - if (config_setting_lookup_int(subsetting_otg, ENB_CONF_STRING_OTG_UE_ID, &otg_ue_id)) { - enb_properties_loc.properties[enb_properties_loc_index]->otg_ue_id[j] = otg_ue_id; - } else { - enb_properties_loc.properties[enb_properties_loc_index]->otg_ue_id[j] = 1; - } + if (config_setting_lookup_int(subsetting_otg, ENB_CONF_STRING_OTG_UE_ID, &otg_ue_id)) { + enb_properties_loc.properties[enb_properties_loc_index]->otg_ue_id[j] = otg_ue_id; + } else { + enb_properties_loc.properties[enb_properties_loc_index]->otg_ue_id[j] = 1; + } - if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_APP_TYPE, (const char **)&otg_app_type)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = map_str_to_int(otg_app_type_names,otg_app_type))== -1) { - enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = BCBR; - } - } else { - enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = NO_PREDEFINED_TRAFFIC; // 0 - } + if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_APP_TYPE, (const char **)&otg_app_type)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = map_str_to_int(otg_app_type_names,otg_app_type))== -1) { + enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = BCBR; + } + } else { + enb_properties_loc.properties[enb_properties_loc_index]->otg_app_type[j] = NO_PREDEFINED_TRAFFIC; // 0 + } - if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_BG_TRAFFIC, (const char **)&otg_bg_traffic)) { + if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_BG_TRAFFIC, (const char **)&otg_bg_traffic)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j] = map_str_to_int(switch_names,otg_bg_traffic)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j]=0; - } - } else { - enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j] = 0; - printf("otg bg %s\n", otg_bg_traffic); - } + if ((enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j] = map_str_to_int(switch_names,otg_bg_traffic)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j]=0; + } + } else { + enb_properties_loc.properties[enb_properties_loc_index]->otg_bg_traffic[j] = 0; + printf("otg bg %s\n", otg_bg_traffic); + } - enb_properties_loc.properties[enb_properties_loc_index]->num_otg_elements+=1; + enb_properties_loc.properties[enb_properties_loc_index]->num_otg_elements+=1; - } + } } // log_config subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG); if (subsetting != NULL) { - // global - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_LEVEL, (const char **) &glog_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->glog_level = map_str_to_int(log_level_names, glog_level)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO; - } + // global + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_LEVEL, (const char **) &glog_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->glog_level = map_str_to_int(log_level_names, glog_level)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO; + } - //printf( "\tGlobal log level :\t%s->%d\n",glog_level, enb_properties_loc.properties[enb_properties_loc_index]->glog_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO; - } + //printf( "\tGlobal log level :\t%s->%d\n",glog_level, enb_properties_loc.properties[enb_properties_loc_index]->glog_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,(const char **) &glog_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = map_str_to_int(log_verbosity_names, glog_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,(const char **) &glog_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = map_str_to_int(log_verbosity_names, glog_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED; + } - //printf( "\tGlobal log verbosity:\t%s->%d\n",glog_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED; - } + //printf( "\tGlobal log verbosity:\t%s->%d\n",glog_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED; + } - // HW - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_LEVEL, (const char **) &hw_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = map_str_to_int(log_level_names,hw_log_level)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO; - } + // HW + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_LEVEL, (const char **) &hw_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = map_str_to_int(log_level_names,hw_log_level)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO; + } - //printf( "\tHW log level :\t%s->%d\n",hw_log_level,enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO; - } + //printf( "\tHW log level :\t%s->%d\n",hw_log_level,enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_VERBOSITY, (const char **) &hw_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = map_str_to_int(log_verbosity_names,hw_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_VERBOSITY, (const char **) &hw_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = map_str_to_int(log_verbosity_names,hw_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED; + } - //printf( "\tHW log verbosity:\t%s->%d\n",hw_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED; - } + //printf( "\tHW log verbosity:\t%s->%d\n",hw_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED; + } - // phy - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_LEVEL,(const char **) &phy_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = map_str_to_int(log_level_names,phy_log_level)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO; - } + // phy + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_LEVEL,(const char **) &phy_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = map_str_to_int(log_level_names,phy_log_level)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO; + } - //printf( "\tPHY log level :\t%s->%d\n",phy_log_level,enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO; - } + //printf( "\tPHY log level :\t%s->%d\n",phy_log_level,enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_VERBOSITY, (const char **)&phy_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = map_str_to_int(log_verbosity_names,phy_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_VERBOSITY, (const char **)&phy_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = map_str_to_int(log_verbosity_names,phy_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED; + } - //printf( "\tPHY log verbosity:\t%s->%d\n",phy_log_level,enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED; - } + //printf( "\tPHY log verbosity:\t%s->%d\n",phy_log_level,enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED; + } - //mac - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_LEVEL, (const char **)&mac_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = map_str_to_int(log_level_names,mac_log_level)) == -1 ) { - enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO; - } + //mac + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_LEVEL, (const char **)&mac_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = map_str_to_int(log_level_names,mac_log_level)) == -1 ) { + enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO; + } - //printf( "\tMAC log level :\t%s->%d\n",mac_log_level,enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO; - } + //printf( "\tMAC log level :\t%s->%d\n",mac_log_level,enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_VERBOSITY, (const char **)&mac_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = map_str_to_int(log_verbosity_names,mac_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_VERBOSITY, (const char **)&mac_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = map_str_to_int(log_verbosity_names,mac_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED; + } - //printf( "\tMAC log verbosity:\t%s->%d\n",mac_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED; - } + //printf( "\tMAC log verbosity:\t%s->%d\n",mac_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED; + } - //rlc - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_LEVEL, (const char **)&rlc_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = map_str_to_int(log_level_names,rlc_log_level)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO; - } + //rlc + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_LEVEL, (const char **)&rlc_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = map_str_to_int(log_level_names,rlc_log_level)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO; + } - //printf( "\tRLC log level :\t%s->%d\n",rlc_log_level, enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO; - } + //printf( "\tRLC log level :\t%s->%d\n",rlc_log_level, enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_VERBOSITY, (const char **)&rlc_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = map_str_to_int(log_verbosity_names,rlc_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_VERBOSITY, (const char **)&rlc_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = map_str_to_int(log_verbosity_names,rlc_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED; + } - //printf( "\tRLC log verbosity:\t%s->%d\n",rlc_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED; - } + //printf( "\tRLC log verbosity:\t%s->%d\n",rlc_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED; + } - //pdcp - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_LEVEL, (const char **)&pdcp_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = map_str_to_int(log_level_names,pdcp_log_level)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO; - } + //pdcp + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_LEVEL, (const char **)&pdcp_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = map_str_to_int(log_level_names,pdcp_log_level)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO; + } - //printf( "\tPDCP log level :\t%s->%d\n",pdcp_log_level, enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO; - } + //printf( "\tPDCP log level :\t%s->%d\n",pdcp_log_level, enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_VERBOSITY, (const char **)&pdcp_log_verbosity)) { - enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = map_str_to_int(log_verbosity_names,pdcp_log_verbosity); - //printf( "\tPDCP log verbosity:\t%s->%d\n",pdcp_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_VERBOSITY, (const char **)&pdcp_log_verbosity)) { + enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = map_str_to_int(log_verbosity_names,pdcp_log_verbosity); + //printf( "\tPDCP log verbosity:\t%s->%d\n",pdcp_log_verbosity, enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = LOG_MED; + } - //rrc - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_LEVEL, (const char **)&rrc_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = map_str_to_int(log_level_names,rrc_log_level)) == -1 ) { - enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO; - } + //rrc + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_LEVEL, (const char **)&rrc_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = map_str_to_int(log_level_names,rrc_log_level)) == -1 ) { + enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO; + } - //printf( "\tRRC log level :\t%s->%d\n",rrc_log_level,enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO; - } + //printf( "\tRRC log level :\t%s->%d\n",rrc_log_level,enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_VERBOSITY, (const char **)&rrc_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = map_str_to_int(log_verbosity_names,rrc_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_VERBOSITY, (const char **)&rrc_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = map_str_to_int(log_verbosity_names,rrc_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED; + } - //printf( "\tRRC log verbosity:\t%s->%d\n",rrc_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED; - } + //printf( "\tRRC log verbosity:\t%s->%d\n",rrc_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_LEVEL, (const char **)>pu_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = map_str_to_int(log_level_names,gtpu_log_level)) == -1 ) { - enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_LEVEL, (const char **)>pu_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = map_str_to_int(log_level_names,gtpu_log_level)) == -1 ) { + enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO; + } - //printf( "\tGTPU log level :\t%s->%d\n",gtpu_log_level,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO; - } + //printf( "\tGTPU log level :\t%s->%d\n",gtpu_log_level,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_VERBOSITY, (const char **)>pu_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = map_str_to_int(log_verbosity_names,gtpu_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_VERBOSITY, (const char **)>pu_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = map_str_to_int(log_verbosity_names,gtpu_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED; + } - //printf( "\tGTPU log verbosity:\t%s->%d\n",gtpu_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED; - } + //printf( "\tGTPU log verbosity:\t%s->%d\n",gtpu_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_LEVEL, (const char **)&udp_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = map_str_to_int(log_level_names,udp_log_level)) == -1 ) { - enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_LEVEL, (const char **)&udp_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = map_str_to_int(log_level_names,udp_log_level)) == -1 ) { + enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO; + } - //printf( "\tUDP log level :\t%s->%d\n",udp_log_level,enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO; - } + //printf( "\tUDP log level :\t%s->%d\n",udp_log_level,enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_VERBOSITY, (const char **)&udp_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = map_str_to_int(log_verbosity_names,udp_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_VERBOSITY, (const char **)&udp_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = map_str_to_int(log_verbosity_names,udp_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED; + } - //printf( "\tUDP log verbosity:\t%s->%d\n",udp_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED; - } + //printf( "\tUDP log verbosity:\t%s->%d\n",udp_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_LEVEL, (const char **)&osa_log_level)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = map_str_to_int(log_level_names,osa_log_level)) == -1 ) { - enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_LEVEL, (const char **)&osa_log_level)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = map_str_to_int(log_level_names,osa_log_level)) == -1 ) { + enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO; + } - //printf( "\tOSA log level :\t%s->%d\n",osa_log_level,enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO; - } + //printf( "\tOSA log level :\t%s->%d\n",osa_log_level,enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO; + } - if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_VERBOSITY, (const char **)&osa_log_verbosity)) { - if ((enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = map_str_to_int(log_verbosity_names,osa_log_verbosity)) == -1) { - enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED; - } + if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_VERBOSITY, (const char **)&osa_log_verbosity)) { + if ((enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = map_str_to_int(log_verbosity_names,osa_log_verbosity)) == -1) { + enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED; + } - //printf( "\tOSA log verbosity:\t%s->%d\n",osa_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gosa_log_verbosity); - } else { - enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED; - } + //printf( "\tOSA log verbosity:\t%s->%d\n",osa_log_verbosity,enb_properties_loc.properties[enb_properties_loc_index]->gosa_log_verbosity); + } else { + enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED; + } } else { // not configuration is given - enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED; - enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO; - enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->glog_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->glog_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->hw_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->hw_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->phy_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->phy_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->mac_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->mac_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->rlc_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->pdcp_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->rrc_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->gtpu_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->udp_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->udp_log_verbosity = LOG_MED; + enb_properties_loc.properties[enb_properties_loc_index]->osa_log_level = LOG_INFO; + enb_properties_loc.properties[enb_properties_loc_index]->osa_log_verbosity = LOG_MED; } */ break; + } } } } } -} -int RCconfig_gtpu() { - config_t cfg; - config_setting_t *setting = NULL; - config_setting_t *subsetting = NULL; - config_setting_t *setting_enb = NULL; - int num_enbs = 0; - libconfig_int enb_id = 0; + int RCconfig_gtpu() { + config_t cfg; + config_setting_t *setting = NULL; + config_setting_t *subsetting = NULL; + config_setting_t *setting_enb = NULL; + int num_enbs = 0; + libconfig_int enb_id = 0; - char* enb_interface_name_for_S1U = NULL; - char* enb_ipv4_address_for_S1U = NULL; - libconfig_int enb_port_for_S1U = 0; - char *address = NULL; - char *cidr = NULL; - char *astring = NULL; + char* enb_interface_name_for_S1U = NULL; + char* enb_ipv4_address_for_S1U = NULL; + libconfig_int enb_port_for_S1U = 0; + char *address = NULL; + char *cidr = NULL; + char *astring = NULL; - // for no gcc warnings - (void)astring; + // for no gcc warnings + (void)astring; - LOG_I(GTPU,"Configuring GTPu\n"); + LOG_I(GTPU,"Configuring GTPu\n"); - config_init(&cfg); + config_init(&cfg); - if (RC.config_file_name != NULL) { - // Read the file. If there is an error, report it and exit. - if (! config_read_file(&cfg, RC.config_file_name)) { + if (RC.config_file_name != NULL) { + // Read the file. If there is an error, report it and exit. + if (! config_read_file(&cfg, RC.config_file_name)) { + config_destroy(&cfg); + AssertFatal (0, "Failed to parse eNB configuration file %s!\n", RC.config_file_name); + } + } else { config_destroy(&cfg); - AssertFatal (0, "Failed to parse eNB configuration file %s!\n", RC.config_file_name); + AssertFatal (0, "No eNB configuration file provided!\n"); } - } else { - config_destroy(&cfg); - AssertFatal (0, "No eNB configuration file provided!\n"); - } - // Get list of active eNBs, (only these will be configured) - setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS); + // Get list of active eNBs, (only these will be configured) + setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS); - if (setting != NULL) { - num_enbs = config_setting_length(setting); - setting_enb = config_setting_get_elem(setting, 0); - } - - if (num_enbs>0) { - // Output a list of all eNBs. - setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST); - if (setting != NULL) { + num_enbs = config_setting_length(setting); + setting_enb = config_setting_get_elem(setting, 0); + } + + if (num_enbs>0) { + // Output a list of all eNBs. + setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST); + + if (setting != NULL) { - setting_enb = config_setting_get_elem(setting, 0); - subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); + setting_enb = config_setting_get_elem(setting, 0); + subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - if (subsetting != NULL) { - if ( (config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, - (const char **)&enb_interface_name_for_S1U) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, - (const char **)&enb_ipv4_address_for_S1U) - && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, - &enb_port_for_S1U) - ) - ) { + if (subsetting != NULL) { + if ( (config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, + (const char **)&enb_interface_name_for_S1U) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, + (const char **)&enb_ipv4_address_for_S1U) + && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, + &enb_port_for_S1U) + ) + ) { - cidr = enb_ipv4_address_for_S1U; - address = strtok(cidr, "/"); + cidr = enb_ipv4_address_for_S1U; + address = strtok(cidr, "/"); - if (address) { - IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); - LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up); + LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up); + + } + + RC.gtpv1u_data_g->enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; } - - RC.gtpv1u_data_g->enb_port_for_S1u_S12_S4_up = enb_port_for_S1U; - } } } } -} -int RCconfig_S1(MessageDef *msg_p, uint32_t i) { - config_t cfg; - config_setting_t *setting = NULL; - config_setting_t *subsetting = NULL; - config_setting_t *setting_mme_addresses = NULL; - config_setting_t *setting_mme_address = NULL; - config_setting_t *setting_enb = NULL; - config_setting_t *setting_otg = NULL; - config_setting_t *subsetting_otg = NULL; - int parse_errors = 0; - int num_enbs = 0; - int num_mme_address = 0; - int num_otg_elements = 0; - int num_component_carriers = 0; - int j = 0; - libconfig_int enb_id = 0; + int RCconfig_S1(MessageDef *msg_p, uint32_t i) { + config_t cfg; + config_setting_t *setting = NULL; + config_setting_t *subsetting = NULL; + config_setting_t *setting_mme_addresses = NULL; + config_setting_t *setting_mme_address = NULL; + config_setting_t *setting_enb = NULL; + config_setting_t *setting_otg = NULL; + config_setting_t *subsetting_otg = NULL; + int parse_errors = 0; + int num_enbs = 0; + int num_mme_address = 0; + int num_otg_elements = 0; + int num_component_carriers = 0; + int j = 0; + libconfig_int enb_id = 0; - const char* cell_type = NULL; - const char* tac = 0; - const char* enb_name = NULL; - const char* mcc = 0; - const char* mnc = 0; + const char* cell_type = NULL; + const char* tac = 0; + const char* enb_name = NULL; + const char* mcc = 0; + const char* mnc = 0; - libconfig_int my_int; + libconfig_int my_int; - char* if_name = NULL; - char* ipv4 = NULL; - char* ipv4_remote = NULL; - char* ipv6 = NULL; - char* local_rf = NULL; - char* preference = NULL; - char* active = NULL; + char* if_name = NULL; + char* ipv4 = NULL; + char* ipv4_remote = NULL; + char* ipv6 = NULL; + char* local_rf = NULL; + char* preference = NULL; + char* active = NULL; - char* tr_preference = NULL; - libconfig_int local_port = 0; - libconfig_int remote_port = 0; - const char* active_enb[MAX_ENB]; - char* enb_interface_name_for_S1U = NULL; - char* enb_ipv4_address_for_S1U = NULL; - libconfig_int enb_port_for_S1U = 0; - char* enb_interface_name_for_S1_MME = NULL; - char* enb_ipv4_address_for_S1_MME = NULL; - char *address = NULL; - char *cidr = NULL; - char *astring = NULL; + char* tr_preference = NULL; + libconfig_int local_port = 0; + libconfig_int remote_port = 0; + const char* active_enb[MAX_ENB]; + char* enb_interface_name_for_S1U = NULL; + char* enb_ipv4_address_for_S1U = NULL; + libconfig_int enb_port_for_S1U = 0; + char* enb_interface_name_for_S1_MME = NULL; + char* enb_ipv4_address_for_S1_MME = NULL; + char *address = NULL; + char *cidr = NULL; + char *astring = NULL; - // for no gcc warnings - (void)astring; - (void)my_int; + // for no gcc warnings + (void)astring; + (void)my_int; - memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*)); + memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*)); - config_init(&cfg); + config_init(&cfg); - if (RC.config_file_name != NULL) { - // Read the file. If there is an error, report it and exit. - if (! config_read_file(&cfg, RC.config_file_name)) { + if (RC.config_file_name != NULL) { + // Read the file. If there is an error, report it and exit. + if (! config_read_file(&cfg, RC.config_file_name)) { + config_destroy(&cfg); + AssertFatal (0, "Failed to parse eNB configuration file %s!\n", RC.config_file_name); + } + } else { config_destroy(&cfg); - AssertFatal (0, "Failed to parse eNB configuration file %s!\n", RC.config_file_name); + AssertFatal (0, "No eNB configuration file provided!\n"); } - } else { - config_destroy(&cfg); - AssertFatal (0, "No eNB configuration file provided!\n"); - } #if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME) - if ( (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) { - if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { - asn_debug = 0; - asn1_xer_print = 0; - } else if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { - asn_debug = 1; - asn1_xer_print = 1; - } else if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { - asn_debug = 1; - asn1_xer_print = 2; - } else { - asn_debug = 0; - asn1_xer_print = 0; + if ( (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) { + if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { + asn_debug = 0; + asn1_xer_print = 0; + } else if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { + asn_debug = 1; + asn1_xer_print = 1; + } else if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) { + asn_debug = 1; + asn1_xer_print = 2; + } else { + asn_debug = 0; + asn1_xer_print = 0; + } } - } #endif - // Get list of active eNBs, (only these will be configured) - setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS); + // Get list of active eNBs, (only these will be configured) + setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS); - if (setting != NULL) { - num_enbs = config_setting_length(setting); - setting_enb = config_setting_get_elem(setting, i); - active_enb[i] = config_setting_get_string (setting_enb); - AssertFatal (active_enb[i] != NULL, - "Failed to parse config file %s, %uth attribute %s \n", - RC.config_file_name, i, ENB_CONFIG_STRING_ACTIVE_ENBS); - active_enb[i] = strdup(active_enb[i]); - } - - - if (num_enbs>0) { - // Output a list of all eNBs. - setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST); - if (setting != NULL) { num_enbs = config_setting_length(setting); + setting_enb = config_setting_get_elem(setting, i); + active_enb[i] = config_setting_get_string (setting_enb); + AssertFatal (active_enb[i] != NULL, + "Failed to parse config file %s, %uth attribute %s \n", + RC.config_file_name, i, ENB_CONFIG_STRING_ACTIVE_ENBS); + active_enb[i] = strdup(active_enb[i]); + } + + + if (num_enbs>0) { + // Output a list of all eNBs. + setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST); + + if (setting != NULL) { + num_enbs = config_setting_length(setting); - for (i = 0; i < num_enbs; i++) { - setting_enb = config_setting_get_elem(setting, i); + for (i = 0; i < num_enbs; i++) { + setting_enb = config_setting_get_elem(setting, i); - if (! config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_ENB_ID, &enb_id)) { - // Calculate a default eNB ID + if (! config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_ENB_ID, &enb_id)) { + // Calculate a default eNB ID # if defined(ENABLE_USE_MME) - uint32_t hash; + uint32_t hash; - hash = s1ap_generate_eNB_id (); - enb_id = i + (hash & 0xFFFF8); + hash = s1ap_generate_eNB_id (); + enb_id = i + (hash & 0xFFFF8); # else - enb_id = i; + enb_id = i; # endif - } + } - if ( !( config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type) - && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME, &enb_name) - && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac) - && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc) - && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc) + if ( !( config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE, &cell_type) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME, &enb_name) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE, &tac) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc) + && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc) - ) - ) { - AssertFatal (0, - "Failed to parse eNB configuration file %s, %u th enb\n", - RC.config_file_name, i); - continue; // FIXME this prevents segfaults below, not sure what happens after function exit - } + ) + ) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, %u th enb\n", + RC.config_file_name, i); + continue; // FIXME this prevents segfaults below, not sure what happens after function exit + } - // search if in active list - for (j=0; j < num_enbs; j++) { - if (strcmp(active_enb[j], enb_name) == 0) { + // search if in active list + for (j=0; j < num_enbs; j++) { + if (strcmp(active_enb[j], enb_name) == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; + S1AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id; - if (strcmp(cell_type, "CELL_MACRO_ENB") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB; - } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).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", - RC.config_file_name, i, cell_type); - } - - S1AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(enb_name); - S1AP_REGISTER_ENB_REQ (msg_p).tac = (uint16_t)atoi(tac); - S1AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(mcc); - S1AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(mnc); - S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(mnc); - S1AP_REGISTER_ENB_REQ (msg_p).default_drx = 0; - AssertFatal((S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || - (S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), - "BAD MNC DIGIT LENGTH %d", - S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); - - - - setting_mme_addresses = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_MME_IP_ADDRESS); - num_mme_address = config_setting_length(setting_mme_addresses); - S1AP_REGISTER_ENB_REQ (msg_p).nb_mme = 0; - - for (j = 0; j < num_mme_address; j++) { - setting_mme_address = config_setting_get_elem(setting_mme_addresses, j); - - if ( !( - config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV4_ADDRESS, (const char **)&ipv4) - && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV6_ADDRESS, (const char **)&ipv6) - && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, (const char **)&active) - && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, (const char **)&preference) - ) - ) { + if (strcmp(cell_type, "CELL_MACRO_ENB") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB; + } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB; + } else { AssertFatal (0, - "Failed to parse eNB configuration file %s, %u th enb %u th mme address !\n", - RC.config_file_name, i, j); - continue; // FIXME will prevent segfaults below, not sure what happens at function exit... + "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n", + RC.config_file_name, i, cell_type); } + + S1AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(enb_name); + S1AP_REGISTER_ENB_REQ (msg_p).tac = (uint16_t)atoi(tac); + S1AP_REGISTER_ENB_REQ (msg_p).mcc = (uint16_t)atoi(mcc); + S1AP_REGISTER_ENB_REQ (msg_p).mnc = (uint16_t)atoi(mnc); + S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = strlen(mnc); + S1AP_REGISTER_ENB_REQ (msg_p).default_drx = 0; + AssertFatal((S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 2) || + (S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length == 3), + "BAD MNC DIGIT LENGTH %d", + S1AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length); + + - S1AP_REGISTER_ENB_REQ (msg_p).nb_mme += 1; + setting_mme_addresses = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_MME_IP_ADDRESS); + num_mme_address = config_setting_length(setting_mme_addresses); + S1AP_REGISTER_ENB_REQ (msg_p).nb_mme = 0; - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4_address,ipv4); - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6_address,ipv6); + for (j = 0; j < num_mme_address; j++) { + setting_mme_address = config_setting_get_elem(setting_mme_addresses, j); - if (strcmp(active, "yes") == 0) { + if ( !( + config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV4_ADDRESS, (const char **)&ipv4) + && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV6_ADDRESS, (const char **)&ipv6) + && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, (const char **)&active) + && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, (const char **)&preference) + ) + ) { + AssertFatal (0, + "Failed to parse eNB configuration file %s, %u th enb %u th mme address !\n", + RC.config_file_name, i, j); + continue; // FIXME will prevent segfaults below, not sure what happens at function exit... + } + + S1AP_REGISTER_ENB_REQ (msg_p).nb_mme += 1; + + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4_address,ipv4); + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6_address,ipv6); + + if (strcmp(active, "yes") == 0) { #if defined(ENABLE_USE_MME) - EPC_MODE_ENABLED = 1; + EPC_MODE_ENABLED = 1; #endif - } - if (strcmp(preference, "ipv4") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4 = 1; - } else if (strcmp(preference, "ipv6") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6 = 1; - } else if (strcmp(preference, "no") == 0) { - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4 = 1; - S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6 = 1; + } + if (strcmp(preference, "ipv4") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4 = 1; + } else if (strcmp(preference, "ipv6") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6 = 1; + } else if (strcmp(preference, "no") == 0) { + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv4 = 1; + S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[j].ipv6 = 1; + } } - } - // SCTP SETTING - S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS; - S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS; + // SCTP SETTING + S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS; + S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS; # if defined(ENABLE_USE_MME) - subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_SCTP_CONFIG); + subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_SCTP_CONFIG); - if (subsetting != NULL) { - if ( (config_setting_lookup_int( subsetting, ENB_CONFIG_STRING_SCTP_INSTREAMS, &my_int) )) { - S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)my_int; - } + if (subsetting != NULL) { + if ( (config_setting_lookup_int( subsetting, ENB_CONFIG_STRING_SCTP_INSTREAMS, &my_int) )) { + S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)my_int; + } - if ( (config_setting_lookup_int( subsetting, ENB_CONFIG_STRING_SCTP_OUTSTREAMS, &my_int) )) { - S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)my_int; + if ( (config_setting_lookup_int( subsetting, ENB_CONFIG_STRING_SCTP_OUTSTREAMS, &my_int) )) { + S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)my_int; + } } - } #endif - // NETWORK_INTERFACES - subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); + // NETWORK_INTERFACES + subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG); - if (subsetting != NULL) { - if ( ( - config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, - (const char **)&enb_interface_name_for_S1_MME) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, - (const char **)&enb_ipv4_address_for_S1_MME) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, - (const char **)&enb_interface_name_for_S1U) - && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, - (const char **)&enb_ipv4_address_for_S1U) - && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, - &enb_port_for_S1U) - ) - ) { - // S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1U = strdup(enb_interface_name_for_S1U); - cidr = enb_ipv4_address_for_S1U; - address = strtok(cidr, "/"); + if (subsetting != NULL) { + if ( ( + config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, + (const char **)&enb_interface_name_for_S1_MME) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, + (const char **)&enb_ipv4_address_for_S1_MME) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, + (const char **)&enb_interface_name_for_S1U) + && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, + (const char **)&enb_ipv4_address_for_S1U) + && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, + &enb_port_for_S1U) + ) + ) { + // S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1U = strdup(enb_interface_name_for_S1U); + cidr = enb_ipv4_address_for_S1U; + address = strtok(cidr, "/"); - S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv6 = 0; - S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4 = 1; + S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv6 = 0; + S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4 = 1; - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address); + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address); - /* - in_addr_t ipv4_address; + /* + in_addr_t ipv4_address; - if (address) { - IPV4_STR_ADDR_TO_INT_NWBO ( address, ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); - } - strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, inet_ntoa(ipv4_address)); - // S1AP_REGISTER_ENB_REQ (msg_p).enb_port_for_S1U = enb_port_for_S1U; + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO ( address, ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" ); + } + strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, inet_ntoa(ipv4_address)); + // S1AP_REGISTER_ENB_REQ (msg_p).enb_port_for_S1U = enb_port_for_S1U; - S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1_MME = strdup(enb_interface_name_for_S1_MME); - cidr = enb_ipv4_address_for_S1_MME; - address = strtok(cidr, "/"); + S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1_MME = strdup(enb_interface_name_for_S1_MME); + cidr = enb_ipv4_address_for_S1_MME; + address = strtok(cidr, "/"); - if (address) { - IPV4_STR_ADDR_TO_INT_NWBO ( address, S1AP_REGISTER_ENB_REQ(msg_p).enb_ipv4_address_for_S1_MME, "BAD IP ADDRESS FORMAT FOR eNB S1_MME !\n" ); + if (address) { + IPV4_STR_ADDR_TO_INT_NWBO ( address, S1AP_REGISTER_ENB_REQ(msg_p).enb_ipv4_address_for_S1_MME, "BAD IP ADDRESS FORMAT FOR eNB S1_MME !\n" ); + } + */ } - */ } - } - break; + break; + } } } } } } -} -void RCConfig(const char *config_file_name) { + void RCConfig(const char *config_file_name) { - config_t cfg; - config_setting_t *setting = NULL; - config_setting_t *setting_enb = NULL; - config_setting_t *setting_component_carriers = NULL; - config_init(&cfg); + config_t cfg; + config_setting_t *setting = NULL; + config_setting_t *setting_enb = NULL; + config_setting_t *setting_component_carriers = NULL; + config_init(&cfg); - if (config_file_name != NULL) { - - RC.config_file_name = config_file_name; - if (! config_read_file(&cfg, RC.config_file_name)) { - config_destroy(&cfg); - AssertFatal (0, "Failed to parse eNB configuration file %s!\n", RC.config_file_name); - } - // Get num eNB instances - setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS); - - if (setting != NULL) RC.nb_inst = config_setting_length(setting); - if (RC.nb_inst > 0) { - printf("Number of eNB RRC instances %d\n",RC.nb_inst); - setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST); - RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int)); - for (int i=0;i 0) { + printf("Number of eNB RRC instances %d\n",RC.nb_inst); + setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST); + RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int)); + for (int i=0;i @@ -119,12 +119,12 @@ extern RAN_CONTEXT_t RC; uint16_t two_tier_hexagonal_cellIds[7] = {0,1,2,4,5,7,8}; uint16_t two_tier_hexagonal_adjacent_cellIds[7][6] = {{1,2,4,5,7,8}, // CellId 0 - {11,18,2,0,8,15}, // CellId 1 - {18,13,3,4,0,1}, // CellId 2 - {2,3,14,6,5,0}, // CellId 4 - {0,4,6,16,9,7}, // CellId 5 - {8,0,5,9,17,12}, // CellId 7 - {15,1,0,7,12,10} + {11,18,2,0,8,15}, // CellId 1 + {18,13,3,4,0,1}, // CellId 2 + {2,3,14,6,5,0}, // CellId 4 + {0,4,6,16,9,7}, // CellId 5 + {8,0,5,9,17,12}, // CellId 7 + {15,1,0,7,12,10} };// CellId 8 /* @@ -234,10 +234,10 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich AssertFatal(phich_Resource <= PHICH_Config__phich_Duration_extended,"Illegal phich_Duration\n"); mib->message.phich_Config.phich_Duration = phich_duration; LOG_I(RRC,"[MIB] systemBandwidth %x, phich_duration %x, phich_resource %x,sfn %x\n", - (uint32_t)mib->message.dl_Bandwidth, - (uint32_t)phich_duration, - (uint32_t)phich_Resource, - (uint32_t)sfn); + (uint32_t)mib->message.dl_Bandwidth, + (uint32_t)phich_duration, + (uint32_t)phich_Resource, + (uint32_t)sfn); mib->message.systemFrameNumber.buf = &sfn; mib->message.systemFrameNumber.size = 1; @@ -261,24 +261,24 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich enc_rval.failed_type->name, enc_rval.encoded); /* -#if defined(ENABLE_ITTI) -# if !defined(DISABLE_XER_SPRINT) - { + #if defined(ENABLE_ITTI) + # if !defined(DISABLE_XER_SPRINT) + { char message_string[20000]; size_t message_string_size; if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_BCCH_BCH_Message, (void *) &mib)) > 0) { - MessageDef *msg_p; + MessageDef *msg_p; - msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_BCCH, message_string_size + sizeof (IttiMsgText)); - msg_p->ittiMsg.rrc_dl_bcch.size = message_string_size; - memcpy(&msg_p->ittiMsg.rrc_dl_bcch.text, message_string, message_string_size); + msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_BCCH, message_string_size + sizeof (IttiMsgText)); + msg_p->ittiMsg.rrc_dl_bcch.size = message_string_size; + memcpy(&msg_p->ittiMsg.rrc_dl_bcch.text, message_string, message_string_size); - itti_send_msg_to_task(TASK_UNKNOWN, enb_module_idP, msg_p); + itti_send_msg_to_task(TASK_UNKNOWN, enb_module_idP, msg_p); } - } -# endif -#endif + } + # endif + #endif */ if (enc_rval.encoded==-1) { return(-1); @@ -292,7 +292,10 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, #if defined(ENABLE_ITTI) , RrcConfigurationReq *configuration #endif - ) +#ifdef Rel14 + , int br_flag +#endif + ) { // SystemInformation_t systemInformation; @@ -301,18 +304,32 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, asn_enc_rval_t enc_rval; SchedulingInfo_t schedulingInfo; SIB_Type_t sib_type; + uint8_t *buffer; + BCCH_DL_SCH_Message_t *bcch_message; + SystemInformationBlockType1_t **sib1; - uint8_t *buffer = carrier->SIB1; - BCCH_DL_SCH_Message_t *bcch_message = &carrier->siblock1; - SystemInformationBlockType1_BR_r13_t **sib1_br = &carrier->sib1; - - +#ifdef Rel14 + if (br_flag==0) { + buffer = carrier->SIB1; + bcch_message = &carrier->siblock1; + sib1 = &carrier->sib1; + } + else { + buffer = carrier->SIB1_BR; + bcch_message = &carrier->siblock1_BR; + sib1 = &carrier->sib1_BR; + } +#else + buffer = carrier->SIB1; + bcch_message = &carrier->siblock1; + sib1 = &carrier->sib1; +#endif memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t)); bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1; bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1; // memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t)); - *sib1_br = &bcch_message->message.choice.c1.choice.systemInformationBlockType1; + *sib1 = &bcch_message->message.choice.c1.choice.systemInformationBlockType1; memset(&PLMN_identity_info,0,sizeof(PLMN_IdentityInfo_t)); memset(&schedulingInfo,0,sizeof(SchedulingInfo_t)); @@ -373,410 +390,414 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, //assign_enum(&PLMN_identity_info.cellReservedForOperatorUse,PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved); PLMN_identity_info.cellReservedForOperatorUse=PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved; - ASN_SEQUENCE_ADD(&(*sib1_br)->cellAccessRelatedInfo.plmn_IdentityList.list, &PLMN_identity_info); + ASN_SEQUENCE_ADD(&(*sib1)->cellAccessRelatedInfo.plmn_IdentityList.list, &PLMN_identity_info); - // 16 bits - (*sib1_br)->cellAccessRelatedInfo.trackingAreaCode.buf = MALLOC(2); + // 16 bits + (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf = MALLOC(2); #if defined(ENABLE_ITTI) - (*sib1_br)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = (configuration->tac >> 8) & 0xff; - (*sib1_br)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = (configuration->tac >> 0) & 0xff; + (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = (configuration->tac >> 8) & 0xff; + (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = (configuration->tac >> 0) & 0xff; #else - (*sib1_br)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = 0x00; - (*sib1_br)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = 0x01; + (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[0] = 0x00; + (*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[1] = 0x01; #endif - (*sib1_br)->cellAccessRelatedInfo.trackingAreaCode.size = 2; - (*sib1_br)->cellAccessRelatedInfo.trackingAreaCode.bits_unused = 0; + (*sib1)->cellAccessRelatedInfo.trackingAreaCode.size = 2; + (*sib1)->cellAccessRelatedInfo.trackingAreaCode.bits_unused = 0; - // 28 bits - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf = MALLOC(8); + // 28 bits + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf = MALLOC(8); #if defined(ENABLE_ITTI) - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[0] = (configuration->cell_identity >> 20) & 0xff; - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[1] = (configuration->cell_identity >> 12) & 0xff; - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[2] = (configuration->cell_identity >> 4) & 0xff; - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[3] = (configuration->cell_identity << 4) & 0xf0; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[0] = (configuration->cell_identity >> 20) & 0xff; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[1] = (configuration->cell_identity >> 12) & 0xff; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[2] = (configuration->cell_identity >> 4) & 0xff; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[3] = (configuration->cell_identity << 4) & 0xf0; #else - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[0] = 0x00; - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[1] = 0x00; - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[2] = 0x00; - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.buf[3] = 0x10; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[0] = 0x00; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[1] = 0x00; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[2] = 0x00; + (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[3] = 0x10; #endif - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.size = 4; - (*sib1_br)->cellAccessRelatedInfo.cellIdentity.bits_unused = 4; + (*sib1)->cellAccessRelatedInfo.cellIdentity.size = 4; + (*sib1)->cellAccessRelatedInfo.cellIdentity.bits_unused = 4; - // assign_enum(&(*sib1)->cellAccessRelatedInfo.cellBarred,SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred); - (*sib1_br)->cellAccessRelatedInfo.cellBarred = SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred; + // assign_enum(&(*sib1)->cellAccessRelatedInfo.cellBarred,SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred); + (*sib1)->cellAccessRelatedInfo.cellBarred = SystemInformationBlockType1__cellAccessRelatedInfo__cellBarred_notBarred; - // assign_enum(&(*sib1)->cellAccessRelatedInfo.intraFreqReselection,SystemInformationBlockType1__cellAccessRelatedInfo__intraFreqReselection_allowed); - (*sib1_br)->cellAccessRelatedInfo.intraFreqReselection = SystemInformationBlockType1__cellAccessRelatedInfo__intraFreqReselection_notAllowed; - (*sib1_br)->cellAccessRelatedInfo.csg_Indication = 0; + // assign_enum(&(*sib1)->cellAccessRelatedInfo.intraFreqReselection,SystemInformationBlockType1__cellAccessRelatedInfo__intraFreqReselection_allowed); + (*sib1)->cellAccessRelatedInfo.intraFreqReselection = SystemInformationBlockType1__cellAccessRelatedInfo__intraFreqReselection_notAllowed; + (*sib1)->cellAccessRelatedInfo.csg_Indication = 0; - (*sib1_br)->cellSelectionInfo.q_RxLevMin = -65; - (*sib1_br)->cellSelectionInfo.q_RxLevMinOffset = NULL; - //(*sib1)->p_Max = CALLOC(1, sizeof(P_Max_t)); - //*((*sib1)->p_Max) = 23; - (*sib1_br)->freqBandIndicator = + (*sib1)->cellSelectionInfo.q_RxLevMin = -65; + (*sib1)->cellSelectionInfo.q_RxLevMinOffset = NULL; + //(*sib1)->p_Max = CALLOC(1, sizeof(P_Max_t)); + //*((*sib1)->p_Max) = 23; + (*sib1)->freqBandIndicator = #if defined(ENABLE_ITTI) - configuration->eutra_band[CC_id]; + configuration->eutra_band[CC_id]; #else - 7; + 7; #endif - schedulingInfo.si_Periodicity = SchedulingInfo__si_Periodicity_rf8; + schedulingInfo.si_Periodicity = SchedulingInfo__si_Periodicity_rf8; - // This is for SIB2/3 - sib_type = SIB_Type_sibType3; - ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list, &sib_type); - ASN_SEQUENCE_ADD(&(*sib1_br)->schedulingInfoList.list, &schedulingInfo); + // This is for SIB2/3 + sib_type = SIB_Type_sibType3; + ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list, &sib_type); + ASN_SEQUENCE_ADD(&(*sib1)->schedulingInfoList.list, &schedulingInfo); - // ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL); + // ASN_SEQUENCE_ADD(&schedulingInfo.sib_MappingInfo.list,NULL); #if defined(ENABLE_ITTI) - if (configuration->frame_type[CC_id] == TDD) + if (configuration->frame_type[CC_id] == TDD) #endif + { + (*sib1)->tdd_Config = CALLOC(1, sizeof(struct TDD_Config)); + + (*sib1)->tdd_Config->subframeAssignment = +#if defined(ENABLE_ITTI) + configuration->tdd_config[CC_id]; +#else + 3; // +kogo this was frame_parms->tdd_config +#endif + + (*sib1)->tdd_Config->specialSubframePatterns = +#if defined(ENABLE_ITTI) + configuration->tdd_config_s[CC_id]; +#else + 0; // +kogo this was frame_parms->tdd_config_S; +#endif + } + + (*sib1)->si_WindowLength = SystemInformationBlockType1__si_WindowLength_ms20; + (*sib1)->systemInfoValueTag = 0; + +#ifdef Rel14 + (*sib1)->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v890_IEs_t)); + + SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension; + sib1_890->lateNonCriticalExtension = NULL; + sib1_890->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v920_IEs_t)); + memset(sib1_890->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v920_IEs_t)); + + SystemInformationBlockType1_v920_IEs_t *sib1_920 = (*sib1_890).nonCriticalExtension; + sib1_920->ims_EmergencySupport_r9 = NULL; // ptr + sib1_920->cellSelectionInfo_v920 = NULL; + sib1_920->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1130_IEs_t)); + memset(sib1_920->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1130_IEs_t)); + + //////Rel11 + SystemInformationBlockType1_v1130_IEs_t *sib1_1130 = sib1_920->nonCriticalExtension; + + sib1_1130->tdd_Config_v1130 = NULL; // ptr + sib1_1130->cellSelectionInfo_v1130 = NULL; // ptr + sib1_1130->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1250_IEs_t)); + memset(sib1_1130->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1250_IEs_t)); + + + ///Rel12 + SystemInformationBlockType1_v1250_IEs_t *sib1_1250 = sib1_1130->nonCriticalExtension; + sib1_1250->cellAccessRelatedInfo_v1250.category0Allowed_r12 = NULL; // long* + sib1_1250->cellSelectionInfo_v1250 = NULL; + sib1_1250->freqBandIndicatorPriority_r12 = 0; // long* // FIXME + sib1_1250->nonCriticalExtension = NULL; + + + + + ////Rel1310 +#if defined(ENABLE_ITTI) + if (configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) + { + sib1_1250->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1310_IEs_t)); + memset(sib1_1250->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1310_IEs_t)); + SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension; + + + if (configuration->hyperSFN_r13[CC_id]) { - (*sib1_br)->tdd_Config = CALLOC(1, sizeof(struct TDD_Config)); - - (*sib1_br)->tdd_Config->subframeAssignment = -#if defined(ENABLE_ITTI) - configuration->tdd_config[CC_id]; -#else - 3; // +kogo this was frame_parms->tdd_config -#endif - - (*sib1_br)->tdd_Config->specialSubframePatterns = -#if defined(ENABLE_ITTI) - configuration->tdd_config_s[CC_id]; -#else - 0; // +kogo this was frame_parms->tdd_config_S; -#endif + sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type + memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t)); + sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t)); + memmove(sib1_1310->hyperSFN_r13->buf, configuration->hyperSFN_r13[CC_id], 2 * sizeof(uint8_t)); + sib1_1310->hyperSFN_r13->size = 2; + sib1_1310->hyperSFN_r13->bits_unused = 6; } + else + sib1_1310->hyperSFN_r13 = NULL; - (*sib1_br)->si_WindowLength = SystemInformationBlockType1__si_WindowLength_ms20; - (*sib1_br)->systemInfoValueTag = 0; - (*sib1_br)->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v890_IEs_t)); - - SystemInformationBlockType1_v890_IEs_t *sib1_br_890 = (*sib1_br)->nonCriticalExtension; - sib1_br_890->lateNonCriticalExtension = NULL; - sib1_br_890->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v920_IEs_t)); - memset(sib1_br_890->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v920_IEs_t)); - - SystemInformationBlockType1_v920_IEs_t *sib1_br_920 = (*sib1_br_890).nonCriticalExtension; - sib1_br_920->ims_EmergencySupport_r9 = NULL; // ptr - sib1_br_920->cellSelectionInfo_v920 = NULL; - sib1_br_920->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1130_IEs_t)); - memset(sib1_br_920->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1130_IEs_t)); - - //////Rel11 - SystemInformationBlockType1_v1130_IEs_t *sib1_br_1130 = sib1_br_920->nonCriticalExtension; - - sib1_br_1130->tdd_Config_v1130 = NULL; // ptr - sib1_br_1130->cellSelectionInfo_v1130 = NULL; // ptr - sib1_br_1130->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1250_IEs_t)); - memset(sib1_br_1130->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1250_IEs_t)); - - - ///Rel12 - SystemInformationBlockType1_v1250_IEs_t *sib1_br_1250 = sib1_br_1130->nonCriticalExtension; - sib1_br_1250->cellAccessRelatedInfo_v1250.category0Allowed_r12 = NULL; // long* - sib1_br_1250->cellSelectionInfo_v1250 = NULL; - sib1_br_1250->freqBandIndicatorPriority_r12 = 0; // long* // FIXME - sib1_br_1250->nonCriticalExtension = NULL; - - - - - ////Rel1310 -#if defined(ENABLE_ITTI) - if (configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) + if (configuration->eDRX_Allowed_r13[CC_id]) { - sib1_br_1250->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1310_IEs_t)); - memset(sib1_br_1250->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1310_IEs_t)); - SystemInformationBlockType1_v1310_IEs_t *sib1_br_1310 = sib1_br_1250->nonCriticalExtension; + sib1_1310->eDRX_Allowed_r13 = calloc(1, sizeof(long)); + *sib1_1310->eDRX_Allowed_r13 = *configuration->eDRX_Allowed_r13[CC_id]; + } + else + sib1_1310->eDRX_Allowed_r13 = NULL; // long* + + if (configuration->cellSelectionInfoCE_r13[CC_id]) + { + sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(CellSelectionInfoCE_r13_t)); + memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(CellSelectionInfoCE_r13_t)); + sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = configuration->q_RxLevMinCE_r13[CC_id]; // (Q_RxLevMin_t) long + if (configuration->q_QualMinRSRQ_CE_r13[CC_id]) + { + sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = calloc(1, sizeof(long)); + *sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = *configuration->q_QualMinRSRQ_CE_r13[CC_id]; + } + else + sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL; + } + else + sib1_1310->cellSelectionInfoCE_r13 = NULL; + + if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id]) + { + sib1_1310->bandwidthReducedAccessRelatedInfo_r13 + = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13)); + + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13 + = configuration->si_WindowLength_BR_r13[CC_id]; // 0 - if (configuration->hyperSFN_r13[CC_id]) - { - sib1_br_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type - memset(sib1_br_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t)); - sib1_br_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t)); - memmove(sib1_br_1310->hyperSFN_r13->buf, configuration->hyperSFN_r13[CC_id], 2 * sizeof(uint8_t)); - sib1_br_1310->hyperSFN_r13->size = 2; - sib1_br_1310->hyperSFN_r13->bits_unused = 6; - } - else - sib1_br_1310->hyperSFN_r13 = NULL; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13 + = configuration->si_RepetitionPattern_r13[CC_id]; // 0 - if (configuration->eDRX_Allowed_r13[CC_id]) - { - sib1_br_1310->eDRX_Allowed_r13 = calloc(1, sizeof(long)); - *sib1_br_1310->eDRX_Allowed_r13 = *configuration->eDRX_Allowed_r13[CC_id]; - } - else - sib1_br_1310->eDRX_Allowed_r13 = NULL; // long* + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(SchedulingInfoList_BR_r13_t)); + SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(SchedulingInfo_BR_r13_t)); + memset(schedulinginfo_br_13, 0, sizeof(SchedulingInfo_BR_r13_t)); + schedulinginfo_br_13->si_Narrowband_r13 = 1; + schedulinginfo_br_13->si_TBS_r13 = SchedulingInfo_BR_r13__si_TBS_r13_b152; + ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13); - if (configuration->cellSelectionInfoCE_r13[CC_id]) - { - sib1_br_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(CellSelectionInfoCE_r13_t)); - memset(sib1_br_1310->cellSelectionInfoCE_r13, 0, sizeof(CellSelectionInfoCE_r13_t)); - sib1_br_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = configuration->q_RxLevMinCE_r13[CC_id]; // (Q_RxLevMin_t) long - if (configuration->q_QualMinRSRQ_CE_r13[CC_id]) - { - sib1_br_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = calloc(1, sizeof(long)); - *sib1_br_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = *configuration->q_QualMinRSRQ_CE_r13[CC_id]; - } - else - sib1_br_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL; - } - else - sib1_br_1310->cellSelectionInfoCE_r13 = NULL; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 + = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0, + sizeof(sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13))); - if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id]) - { - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13 - = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13)); + if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id]) + { + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present + = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13 - = configuration->si_WindowLength_BR_r13[CC_id]; // 0 + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t)); + memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 2 * sizeof(uint8_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6; + } + else + { + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present + = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13; + + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf = calloc(5, sizeof(uint8_t)); + memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 5 * sizeof(uint8_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.size = 5; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.bits_unused = 0; + } + + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t)); + memmove(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, &configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id], + 2 * sizeof(uint8_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13 - = configuration->si_RepetitionPattern_r13[CC_id]; // 0 + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = configuration->startSymbolBR_r13[CC_id]; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 + = configuration->si_HoppingConfigCommon_r13[CC_id]; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(SchedulingInfoList_BR_r13_t)); - SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(SchedulingInfo_BR_r13_t)); - memset(schedulinginfo_br_13, 0, sizeof(SchedulingInfo_BR_r13_t)); - schedulinginfo_br_13->si_Narrowband_r13 = 1; - schedulinginfo_br_13->si_TBS_r13 = SchedulingInfo_BR_r13__si_TBS_r13_b152; - ASN_SEQUENCE_ADD(&sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13); + if (configuration->si_ValidityTime_r13[CC_id]) + { + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long)); + *sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 + = *configuration->si_ValidityTime_r13[CC_id]; + } + else + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = NULL; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 - = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0, - sizeof(sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13))); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(SystemInfoValueTagList_r13_t)); + SystemInfoValueTagSI_r13_t systemInfoValueTagSi_r13 = 0; + ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, &systemInfoValueTagSi_r13); + } + else + sib1_1310->bandwidthReducedAccessRelatedInfo_r13 = NULL; - if (configuration->bandwidthReducedAccessRelatedInfo_r13[CC_id]) - { - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present - = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13; + sib1_1310->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1320_IEs_t)); + memset(sib1_1310->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1320_IEs_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t)); - memmove(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 2 * sizeof(uint8_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6; - } - else - { - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present - = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13; - - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf = calloc(5, sizeof(uint8_t)); - memmove(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.buf, &configuration->fdd_DownlinkOrTddSubframeBitmapBR_val_r13[CC_id], 5 * sizeof(uint8_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.size = 5; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern40_r13.bits_unused = 0; - } - - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t)); - memmove(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, &configuration->fdd_UplinkSubframeBitmapBR_r13[CC_id], - 2 * sizeof(uint8_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6; - - - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = configuration->startSymbolBR_r13[CC_id]; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 - = configuration->si_HoppingConfigCommon_r13[CC_id]; - - if (configuration->si_ValidityTime_r13[CC_id]) - { - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long)); - *sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 - = *configuration->si_ValidityTime_r13[CC_id]; - } - else - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = NULL; - - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(SystemInfoValueTagList_r13_t)); - SystemInfoValueTagSI_r13_t systemInfoValueTagSi_r13 = 0; - ASN_SEQUENCE_ADD(&sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, &systemInfoValueTagSi_r13); - } - else - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13 = NULL; - - sib1_br_1310->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1320_IEs_t)); - memset(sib1_br_1310->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1320_IEs_t)); - - /////Rel1320 - SystemInformationBlockType1_v1320_IEs_t *sib1_br_1320 = sib1_br_1310->nonCriticalExtension; + /////Rel1320 + SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension; - if (configuration->freqHoppingParametersDL_r13[CC_id]) - { - sib1_br_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); - memset(sib1_br_1320->freqHoppingParametersDL_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); + if (configuration->freqHoppingParametersDL_r13[CC_id]) + { + sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); + memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); - if (configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]) - { - sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long)); - *sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = *configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]; - } - else - sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = NULL; + if (configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]) + { + sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long)); + *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = *configuration->mpdcch_pdsch_HoppingNB_r13[CC_id]; + } + else + sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = NULL; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); - memset(sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); + memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); - if (configuration->interval_DLHoppingConfigCommonModeA_r13[CC_id]) - { - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id]; - } - else - { - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_TDD_r13; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id]; - } + if (configuration->interval_DLHoppingConfigCommonModeA_r13[CC_id]) + { + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id]; + } + else + { + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_TDD_r13; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeA_r13_val[CC_id]; + } - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); - memset(sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); + memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); - if (configuration->interval_DLHoppingConfigCommonModeB_r13[CC_id]) - { - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id]; - } - else - { - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_TDD_r13; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id]; - } + if (configuration->interval_DLHoppingConfigCommonModeB_r13[CC_id]) + { + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id]; + } + else + { + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_TDD_r13; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_TDD_r13 = configuration->interval_DLHoppingConfigCommonModeB_r13_val[CC_id]; + } - if (configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]) - { + if (configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]) + { - sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long)); - *sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = *configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]; - } - else - sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = NULL; + sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long)); + *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = *configuration->mpdcch_pdsch_HoppingOffset_r13[CC_id]; + } + else + sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = NULL; - } - else - sib1_br_1320->freqHoppingParametersDL_r13 = NULL; + } + else + sib1_1320->freqHoppingParametersDL_r13 = NULL; - sib1_br_1320->nonCriticalExtension = NULL; + sib1_1320->nonCriticalExtension = NULL; } #else - sib1_br_1250->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1310_IEs_t)); - memset(sib1_br_1250->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1310_IEs_t)); - SystemInformationBlockType1_v1310_IEs_t *sib1_br_1310 = sib1_br_1250->nonCriticalExtension; + sib1_1250->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1310_IEs_t)); + memset(sib1_1250->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1310_IEs_t)); + SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension; - sib1_br_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type - memset(sib1_br_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t)); - sib1_br_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t)); - memset(sib1_br_1310->hyperSFN_r13->buf, 0, 2*sizeof(uint8_t)); - sib1_br_1310->hyperSFN_r13->size = 2; - sib1_br_1310->hyperSFN_r13->bits_unused = 6; + sib1_1310->hyperSFN_r13 = calloc(1, sizeof(BIT_STRING_t)); // type + memset(sib1_1310->hyperSFN_r13, 0, sizeof(BIT_STRING_t)); + sib1_1310->hyperSFN_r13->buf = calloc(2, sizeof(uint8_t)); + memset(sib1_1310->hyperSFN_r13->buf, 0, 2*sizeof(uint8_t)); + sib1_1310->hyperSFN_r13->size = 2; + sib1_1310->hyperSFN_r13->bits_unused = 6; - sib1_br_1310->eDRX_Allowed_r13 = NULL; // long* - sib1_br_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(CellSelectionInfoCE_r13_t)); - memset(sib1_br_1310->cellSelectionInfoCE_r13, 0, sizeof(CellSelectionInfoCE_r13_t)); - sib1_br_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = -70; // (Q_RxLevMin_t) long - sib1_br_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL; // (Q_RxLevMin_t) *long + sib1_1310->eDRX_Allowed_r13 = NULL; // long* + sib1_1310->cellSelectionInfoCE_r13 = calloc(1, sizeof(CellSelectionInfoCE_r13_t)); + memset(sib1_1310->cellSelectionInfoCE_r13, 0, sizeof(CellSelectionInfoCE_r13_t)); + sib1_1310->cellSelectionInfoCE_r13->q_RxLevMinCE_r13 = -70; // (Q_RxLevMin_t) long + sib1_1310->cellSelectionInfoCE_r13->q_QualMinRSRQ_CE_r13 = NULL; // (Q_RxLevMin_t) *long - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13 - = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13 + = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13 - = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms20; // 0 + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13 + = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms20; // 0 - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13 - = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_everyRF; // 0 + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13 + = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_everyRF; // 0 - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(SchedulingInfoList_BR_r13_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13 = calloc(1, sizeof(SchedulingInfoList_BR_r13_t)); SchedulingInfo_BR_r13_t *schedulinginfo_br_13 = calloc(1, sizeof(SchedulingInfo_BR_r13_t)); memset(schedulinginfo_br_13, 0, sizeof(SchedulingInfo_BR_r13_t)); schedulinginfo_br_13->si_Narrowband_r13 = 1; schedulinginfo_br_13->si_TBS_r13 = SchedulingInfo_BR_r13__si_TBS_r13_b152; - ASN_SEQUENCE_ADD(&sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13); + ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13->list, schedulinginfo_br_13); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 - = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0, - sizeof(sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13))); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13 + = calloc(1, sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0, + sizeof(sizeof(struct SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13))); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present - = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, 0, 2 * sizeof(uint8_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present + = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf, 0, 2 * sizeof(uint8_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.size = 2; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.bits_unused = 6; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, 0, - 2 * sizeof(uint8_t)); - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = 1; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 - = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_on; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13 = calloc(1, sizeof(BIT_STRING_t)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13, 0, sizeof(BIT_STRING_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf = calloc(2, sizeof(uint8_t)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->buf, 0, + 2 * sizeof(uint8_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->size = 2; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_UplinkSubframeBitmapBR_r13->bits_unused = 6; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13 = 1; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 + = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_on; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long)); - memset(sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long)); - *sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 - = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_ValidityTime_r13_true; + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 = calloc(1, sizeof(long)); + memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13, 0, sizeof(long)); + *sib1_1310->bandwidthReducedAccessRelatedInfo_r13->si_ValidityTime_r13 + = SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_ValidityTime_r13_true; - sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(SystemInfoValueTagList_r13_t)); + sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13 = calloc(1, sizeof(SystemInfoValueTagList_r13_t)); SystemInfoValueTagSI_r13_t systemInfoValueTagSi_r13 = 0; - ASN_SEQUENCE_ADD(&sib1_br_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, &systemInfoValueTagSi_r13); + ASN_SEQUENCE_ADD(&sib1_1310->bandwidthReducedAccessRelatedInfo_r13->systemInfoValueTagList_r13->list, &systemInfoValueTagSi_r13); - sib1_br_1310->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1320_IEs_t)); - memset(sib1_br_1310->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1320_IEs_t)); + sib1_1310->nonCriticalExtension = calloc(1, sizeof(SystemInformationBlockType1_v1320_IEs_t)); + memset(sib1_1310->nonCriticalExtension, 0, sizeof(SystemInformationBlockType1_v1320_IEs_t)); /////Rel1320 - SystemInformationBlockType1_v1320_IEs_t *sib1_br_1320 = sib1_br_1310->nonCriticalExtension; - sib1_br_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); - memset(sib1_br_1320->freqHoppingParametersDL_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); + SystemInformationBlockType1_v1320_IEs_t *sib1_1320 = sib1_1310->nonCriticalExtension; + sib1_1320->freqHoppingParametersDL_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); + memset(sib1_1320->freqHoppingParametersDL_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13)); - sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long)); - *sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__mpdcch_pdsch_HoppingNB_r13_nb2; + sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = calloc(1, sizeof(long)); + *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingNB_r13 = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__mpdcch_pdsch_HoppingNB_r13_nb2; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); - memset(sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13__interval_FDD_r13_int1; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); + memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13)); + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13_PR_interval_FDD_r13; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeA_r13->choice.interval_FDD_r13 = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeA_r13__interval_FDD_r13_int1; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); - memset(sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13; - sib1_br_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13__interval_FDD_r13_int2; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13 = calloc(1, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); + memset(sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13, 0, sizeof(struct SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13)); + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->present = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13_PR_interval_FDD_r13; + sib1_1320->freqHoppingParametersDL_r13->interval_DLHoppingConfigCommonModeB_r13->choice.interval_FDD_r13 = SystemInformationBlockType1_v1320_IEs__freqHoppingParametersDL_r13__interval_DLHoppingConfigCommonModeB_r13__interval_FDD_r13_int2; - sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long)); - *sib1_br_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = 1; + sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = calloc(1, sizeof(long)); + *sib1_1320->freqHoppingParametersDL_r13->mpdcch_pdsch_HoppingOffset_r13 = 1; - sib1_br_1320->nonCriticalExtension = NULL; + sib1_1320->nonCriticalExtension = NULL; #endif +#endif + #ifdef XER_PRINT xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message, - (void*)bcch_message, - buffer, - 100); + (void*)bcch_message, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -809,11 +830,14 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, uint8_t do_SIB23(uint8_t Mod_id, - int CC_id + int CC_id #if defined(ENABLE_ITTI) - , RrcConfigurationReq *configuration + , RrcConfigurationReq *configuration #endif - ) +#ifdef Rel14 + , int br_flag +#endif + ) { struct SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib2_part,*sib3_part; #if defined(Rel10) || defined(Rel14) @@ -824,13 +848,31 @@ uint8_t do_SIB23(uint8_t Mod_id, #endif asn_enc_rval_t enc_rval; - uint8_t *buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23; - BCCH_DL_SCH_Message_t *bcch_message = &RC.rrc[Mod_id]->carrier[CC_id].systemInformation; - SystemInformationBlockType2_t **sib2_br = &RC.rrc[Mod_id]->carrier[CC_id].sib2; - SystemInformationBlockType3_t **sib3 = &RC.rrc[Mod_id]->carrier[CC_id].sib3; + + BCCH_DL_SCH_Message_t *bcch_message = &RC.rrc[Mod_id]->carrier[CC_id].systemInformation; + uint8_t *buffer; + SystemInformationBlockType2_t **sib2; + RadioResourceConfig *rrconfig; +#ifdef Rel14 + if (br_flag == 0) { + buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23; + sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2; + rrconfig = &configuration->radioresourceconfig[CC_id]; + } + else { + buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23_BR; + sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2_BR; + rrconfig = &configuration->radioresourceconfig_BR[CC_id]; + } +#else + buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23; + sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2; + rrconfig = &configuration->radioresourceconfig[CC_id]; +#endif + SystemInformationBlockType3_t **sib3 = &RC.rrc[Mod_id]->carrier[CC_id].sib3; #if defined(Rel10) || defined(Rel14) - SystemInformationBlockType13_r9_t **sib13 = &RC.rrc[Mod_id]->carrier[CC_id].sib13; - uint8_t MBMS_flag = RC.rrc[Mod_id]->carrier[CC_id].MBMS_flag; + SystemInformationBlockType13_r9_t **sib13 = &RC.rrc[Mod_id]->carrier[CC_id].sib13; + uint8_t MBMS_flag = RC.rrc[Mod_id]->carrier[CC_id].MBMS_flag; #endif if (bcch_message) { @@ -840,8 +882,8 @@ uint8_t do_SIB23(uint8_t Mod_id, exit(-1); } - if (!sib2_br) { - LOG_E(RRC,"[eNB %d] sib2_br is null, exiting\n", Mod_id); + if (!sib2) { + LOG_E(RRC,"[eNB %d] sib2 is null, exiting\n", Mod_id); exit(-1); } @@ -851,7 +893,7 @@ uint8_t do_SIB23(uint8_t Mod_id, } #if defined(Rel10) || defined(Rel14) - LOG_I(RRC,"[eNB %d] Configuration sib2_br/3, MBMS = %d\n", Mod_id, MBMS_flag); + LOG_I(RRC,"[eNB %d] Configuration sib2/3, MBMS = %d\n", Mod_id, MBMS_flag); #else LOG_I(RRC,"[eNB %d] Configuration SIB2/3\n", Mod_id); #endif @@ -863,7 +905,7 @@ uint8_t do_SIB23(uint8_t Mod_id, sib2_part->present = SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2; sib3_part->present = SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3; - *sib2_br = &sib2_part->choice.sib2; + *sib2 = &sib2_part->choice.sib2; *sib3 = &sib3_part->choice.sib3; #if defined(Rel10) || defined(Rel14) @@ -879,54 +921,54 @@ uint8_t do_SIB23(uint8_t Mod_id, // sib2 - (*sib2_br)->ac_BarringInfo = NULL; + (*sib2)->ac_BarringInfo = NULL; #if defined(Rel10) || defined(Rel14) #if 0 - (*sib2_br)->ssac_BarringForMMTEL_Voice_r9 = NULL; - (*sib2_br)->ssac_BarringForMMTEL_Video_r9 = NULL; - (*sib2_br)->ac_BarringForCSFB_r10 = NULL; + (*sib2)->ssac_BarringForMMTEL_Voice_r9 = NULL; + (*sib2)->ssac_BarringForMMTEL_Video_r9 = NULL; + (*sib2)->ac_BarringForCSFB_r10 = NULL; #endif - (*sib2_br)->ext1 = NULL; - (*sib2_br)->ext2 = NULL; + (*sib2)->ext1 = NULL; + (*sib2)->ext2 = NULL; #endif #if defined(ENABLE_ITTI) - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles = configuration->rach_numberOfRA_Preambles[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles = rrconfig->rach_numberOfRA_Preambles; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL; - if (configuration->rach_preamblesGroupAConfig[CC_id]) { - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig + if (rrconfig->rach_preamblesGroupAConfig) { + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = CALLOC(1,sizeof(struct RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig)); - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA - = configuration->rach_sizeOfRA_PreamblesGroupA[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messageSizeGroupA - = configuration->rach_messageSizeGroupA[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messagePowerOffsetGroupB - = configuration->rach_messagePowerOffsetGroupB[CC_id]; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->sizeOfRA_PreamblesGroupA + = rrconfig->rach_sizeOfRA_PreamblesGroupA; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messageSizeGroupA + = rrconfig->rach_messageSizeGroupA; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig->messagePowerOffsetGroupB + = rrconfig->rach_messagePowerOffsetGroupB; } - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep = configuration->rach_powerRampingStep[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower = configuration->rach_preambleInitialReceivedTargetPower[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax = configuration->rach_preambleTransMax[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize = configuration->rach_raResponseWindowSize[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer = configuration->rach_macContentionResolutionTimer[CC_id]; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = configuration->rach_maxHARQ_Msg3Tx[CC_id]; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep = rrconfig->rach_powerRampingStep; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower = rrconfig->rach_preambleInitialReceivedTargetPower; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax = rrconfig->rach_preambleTransMax; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize = rrconfig->rach_raResponseWindowSize; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer = rrconfig->rach_macContentionResolutionTimer; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = rrconfig->rach_maxHARQ_Msg3Tx; // LTE-M +kogo - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct RACH_ConfigCommon__ext1)); - memset((*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct RACH_ConfigCommon__ext1)); + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct RACH_ConfigCommon__ext1)); + memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct RACH_ConfigCommon__ext1)); - if (configuration->rach_maxHARQ_Msg3Tx[CC_id]) - { - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(PreambleTransMax_t)); - *(*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = configuration->rach_maxHARQ_Msg3Tx[CC_id]; // to be re-initialized when we find the enum - } + if (rrconfig->rach_maxHARQ_Msg3Tx) + { + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(PreambleTransMax_t)); + *(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = rrconfig->rach_maxHARQ_Msg3Tx; // to be re-initialized when we find the enum + } else - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = NULL; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(RACH_CE_LevelInfoList_r13_t)); - memset((*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(RACH_CE_LevelInfoList_r13_t)); + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(RACH_CE_LevelInfoList_r13_t)); + memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(RACH_CE_LevelInfoList_r13_t)); RACH_CE_LevelInfo_r13_t *rach_ce_levelinfo_r13 = calloc(1, sizeof(RACH_CE_LevelInfo_r13_t)); memset(rach_ce_levelinfo_r13, 0, sizeof(RACH_CE_LevelInfo_r13_t)); @@ -936,161 +978,161 @@ uint8_t do_SIB23(uint8_t Mod_id, rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13 = RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200; rach_ce_levelinfo_r13->rar_HoppingConfig_r13 = RACH_CE_LevelInfo_r13__rar_HoppingConfig_r13_off; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13->list, rach_ce_levelinfo_r13); -//--------------------------------------------------------------------------------------------------------------------------------------------------- +kogo + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13->list, rach_ce_levelinfo_r13); + //--------------------------------------------------------------------------------------------------------------------------------------------------- +kogo // BCCH-Config - (*sib2_br)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff - = configuration->bcch_modificationPeriodCoeff[CC_id]; + (*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff + = rrconfig->bcch_modificationPeriodCoeff; // PCCH-Config - (*sib2_br)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle - = configuration->pcch_defaultPagingCycle[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pcch_Config.nB - = configuration->pcch_nB[CC_id]; + (*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle + = rrconfig->pcch_defaultPagingCycle; + (*sib2)->radioResourceConfigCommon.pcch_Config.nB + = rrconfig->pcch_nB; // PRACH-Config - (*sib2_br)->radioResourceConfigCommon.prach_Config.rootSequenceIndex - = configuration->prach_root[CC_id]; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex - = configuration->prach_config_index[CC_id]; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag - = configuration->prach_high_speed[CC_id]; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig - = configuration->prach_zero_correlation[CC_id]; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset - = configuration->prach_freq_offset[CC_id]; + (*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex + = rrconfig->prach_root; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex + = rrconfig->prach_config_index; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag + = rrconfig->prach_high_speed; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig + = rrconfig->prach_zero_correlation; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset + = rrconfig->prach_freq_offset; // PDSCH-Config - (*sib2_br)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower - = configuration->pdsch_referenceSignalPower[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b - = configuration->pdsch_p_b[CC_id]; + (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower + = rrconfig->pdsch_referenceSignalPower; + (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b + = rrconfig->pdsch_p_b; // PUSCH-Config - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB - = configuration->pusch_n_SB[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode - = configuration->pusch_hoppingMode[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset - = configuration->pusch_hoppingOffset[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM - = configuration->pusch_enable64QAM[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled - = configuration->pusch_groupHoppingEnabled[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH - = configuration->pusch_groupAssignment[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled - = configuration->pusch_sequenceHoppingEnabled[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift - = configuration->pusch_nDMRS1[CC_id]; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB + = rrconfig->pusch_n_SB; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode + = rrconfig->pusch_hoppingMode; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset + = rrconfig->pusch_hoppingOffset; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM + = rrconfig->pusch_enable64QAM; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled + = rrconfig->pusch_groupHoppingEnabled; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH + = rrconfig->pusch_groupAssignment; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled + = rrconfig->pusch_sequenceHoppingEnabled; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift + = rrconfig->pusch_nDMRS1; // PUCCH-Config - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift - = configuration->pucch_delta_shift[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI - = configuration->pucch_nRB_CQI[CC_id]; - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN - = configuration->pucch_nCS_AN[CC_id]; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift + = rrconfig->pucch_delta_shift; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI + = rrconfig->pucch_nRB_CQI; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN + = rrconfig->pucch_nCS_AN; #if !defined(Rel10) && !defined(Rel14) - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN - = configuration->pucch_n1_AN[CC_id]; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN + = rrconfig->pucch_n1_AN; #endif // SRS Config - if (configuration->srs_enable[CC_id]==1) { - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present + if (rrconfig->srs_enable == 1) { + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present = SoundingRS_UL_ConfigCommon_PR_setup; - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_BandwidthConfig - = configuration->srs_BandwidthConfig[CC_id]; - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig - = configuration->srs_SubframeConfig[CC_id]; - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission - = configuration->srs_ackNackST[CC_id]; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_BandwidthConfig + = rrconfig->srs_BandwidthConfig; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig + = rrconfig->srs_SubframeConfig; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission + = rrconfig->srs_ackNackST; - if (configuration->srs_MaxUpPts[CC_id]) { - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts - = CALLOC(1,sizeof(long)); - *(*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts=1; + if (rrconfig->srs_MaxUpPts) { + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts + = CALLOC(1,sizeof(long)); + *(*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts=1; } else { - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts = NULL; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts = NULL; } RC.rrc[Mod_id]->srs_enable[CC_id] = 1; } else { RC.rrc[Mod_id]->srs_enable[CC_id] = 0; - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=SoundingRS_UL_ConfigCommon_PR_release; - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=SoundingRS_UL_ConfigCommon_PR_release; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0; } // uplinkPowerControlCommon - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH - = configuration->pusch_p0_Nominal[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH - = configuration->pucch_p0_Nominal[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha - = configuration->pusch_alpha[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1 - = configuration->pucch_deltaF_Format1[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b - = configuration->pucch_deltaF_Format1b[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2 - = configuration->pucch_deltaF_Format2[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a - = configuration->pucch_deltaF_Format2a[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b - = configuration->pucch_deltaF_Format2b[CC_id]; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 - = configuration->msg3_delta_Preamble[CC_id]; - (*sib2_br)->radioResourceConfigCommon.ul_CyclicPrefixLength - = configuration->ul_CyclicPrefixLength[CC_id]; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH + = rrconfig->pusch_p0_Nominal; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH + = rrconfig->pucch_p0_Nominal; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha + = rrconfig->pusch_alpha; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1 + = rrconfig->pucch_deltaF_Format1; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b + = rrconfig->pucch_deltaF_Format1b; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2 + = rrconfig->pucch_deltaF_Format2; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a + = rrconfig->pucch_deltaF_Format2a; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b + = rrconfig->pucch_deltaF_Format2b; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 + = rrconfig->msg3_delta_Preamble; + (*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength + = rrconfig->ul_CyclicPrefixLength; // LTE-M - +Kogo - (*sib2_br)->radioResourceConfigCommon.ext4 = calloc(1, sizeof(struct RadioResourceConfigCommonSIB__ext4)); - memset((*sib2_br)->radioResourceConfigCommon.ext4, 0, sizeof(struct RadioResourceConfigCommonSIB__ext4)); - (*sib2_br)->radioResourceConfigCommon.ext4->bcch_Config_v1310 = calloc(1, sizeof(BCCH_Config_v1310_t)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t)); - (*sib2_br)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64; - (*sib2_br)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = NULL; + (*sib2)->radioResourceConfigCommon.ext4 = calloc(1, sizeof(struct RadioResourceConfigCommonSIB__ext4)); + memset((*sib2)->radioResourceConfigCommon.ext4, 0, sizeof(struct RadioResourceConfigCommonSIB__ext4)); + (*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310 = calloc(1, sizeof(BCCH_Config_v1310_t)); + memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t)); + (*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64; + (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = NULL; - if (configuration->prach_ConfigCommon_v1310[CC_id]) - { - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = calloc(1, sizeof(PRACH_ConfigSIB_v1310_t)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310, 0, sizeof(PRACH_ConfigSIB_v1310_t)); + if (rrconfig->prach_ConfigCommon_v1310) + { + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = calloc(1, sizeof(PRACH_ConfigSIB_v1310_t)); + memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310, 0, sizeof(PRACH_ConfigSIB_v1310_t)); RSRP_Range_t rsrp_range = 60; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, &rsrp_range); + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, &rsrp_range); - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = NULL; - if (configuration->mpdcch_startSF_CSS_RA_r13[CC_id]) - { - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); + if (rrconfig->mpdcch_startSF_CSS_RA_r13) + { + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); + memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); - if (*configuration->mpdcch_startSF_CSS_RA_r13[CC_id]) - { - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13; - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = configuration->mpdcch_startSF_CSS_RA_r13_val[CC_id]; - } - else - { - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_tdd_r13; - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.tdd_r13 = configuration->mpdcch_startSF_CSS_RA_r13_val[CC_id]; - } - } + if (*rrconfig->mpdcch_startSF_CSS_RA_r13) + { + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = rrconfig->mpdcch_startSF_CSS_RA_r13_val; + } + else + { + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_tdd_r13; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.tdd_r13 = rrconfig->mpdcch_startSF_CSS_RA_r13_val; + } + } - if (configuration->prach_HoppingOffset_r13[CC_id]) - { - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = calloc(1, sizeof(long)); - *(*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = *configuration->prach_HoppingOffset_r13[CC_id]; - } + if (rrconfig->prach_HoppingOffset_r13) + { + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = calloc(1, sizeof(long)); + *(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = *rrconfig->prach_HoppingOffset_r13; + } else - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL; PRACH_ParametersCE_r13_t *prach_parametersce_r13 = calloc(1, sizeof(PRACH_ParametersCE_r13_t)); memset(prach_parametersce_r13, 0, sizeof(PRACH_ParametersCE_r13_t)); @@ -1107,60 +1149,60 @@ uint8_t do_SIB23(uint8_t Mod_id, prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1; prach_parametersce_r13->prach_HoppingConfig_r13 = PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13); - } + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13); + } else - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310 = calloc(1, sizeof(PUCCH_ConfigCommon_v1310_t)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310, 0, sizeof(PUCCH_ConfigCommon_v1310_t)); - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13 = calloc(1, sizeof(N1PUCCH_AN_InfoList_r13_t)); + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310 = calloc(1, sizeof(PUCCH_ConfigCommon_v1310_t)); + memset((*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310, 0, sizeof(PUCCH_ConfigCommon_v1310_t)); + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13 = calloc(1, sizeof(N1PUCCH_AN_InfoList_r13_t)); long pucch_info_value1 = 0; long pucch_info_value2 = 2; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value1); - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value2); - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL; -//----------------------------------------------------------------------------------------------------------------------------------------- + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value1); + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value2); + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL; + //----------------------------------------------------------------------------------------------------------------------------------------- // UE Timers and Constants - (*sib2_br)->ue_TimersAndConstants.t300 - = configuration->ue_TimersAndConstants_t300[CC_id]; - (*sib2_br)->ue_TimersAndConstants.t301 - = configuration->ue_TimersAndConstants_t301[CC_id]; - (*sib2_br)->ue_TimersAndConstants.t310 - = configuration->ue_TimersAndConstants_t310[CC_id]; - (*sib2_br)->ue_TimersAndConstants.n310 - = configuration->ue_TimersAndConstants_n310[CC_id]; - (*sib2_br)->ue_TimersAndConstants.t311 - = configuration->ue_TimersAndConstants_t311[CC_id]; - (*sib2_br)->ue_TimersAndConstants.n311 - = configuration->ue_TimersAndConstants_n311[CC_id]; + (*sib2)->ue_TimersAndConstants.t300 + = rrconfig->ue_TimersAndConstants_t300; + (*sib2)->ue_TimersAndConstants.t301 + = rrconfig->ue_TimersAndConstants_t301; + (*sib2)->ue_TimersAndConstants.t310 + = rrconfig->ue_TimersAndConstants_t310; + (*sib2)->ue_TimersAndConstants.n310 + = rrconfig->ue_TimersAndConstants_n310; + (*sib2)->ue_TimersAndConstants.t311 + = rrconfig->ue_TimersAndConstants_t311; + (*sib2)->ue_TimersAndConstants.n311 + = rrconfig->ue_TimersAndConstants_n311; #else puts("This is a test that #define ITTI is not working"); - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep=RACH_ConfigCommon__powerRampingParameters__powerRampingStep_dB2; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower= + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles=RACH_ConfigCommon__preambleInfo__numberOfRA_Preambles_n64; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep=RACH_ConfigCommon__powerRampingParameters__powerRampingStep_dB2; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower= RACH_ConfigCommon__powerRampingParameters__preambleInitialReceivedTargetPower_dBm_100; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf10; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer= + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax=RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize=RACH_ConfigCommon__ra_SupervisionInfo__ra_ResponseWindowSize_sf10; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer= RACH_ConfigCommon__ra_SupervisionInfo__mac_ContentionResolutionTimer_sf48; - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = 4; + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx = 4; // LTE-M +kogo - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct RACH_ConfigCommon__ext1)); - memset((*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct RACH_ConfigCommon__ext1)); - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(PreambleTransMax_t)); - *(*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = PreambleTransMax_n5; // to be re-initialized when we find the enum - (*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(RACH_CE_LevelInfoList_r13_t)); - memset((*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(RACH_CE_LevelInfoList_r13_t)); + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1 = calloc(1, sizeof(struct RACH_ConfigCommon__ext1)); + memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1, 0, sizeof(struct RACH_ConfigCommon__ext1)); + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = calloc(1, sizeof(PreambleTransMax_t)); + *(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->preambleTransMax_CE_r13 = PreambleTransMax_n5; // to be re-initialized when we find the enum + (*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13 = calloc(1, sizeof(RACH_CE_LevelInfoList_r13_t)); + memset((*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13, 0, sizeof(RACH_CE_LevelInfoList_r13_t)); RACH_CE_LevelInfo_r13_t *rach_ce_levelinfo_r13 = calloc(1, sizeof(RACH_CE_LevelInfo_r13_t)); memset(rach_ce_levelinfo_r13, 0, sizeof(RACH_CE_LevelInfo_r13_t)); @@ -1170,89 +1212,89 @@ uint8_t do_SIB23(uint8_t Mod_id, rach_ce_levelinfo_r13->mac_ContentionResolutionTimer_r13 = RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_sf200; rach_ce_levelinfo_r13->rar_HoppingConfig_r13 = RACH_CE_LevelInfo_r13__rar_HoppingConfig_r13_off; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13->list, rach_ce_levelinfo_r13); -//--------------------------------------------------------------------------------------------------------------------------------------------------- +kogo + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.rach_ConfigCommon.ext1->rach_CE_LevelInfoList_r13->list, rach_ce_levelinfo_r13); + //--------------------------------------------------------------------------------------------------------------------------------------------------- +kogo // BCCH-Config - (*sib2_br)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff=BCCH_Config__modificationPeriodCoeff_n2; + (*sib2)->radioResourceConfigCommon.bcch_Config.modificationPeriodCoeff=BCCH_Config__modificationPeriodCoeff_n2; // PCCH-Config - (*sib2_br)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle = PCCH_Config__defaultPagingCycle_rf128; - (*sib2_br)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT; + (*sib2)->radioResourceConfigCommon.pcch_Config.defaultPagingCycle = PCCH_Config__defaultPagingCycle_rf128; + (*sib2)->radioResourceConfigCommon.pcch_Config.nB=PCCH_Config__nB_oneT; // PRACH-Config - (*sib2_br)->radioResourceConfigCommon.prach_Config.rootSequenceIndex=Mod_id;//0;//384; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex = 0;//3; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag = 0; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig = 1;//12; - (*sib2_br)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset = 2; + (*sib2)->radioResourceConfigCommon.prach_Config.rootSequenceIndex=Mod_id;//0;//384; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex = 0;//3; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag = 0; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig = 1;//12; + (*sib2)->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset = 2; // PDSCH-Config - (*sib2_br)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=0; // corresponds to 24.7 dBm 5 MHz/ 27.7 10 MHz/ 30.7 20 MHz + (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower=0; // corresponds to 24.7 dBm 5 MHz/ 27.7 10 MHz/ 30.7 20 MHz - (*sib2_br)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0; // this is different ,, + (*sib2)->radioResourceConfigCommon.pdsch_ConfigCommon.p_b=0; // this is different ,, // PUSCH-Config - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB=1; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode=PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset=0; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM=0; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled=1; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH=0; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled=0; - (*sib2_br)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift=0; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB=1; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode=PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset=0; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM=0; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled=1; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH=0; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled=0; + (*sib2)->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift=0; // PUCCH-Config - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift=PUCCH_ConfigCommon__deltaPUCCH_Shift_ds1; - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI = 1; - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN = 0; - (*sib2_br)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN = 32; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift=PUCCH_ConfigCommon__deltaPUCCH_Shift_ds1; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI = 1; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN = 0; + (*sib2)->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN = 32; - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=SoundingRS_UL_ConfigCommon_PR_release; - (*sib2_br)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present=SoundingRS_UL_ConfigCommon_PR_release; + (*sib2)->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.release=0; // uplinkPowerControlCommon - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -108; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -108; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha=UplinkPowerControlCommon__alpha_al1; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1=DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b=DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -108; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -108; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.alpha=UplinkPowerControlCommon__alpha_al1; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1=DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b=DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF3; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2=DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2=DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF0; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a=DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a=DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF0; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b=DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b=DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF0; - (*sib2_br)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 = 6; + (*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 = 6; - (*sib2_br)->radioResourceConfigCommon.ul_CyclicPrefixLength=UL_CyclicPrefixLength_len1; + (*sib2)->radioResourceConfigCommon.ul_CyclicPrefixLength=UL_CyclicPrefixLength_len1; // LTE-M - +Kogo - (*sib2_br)->radioResourceConfigCommon.ext4 = calloc(1, sizeof(struct RadioResourceConfigCommonSIB__ext4)); - memset((*sib2_br)->radioResourceConfigCommon.ext4, 0, sizeof(struct RadioResourceConfigCommonSIB__ext4)); - (*sib2_br)->radioResourceConfigCommon.ext4->bcch_Config_v1310 = calloc(1, sizeof(BCCH_Config_v1310_t)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t)); - (*sib2_br)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64; - (*sib2_br)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = calloc(1, sizeof(PRACH_ConfigSIB_v1310_t)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310, 0, sizeof(PRACH_ConfigSIB_v1310_t)); + (*sib2)->radioResourceConfigCommon.ext4 = calloc(1, sizeof(struct RadioResourceConfigCommonSIB__ext4)); + memset((*sib2)->radioResourceConfigCommon.ext4, 0, sizeof(struct RadioResourceConfigCommonSIB__ext4)); + (*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310 = calloc(1, sizeof(BCCH_Config_v1310_t)); + memset((*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310, 0, sizeof(BCCH_Config_v1310_t)); + (*sib2)->radioResourceConfigCommon.ext4->bcch_Config_v1310->modificationPeriodCoeff_v1310 = BCCH_Config_v1310__modificationPeriodCoeff_v1310_n64; + (*sib2)->radioResourceConfigCommon.ext4->pcch_Config_v1310 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->freqHoppingParameters_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pdsch_ConfigCommon_v1310 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pusch_ConfigCommon_v1310 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310 = calloc(1, sizeof(PRACH_ConfigSIB_v1310_t)); + memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310, 0, sizeof(PRACH_ConfigSIB_v1310_t)); RSRP_Range_t rsrp_range = 60; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, &rsrp_range); + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->rsrp_ThresholdsPrachInfoList_r13.list, &rsrp_range); - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13; - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13__fdd_r13_v5; - (*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); + memset((*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13, 0, sizeof(struct PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13)); + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->present = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13_PR_fdd_r13; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->mpdcch_startSF_CSS_RA_r13->choice.fdd_r13 = PRACH_ConfigSIB_v1310__mpdcch_startSF_CSS_RA_r13__fdd_r13_v5; + (*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_HoppingOffset_r13 = NULL; PRACH_ParametersCE_r13_t *prach_parametersce_r13 = calloc(1, sizeof(PRACH_ParametersCE_r13_t)); memset(prach_parametersce_r13, 0, sizeof(PRACH_ParametersCE_r13_t)); @@ -1269,38 +1311,38 @@ uint8_t do_SIB23(uint8_t Mod_id, prach_parametersce_r13->mpdcch_NumRepetition_RA_r13 = PRACH_ParametersCE_r13__mpdcch_NumRepetition_RA_r13_r1; prach_parametersce_r13->prach_HoppingConfig_r13 = PRACH_ParametersCE_r13__prach_HoppingConfig_r13_off; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13); + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->prach_ConfigCommon_v1310->prach_ParametersListCE_r13.list, prach_parametersce_r13); - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310 = calloc(1, sizeof(PUCCH_ConfigCommon_v1310_t)); - memset((*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310, 0, sizeof(PUCCH_ConfigCommon_v1310_t)); - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13 = calloc(1, sizeof(N1PUCCH_AN_InfoList_r13_t)); + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310 = calloc(1, sizeof(PUCCH_ConfigCommon_v1310_t)); + memset((*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310, 0, sizeof(PUCCH_ConfigCommon_v1310_t)); + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13 = calloc(1, sizeof(N1PUCCH_AN_InfoList_r13_t)); long pucch_info_value1 = 0; long pucch_info_value2 = 2; - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value1); - ASN_SEQUENCE_ADD(&(*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value2); - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL; - (*sib2_br)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL; -//----------------------------------------------------------------------------------------------------------------------------------------- + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value1); + ASN_SEQUENCE_ADD(&(*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->n1PUCCH_AN_InfoList_r13->list, &pucch_info_value2); + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level0_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level1_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level2_r13 = NULL; + (*sib2)->radioResourceConfigCommon.ext4->pucch_ConfigCommon_v1310->pucch_NumRepetitionCE_Msg4_Level3_r13 = NULL; + //----------------------------------------------------------------------------------------------------------------------------------------- - (*sib2_br)->ue_TimersAndConstants.t300=UE_TimersAndConstants__t300_ms1000; + (*sib2)->ue_TimersAndConstants.t300=UE_TimersAndConstants__t300_ms1000; - (*sib2_br)->ue_TimersAndConstants.t301=UE_TimersAndConstants__t301_ms1000; + (*sib2)->ue_TimersAndConstants.t301=UE_TimersAndConstants__t301_ms1000; - (*sib2_br)->ue_TimersAndConstants.t310=UE_TimersAndConstants__t310_ms1000; + (*sib2)->ue_TimersAndConstants.t310=UE_TimersAndConstants__t310_ms1000; - (*sib2_br)->ue_TimersAndConstants.n310=UE_TimersAndConstants__n310_n20; + (*sib2)->ue_TimersAndConstants.n310=UE_TimersAndConstants__n310_n20; - (*sib2_br)->ue_TimersAndConstants.t311=UE_TimersAndConstants__t311_ms10000; + (*sib2)->ue_TimersAndConstants.t311=UE_TimersAndConstants__t311_ms10000; - (*sib2_br)->ue_TimersAndConstants.n311=UE_TimersAndConstants__n311_n1; + (*sib2)->ue_TimersAndConstants.n311=UE_TimersAndConstants__n311_n1; #endif - (*sib2_br)->freqInfo.additionalSpectrumEmission = 1; - (*sib2_br)->freqInfo.ul_CarrierFreq = NULL; - (*sib2_br)->freqInfo.ul_Bandwidth = NULL; + (*sib2)->freqInfo.additionalSpectrumEmission = 1; + (*sib2)->freqInfo.ul_CarrierFreq = NULL; + (*sib2)->freqInfo.ul_Bandwidth = NULL; // (*sib2)->mbsfn_SubframeConfigList = NULL; #if defined(Rel10) || defined(Rel14) @@ -1308,8 +1350,8 @@ uint8_t do_SIB23(uint8_t Mod_id, if (MBMS_flag > 0) { LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2\n"); MBSFN_SubframeConfig_t *sib2_mbsfn_SubframeConfig1; - (*sib2_br)->mbsfn_SubframeConfigList = CALLOC(1,sizeof(struct MBSFN_SubframeConfigList)); - MBSFNSubframeConfigList = (*sib2_br)->mbsfn_SubframeConfigList; + (*sib2)->mbsfn_SubframeConfigList = CALLOC(1,sizeof(struct MBSFN_SubframeConfigList)); + MBSFNSubframeConfigList = (*sib2)->mbsfn_SubframeConfigList; sib2_mbsfn_SubframeConfig1= CALLOC(1,sizeof(*sib2_mbsfn_SubframeConfig1)); memset((void*)sib2_mbsfn_SubframeConfig1,0,sizeof(*sib2_mbsfn_SubframeConfig1)); @@ -1346,10 +1388,10 @@ uint8_t do_SIB23(uint8_t Mod_id, } #else // no MBMS transmission - (*sib2_br)->mbsfn_SubframeConfigList = NULL; + (*sib2)->mbsfn_SubframeConfigList = NULL; #endif - (*sib2_br)->timeAlignmentTimerCommon=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120; + (*sib2)->timeAlignmentTimerCommon=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120; /// (*SIB3) #if defined(Rel10) || defined(Rel14) @@ -1450,8 +1492,8 @@ uint8_t do_SIB23(uint8_t Mod_id, bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation; /* memcpy((void*)&bcch_message.message.choice.c1.choice.systemInformation, - (void*)systemInformation, - sizeof(SystemInformation_t));*/ + (void*)systemInformation, + sizeof(SystemInformation_t));*/ bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.present = SystemInformation__criticalExtensions_PR_systemInformation_r8; @@ -1460,9 +1502,9 @@ uint8_t do_SIB23(uint8_t Mod_id, // asn_set_empty(&systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list);//.size=0; // systemInformation->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count=0; ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, - sib2_part); + sib2_part); ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, - sib3_part); + sib3_part); #if defined(Rel10) || defined(Rel14) if (MBMS_flag > 0) { @@ -1476,11 +1518,11 @@ uint8_t do_SIB23(uint8_t Mod_id, xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message, - (void*)bcch_message, - buffer, - 900); + (void*)bcch_message, + buffer, + 900); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) @@ -1566,11 +1608,11 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) enc_rval = uper_encode_to_buffer(&asn_DEF_UL_CCCH_Message, - (void*)&ul_ccch_msg, - buffer, - 100); + (void*)&ul_ccch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -1620,12 +1662,12 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin rrcConnectionSetupComplete->criticalExtensions.choice.c1.present = RRCConnectionSetupComplete__criticalExtensions__c1_PR_rrcConnectionSetupComplete_r8; rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.nonCriticalExtension=CALLOC(1, - sizeof(*rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.nonCriticalExtension)); + sizeof(*rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.nonCriticalExtension)); if(usim_test == 0) - rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.selectedPLMN_Identity= 2; + rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.selectedPLMN_Identity= 2; else - rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.selectedPLMN_Identity= 1; + rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.selectedPLMN_Identity= 1; rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME = NULL;//calloc(1,sizeof(*rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME)); @@ -1639,7 +1681,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin */ memset(&rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.dedicatedInfoNAS,0,sizeof(OCTET_STRING_t)); OCTET_STRING_fromBuf(&rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.dedicatedInfoNAS, - dedicatedInfoNAS, dedicatedInfoNASLength); + dedicatedInfoNAS, dedicatedInfoNASLength); /* rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.buf = calloc(1,1); @@ -1649,11 +1691,11 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin */ enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, - (void*)&ul_dcch_msg, - buffer, - 100); + (void*)&ul_dcch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -1685,10 +1727,10 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin //------------------------------------------------------------------------------ uint8_t do_RRCConnectionReconfigurationComplete( - const protocol_ctxt_t* const ctxt_pP, - uint8_t* buffer, - const uint8_t Transaction_id -) + const protocol_ctxt_t* const ctxt_pP, + uint8_t* buffer, + const uint8_t Transaction_id + ) //------------------------------------------------------------------------------ { @@ -1711,11 +1753,11 @@ do_RRCConnectionReconfigurationComplete( rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL; enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, - (void*)&ul_dcch_msg, - buffer, - 100); + (void*)&ul_dcch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -1745,42 +1787,42 @@ do_RRCConnectionReconfigurationComplete( uint8_t do_RRCConnectionSetup_BR( - const protocol_ctxt_t* const ctxt_pP, - rrc_eNB_ue_context_t* const ue_context_pP, - int CC_id, - uint8_t* const buffer, - const uint8_t transmission_mode, - const uint8_t Transaction_id, - SRB_ToAddModList_t **SRB_configList, - struct PhysicalConfigDedicated **physicalConfigDedicated) + const protocol_ctxt_t* const ctxt_pP, + rrc_eNB_ue_context_t* const ue_context_pP, + int CC_id, + uint8_t* const buffer, + const uint8_t transmission_mode, + const uint8_t Transaction_id, + SRB_ToAddModList_t **SRB_configList, + struct PhysicalConfigDedicated **physicalConfigDedicated) { - asn_enc_rval_t enc_rval; - uint8_t ecause=0; - eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id]; - rrc_eNB_carrier_data_t *carrier = &rrc->carrier[CC_id]; + asn_enc_rval_t enc_rval; + uint8_t ecause=0; + eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id]; + rrc_eNB_carrier_data_t *carrier = &rrc->carrier[CC_id]; - long* logicalchannelgroup = NULL; - struct SRB_ToAddMod* SRB1_config = NULL; - struct SRB_ToAddMod__rlc_Config* SRB1_rlc_config = NULL; - struct SRB_ToAddMod__logicalChannelConfig* SRB1_lchan_config = NULL; - struct LogicalChannelConfig__ul_SpecificParameters* SRB1_ul_SpecificParameters = NULL; + long* logicalchannelgroup = NULL; + struct SRB_ToAddMod* SRB1_config = NULL; + struct SRB_ToAddMod__rlc_Config* SRB1_rlc_config = NULL; + struct SRB_ToAddMod__logicalChannelConfig* SRB1_lchan_config = NULL; + struct LogicalChannelConfig__ul_SpecificParameters* SRB1_ul_SpecificParameters = NULL; - #ifdef CBA - struct PUSCH_CBAConfigDedicated_vlola* pusch_CBAConfigDedicated_vlola = NULL; - long* betaOffset_CBA_Index = NULL; - long* cShift_CBA = NULL; - #endif - PhysicalConfigDedicated_t* physicalConfigDedicated2 = NULL; +#ifdef CBA + struct PUSCH_CBAConfigDedicated_vlola* pusch_CBAConfigDedicated_vlola = NULL; + long* betaOffset_CBA_Index = NULL; + long* cShift_CBA = NULL; +#endif + PhysicalConfigDedicated_t* physicalConfigDedicated2 = NULL; - DL_CCCH_Message_t dl_ccch_msg; + DL_CCCH_Message_t dl_ccch_msg; - RRCConnectionSetup_t* rrcConnectionSetup = NULL; + RRCConnectionSetup_t* rrcConnectionSetup = NULL; - memset((void *)&dl_ccch_msg,0,sizeof(DL_CCCH_Message_t)); - dl_ccch_msg.message.present = DL_CCCH_MessageType_PR_c1; - dl_ccch_msg.message.choice.c1.present = DL_CCCH_MessageType__c1_PR_rrcConnectionSetup; - rrcConnectionSetup = &dl_ccch_msg.message.choice.c1.choice.rrcConnectionSetup; + memset((void *)&dl_ccch_msg,0,sizeof(DL_CCCH_Message_t)); + dl_ccch_msg.message.present = DL_CCCH_MessageType_PR_c1; + dl_ccch_msg.message.choice.c1.present = DL_CCCH_MessageType__c1_PR_rrcConnectionSetup; + rrcConnectionSetup = &dl_ccch_msg.message.choice.c1.choice.rrcConnectionSetup; // RRCConnectionSetup // Configure SRB1 @@ -1895,7 +1937,7 @@ do_RRCConnectionSetup_BR( physicalConfigDedicated2->uplinkPowerControlDedicated->p0_UE_PUCCH = 0; // 0 dB physicalConfigDedicated2->uplinkPowerControlDedicated->pSRS_Offset = 0; // 0 dB physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient = CALLOC(1, - sizeof(*physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient)); + sizeof(*physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient)); // assign_enum(physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient,FilterCoefficient_fc4); // fc4 dB *physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient=FilterCoefficient_fc4; // fc4 dB @@ -1915,7 +1957,7 @@ do_RRCConnectionSetup_BR( physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic=CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic)); physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_release; - /* + /* physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_setup; physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex = 0; // n2_pucch physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_pmi_ConfigIndex = 0; // Icqi/pmi @@ -1924,50 +1966,50 @@ do_RRCConnectionSetup_BR( physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex=NULL; physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.simultaneousAckNackAndCQI=0; - */ + */ /// TODO to be reviewed if (rrc->srs_enable[CC_id]) { physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->present = SoundingRS_UL_ConfigDedicated_PR_setup; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth = - SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0; + SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth = - SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0; + SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1; if (carrier->sib1->tdd_Config==NULL) { // FDD if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present - == SoundingRS_UL_ConfigCommon_PR_setup) - if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=0) - LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!\n", - carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig); + == SoundingRS_UL_ConfigCommon_PR_setup) + if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=0) + LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!\n", + carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig); if (ue_context_pP->local_uid >=20) - LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n", - ue_context_pP->local_uid); + LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n", + ue_context_pP->local_uid); //the current code will allow for 20 UEs - to be revised for more physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=7+ue_context_pP->local_uid/2; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2; } else { if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present - == SoundingRS_UL_ConfigCommon_PR_setup) - if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=7) { - LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n", - carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig, - carrier->sib1->tdd_Config->subframeAssignment); - } + == SoundingRS_UL_ConfigCommon_PR_setup) + if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=7) { + LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n", + carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig, + carrier->sib1->tdd_Config->subframeAssignment); + } if (ue_context_pP->local_uid >=6) - LOG_W(RRC,"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!\n", - ue_context_pP->local_uid); + LOG_W(RRC,"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!\n", + ue_context_pP->local_uid); physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=17+ue_context_pP->local_uid/2; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2; } LOG_W(RRC,"local UID %d, srs ConfigIndex %d, TransmissionComb %d\n",ue_context_pP->local_uid, - physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex, - physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb); + physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex, + physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb); physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift= - SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0; + SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0; } //AntennaInfoDedicated @@ -1987,34 +2029,34 @@ do_RRCConnectionSetup_BR( physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm2; break; /* - case 3: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm3; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1, - sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction)); - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = + case 3: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm3; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1, + sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction)); + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1); - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1); + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6; - break; + break; - case 4: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm4; - break; + case 4: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm4; + break; - case 5: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm5; - break; + case 5: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm5; + break; - case 6: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6; - break; + case 6: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6; + break; - case 7: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7; - break; + case 7: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7; + break; */ } @@ -2033,17 +2075,17 @@ do_RRCConnectionSetup_BR( switch (carrier->sib1->tdd_Config->subframeAssignment) { case 1: physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+(ue_context_pP->local_uid&1)+(( - ue_context_pP->local_uid&3)>>1)*5; // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 7 for UE2, 8 for UE3 , 2 for UE4 etc..) + ue_context_pP->local_uid&3)>>1)*5; // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 7 for UE2, 8 for UE3 , 2 for UE4 etc..) break; case 3: physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+ - (ue_context_pP->local_uid%3); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) + (ue_context_pP->local_uid%3); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) break; case 4: physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+ - (ue_context_pP->local_uid&1); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) + (ue_context_pP->local_uid&1); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) break; default: @@ -2070,7 +2112,7 @@ do_RRCConnectionSetup_BR( physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = calloc(1, sizeof(EPDCCH_SetConfigToAddModList_r11_t)); -// memset(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, 0, sizeof()) + // memset(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, 0, sizeof()) EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = calloc(0, sizeof(EPDCCH_SetConfig_r11_t)); epdcch_setconfig_r11->setConfigId_r11 = 0; epdcch_setconfig_r11->transmissionType_r11 = EPDCCH_SetConfig_r11__transmissionType_r11_localised; @@ -2140,11 +2182,11 @@ do_RRCConnectionSetup_BR( xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, - (void*)&dl_ccch_msg, - buffer, - 100); + (void*)&dl_ccch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -2167,7 +2209,7 @@ do_RRCConnectionSetup_BR( #ifdef USER_MODE LOG_D(RRC,"RRCConnectionSetup Encoded %d bits (%d bytes), ecause %d\n", - enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); + enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); #endif // FREEMEM(SRB_list); @@ -2183,14 +2225,14 @@ do_RRCConnectionSetup_BR( //------------------------------------------------------------------------------ uint8_t do_RRCConnectionSetup( - const protocol_ctxt_t* const ctxt_pP, - rrc_eNB_ue_context_t* const ue_context_pP, - int CC_id, - uint8_t* const buffer, - const uint8_t transmission_mode, - const uint8_t Transaction_id, - SRB_ToAddModList_t **SRB_configList, - struct PhysicalConfigDedicated **physicalConfigDedicated) + const protocol_ctxt_t* const ctxt_pP, + rrc_eNB_ue_context_t* const ue_context_pP, + int CC_id, + uint8_t* const buffer, + const uint8_t transmission_mode, + const uint8_t Transaction_id, + SRB_ToAddModList_t **SRB_configList, + struct PhysicalConfigDedicated **physicalConfigDedicated) { asn_enc_rval_t enc_rval; @@ -2334,7 +2376,7 @@ do_RRCConnectionSetup( physicalConfigDedicated2->uplinkPowerControlDedicated->p0_UE_PUCCH = 0; // 0 dB physicalConfigDedicated2->uplinkPowerControlDedicated->pSRS_Offset = 0; // 0 dB physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient = CALLOC(1, - sizeof(*physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient)); + sizeof(*physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient)); // assign_enum(physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient,FilterCoefficient_fc4); // fc4 dB *physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient=FilterCoefficient_fc4; // fc4 dB @@ -2371,7 +2413,7 @@ do_RRCConnectionSetup( physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic=CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic)); physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_release; - /* + /* physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_setup; physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex = 0; // n2_pucch physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_pmi_ConfigIndex = 0; // Icqi/pmi @@ -2380,15 +2422,15 @@ do_RRCConnectionSetup( physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex=NULL; physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.simultaneousAckNackAndCQI=0; - */ + */ //soundingRS-UL-ConfigDedicated if (rrc->srs_enable[CC_id]==1) { physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->present = SoundingRS_UL_ConfigDedicated_PR_setup; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth = - SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0; + SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth = - SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0; + SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition=0; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.duration=1; if (carrier->sib1->tdd_Config==NULL) { // FDD @@ -2423,7 +2465,7 @@ do_RRCConnectionSetup( physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb); physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift= - SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0; + SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0; } @@ -2444,34 +2486,34 @@ do_RRCConnectionSetup( physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm2; break; /* - case 3: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm3; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1, - sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction)); - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = + case 3: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm3; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1, + sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction)); + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1); - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1; - physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1); + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1; + physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6; - break; + break; - case 4: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm4; - break; + case 4: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm4; + break; - case 5: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm5; - break; + case 5: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm5; + break; - case 6: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6; - break; + case 6: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6; + break; - case 7: - physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7; - break; + case 7: + physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7; + break; */ } @@ -2490,17 +2532,17 @@ do_RRCConnectionSetup( switch (carrier->sib1->tdd_Config->subframeAssignment) { case 1: physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+(ue_context_pP->local_uid&1)+(( - ue_context_pP->local_uid&3)>>1)*5; // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 7 for UE2, 8 for UE3 , 2 for UE4 etc..) + ue_context_pP->local_uid&3)>>1)*5; // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 7 for UE2, 8 for UE3 , 2 for UE4 etc..) break; case 3: physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+ - (ue_context_pP->local_uid%3); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) + (ue_context_pP->local_uid%3); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) break; case 4: physicalConfigDedicated2->schedulingRequestConfig->choice.setup.sr_ConfigIndex = 7+ - (ue_context_pP->local_uid&1); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) + (ue_context_pP->local_uid&1); // Isr = 5 (every 10 subframes, offset=2 for UE0, 3 for UE1, 3 for UE2, 2 for UE3 , etc..) break; default: @@ -2538,11 +2580,11 @@ do_RRCConnectionSetup( xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, - (void*)&dl_ccch_msg, - buffer, - 100); + (void*)&dl_ccch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -2565,7 +2607,7 @@ do_RRCConnectionSetup( #ifdef USER_MODE LOG_D(RRC,"RRCConnectionSetup Encoded %d bits (%d bytes), ecause %d\n", - enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); + enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); #endif // FREEMEM(SRB_list); @@ -2580,12 +2622,12 @@ do_RRCConnectionSetup( //------------------------------------------------------------------------------ uint8_t do_SecurityModeCommand( - const protocol_ctxt_t* const ctxt_pP, - uint8_t* const buffer, - const uint8_t Transaction_id, - const uint8_t cipheringAlgorithm, - const uint8_t integrityProtAlgorithm -) + const protocol_ctxt_t* const ctxt_pP, + uint8_t* const buffer, + const uint8_t Transaction_id, + const uint8_t cipheringAlgorithm, + const uint8_t integrityProtAlgorithm + ) //------------------------------------------------------------------------------ { DL_DCCH_Message_t dl_dcch_msg; @@ -2611,11 +2653,11 @@ do_SecurityModeCommand( xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, - (void*)&dl_dcch_msg, - buffer, - 100); + (void*)&dl_dcch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -2638,16 +2680,16 @@ do_SecurityModeCommand( #ifdef USER_MODE LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %d bits (%d bytes)\n", - ctxt_pP->module_id, - ctxt_pP->rnti, - enc_rval.encoded, - (enc_rval.encoded+7)/8); + ctxt_pP->module_id, + ctxt_pP->rnti, + enc_rval.encoded, + (enc_rval.encoded+7)/8); #endif if (enc_rval.encoded==-1) { LOG_E(RRC,"[eNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n", - ctxt_pP->module_id, - ctxt_pP->rnti); + ctxt_pP->module_id, + ctxt_pP->rnti); return(-1); } @@ -2659,10 +2701,10 @@ do_SecurityModeCommand( //------------------------------------------------------------------------------ uint8_t do_UECapabilityEnquiry( - const protocol_ctxt_t* const ctxt_pP, - uint8_t* const buffer, - const uint8_t Transaction_id -) + const protocol_ctxt_t* const ctxt_pP, + uint8_t* const buffer, + const uint8_t Transaction_id + ) //------------------------------------------------------------------------------ { @@ -2683,17 +2725,17 @@ do_UECapabilityEnquiry( UECapabilityEnquiry__criticalExtensions__c1_PR_ueCapabilityEnquiry_r8; dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count=0; ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list, - &rat); + &rat); #ifdef XER_PRINT xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, - (void*)&dl_dcch_msg, - buffer, - 100); + (void*)&dl_dcch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -2716,16 +2758,16 @@ do_UECapabilityEnquiry( #ifdef USER_MODE LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %d bits (%d bytes)\n", - ctxt_pP->module_id, - ctxt_pP->rnti, - enc_rval.encoded, - (enc_rval.encoded+7)/8); + ctxt_pP->module_id, + ctxt_pP->rnti, + enc_rval.encoded, + (enc_rval.encoded+7)/8); #endif if (enc_rval.encoded==-1) { LOG_E(RRC,"[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %x\n", - ctxt_pP->module_id, - ctxt_pP->rnti); + ctxt_pP->module_id, + ctxt_pP->rnti); return(-1); } @@ -2734,251 +2776,251 @@ do_UECapabilityEnquiry( uint16_t do_RRCConnectionReconfiguration_BR( - const protocol_ctxt_t* const ctxt_pP, - uint8_t *buffer, - uint8_t Transaction_id, - SRB_ToAddModList_t *SRB_list, - DRB_ToAddModList_t *DRB_list, - DRB_ToReleaseList_t *DRB_list2, - struct SPS_Config *sps_Config, - struct PhysicalConfigDedicated *physicalConfigDedicated, - MeasObjectToAddModList_t *MeasObj_list, - ReportConfigToAddModList_t *ReportConfig_list, - QuantityConfig_t *quantityConfig, - MeasIdToAddModList_t *MeasId_list, - MAC_MainConfig_t *mac_MainConfig, - MeasGapConfig_t *measGapConfig, - MobilityControlInfo_t *mobilityInfo, - struct MeasConfig__speedStatePars *speedStatePars, - RSRP_Range_t *rsrp, - C_RNTI_t *cba_rnti, - struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList - *dedicatedInfoNASList + const protocol_ctxt_t* const ctxt_pP, + uint8_t *buffer, + uint8_t Transaction_id, + SRB_ToAddModList_t *SRB_list, + DRB_ToAddModList_t *DRB_list, + DRB_ToReleaseList_t *DRB_list2, + struct SPS_Config *sps_Config, + struct PhysicalConfigDedicated *physicalConfigDedicated, + MeasObjectToAddModList_t *MeasObj_list, + ReportConfigToAddModList_t *ReportConfig_list, + QuantityConfig_t *quantityConfig, + MeasIdToAddModList_t *MeasId_list, + MAC_MainConfig_t *mac_MainConfig, + MeasGapConfig_t *measGapConfig, + MobilityControlInfo_t *mobilityInfo, + struct MeasConfig__speedStatePars *speedStatePars, + RSRP_Range_t *rsrp, + C_RNTI_t *cba_rnti, + struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList + *dedicatedInfoNASList #if defined(Rel10) || defined(Rel14) - , SCellToAddMod_r10_t *SCell_config + , SCellToAddMod_r10_t *SCell_config #endif -) + ) { - asn_enc_rval_t enc_rval; + asn_enc_rval_t enc_rval; - DL_DCCH_Message_t dl_dcch_msg; - RRCConnectionReconfiguration_t *rrcConnectionReconfiguration; + DL_DCCH_Message_t dl_dcch_msg; + RRCConnectionReconfiguration_t *rrcConnectionReconfiguration; - memset(&dl_dcch_msg,0,sizeof(DL_DCCH_Message_t)); + memset(&dl_dcch_msg,0,sizeof(DL_DCCH_Message_t)); - dl_dcch_msg.message.present = DL_DCCH_MessageType_PR_c1; - dl_dcch_msg.message.choice.c1.present = DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration; - rrcConnectionReconfiguration = &dl_dcch_msg.message.choice.c1.choice.rrcConnectionReconfiguration; + dl_dcch_msg.message.present = DL_DCCH_MessageType_PR_c1; + dl_dcch_msg.message.choice.c1.present = DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration; + rrcConnectionReconfiguration = &dl_dcch_msg.message.choice.c1.choice.rrcConnectionReconfiguration; - // RRCConnectionReconfiguration - rrcConnectionReconfiguration->rrc_TransactionIdentifier = Transaction_id; - rrcConnectionReconfiguration->criticalExtensions.present = RRCConnectionReconfiguration__criticalExtensions_PR_c1; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.present =RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8 ; + // RRCConnectionReconfiguration + rrcConnectionReconfiguration->rrc_TransactionIdentifier = Transaction_id; + rrcConnectionReconfiguration->criticalExtensions.present = RRCConnectionReconfiguration__criticalExtensions_PR_c1; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.present =RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8 ; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated)); - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->srb_ToAddModList = SRB_list; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList = DRB_list; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToReleaseList = DRB_list2; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->sps_Config = sps_Config; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->physicalConfigDedicated = physicalConfigDedicated; - #ifdef CBA - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->cba_RNTI_vlola= cba_rnti; - #endif + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated = CALLOC(1, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated)); + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->srb_ToAddModList = SRB_list; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList = DRB_list; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToReleaseList = DRB_list2; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->sps_Config = sps_Config; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->physicalConfigDedicated = physicalConfigDedicated; +#ifdef CBA + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->cba_RNTI_vlola= cba_rnti; +#endif - // +kogo - physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax = SchedulingRequestConfig__setup__dsr_TransMax_n4; + // +kogo + physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax = SchedulingRequestConfig__setup__dsr_TransMax_n4; - physicalConfigDedicated->ext4->csi_RS_ConfigNZPToReleaseList_r11 = NULL; - physicalConfigDedicated->ext4->csi_RS_ConfigNZPToAddModList_r11 = NULL; - physicalConfigDedicated->ext4->csi_RS_ConfigZPToAddModList_r11 = NULL; - physicalConfigDedicated->ext4->csi_RS_ConfigZPToReleaseList_r11 = NULL; + physicalConfigDedicated->ext4->csi_RS_ConfigNZPToReleaseList_r11 = NULL; + physicalConfigDedicated->ext4->csi_RS_ConfigNZPToAddModList_r11 = NULL; + physicalConfigDedicated->ext4->csi_RS_ConfigZPToAddModList_r11 = NULL; + physicalConfigDedicated->ext4->csi_RS_ConfigZPToReleaseList_r11 = NULL; - physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present = EPDCCH_Config_r11__config_r11_PR_setup; - physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.subframePatternConfig_r11 = NULL; - physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 = NULL; - physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToReleaseList_r11 = NULL; + physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present = EPDCCH_Config_r11__config_r11_PR_setup; + physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.subframePatternConfig_r11 = NULL; + physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 = NULL; + physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToReleaseList_r11 = NULL; - physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = calloc(1, sizeof(EPDCCH_SetConfigToAddModList_r11_t)); + physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = calloc(1, sizeof(EPDCCH_SetConfigToAddModList_r11_t)); // memset(physicalConfigDedicated2->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, 0, sizeof()) - EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = calloc(0, sizeof(EPDCCH_SetConfig_r11_t)); - epdcch_setconfig_r11->setConfigId_r11 = 0; - epdcch_setconfig_r11->transmissionType_r11 = EPDCCH_SetConfig_r11__transmissionType_r11_localised; - epdcch_setconfig_r11->resourceBlockAssignment_r11.numberPRB_Pairs_r11 = EPDCCH_SetConfig_r11__resourceBlockAssignment_r11__numberPRB_Pairs_r11_n2; - //epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11 = calloc(0, sizeof(BIT_STRING_t)); - epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.buf = calloc(0, 2 * sizeof(uint8_t)); - epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.size = 2; - epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.bits_unused = 6; - epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.buf[0] = 0x0E; + EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = calloc(0, sizeof(EPDCCH_SetConfig_r11_t)); + epdcch_setconfig_r11->setConfigId_r11 = 0; + epdcch_setconfig_r11->transmissionType_r11 = EPDCCH_SetConfig_r11__transmissionType_r11_localised; + epdcch_setconfig_r11->resourceBlockAssignment_r11.numberPRB_Pairs_r11 = EPDCCH_SetConfig_r11__resourceBlockAssignment_r11__numberPRB_Pairs_r11_n2; + //epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11 = calloc(0, sizeof(BIT_STRING_t)); + epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.buf = calloc(0, 2 * sizeof(uint8_t)); + epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.size = 2; + epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.bits_unused = 6; + epdcch_setconfig_r11->resourceBlockAssignment_r11.resourceBlockAssignment_r11.buf[0] = 0x0E; - epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11 = 0; - epdcch_setconfig_r11->pucch_ResourceStartOffset_r11 = 0; - epdcch_setconfig_r11->re_MappingQCL_ConfigId_r11 = NULL; - epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 = NULL; - epdcch_setconfig_r11->ext2->mpdcch_config_r13->present = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup; - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.csi_NumRepetitionCE_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__csi_NumRepetitionCE_r13_sf1; - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off; - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.present = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_StartSF_UESS_r13_PR_fdd_r13; - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.fdd_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_StartSF_UESS_r13__fdd_r13_v1; - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_NumRepetition_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_NumRepetition_r13_r1; - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 = 3; - ASN_SEQUENCE_ADD(physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, epdcch_setconfig_r11); + epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11 = 0; + epdcch_setconfig_r11->pucch_ResourceStartOffset_r11 = 0; + epdcch_setconfig_r11->re_MappingQCL_ConfigId_r11 = NULL; + epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 = NULL; + epdcch_setconfig_r11->ext2->mpdcch_config_r13->present = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup; + epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.csi_NumRepetitionCE_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__csi_NumRepetitionCE_r13_sf1; + epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off; + epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.present = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_StartSF_UESS_r13_PR_fdd_r13; + epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_StartSF_UESS_r13.choice.fdd_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_StartSF_UESS_r13__fdd_r13_v1; + epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_NumRepetition_r13 = EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_NumRepetition_r13_r1; + epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 = 3; + ASN_SEQUENCE_ADD(physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11, epdcch_setconfig_r11); - physicalConfigDedicated->ext7->pdsch_ConfigDedicated_v1310 = NULL; - physicalConfigDedicated->ext7->pusch_ConfigDedicated_r13 = NULL; + physicalConfigDedicated->ext7->pdsch_ConfigDedicated_v1310 = NULL; + physicalConfigDedicated->ext7->pusch_ConfigDedicated_r13 = NULL; - physicalConfigDedicated->ext7->pdcch_CandidateReductions_r13 = NULL; + physicalConfigDedicated->ext7->pdcch_CandidateReductions_r13 = NULL; - physicalConfigDedicated->ext7->pucch_ConfigDedicated_r13 = NULL; + physicalConfigDedicated->ext7->pucch_ConfigDedicated_r13 = NULL; - physicalConfigDedicated->ext7->cqi_ReportConfig_v1310 = NULL; + physicalConfigDedicated->ext7->cqi_ReportConfig_v1310 = NULL; - physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicated_v1310 = NULL; - physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicatedUpPTsExt_r13 = NULL; - physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicatedAperiodic_v1310 = NULL; - physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicatedAperiodicUpPTsExt_r13 = NULL; + physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicated_v1310 = NULL; + physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicatedUpPTsExt_r13 = NULL; + physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicatedAperiodic_v1310 = NULL; + physicalConfigDedicated->ext7->soundingRS_UL_ConfigDedicatedAperiodicUpPTsExt_r13 = NULL; - physicalConfigDedicated->ext7->csi_RS_Config_v1310 = NULL; + physicalConfigDedicated->ext7->csi_RS_Config_v1310 = NULL; - physicalConfigDedicated->ext7->ce_Mode_r13->present = PhysicalConfigDedicated__ext7__ce_Mode_r13_PR_setup; - physicalConfigDedicated->ext7->ce_Mode_r13->choice.setup = PhysicalConfigDedicated__ext7__ce_Mode_r13__setup_ce_ModeA; - physicalConfigDedicated->ext7->csi_RS_ConfigNZPToAddModListExt_r13 = NULL; - physicalConfigDedicated->ext7->csi_RS_ConfigNZPToReleaseListExt_r13 = NULL; + physicalConfigDedicated->ext7->ce_Mode_r13->present = PhysicalConfigDedicated__ext7__ce_Mode_r13_PR_setup; + physicalConfigDedicated->ext7->ce_Mode_r13->choice.setup = PhysicalConfigDedicated__ext7__ce_Mode_r13__setup_ce_ModeA; + physicalConfigDedicated->ext7->csi_RS_ConfigNZPToAddModListExt_r13 = NULL; + physicalConfigDedicated->ext7->csi_RS_ConfigNZPToReleaseListExt_r13 = NULL; - // +kogo ------------------------------------------------------------------------------------------ + // +kogo ------------------------------------------------------------------------------------------ - if (mac_MainConfig!=NULL) { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig)); - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->present - =RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue; - memcpy(&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue, - mac_MainConfig, - sizeof(*mac_MainConfig)); + if (mac_MainConfig!=NULL) { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig = CALLOC(1, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig)); + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->present + =RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue; + memcpy(&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue, + mac_MainConfig, + sizeof(*mac_MainConfig)); + } else { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig=NULL; + } + + if (MeasId_list != NULL) { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig = CALLOC(1, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); + memset((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig, + 0, sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); + + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList = MeasId_list; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list; + + if (quantityConfig!=NULL) { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = CALLOC(1, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); + memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig, + (void *)quantityConfig, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); } else { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig=NULL; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = NULL; } - if (MeasId_list != NULL) { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); - memset((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig, - 0, sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); - - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList = MeasId_list; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measObjectToAddModList = MeasObj_list; - - if (quantityConfig!=NULL) { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); - memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig, - (void *)quantityConfig, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); - } else { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = NULL; - } - - if(speedStatePars != NULL) { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars)); - memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars, - (void *)speedStatePars,sizeof(*speedStatePars)); - } else { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = NULL; - } - - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->s_Measure= rsrp; + if(speedStatePars != NULL) { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = CALLOC(1, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars)); + memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars, + (void *)speedStatePars,sizeof(*speedStatePars)); } else { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig = NULL; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = NULL; } - if (mobilityInfo !=NULL) { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo)); - memcpy((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo, (void*)mobilityInfo, - sizeof(MobilityControlInfo_t)); + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->s_Measure= rsrp; + } else { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig = NULL; + } - } else { - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = NULL; + if (mobilityInfo !=NULL) { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = CALLOC(1, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo)); + memcpy((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo, (void*)mobilityInfo, + sizeof(MobilityControlInfo_t)); + + } else { + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = NULL; + } + + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = dedicatedInfoNASList; + rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL; + + enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, + (void*)&dl_dcch_msg, + buffer, + RRC_BUF_SIZE); + AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %l)!\n", + enc_rval.failed_type->name, enc_rval.encoded); + +#ifdef XER_PRINT + xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg); +#endif + +#if defined(ENABLE_ITTI) +# if !defined(DISABLE_XER_SPRINT) + { + char message_string[30000]; + size_t message_string_size; + + if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message, (void *) &dl_dcch_msg)) > 0) { + MessageDef *msg_p; + + msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText)); + msg_p->ittiMsg.rrc_dl_dcch.size = message_string_size; + memcpy(&msg_p->ittiMsg.rrc_dl_dcch.text, message_string, message_string_size); + + itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p); } + } +# endif +#endif - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.dedicatedInfoNASList = dedicatedInfoNASList; - rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL; + //#ifdef USER_MODE + LOG_I(RRC,"RRCConnectionReconfiguration Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); + // for (i=0;i<30;i++) + // msg("%x.",buffer[i]); + // msg("\n"); - enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, - (void*)&dl_dcch_msg, - buffer, - RRC_BUF_SIZE); - AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %l)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + //#endif - #ifdef XER_PRINT - xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg); - #endif - - #if defined(ENABLE_ITTI) - # if !defined(DISABLE_XER_SPRINT) - { - char message_string[30000]; - size_t message_string_size; - - if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message, (void *) &dl_dcch_msg)) > 0) { - MessageDef *msg_p; - - msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText)); - msg_p->ittiMsg.rrc_dl_dcch.size = message_string_size; - memcpy(&msg_p->ittiMsg.rrc_dl_dcch.text, message_string, message_string_size); - - itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p); - } - } - # endif - #endif - - //#ifdef USER_MODE - LOG_I(RRC,"RRCConnectionReconfiguration Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); - // for (i=0;i<30;i++) - // msg("%x.",buffer[i]); - // msg("\n"); - - //#endif - - return((enc_rval.encoded+7)/8); + return((enc_rval.encoded+7)/8); } //------------------------------------------------------------------------------ uint16_t do_RRCConnectionReconfiguration( - const protocol_ctxt_t* const ctxt_pP, - uint8_t *buffer, - uint8_t Transaction_id, - SRB_ToAddModList_t *SRB_list, - DRB_ToAddModList_t *DRB_list, - DRB_ToReleaseList_t *DRB_list2, - struct SPS_Config *sps_Config, - struct PhysicalConfigDedicated *physicalConfigDedicated, - MeasObjectToAddModList_t *MeasObj_list, - ReportConfigToAddModList_t *ReportConfig_list, - QuantityConfig_t *quantityConfig, - MeasIdToAddModList_t *MeasId_list, - MAC_MainConfig_t *mac_MainConfig, - MeasGapConfig_t *measGapConfig, - MobilityControlInfo_t *mobilityInfo, - struct MeasConfig__speedStatePars *speedStatePars, - RSRP_Range_t *rsrp, - C_RNTI_t *cba_rnti, - struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList - *dedicatedInfoNASList + const protocol_ctxt_t* const ctxt_pP, + uint8_t *buffer, + uint8_t Transaction_id, + SRB_ToAddModList_t *SRB_list, + DRB_ToAddModList_t *DRB_list, + DRB_ToReleaseList_t *DRB_list2, + struct SPS_Config *sps_Config, + struct PhysicalConfigDedicated *physicalConfigDedicated, + MeasObjectToAddModList_t *MeasObj_list, + ReportConfigToAddModList_t *ReportConfig_list, + QuantityConfig_t *quantityConfig, + MeasIdToAddModList_t *MeasId_list, + MAC_MainConfig_t *mac_MainConfig, + MeasGapConfig_t *measGapConfig, + MobilityControlInfo_t *mobilityInfo, + struct MeasConfig__speedStatePars *speedStatePars, + RSRP_Range_t *rsrp, + C_RNTI_t *cba_rnti, + struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList + *dedicatedInfoNASList #if defined(Rel10) || defined(Rel14) - , SCellToAddMod_r10_t *SCell_config + , SCellToAddMod_r10_t *SCell_config #endif -) + ) //------------------------------------------------------------------------------ { @@ -3000,7 +3042,7 @@ do_RRCConnectionReconfiguration( rrcConnectionReconfiguration->criticalExtensions.choice.c1.present =RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8 ; rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated)); + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated)); rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->srb_ToAddModList = SRB_list; rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList = DRB_list; rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToReleaseList = DRB_list2; @@ -3012,21 +3054,21 @@ do_RRCConnectionReconfiguration( if (mac_MainConfig!=NULL) { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig)); + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig)); rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->present =RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue; memcpy(&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue, - mac_MainConfig, - sizeof(*mac_MainConfig)); + mac_MainConfig, + sizeof(*mac_MainConfig)); } else { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->mac_MainConfig=NULL; } if (MeasId_list != NULL) { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); memset((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig, - 0, sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); + 0, sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig)); rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->reportConfigToAddModList = ReportConfig_list; rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->measIdToAddModList = MeasId_list; @@ -3034,19 +3076,19 @@ do_RRCConnectionReconfiguration( if (quantityConfig!=NULL) { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig, - (void *)quantityConfig, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); + (void *)quantityConfig, + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig)); } else { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->quantityConfig = NULL; } if(speedStatePars != NULL) { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars)); + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars)); memcpy((void *)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars, - (void *)speedStatePars,sizeof(*speedStatePars)); + (void *)speedStatePars,sizeof(*speedStatePars)); } else { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.measConfig->speedStatePars = NULL; } @@ -3058,9 +3100,9 @@ do_RRCConnectionReconfiguration( if (mobilityInfo !=NULL) { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = CALLOC(1, - sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo)); + sizeof(*rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo)); memcpy((void*)rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo, (void*)mobilityInfo, - sizeof(MobilityControlInfo_t)); + sizeof(MobilityControlInfo_t)); } else { rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo = NULL; @@ -3070,11 +3112,11 @@ do_RRCConnectionReconfiguration( rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.securityConfigHO = NULL; enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, - (void*)&dl_dcch_msg, - buffer, - RRC_BUF_SIZE); + (void*)&dl_dcch_msg, + buffer, + RRC_BUF_SIZE); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %l)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #ifdef XER_PRINT xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg); @@ -3113,8 +3155,8 @@ do_RRCConnectionReconfiguration( //------------------------------------------------------------------------------ uint8_t do_RRCConnectionReestablishmentReject( - uint8_t Mod_id, - uint8_t* const buffer) + uint8_t Mod_id, + uint8_t* const buffer) //------------------------------------------------------------------------------ { @@ -3135,11 +3177,11 @@ do_RRCConnectionReestablishmentReject( xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, - (void*)&dl_ccch_msg, - buffer, - 100); + (void*)&dl_ccch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -3162,7 +3204,7 @@ do_RRCConnectionReestablishmentReject( #ifdef USER_MODE LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %d bits (%d bytes)\n", - enc_rval.encoded,(enc_rval.encoded+7)/8); + enc_rval.encoded,(enc_rval.encoded+7)/8); #endif return((enc_rval.encoded+7)/8); @@ -3171,8 +3213,8 @@ do_RRCConnectionReestablishmentReject( //------------------------------------------------------------------------------ uint8_t do_RRCConnectionReject( - uint8_t Mod_id, - uint8_t* const buffer) + uint8_t Mod_id, + uint8_t* const buffer) //------------------------------------------------------------------------------ { @@ -3196,11 +3238,11 @@ do_RRCConnectionReject( xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, - (void*)&dl_ccch_msg, - buffer, - 100); + (void*)&dl_ccch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %ld)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -3223,16 +3265,16 @@ do_RRCConnectionReject( #ifdef USER_MODE LOG_D(RRC,"RRCConnectionReject Encoded %d bits (%d bytes)\n", - enc_rval.encoded,(enc_rval.encoded+7)/8); + enc_rval.encoded,(enc_rval.encoded+7)/8); #endif return((enc_rval.encoded+7)/8); } uint8_t do_RRCConnectionRelease( - uint8_t Mod_id, - uint8_t *buffer, - uint8_t Transaction_id) + uint8_t Mod_id, + uint8_t *buffer, + uint8_t Transaction_id) { asn_enc_rval_t enc_rval; @@ -3257,12 +3299,12 @@ uint8_t do_RRCConnectionRelease( rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.idleModeMobilityControlInfo = NULL; rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension=CALLOC(1, - sizeof(*rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension)); + sizeof(*rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension)); enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message, - (void*)&dl_dcch_msg, - buffer, - RRC_BUF_SIZE); + (void*)&dl_dcch_msg, + buffer, + RRC_BUF_SIZE); return((enc_rval.encoded+7)/8); } @@ -3272,10 +3314,10 @@ uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 1 #if defined(Rel10) || defined(Rel14) uint8_t do_MBSFNAreaConfig(uint8_t Mod_id, - uint8_t sync_area, - uint8_t *buffer, - MCCH_Message_t *mcch_message, - MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration) + uint8_t sync_area, + uint8_t *buffer, + MCCH_Message_t *mcch_message, + MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration) { asn_enc_rval_t enc_rval; @@ -3387,11 +3429,11 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id, xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_MCCH_Message, - (void*)mcch_message, - buffer, - 100); + (void*)mcch_message, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -3441,7 +3483,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_ measurementReport->criticalExtensions.present=MeasurementReport__criticalExtensions_PR_c1; measurementReport->criticalExtensions.choice.c1.present=MeasurementReport__criticalExtensions__c1_PR_measurementReport_r8; measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension=CALLOC(1, - sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension)); + sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.nonCriticalExtension)); measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measId=measid; #if defined(Rel10) || defined(Rel14) @@ -3452,7 +3494,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_ measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultServCell.rsrqResult=rsrq_s; #endif measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells=CALLOC(1, - sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells)); + sizeof(*measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells)); measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->present=MeasResults__measResultNeighCells_PR_measResultListEUTRA; MeasResultListEUTRA_t *measResultListEUTRA2; @@ -3518,14 +3560,14 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_ measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA=*(measResultListEUTRA2); enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, - (void*)&ul_dcch_msg, - buffer, - 100); + (void*)&ul_dcch_msg, + buffer, + 100); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if !defined(DISABLE_XER_SPRINT) @@ -3728,12 +3770,12 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) bit_string = CALLOC(1, sizeof(*bit_string)); featrG = 0x04000800; if(usim_test == 1) - { - bit_string->buf = &featrG; - bit_string->size = 4; - bit_string->bits_unused = 0; - UE_EUTRA_Capability->featureGroupIndicators = bit_string; - } + { + bit_string->buf = &featrG; + bit_string->size = 4; + bit_string->bits_unused = 0; + UE_EUTRA_Capability->featureGroupIndicators = bit_string; + } // UE_EUTRA_Capability->interRAT_Parameters // null } else { @@ -3758,11 +3800,11 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) xer_fprint(stdout,&asn_DEF_UE_EUTRA_Capability,(void *)UE_EUTRA_Capability); #endif enc_rval = uper_encode_to_buffer(&asn_DEF_UE_EUTRA_Capability, - (void*)UE_EUTRA_Capability, - &UECapability.sdu[0], - MAX_UE_CAPABILITY_SIZE); + (void*)UE_EUTRA_Capability, + &UECapability.sdu[0], + MAX_UE_CAPABILITY_SIZE); AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", - enc_rval.failed_type->name, enc_rval.encoded); + enc_rval.failed_type->name, enc_rval.encoded); #if defined(ENABLE_ITTI) # if defined(DISABLE_XER_SPRINT) @@ -3794,7 +3836,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) UECapability.sdu_size = (enc_rval.encoded + 7) / 8; LOG_I(PHY, "[RRC]UE Capability encoded, %d bytes (%d bits)\n", - UECapability.sdu_size, enc_rval.encoded + 7); + UECapability.sdu_size, enc_rval.encoded + 7); { char *sdu; sdu = malloc (3 * UECapability.sdu_size + 1 /* For '\0' */); diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.h b/openair2/RRC/LITE/MESSAGES/asn1_msg.h index 9f978dc797..c77f31941f 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.h +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.h @@ -75,10 +75,17 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich @param Mod_id Instance of eNB @param Component carrier Component carrier to configure @param configuration Pointer Configuration Request structure +@param br_flag Do for BL/CE UE configuration @return size of encoded bit stream in bytes*/ -uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id, RrcConfigurationReq *configuration - ); +uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,int Mod_id,int CC_id +#if defined(ENABLE_ITTI) + ,RrcConfigurationReq *configuration +#endif +#ifdef Rel14 + ,int br_flag +#endif + ); /** \brief Generate a default configuration for SIB2/SIB3 in one System Information PDU (eNB). @@ -95,6 +102,9 @@ uint8_t do_SIB23(uint8_t Mod_id, int CC_id #if defined(ENABLE_ITTI) , RrcConfigurationReq *configuration +#endif +#ifdef Rel14 + , int br_flag #endif ); diff --git a/openair2/RRC/LITE/defs.h b/openair2/RRC/LITE/defs.h index 3d98d1d300..b57483ac59 100644 --- a/openair2/RRC/LITE/defs.h +++ b/openair2/RRC/LITE/defs.h @@ -475,7 +475,9 @@ typedef struct { uint32_t pbch_repetition; BCCH_BCH_Message_t mib; BCCH_DL_SCH_Message_t siblock1; + BCCH_DL_SCH_Message_t siblock1_BR; BCCH_DL_SCH_Message_t systemInformation; + BCCH_DL_SCH_Message_t systemInformation_BR; // SystemInformation_t systemInformation; SystemInformationBlockType1_t *sib1; SystemInformationBlockType2_t *sib2; @@ -483,7 +485,6 @@ typedef struct { #ifdef Rel14 SystemInformationBlockType1_t *sib1_BR; SystemInformationBlockType2_t *sib2_BR; - SystemInformationBlockType2_t *sib3_BR; #endif #if defined(Rel10) || defined(Rel14) SystemInformationBlockType13_r9_t *sib13; diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index 91c1d91ee6..ab939dcbad 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -127,8 +127,6 @@ init_SI( ) //----------------------------------------------------------------------------- { - uint8_t SIwindowsize = 1; - uint16_t SIperiod = 8; #if defined(Rel10) || defined(Rel14) int i; #endif @@ -149,14 +147,14 @@ init_SI( #endif LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n", configuration->N_RB_DL[CC_id], - configuration->phich_resource[CC_id], - configuration->phich_duration[CC_id]); + (int)configuration->radioresourceconfig[CC_id].phich_resource, + (int)configuration->radioresourceconfig[CC_id].phich_duration); do_MIB(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id], #ifdef ENABLE_ITTI configuration->N_RB_DL[CC_id], - configuration->phich_resource[CC_id], - configuration->phich_duration[CC_id], - configuration->schedulingInfoSIB1_BR_r13[CC_id] + (int)configuration->radioresourceconfig[CC_id].phich_resource, + (int)configuration->radioresourceconfig[CC_id].phich_duration, + configuration->schedulingInfoSIB1_BR_r13[CC_id] #else 50, 0, 0, 1 #endif @@ -172,11 +170,24 @@ init_SI( RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id #if defined(ENABLE_ITTI) , configuration +#endif +#ifdef Rel14 + ,0 #endif ); AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255"); + +#ifdef Rel14 + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id +#if defined(ENABLE_ITTI) + , configuration +#endif + ,1 + ); +#endif + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23 = (uint8_t*) malloc16(64); AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23!=NULL,"cannot allocate memory for SIB"); RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = do_SIB23( @@ -185,11 +196,30 @@ init_SI( CC_id #if defined(ENABLE_ITTI) , configuration +#endif +#ifdef Rel14 + ,0 #endif ); AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 != 255,"FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB23 == 255"); - + +#ifdef Rel14 + if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) { + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23_BR = (uint8_t*) malloc16(64); + AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23_BR!=NULL,"cannot allocate memory for SIB"); + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23_BR = do_SIB23( + ctxt_pP->module_id, + CC_id, +#if defined(ENABLE_ITTI) + configuration, +#endif + 0); + } + else { + RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23_BR = 0; + } +#endif LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); @@ -1679,9 +1709,9 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons //TODO: change TM for secondary CC in SCelltoaddmodlist if (*physicalConfigDedicated) { if ((*physicalConfigDedicated)->antennaInfo) { - (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.transmissionMode = rrc_inst->configuration.ue_TransmissionMode[0]; - LOG_D(RRC,"Setting transmission mode to %ld+1\n",rrc_inst->configuration.ue_TransmissionMode[0]); - if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm3) { + (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.transmissionMode = rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode; + LOG_D(RRC,"Setting transmission mode to %ld+1\n",rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode); + if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==AntennaInfoDedicated__transmissionMode_tm3) { (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR)); (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = @@ -1691,7 +1721,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1; (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6; } - else if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm4) { + else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==AntennaInfoDedicated__transmissionMode_tm4) { (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR)); (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = @@ -1702,7 +1732,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm4.bits_unused=2; } - else if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm5) { + else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==AntennaInfoDedicated__transmissionMode_tm5) { (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR)); (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = @@ -1712,7 +1742,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.size=1; (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm5.bits_unused=4; } - else if (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm6) { + else if (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==AntennaInfoDedicated__transmissionMode_tm6) { (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1,sizeof(AntennaInfoDedicated__codebookSubsetRestriction_PR)); (*physicalConfigDedicated)->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present = @@ -1727,9 +1757,9 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons LOG_E(RRC,"antenna_info not present in physical_config_dedicated. Not reconfiguring!\n"); } if ((*physicalConfigDedicated)->cqi_ReportConfig) { - if ((rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm4) || - (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm5) || - (rrc_inst->configuration.ue_TransmissionMode[0]==AntennaInfoDedicated__transmissionMode_tm6)) { + if ((rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==AntennaInfoDedicated__transmissionMode_tm4) || + (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==AntennaInfoDedicated__transmissionMode_tm5) || + (rrc_inst->configuration.radioresourceconfig[0].ue_TransmissionMode==AntennaInfoDedicated__transmissionMode_tm6)) { //feedback mode needs to be set as well //TODO: I think this is taken into account in the PHY automatically based on the transmission mode variable printf("setting cqi reporting mode to rm31\n");