Commit 64cd0076 authored by Cedric Roux's avatar Cedric Roux
Browse files

bugfix: print a warning when a configuration parameter is not found

If your configuration file does not contain a parameter
the softmodem only printed "Failed to parse eNB configuration file"
without telling you what parameter was not found.

This quick fix adds a warning in such cases.

It also exists at the first error rather than trying to
parse the rest of the configuration file.
parent 85e562d0
...@@ -60,6 +60,27 @@ ...@@ -60,6 +60,27 @@
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
/* those macros are here to help diagnose problems in configuration files
* if the lookup fails, a warning is printed
* (yes we can use the function name for the macro itself, the C preprocessor
* won't die in an infinite loop)
*/
#define config_setting_lookup_int(setting, name, value) \
(config_setting_lookup_int(setting, name, value) || \
(printf("WARNING: setting '%s' not found in configuration file\n", name), 0))
#define config_setting_lookup_int64(setting, name, value) \
(config_setting_lookup_int64(setting, name, value) || \
(printf("WARNING: setting '%s' not found in configuration file\n", name), 0))
#define config_setting_lookup_float(setting, name, value) \
(config_setting_lookup_float(setting, name, value) || \
(printf("WARNING: setting '%s' not found in configuration file\n", name), 0))
#define config_setting_lookup_bool(setting, name, value) \
(config_setting_lookup_bool(setting, name, value) || \
(printf("WARNING: setting '%s' not found in configuration file\n", name), 0))
#define config_setting_lookup_string(setting, name, value) \
(config_setting_lookup_string(setting, name, value) || \
(printf("WARNING: setting '%s' not found in configuration file\n", name), 0))
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs" #define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
#define ENB_CONFIG_STRING_ENB_LIST "eNBs" #define ENB_CONFIG_STRING_ENB_LIST "eNBs"
...@@ -514,7 +535,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -514,7 +535,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
int num_component_carriers = 0; int num_component_carriers = 0;
int i = 0; int i = 0;
int j = 0; int j = 0;
int parse_errors = 0;
libconfig_int enb_id = 0; libconfig_int enb_id = 0;
const char* cell_type = NULL; const char* cell_type = NULL;
const char* tac = 0; const char* tac = 0;
...@@ -716,7 +736,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -716,7 +736,6 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
if (setting != NULL) { if (setting != NULL) {
enb_properties_index = 0; enb_properties_index = 0;
parse_errors = 0;
num_enbs = config_setting_length(setting); num_enbs = config_setting_length(setting);
for (i = 0; i < num_enbs; i++) { for (i = 0; i < num_enbs; i++) {
...@@ -743,7 +762,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -743,7 +762,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
) )
) { ) {
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, %u th enb\n", "Failed to parse eNB configuration file %s, %u th enb\n",
lib_config_file_name_pP, i); lib_config_file_name_pP, i);
continue; // FIXME this prevents segfaults below, not sure what happens after function exit continue; // FIXME this prevents segfaults below, not sure what happens after function exit
...@@ -761,7 +780,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -761,7 +780,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) { } else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) {
enb_properties.properties[enb_properties_index]->cell_type = CELL_HOME_ENB; enb_properties.properties[enb_properties_index]->cell_type = CELL_HOME_ENB;
} else { } else {
AssertError (0, parse_errors ++, 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", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
lib_config_file_name_pP, i, cell_type); lib_config_file_name_pP, i, cell_type);
} }
...@@ -865,7 +884,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -865,7 +884,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
#endif #endif
)) { )) {
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, Component Carrier %d!\n", "Failed to parse eNB configuration file %s, Component Carrier %d!\n",
lib_config_file_name_pP, enb_properties.properties[enb_properties_index]->nb_cc++); lib_config_file_name_pP, enb_properties.properties[enb_properties_index]->nb_cc++);
continue; // FIXME this prevents segfaults below, not sure what happens after function exit continue; // FIXME this prevents segfaults below, not sure what happens after function exit
...@@ -874,17 +893,17 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -874,17 +893,17 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->nb_cc++; enb_properties.properties[enb_properties_index]->nb_cc++;
enb_properties.properties[enb_properties_index]->tdd_config[j] = tdd_config; enb_properties.properties[enb_properties_index]->tdd_config[j] = tdd_config;
AssertError (tdd_config <= TDD_Config__subframeAssignment_sa6, parse_errors ++, AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config, TDD_Config__subframeAssignment_sa6); lib_config_file_name_pP, i, tdd_config, TDD_Config__subframeAssignment_sa6);
enb_properties.properties[enb_properties_index]->tdd_config_s[j] = tdd_config_s; enb_properties.properties[enb_properties_index]->tdd_config_s[j] = tdd_config_s;
AssertError (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, parse_errors ++, AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); lib_config_file_name_pP, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8);
if (!prefix_type) if (!prefix_type)
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_PREFIX_TYPE); lib_config_file_name_pP, i, ENB_CONFIG_STRING_PREFIX_TYPE);
else if (strcmp(prefix_type, "NORMAL") == 0) { else if (strcmp(prefix_type, "NORMAL") == 0) {
...@@ -892,7 +911,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -892,7 +911,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(prefix_type, "EXTENDED") == 0) { } else if (strcmp(prefix_type, "EXTENDED") == 0) {
enb_properties.properties[enb_properties_index]->prefix_type[j] = EXTENDED; enb_properties.properties[enb_properties_index]->prefix_type[j] = EXTENDED;
} else { } else {
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
lib_config_file_name_pP, i, prefix_type); lib_config_file_name_pP, i, prefix_type);
} }
...@@ -903,7 +922,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -903,7 +922,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->Nid_cell[j]= Nid_cell; enb_properties.properties[enb_properties_index]->Nid_cell[j]= Nid_cell;
if (Nid_cell>503) { if (Nid_cell>503) {
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n",
lib_config_file_name_pP, i, Nid_cell); lib_config_file_name_pP, i, Nid_cell);
} }
...@@ -911,7 +930,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -911,7 +930,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->N_RB_DL[j]= N_RB_DL; enb_properties.properties[enb_properties_index]->N_RB_DL[j]= N_RB_DL;
if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) {
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n",
lib_config_file_name_pP, i, N_RB_DL); lib_config_file_name_pP, i, N_RB_DL);
} }
...@@ -921,27 +940,27 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -921,27 +940,27 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(frame_type, "TDD") == 0) { } else if (strcmp(frame_type, "TDD") == 0) {
enb_properties.properties[enb_properties_index]->frame_type[j] = TDD; enb_properties.properties[enb_properties_index]->frame_type[j] = TDD;
} else { } else {
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
lib_config_file_name_pP, i, frame_type); lib_config_file_name_pP, i, frame_type);
} }
enb_properties.properties[enb_properties_index]->tdd_config[j] = tdd_config; enb_properties.properties[enb_properties_index]->tdd_config[j] = tdd_config;
AssertError (tdd_config <= TDD_Config__subframeAssignment_sa6, parse_errors ++, AssertFatal (tdd_config <= TDD_Config__subframeAssignment_sa6,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!", "Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config, TDD_Config__subframeAssignment_sa6); lib_config_file_name_pP, i, tdd_config, TDD_Config__subframeAssignment_sa6);
enb_properties.properties[enb_properties_index]->tdd_config_s[j] = tdd_config_s; enb_properties.properties[enb_properties_index]->tdd_config_s[j] = tdd_config_s;
AssertError (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8, parse_errors ++, AssertFatal (tdd_config_s <= TDD_Config__specialSubframePatterns_ssp8,
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!", "Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!",
lib_config_file_name_pP, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8); lib_config_file_name_pP, i, tdd_config_s, TDD_Config__specialSubframePatterns_ssp8);
if (!prefix_type) if (!prefix_type)
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n", "Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_PREFIX_TYPE); lib_config_file_name_pP, i, ENB_CONFIG_STRING_PREFIX_TYPE);
else if (strcmp(prefix_type, "NORMAL") == 0) { else if (strcmp(prefix_type, "NORMAL") == 0) {
...@@ -949,7 +968,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -949,7 +968,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(prefix_type, "EXTENDED") == 0) { } else if (strcmp(prefix_type, "EXTENDED") == 0) {
enb_properties.properties[enb_properties_index]->prefix_type[j] = EXTENDED; enb_properties.properties[enb_properties_index]->prefix_type[j] = EXTENDED;
} else { } else {
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
lib_config_file_name_pP, i, prefix_type); lib_config_file_name_pP, i, prefix_type);
} }
...@@ -967,64 +986,66 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -967,64 +986,66 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset; enb_properties.properties[enb_properties_index]->uplink_frequency_offset[j] = (unsigned int) uplink_frequency_offset;
parse_errors += enb_check_band_frequencies(lib_config_file_name_pP, if (enb_check_band_frequencies(lib_config_file_name_pP,
enb_properties_index, enb_properties_index,
enb_properties.properties[enb_properties_index]->eutra_band[j], enb_properties.properties[enb_properties_index]->eutra_band[j],
enb_properties.properties[enb_properties_index]->downlink_frequency[j], enb_properties.properties[enb_properties_index]->downlink_frequency[j],
enb_properties.properties[enb_properties_index]->uplink_frequency_offset[j], enb_properties.properties[enb_properties_index]->uplink_frequency_offset[j],
enb_properties.properties[enb_properties_index]->frame_type[j]); enb_properties.properties[enb_properties_index]->frame_type[j])) {
AssertFatal(0, "error calling enb_check_band_frequencies\n");
}
enb_properties.properties[enb_properties_index]->nb_antennas_tx[j] = nb_antennas_tx; enb_properties.properties[enb_properties_index]->nb_antennas_tx[j] = nb_antennas_tx;
if ((nb_antenna_ports <1) || (nb_antenna_ports > 2)) if ((nb_antenna_ports <1) || (nb_antenna_ports > 2))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n",
lib_config_file_name_pP, i, nb_antenna_ports); lib_config_file_name_pP, i, nb_antenna_ports);
enb_properties.properties[enb_properties_index]->nb_antenna_ports[j] = nb_antenna_ports; enb_properties.properties[enb_properties_index]->nb_antenna_ports[j] = nb_antenna_ports;
if ((nb_antennas_tx <1) || (nb_antennas_tx > 64)) if ((nb_antennas_tx <1) || (nb_antennas_tx > 64))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_tx choice: 1..4 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_tx choice: 1..4 !\n",
lib_config_file_name_pP, i, nb_antennas_tx); lib_config_file_name_pP, i, nb_antennas_tx);
enb_properties.properties[enb_properties_index]->nb_antennas_rx[j] = nb_antennas_rx; enb_properties.properties[enb_properties_index]->nb_antennas_rx[j] = nb_antennas_rx;
if ((nb_antennas_rx <1) || (nb_antennas_rx > 4)) if ((nb_antennas_rx <1) || (nb_antennas_rx > 4))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_rx choice: 1..4 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antennas_rx choice: 1..4 !\n",
lib_config_file_name_pP, i, nb_antennas_rx); lib_config_file_name_pP, i, nb_antennas_rx);
enb_properties.properties[enb_properties_index]->tx_gain[j] = tx_gain; enb_properties.properties[enb_properties_index]->tx_gain[j] = tx_gain;
if ((tx_gain <0) || (tx_gain > 127)) if ((tx_gain <0) || (tx_gain > 127))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for tx_gain choice: 0..127 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for tx_gain choice: 0..127 !\n",
lib_config_file_name_pP, i, tx_gain); lib_config_file_name_pP, i, tx_gain);
enb_properties.properties[enb_properties_index]->rx_gain[j] = rx_gain; enb_properties.properties[enb_properties_index]->rx_gain[j] = rx_gain;
if ((rx_gain <0) || (rx_gain > 160)) if ((rx_gain <0) || (rx_gain > 160))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rx_gain choice: 0..160 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rx_gain choice: 0..160 !\n",
lib_config_file_name_pP, i, rx_gain); lib_config_file_name_pP, i, rx_gain);
enb_properties.properties[enb_properties_index]->prach_root[j] = prach_root; enb_properties.properties[enb_properties_index]->prach_root[j] = prach_root;
if ((prach_root <0) || (prach_root > 1023)) if ((prach_root <0) || (prach_root > 1023))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n",
lib_config_file_name_pP, i, prach_root); lib_config_file_name_pP, i, prach_root);
enb_properties.properties[enb_properties_index]->prach_config_index[j] = prach_config_index; enb_properties.properties[enb_properties_index]->prach_config_index[j] = prach_config_index;
if ((prach_config_index <0) || (prach_config_index > 63)) if ((prach_config_index <0) || (prach_config_index > 63))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n",
lib_config_file_name_pP, i, prach_config_index); lib_config_file_name_pP, i, prach_config_index);
if (!prach_high_speed) if (!prach_high_speed)
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED); lib_config_file_name_pP, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
else if (strcmp(prach_high_speed, "ENABLE") == 0) { else if (strcmp(prach_high_speed, "ENABLE") == 0) {
...@@ -1032,21 +1053,21 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1032,21 +1053,21 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(prach_high_speed, "DISABLE") == 0) { } else if (strcmp(prach_high_speed, "DISABLE") == 0) {
enb_properties.properties[enb_properties_index]->prach_high_speed[j] = FALSE; enb_properties.properties[enb_properties_index]->prach_high_speed[j] = FALSE;
} else } else
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
lib_config_file_name_pP, i, prach_high_speed); lib_config_file_name_pP, i, prach_high_speed);
enb_properties.properties[enb_properties_index]->prach_zero_correlation[j] =prach_zero_correlation; enb_properties.properties[enb_properties_index]->prach_zero_correlation[j] =prach_zero_correlation;
if ((prach_zero_correlation <0) || (prach_zero_correlation > 15)) if ((prach_zero_correlation <0) || (prach_zero_correlation > 15))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
lib_config_file_name_pP, i, prach_zero_correlation); lib_config_file_name_pP, i, prach_zero_correlation);
enb_properties.properties[enb_properties_index]->prach_freq_offset[j] = prach_freq_offset; enb_properties.properties[enb_properties_index]->prach_freq_offset[j] = prach_freq_offset;
if ((prach_freq_offset <0) || (prach_freq_offset > 94)) if ((prach_freq_offset <0) || (prach_freq_offset > 94))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
lib_config_file_name_pP, i, prach_freq_offset); lib_config_file_name_pP, i, prach_freq_offset);
...@@ -1054,21 +1075,21 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1054,21 +1075,21 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->pucch_delta_shift[j] = pucch_delta_shift-1; enb_properties.properties[enb_properties_index]->pucch_delta_shift[j] = pucch_delta_shift-1;
if ((pucch_delta_shift <1) || (pucch_delta_shift > 3)) if ((pucch_delta_shift <1) || (pucch_delta_shift > 3))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n",
lib_config_file_name_pP, i, pucch_delta_shift); lib_config_file_name_pP, i, pucch_delta_shift);
enb_properties.properties[enb_properties_index]->pucch_nRB_CQI[j] = pucch_nRB_CQI; enb_properties.properties[enb_properties_index]->pucch_nRB_CQI[j] = pucch_nRB_CQI;
if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98)) if ((pucch_nRB_CQI <0) || (pucch_nRB_CQI > 98))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n",
lib_config_file_name_pP, i, pucch_nRB_CQI); lib_config_file_name_pP, i, pucch_nRB_CQI);
enb_properties.properties[enb_properties_index]->pucch_nCS_AN[j] = pucch_nCS_AN; enb_properties.properties[enb_properties_index]->pucch_nCS_AN[j] = pucch_nCS_AN;
if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7)) if ((pucch_nCS_AN <0) || (pucch_nCS_AN > 7))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
lib_config_file_name_pP, i, pucch_nCS_AN); lib_config_file_name_pP, i, pucch_nCS_AN);
...@@ -1076,7 +1097,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1076,7 +1097,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->pucch_n1_AN[j] = pucch_n1_AN; enb_properties.properties[enb_properties_index]->pucch_n1_AN[j] = pucch_n1_AN;
if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047)) if ((pucch_n1_AN <0) || (pucch_n1_AN > 2047))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
lib_config_file_name_pP, i, pucch_n1_AN); lib_config_file_name_pP, i, pucch_n1_AN);
...@@ -1084,26 +1105,26 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1084,26 +1105,26 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower; enb_properties.properties[enb_properties_index]->pdsch_referenceSignalPower[j] = pdsch_referenceSignalPower;
if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50)) if ((pdsch_referenceSignalPower <-60) || (pdsch_referenceSignalPower > 50))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n",
lib_config_file_name_pP, i, pdsch_referenceSignalPower); lib_config_file_name_pP, i, pdsch_referenceSignalPower);
enb_properties.properties[enb_properties_index]->pdsch_p_b[j] = pdsch_p_b; enb_properties.properties[enb_properties_index]->pdsch_p_b[j] = pdsch_p_b;
if ((pdsch_p_b <0) || (pdsch_p_b > 3)) if ((pdsch_p_b <0) || (pdsch_p_b > 3))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n",
lib_config_file_name_pP, i, pdsch_p_b); lib_config_file_name_pP, i, pdsch_p_b);
enb_properties.properties[enb_properties_index]->pusch_n_SB[j] = pusch_n_SB; enb_properties.properties[enb_properties_index]->pusch_n_SB[j] = pusch_n_SB;
if ((pusch_n_SB <1) || (pusch_n_SB > 4)) if ((pusch_n_SB <1) || (pusch_n_SB > 4))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n",
lib_config_file_name_pP, i, pusch_n_SB); lib_config_file_name_pP, i, pusch_n_SB);
if (!pusch_hoppingMode) if (!pusch_hoppingMode)
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n", "Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE); lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE);
else if (strcmp(pusch_hoppingMode,"interSubFrame")==0) { else if (strcmp(pusch_hoppingMode,"interSubFrame")==0) {
...@@ -1111,19 +1132,19 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1111,19 +1132,19 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(pusch_hoppingMode,"intraAndInterSubFrame")==0) { } else if (strcmp(pusch_hoppingMode,"intraAndInterSubFrame")==0) {
enb_properties.properties[enb_properties_index]->pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame; enb_properties.properties[enb_properties_index]->pusch_hoppingMode[j] = PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame;
} else } else
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n",
lib_config_file_name_pP, i, pusch_hoppingMode); lib_config_file_name_pP, i, pusch_hoppingMode);
enb_properties.properties[enb_properties_index]->pusch_hoppingOffset[j] = pusch_hoppingOffset; enb_properties.properties[enb_properties_index]->pusch_hoppingOffset[j] = pusch_hoppingOffset;
if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98)) if ((pusch_hoppingOffset<0) || (pusch_hoppingOffset>98))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n",
lib_config_file_name_pP, i, pusch_hoppingMode); lib_config_file_name_pP, i, pusch_hoppingMode);
if (!pusch_enable64QAM) if (!pusch_enable64QAM)
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM); lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) { else if (strcmp(pusch_enable64QAM, "ENABLE") == 0) {
...@@ -1131,12 +1152,12 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1131,12 +1152,12 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) { } else if (strcmp(pusch_enable64QAM, "DISABLE") == 0) {
enb_properties.properties[enb_properties_index]->pusch_enable64QAM[j] = FALSE; enb_properties.properties[enb_properties_index]->pusch_enable64QAM[j] = FALSE;
} else } else
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, pusch_enable64QAM); lib_config_file_name_pP, i, pusch_enable64QAM);
if (!pusch_groupHoppingEnabled) if (!pusch_groupHoppingEnabled)
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN); lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) { else if (strcmp(pusch_groupHoppingEnabled, "ENABLE") == 0) {
...@@ -1144,7 +1165,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1144,7 +1165,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) { } else if (strcmp(pusch_groupHoppingEnabled, "DISABLE") == 0) {
enb_properties.properties[enb_properties_index]->pusch_groupHoppingEnabled[j] = FALSE; enb_properties.properties[enb_properties_index]->pusch_groupHoppingEnabled[j] = FALSE;
} else } else
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, pusch_groupHoppingEnabled); lib_config_file_name_pP, i, pusch_groupHoppingEnabled);
...@@ -1152,12 +1173,12 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1152,12 +1173,12 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
enb_properties.properties[enb_properties_index]->pusch_groupAssignment[j] = pusch_groupAssignment; enb_properties.properties[enb_properties_index]->pusch_groupAssignment[j] = pusch_groupAssignment;
if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29)) if ((pusch_groupAssignment<0)||(pusch_groupAssignment>29))
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n", "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n",
lib_config_file_name_pP, i, pusch_groupAssignment); lib_config_file_name_pP, i, pusch_groupAssignment);
if (!pusch_sequenceHoppingEnabled) if (!pusch_sequenceHoppingEnabled)
AssertError (0, parse_errors ++, AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n", "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN); lib_config_file_name_pP, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) { else if (strcmp(pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
...@@ -1165,14 +1186,14 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -1165,14 +1186,14 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
} else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) { } else if (strcmp(pusch_sequenceHoppingEnabled, "DISABLE") == 0) {