diff --git a/common/config/config_cmdline.c b/common/config/config_cmdline.c index 382aa64bc08b4ceed3033c33dc4d945b9a91e772..c5461610a1c2716d3f22fdd393b02d4f69160db7 100644 --- a/common/config/config_cmdline.c +++ b/common/config/config_cmdline.c @@ -136,7 +136,7 @@ char *cfgpath; } else { sprintf(cfgpath,"%s",cfgoptions[i].optname); } - if ( ((strlen(*p) > 1) && (strcmp(*p + 1,cfgoptions[i].shortopt) == 0)) || + if ( ((strlen(*p) == 2) && (strcmp(*p + 1,cfgpath) == 0)) || ((strlen(*p) > 2) && (strcmp(*p + 2,cfgpath ) == 0 )) ) { p++; j =+ processoption(&(cfgoptions[i]), *p); diff --git a/common/config/config_load_configmodule.c b/common/config/config_load_configmodule.c index cd1876d375e896d1870c6a98f97f1d13c5fb4158..753659129e71e7f273e837b81c922eb7ba5b6d4c 100644 --- a/common/config/config_load_configmodule.c +++ b/common/config/config_load_configmodule.c @@ -106,16 +106,19 @@ char *modeparams=NULL; char *cfgmode=NULL; char *strtokctx=NULL; char *atoken; - +uint32_t tmpflags=0; int i; /* first parse the command line to look for the -O option */ opterr=0; - while ((i = getopt(argc, argv, "O:")) != -1) { + while ((i = getopt(argc, argv, "O:h")) != -1) { if ( i == 'O' ) { cfgparam = optarg; - } + } + if ( i == 'h' ) { + tmpflags = CONFIG_HELP; + } } optind=1; @@ -132,20 +135,21 @@ int i; i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams); if (i< 0) { fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno)); - return NULL; + cfgmode=strdup("libconfig"); + modeparams = strdup("oaisoftmodem.conf"); } else if ( i == 1 ) { /* -O argument doesn't contain ":" separator, legacy -O <conf file> option, default cfgmode to libconfig with one parameter, the path to the configuration file */ modeparams=cfgmode; cfgmode=strdup("libconfig"); + tmpflags = tmpflags | CONFIG_LEGACY;/* temporary, legacy mode */ } cfgptr = malloc(sizeof(configmodule_interface_t)); memset(cfgptr,0,sizeof(configmodule_interface_t)); -/* temporary, legacy mode */ - if (i==1) cfgptr->rtflags = cfgptr->rtflags | CONFIG_LEGACY; -/*--*/ + + cfgptr->rtflags = cfgptr->rtflags | tmpflags; cfgptr->argc = argc; cfgptr->argv = argv; cfgptr->cfgmode=strdup(cfgmode); @@ -178,17 +182,18 @@ int i; i=load_config_sharedlib(cfgptr); if (i< 0) { fprintf(stderr,"[CONFIG] %s %d config module %s couldn't be loaded\n", __FILE__, __LINE__,cfgmode); - return NULL; + cfgptr->rtflags = cfgptr->rtflags | CONFIG_HELP | CONFIG_ABORT; } else { printf("[CONFIG] config module %s loaded\n",cfgmode); + Config_Params[CONFIGPARAM_DEBUGFLAGS_IDX].uptr=&(cfgptr->rtflags); + config_get(Config_Params,CONFIG_PARAMLENGTH(Config_Params), CONFIG_SECTIONNAME ); } - Config_Params[CONFIGPARAM_DEBUGFLAGS_IDX].uptr=&(cfgptr->rtflags); - config_get(Config_Params,CONFIG_PARAMLENGTH(Config_Params), CONFIG_SECTIONNAME ); + if (modeparams != NULL) free(modeparams); if (cfgmode != NULL) free(cfgmode); - + if (CONFIG_ISFLAGSET(CONFIG_ABORT)) config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params)); return cfgptr; } diff --git a/common/config/config_load_configmodule.h b/common/config/config_load_configmodule.h index 82a97f067491bc0cec8a02bf1382921b3d5739d4..e9f1f7050fedfe2e992d6277fcd4cb8a0264d639 100644 --- a/common/config/config_load_configmodule.h +++ b/common/config/config_load_configmodule.h @@ -44,7 +44,8 @@ #define CONFIG_PRINTPARAMS 1 // print parameters values while processing #define CONFIG_DEBUGPTR 2 // print memory allocation/free debug messages #define CONFIG_DEBUGCMDLINE 4 // print command line processing messages - +#define CONFIG_HELP 8 // print help message +#define CONFIG_ABORT 16 // config failed,abort execution /* temporary flag to be able to use legacy config mechanism */ #define CONFIG_LEGACY (1 << 10) @@ -71,17 +72,21 @@ typedef struct configmodule_interface #ifdef CONFIG_LOADCONFIG_MAIN configmodule_interface_t *cfgptr=NULL; -static char config_helpstr [] =" \ - config debugflags: mask, 1->print parameters, 2->print memory allocations debug messages \ - 4->print command line processing debug messages \ - -O <config mode><:dbg> \ - debugflags can also be defined in the config_libconfig section of the config file \ -"; +static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbg[debugflags]> \n \ + debugflags can also be defined in the config_libconfig section of the config file\n \ + debugflags: mask, 1->print parameters, 2->print memory allocations debug messages\n \ + 4->print command line processing debug messages\n "; + #define CONFIG_SECTIONNAME "config" - #define CONFIGPARAM_DEBUGFLAGS_IDX 0 + + static paramdef_t Config_Params[] = { -{"debugflags", "", config_helpstr, 0, uptr:NULL, defintval:0, TYPE_MASK, 0}, +/*-----------------------------------------------------------------------------------------------------------------------*/ +/* config parameters for config module */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-----------------------------------------------------------------------------------------------------------------------*/ +{"debugflags", config_helpstr, 0, uptr:NULL, defintval:0, TYPE_MASK, 0}, }; #else diff --git a/common/config/config_paramdesc.h b/common/config/config_paramdesc.h index 8f4282b4f1926d759df32a5ac9fe6b9697ab1482..a7de5e3098ffabc47226eb8c04ab0381b3593af8 100644 --- a/common/config/config_paramdesc.h +++ b/common/config/config_paramdesc.h @@ -38,7 +38,7 @@ #define MAX_OPTNAME_SIZE 64 -#define MAX_SHORTOPT_SIZE 8 + /* parameter flags definitions */ @@ -58,7 +58,6 @@ typedef struct paramdef { char optname[MAX_OPTNAME_SIZE]; /* parameter name, can be used as long command line option */ - char shortopt[MAX_SHORTOPT_SIZE]; /* short command line option */ char *helpstr; /* help string */ unsigned int paramflags; /* value is a "ored" combination of above PARAMFLAG_XXXX values */ union { /* pointer to the parameter value, completed by the config module */ diff --git a/common/config/config_userapi.c b/common/config/config_userapi.c index d7ee462c2657c179e297ee49be9b728b48fad3f6..25fc6102f56f4a9d1d559a4f11cd21bbfe1b2ad0 100644 --- a/common/config/config_userapi.c +++ b/common/config/config_userapi.c @@ -112,7 +112,10 @@ void config_printhelp(paramdef_t *params,int numparams) { for (int i=0 ; i<numparams ; i++) { if ( params[i].helpstr != NULL) { - printf("%s", params[i].helpstr); + printf("%s%s: %s", + (strlen(params[i].optname) <= 1) ? "-" : "--", + params[i].optname, + params[i].helpstr); } } } diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 439b70c364152b48e0152b06aeac34a84a767c27..8f4c06330f3c29cb23d2660c571563707c733b60 100755 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -149,9 +149,12 @@ typedef enum { #define CONFIG_STRING_ACTIVE_RUS "Active_RUs" +/*------------------------------------------------------------------------------------------------------------------------------------------*/ +/* RUs configuration section name */ #define CONFIG_STRING_RU_LIST "RUs" - #define CONFIG_STRING_RU_CONFIG "ru_config" + +/* RUs configuration parameters name */ #define CONFIG_STRING_RU_LOCAL_IF_NAME "local_if_name" #define CONFIG_STRING_RU_LOCAL_ADDRESS "local_address" #define CONFIG_STRING_RU_REMOTE_ADDRESS "remote_address" @@ -195,42 +198,53 @@ typedef enum { static int DEFBANDS[] = {7}; static int DEFENBS[] = {0}; -#define RUPARAMS_DESC { \ -{CONFIG_STRING_RU_LOCAL_IF_NAME, "", NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_RU_LOCAL_ADDRESS, "", NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_RU_REMOTE_ADDRESS, "", NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_RU_LOCAL_PORTC, "", NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ -{CONFIG_STRING_RU_REMOTE_PORTC, "", NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ -{CONFIG_STRING_RU_LOCAL_PORTD, "", NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ -{CONFIG_STRING_RU_REMOTE_PORTD, "", NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ -{CONFIG_STRING_RU_TRANSPORT_PREFERENCE, "", NULL, 0, strptr:NULL, defstrval:"udp_if4p5", TYPE_STRING, 0}, \ -{CONFIG_STRING_RU_LOCAL_RF, "", NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \ -{CONFIG_STRING_RU_NB_TX, "", NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \ -{CONFIG_STRING_RU_NB_RX, "", NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \ -{CONFIG_STRING_RU_MAX_RS_EPRE, "", NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \ -{CONFIG_STRING_RU_MAX_RXGAIN, "", NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \ -{CONFIG_STRING_RU_BAND_LIST, "", NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY,1}, \ -{CONFIG_STRING_RU_ENB_LIST, "", NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY,1}, \ -{CONFIG_STRING_RU_ATT_TX, "", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_RU_ATT_RX, "", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0} \ -} +/*-----------------------------------------------------------------------------------------------------------------------------------------*/ +/* RU configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-----------------------------------------------------------------------------------------------------------------------------------------*/ +#define RUPARAMS_DESC { \ +{CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ +{CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ +{CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ +{CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ +{CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ +{CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ +{CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ +{CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"udp_if4p5", TYPE_STRING, 0}, \ +{CONFIG_STRING_RU_LOCAL_RF, NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \ +{CONFIG_STRING_RU_NB_TX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \ +{CONFIG_STRING_RU_NB_RX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \ +{CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \ +{CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \ +{CONFIG_STRING_RU_BAND_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY, 1}, \ +{CONFIG_STRING_RU_ENB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \ +{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ +{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0} \ +} + +/*---------------------------------------------------------------------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------------------------------------------------------------------*/ +/* value definitions for ASN1 verbosity parameter */ #define ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE "none" #define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying" #define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info" -#define ENB_ASN1_VERBOSITY_IDX 0 -#define ENB_ACTIVE_ENBS_IDX 1 +/* global parameters, not under a specific section */ #define ENB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity" #define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs" - +/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* global configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define ENBSPARAMS_DESC { \ -{ENB_CONFIG_STRING_ASN1_VERBOSITY,"", "", 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ACTIVE_ENBS, "", "", 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0} \ +{ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0} \ } - +#define ENB_ASN1_VERBOSITY_IDX 0 +#define ENB_ACTIVE_ENBS_IDX 1 /* @@ -240,26 +254,14 @@ static int DEFENBS[] = {0}; {ENB_CONFIG_STRING_CC_NODE_SYNCH_REF,"", "", 0, uptr:NULL,defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE,TYPE_STRING,0}, \ */ -#define ENB_ENB_ID_IDX 0 -#define ENB_CELL_TYPE_IDX 1 -#define ENB_ENB_NAME_IDX 2 -#define ENB_TRACKING_AREA_CODE_IDX 3 -#define ENB_MOBILE_COUNTRY_CODE_IDX 4 -#define ENB_MOBILE_NETWORK_CODE_IDX 5 -#define ENB_TRANSPORT_S_PREFERENCE_IDX 6 -#define ENB_LOCAL_S_IF_NAME_IDX 7 -#define ENB_LOCAL_S_ADDRESS_IDX 8 -#define ENB_REMOTE_S_ADDRESS_IDX 9 -#define ENB_LOCAL_S_PORTC_IDX 10 -#define ENB_REMOTE_S_PORTC_IDX 11 -#define ENB_LOCAL_S_PORTD_IDX 12 -#define ENB_REMOTE_S_PORTD_IDX 13 - - +/*------------------------------------------------------------------------------------------------------------------------------------------*/ +/*------------------------------------------------------------------------------------------------------------------------------------------*/ +/* cell configuration section name */ #define ENB_CONFIG_STRING_ENB_LIST "eNBs" +/* cell configuration parameters names */ #define ENB_CONFIG_STRING_ENB_ID "eNB_ID" #define ENB_CONFIG_STRING_CELL_TYPE "cell_type" #define ENB_CONFIG_STRING_ENB_NAME "eNB_name" @@ -275,29 +277,47 @@ static int DEFENBS[] = {0}; #define ENB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd" #define ENB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd" -#define ENBPARAMS_DESC { \ -{ENB_CONFIG_STRING_ENB_ID, "", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_CELL_TYPE, "", NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_NAME, "", NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_TRACKING_AREA_CODE, "", NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "", NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "", NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, "", NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_LOCAL_S_IF_NAME, "", NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_LOCAL_S_ADDRESS, "", NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_REMOTE_S_ADDRESS, "", NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_LOCAL_S_PORTC, "", NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_REMOTE_S_PORTC, "", NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_LOCAL_S_PORTD, "", NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_REMOTE_S_PORTD, "", NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ -} - - - +/*-----------------------------------------------------------------------------------------------------------------------------------------*/ +/* cell configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-----------------------------------------------------------------------------------------------------------------------------------------*/ +#define ENBPARAMS_DESC {\ +{ENB_CONFIG_STRING_ENB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ +} +#define ENB_ENB_ID_IDX 0 +#define ENB_CELL_TYPE_IDX 1 +#define ENB_ENB_NAME_IDX 2 +#define ENB_TRACKING_AREA_CODE_IDX 3 +#define ENB_MOBILE_COUNTRY_CODE_IDX 4 +#define ENB_MOBILE_NETWORK_CODE_IDX 5 +#define ENB_TRANSPORT_S_PREFERENCE_IDX 6 +#define ENB_LOCAL_S_IF_NAME_IDX 7 +#define ENB_LOCAL_S_ADDRESS_IDX 8 +#define ENB_REMOTE_S_ADDRESS_IDX 9 +#define ENB_LOCAL_S_PORTC_IDX 10 +#define ENB_REMOTE_S_PORTC_IDX 11 +#define ENB_LOCAL_S_PORTD_IDX 12 +#define ENB_REMOTE_S_PORTD_IDX 13 +/*-------------------------------------------------------------------------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------------------------------------------------------------*/ - +/* component carriers configuration section name */ #define ENB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers" +/* component carries configuration parameters name */ #define ENB_CONFIG_STRING_FRAME_TYPE "frame_type" #define ENB_CONFIG_STRING_PBCH_REPETITION "pbch_repetition" #define ENB_CONFIG_STRING_TDD_CONFIG "tdd_config" @@ -373,82 +393,87 @@ static int DEFENBS[] = {0}; #define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311" #define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode" - -#define CCPARAMS_DESC { \ -{ENB_CONFIG_STRING_FRAME_TYPE, "", NULL, 0, strptr:&frame_type, defstrval:"FDD", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_TDD_CONFIG, "", NULL, 0, iptr:&tdd_config, defintval:3, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_TDD_CONFIG_S, "", NULL, 0, iptr:&tdd_config_s, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PREFIX_TYPE, "", NULL, 0, strptr:&prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PBCH_REPETITION, "", NULL, 0, strptr:&pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_EUTRA_BAND, "", NULL, 0, iptr:&eutra_band, defintval:7, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, "", NULL, 0, i64ptr:(int64_t *)&downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \ -{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, "", NULL, 0, iptr:&uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_NID_CELL, "", NULL, 0, iptr:&Nid_cell, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_N_RB_DL, "", NULL, 0, iptr:&N_RB_DL, defintval:25, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_CELL_MBSFN, "", NULL, 0, iptr:&Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_NB_ANT_PORTS, "", NULL, 0, iptr:&nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_ROOT, "", NULL, 0, iptr:&prach_root, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, "", NULL, 0, iptr:&prach_config_index, defintval:0, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, "", NULL, 0, strptr:&prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, "", NULL, 0, iptr:&prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, "", NULL, 0, iptr:&prach_freq_offset, defintval:2, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, "", NULL, 0, iptr:&pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_NRB_CQI, "", NULL, 0, iptr:&pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_NCS_AN, "", NULL, 0, iptr:&pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_N1_AN, "", NULL, 0, iptr:&pucch_n1_AN, defintval:32, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PDSCH_RS_EPRE, "", NULL, 0, iptr:&pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PDSCH_PB, "", NULL, 0, iptr:&pdsch_p_b, defintval:0, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_N_SB, "", NULL, 0, iptr:&pusch_n_SB, defintval:1, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, "", NULL, 0, strptr:&pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, "", NULL, 0, iptr:&pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, "", NULL, 0, strptr:&pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, "", NULL, 0, strptr:&pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, "", NULL, 0, iptr:&pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, "", NULL, 0, strptr:&pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_NDMRS1, "", NULL, 0, iptr:&pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PHICH_DURATION, "", NULL, 0, strptr:&phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PHICH_RESOURCE, "", NULL, 0, strptr:&phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SRS_ENABLE, "", NULL, 0, strptr:&srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, "", NULL, 0, iptr:&srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, "", NULL, 0, iptr:&srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, "", NULL, 0, strptr:&srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SRS_MAXUPPTS, "", NULL, 0, strptr:&srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, "", NULL, 0, iptr:&pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_ALPHA, "", NULL, 0, strptr:&pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, "", NULL, 0, iptr:&pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, "", NULL, 0, iptr:&msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, "", NULL, 0, strptr:&pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, "", NULL, 0, strptr:&pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, "", NULL, 0, strptr:&pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, "", NULL, 0, strptr:&pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, "", NULL, 0, strptr:&pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, "", NULL, 0, iptr:&rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, "", NULL, 0, strptr:&rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, "", NULL, 0, iptr:&rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, "", NULL, 0, iptr:&rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, "", NULL, 0, strptr:&rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, "", NULL, 0, iptr:&rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER,"", NULL, 0, iptr:&rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, "", NULL, 0, iptr:&rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, "", NULL, 0, iptr:&rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, "", NULL, 0, iptr:&rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, "", NULL, 0, iptr:&rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, "", NULL, 0, iptr:&pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PCCH_NB, "", NULL, 0, strptr:&pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, "", NULL, 0, iptr:&bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T300, "", NULL, 0, iptr:&ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T301, "", NULL, 0, iptr:&ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T310, "", NULL, 0, iptr:&ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T311, "", NULL, 0, iptr:&ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_N310, "", NULL, 0, iptr:&ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_N311, "", NULL, 0, iptr:&ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, "", NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0} \ +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* component carriers configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +#define CCPARAMS_DESC { \ +{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&frame_type, defstrval:"FDD", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&tdd_config, defintval:3, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&tdd_config_s, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&eutra_band, defintval:7, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \ +{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&Nid_cell, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&N_RB_DL, defintval:25, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&prach_root, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&prach_config_index, defintval:0, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&prach_freq_offset, defintval:2, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&pucch_n1_AN, defintval:32, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&pdsch_p_b, defintval:0, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&pusch_n_SB, defintval:1, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \ +{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ue_TransmissionMode, defintval:1, TYPE_UINT, 0} \ } - - +/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* SRB1 configuration parameters section name */ #define ENB_CONFIG_STRING_SRB1 "srb1_parameters" +/* SRB1 configuration parameters names */ #define ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT "timer_poll_retransmit" #define ENB_CONFIG_STRING_SRB1_TIMER_REORDERING "timer_reordering" #define ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT "timer_status_prohibit" @@ -456,54 +481,72 @@ static int DEFENBS[] = {0}; #define ENB_CONFIG_STRING_SRB1_POLL_BYTE "poll_byte" #define ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD "max_retx_threshold" - +/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* SRB1 configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define SRB1PARAMS_DESC { \ -{ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, "", NULL, 0, iptr:&srb1_timer_poll_retransmit, defintval:80, TYPE_UINT,0}, \ -{ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, "", NULL, 0, iptr:&srb1_timer_reordering, defintval:35, TYPE_UINT,0}, \ -{ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, "", NULL, 0, iptr:&srb1_timer_status_prohibit, defintval:0, TYPE_UINT,0}, \ -{ENB_CONFIG_STRING_SRB1_POLL_PDU, "", NULL, 0, iptr:&srb1_poll_pdu, defintval:4, TYPE_UINT,0}, \ -{ENB_CONFIG_STRING_SRB1_POLL_BYTE, "", NULL, 0, iptr:&srb1_poll_byte, defintval:99999, TYPE_UINT,0}, \ -{ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, "", NULL, 0, iptr:&srb1_max_retx_threshold, defintval:4, TYPE_UINT,0} \ +{ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, NULL, 0, iptr:&srb1_timer_poll_retransmit, defintval:80, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, NULL, 0, iptr:&srb1_timer_reordering, defintval:35, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, NULL, 0, iptr:&srb1_timer_status_prohibit, defintval:0, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_SRB1_POLL_PDU, NULL, 0, iptr:&srb1_poll_pdu, defintval:4, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_SRB1_POLL_BYTE, NULL, 0, iptr:&srb1_poll_byte, defintval:99999, TYPE_UINT, 0}, \ +{ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, NULL, 0, iptr:&srb1_max_retx_threshold, defintval:4, TYPE_UINT, 0} \ } +/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ - +/* MME configuration parameters section name */ #define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address" +/* SRB1 configuration parameters names */ -#define ENB_MME_IPV4_ADDRESS_IDX 0 -#define ENB_MME_IPV6_ADDRESS_IDX 1 -#define ENB_MME_IP_ADDRESS_ACTIVE_IDX 2 -#define ENB_MME_IP_ADDRESS_PREFERENCE_IDX 3 #define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4" #define ENB_CONFIG_STRING_MME_IPV6_ADDRESS "ipv6" #define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE "active" #define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE "preference" + +/*-------------------------------------------------------------------------------------------------------------------------------------*/ +/* MME configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-------------------------------------------------------------------------------------------------------------------------------------*/ #define S1PARAMS_DESC { \ -{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, "", NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, "", NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, "", NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, "", NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ } - - +#define ENB_MME_IPV4_ADDRESS_IDX 0 +#define ENB_MME_IPV6_ADDRESS_IDX 1 +#define ENB_MME_IP_ADDRESS_ACTIVE_IDX 2 +#define ENB_MME_IP_ADDRESS_PREFERENCE_IDX 3 +/*---------------------------------------------------------------------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------------------------------------------------------------------*/ +/* SCTP configuration parameters section name */ #define ENB_CONFIG_STRING_SCTP_CONFIG "SCTP" +/* SCTP configuration parameters names */ #define ENB_CONFIG_STRING_SCTP_INSTREAMS "SCTP_INSTREAMS" #define ENB_CONFIG_STRING_SCTP_OUTSTREAMS "SCTP_OUTSTREAMS" -#define ENB_SCTP_INSTREAMS_IDX 0 -#define ENB_SCTP_OUTSTREAMS_IDX 1 + +/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* SRB1 configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define SCTPPARAMS_DESC { \ -{ENB_CONFIG_STRING_SCTP_INSTREAMS, "", NULL, 0, strptr:NULL, defstrval:ENB_CONFIG_STRING_SCTP_INSTREAMS, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SCTP_OUTSTREAMS, "", NULL, 0, strptr:NULL, defstrval:ENB_CONFIG_STRING_SCTP_OUTSTREAMS, TYPE_STRING, 0} \ +{ENB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, strptr:NULL, defstrval:ENB_CONFIG_STRING_SCTP_INSTREAMS, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, strptr:NULL, defstrval:ENB_CONFIG_STRING_SCTP_OUTSTREAMS, TYPE_STRING, 0} \ } - - +#define ENB_SCTP_INSTREAMS_IDX 0 +#define ENB_SCTP_OUTSTREAMS_IDX 1 +/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* S1 interface configuration parameters section name */ #define ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES" #define ENB_INTERFACE_NAME_FOR_S1_MME_IDX 0 @@ -512,52 +555,51 @@ static int DEFENBS[] = {0}; #define ENB_IPV4_ADDR_FOR_S1U_IDX 3 #define ENB_PORT_FOR_S1U_IDX 4 +/* S1 interface configuration parameters names */ #define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME" #define ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME "ENB_IPV4_ADDRESS_FOR_S1_MME" #define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U "ENB_INTERFACE_NAME_FOR_S1U" #define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U "ENB_IPV4_ADDRESS_FOR_S1U" #define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U" +/*--------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* S1 interface configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*--------------------------------------------------------------------------------------------------------------------------------------------------*/ #define NETPARAMS_DESC { \ -{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, "", NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, "", NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, "", NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, "", NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, "", NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0} \ +{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0} \ } - -#define GTPUPARAMS_DESC { \ -{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, "", NULL, 0, strptr:&enb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, "", NULL, 0, strptr:&enb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, "", NULL, 0, uptr:&enb_port_for_S1U, defintval:2152, TYPE_UINT, 0} \ -} - - - +#define ENB_INTERFACE_NAME_FOR_S1_MME_IDX 0 +#define ENB_IPV4_ADDRESS_FOR_S1_MME_IDX 1 +#define ENB_INTERFACE_NAME_FOR_S1U_IDX 2 +#define ENB_IPV4_ADDR_FOR_S1U_IDX 3 +#define ENB_PORT_FOR_S1U_IDX 4 -#define ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG "NETWORK_CONTROLLER" - -#define ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME "FLEXRAN_AGENT_INTERFACE_NAME" -#define ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS "FLEXRAN_AGENT_IPV4_ADDRESS" -#define ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT "FLEXRAN_AGENT_PORT" -#define ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE "FLEXRAN_AGENT_CACHE" +/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* GTPU configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +#define GTPUPARAMS_DESC { \ +{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:&enb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:&enb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:&enb_port_for_S1U, defintval:2152, TYPE_UINT, 0} \ +} +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* L1 configuration section names */ #define CONFIG_STRING_L1_LIST "L1s" #define CONFIG_STRING_L1_CONFIG "l1_config" -#define L1_CC_IDX 0 -#define L1_TRANSPORT_N_PREFERENCE_IDX 1 -#define L1_LOCAL_N_IF_NAME_IDX 2 -#define L1_LOCAL_N_ADDRESS_IDX 3 -#define L1_REMOTE_N_ADDRESS_IDX 4 -#define L1_LOCAL_N_PORTC_IDX 5 -#define L1_REMOTE_N_PORTC_IDX 6 -#define L1_LOCAL_N_PORTD_IDX 7 -#define L1_REMOTE_N_PORTD_IDX 8 +/* L1 configuration parameters names */ #define CONFIG_STRING_L1_CC "num_cc" #define CONFIG_STRING_L1_LOCAL_N_IF_NAME "local_n_if_name" #define CONFIG_STRING_L1_LOCAL_N_ADDRESS "local_n_address" @@ -568,49 +610,55 @@ static int DEFENBS[] = {0}; #define CONFIG_STRING_L1_REMOTE_N_PORTD "remote_n_portd" #define CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE "tr_n_preference" +/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* L1 configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ #define L1PARAMS_DESC { \ -{CONFIG_STRING_L1_CC, "", NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, "", NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_IF_NAME, "", NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_ADDRESS, "", NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_ADDRESS, "", NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_PORTC, "", NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_PORTC, "", NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_PORTD, "", NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_PORTD, "", NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_CC, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ +{CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ +{CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ +{CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ +{CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ +{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ } +#define L1_CC_IDX 0 +#define L1_TRANSPORT_N_PREFERENCE_IDX 1 +#define L1_LOCAL_N_IF_NAME_IDX 2 +#define L1_LOCAL_N_ADDRESS_IDX 3 +#define L1_REMOTE_N_ADDRESS_IDX 4 +#define L1_LOCAL_N_PORTC_IDX 5 +#define L1_REMOTE_N_PORTC_IDX 6 +#define L1_LOCAL_N_PORTD_IDX 7 +#define L1_REMOTE_N_PORTD_IDX 8 + +/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +#define ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG "NETWORK_CONTROLLER" +#define ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME "FLEXRAN_AGENT_INTERFACE_NAME" +#define ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS "FLEXRAN_AGENT_IPV4_ADDRESS" +#define ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT "FLEXRAN_AGENT_PORT" +#define ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE "FLEXRAN_AGENT_CACHE" #define FLEXRANPARAMS_DESC { \ -{ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME, "", NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS, "", NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT, "", NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE, "", NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0} \ +{ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ +{ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0} \ } - - +/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* MACRLC configuration section names */ #define CONFIG_STRING_MACRLC_LIST "MACRLCs" #define CONFIG_STRING_MACRLC_CONFIG "macrlc_config" -#define MACRLC_CC_IDX 0 -#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 -#define MACRLC_LOCAL_N_IF_NAME_IDX 2 -#define MACRLC_LOCAL_N_ADDRESS_IDX 3 -#define MACRLC_REMOTE_N_ADDRESS_IDX 4 -#define MACRLC_LOCAL_N_PORTC_IDX 5 -#define MACRLC_REMOTE_N_PORTC_IDX 6 -#define MACRLC_LOCAL_N_PORTD_IDX 7 -#define MACRLC_REMOTE_N_PORTD_IDX 8 -#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 9 -#define MACRLC_LOCAL_S_IF_NAME_IDX 10 -#define MACRLC_LOCAL_S_ADDRESS_IDX 11 -#define MACRLC_REMOTE_S_ADDRESS_IDX 12 -#define MACRLC_LOCAL_S_PORTC_IDX 13 -#define MACRLC_REMOTE_S_PORTC_IDX 14 -#define MACRLC_LOCAL_S_PORTD_IDX 15 -#define MACRLC_REMOTE_S_PORTD_IDX 16 +/* MACRLC configuration parameters names */ #define CONFIG_STRING_MACRLC_CC "num_cc" #define CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE "tr_n_preference" #define CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME "local_n_if_name" @@ -630,23 +678,44 @@ static int DEFENBS[] = {0}; #define CONFIG_STRING_MACRLC_REMOTE_S_PORTD "remote_s_portd" - +/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* MacRLC configuration parameters */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define MACRLCPARAMS_DESC { \ -{CONFIG_STRING_MACRLC_CC, "", NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, "", NULL, 0, strptr:NULL, defstrval:"local_L1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, "", NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, "", NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, "", NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_PORTC, "", NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_PORTC, "", NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_PORTD, "", NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_PORTD, "", NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, "", NULL, 0, strptr:NULL, defstrval:"local_RRC", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, "", NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, "", NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, "", NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_PORTC, "", NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_PORTC, "", NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, "", NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, "", NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_CC, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_L1", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_RRC", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ +{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ } +#define MACRLC_CC_IDX 0 +#define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 +#define MACRLC_LOCAL_N_IF_NAME_IDX 2 +#define MACRLC_LOCAL_N_ADDRESS_IDX 3 +#define MACRLC_REMOTE_N_ADDRESS_IDX 4 +#define MACRLC_LOCAL_N_PORTC_IDX 5 +#define MACRLC_REMOTE_N_PORTC_IDX 6 +#define MACRLC_LOCAL_N_PORTD_IDX 7 +#define MACRLC_REMOTE_N_PORTD_IDX 8 +#define MACRLC_TRANSPORT_S_PREFERENCE_IDX 9 +#define MACRLC_LOCAL_S_IF_NAME_IDX 10 +#define MACRLC_LOCAL_S_ADDRESS_IDX 11 +#define MACRLC_REMOTE_S_ADDRESS_IDX 12 +#define MACRLC_LOCAL_S_PORTC_IDX 13 +#define MACRLC_REMOTE_S_PORTC_IDX 14 +#define MACRLC_LOCAL_S_PORTD_IDX 15 +#define MACRLC_REMOTE_S_PORTD_IDX 16 +/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 6873d32329c15b3811aaf7e1d491bb20843d256b..e60caa0709ba1f1d85fea942d46850dc7e912638 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -715,26 +715,27 @@ static void get_options(void) { config_process_cmdline( cmdline_ttraceparams,sizeof(cmdline_ttraceparams)/sizeof(paramdef_t),NULL); #endif + if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) ) { + if (UE_flag == 0) { + memset((void*)&RC,0,sizeof(RC)); + /* Read RC configuration file */ + RCConfig(NULL); + NB_eNB_INST = RC.nb_inst; + NB_RU = RC.nb_RU; + printf("Configuration: nb_inst %d, nb_ru %d\n",NB_eNB_INST,NB_RU); - if (UE_flag == 0) { - memset((void*)&RC,0,sizeof(RC)); - /* Read RC configuration file */ - RCConfig(NULL); - NB_eNB_INST = RC.nb_inst; - NB_RU = RC.nb_RU; - printf("Configuration: nb_inst %d, nb_ru %d\n",NB_eNB_INST,NB_RU); - - - } else if (UE_flag == 1) { - if (conf_config_file_name != NULL) { - // Here the configuration file is the XER encoded UE capabilities - // Read it in and store in asn1c data structures - strcpy(uecap_xer,conf_config_file_name); - uecap_xer_in=1; + } else if (UE_flag == 1) { + if (conf_config_file_name != NULL) { + + // Here the configuration file is the XER encoded UE capabilities + // Read it in and store in asn1c data structures + strcpy(uecap_xer,conf_config_file_name); + uecap_xer_in=1; + } } - } + } /* CONFIG_ABORT not set */ } @@ -1429,7 +1430,11 @@ int main( int argc, char **argv ) if ( CONFIG_ISFLAGSET(CONFIG_LEGACY) == 0) { printf("configuration via the configuration module \n"); - get_options (); //Command-line options, enb_properties + get_options (); + if (CONFIG_ISFLAGSET(CONFIG_ABORT)) { + fprintf(stderr,"Getting configuration failed\n"); + exit(-1); + } } else { printf("Legacy configuration mode \n"); old_get_options (argc,argv); diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index c884b92bedb632a9b78d981d6b3e3d857543c485..6fba60968945d1bb9ad9b784e4419b4485334b03 100644 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -40,7 +40,7 @@ #endif #endif -/* help strings definition for command line options */ +/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */ #define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n" #define CONFIG_HLP_ULMAXE "set the eNodeB max ULSCH erros\n" #define CONFIG_HLP_CALUER "set UE RX calibration\n" @@ -87,8 +87,26 @@ #define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n" #define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n" -/* command line options definitions */ +/***************************************************************************************************************************************/ +/* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument + when calling config_get or config_getlist functions */ + + +/*------------------------------------------------------------------------------------------------------------------------------------------*/ +/* command line parameters defining UE running mode */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*------------------------------------------------------------------------------------------------------------------------------------------*/ +#define CMDLINE_UEMODEPARAMS_DESC { \ +{"calib-ue-rx", CONFIG_HLP_CALUER, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ +{"calib-ue-rx-med", CONFIG_HLP_CALUERM, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ +{"calib-ue-rx-byp", CONFIG_HLP_CALUERB, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ +{"debug-ue-prach", CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ +{"no-L2-connect", CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ +{"calib-prach-tx", CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ +{"loop-memory", CONFIG_HLP_UELOOP, 0, strptr:&loopfile, defstrval:"iqs.in", TYPE_STRING,0}, \ +{"ue-dump-frame", CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, iptr:&dumpframe, defintval:0, TYPE_INT, 0}, \ +} #define CMDLINE_CALIBUERX_IDX 0 #define CMDLINE_CALIBUERXMED_IDX 1 #define CMDLINE_CALIBUERXBYP_IDX 2 @@ -96,74 +114,80 @@ #define CMDLINE_NOL2CONNECT_IDX 4 #define CMDLINE_CALIBPRACHTX_IDX 5 #define CMDLINE_MEMLOOP_IDX 6 +#define CMDLINE_DUMPMEMORY_IDX 7 +/*------------------------------------------------------------------------------------------------------------------------------------------*/ -#define CMDLINE_UEMODEPARAMS_DESC { \ -{"calib-ue-rx", "", CONFIG_HLP_CALUER, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ -{"calib-ue-rx-med", "", CONFIG_HLP_CALUERM, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ -{"calib-ue-rx-byp", "", CONFIG_HLP_CALUERB, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ -{"debug-ue-prach", "", CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ -{"no-L2-connect", "", CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ -{"calib-prach-tx", "", CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ -{"loop-memory", "", CONFIG_HLP_UELOOP, 0, strptr:&loopfile, defstrval:"iqs.in", TYPE_STRING,0}, \ -{"ue-dump-frame", "", CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, iptr:&dumpframe, defintval:0, TYPE_INT, 0}, \ -} +/*--------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* command line parameters specific to UE */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*--------------------------------------------------------------------------------------------------------------------------------------------------*/ #define CMDLINE_UEPARAMS_DESC { \ -{"ue-rxgain", "", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \ -{"ue-rxgain-off", "", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \ -{"ue-txgain", "", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \ -{"ue-nb-ant-rx", "", CONFIG_HLP_UENANTR, 0, u8ptr:&nb_antenna_rx, defuintval:1, TYPE_UINT8, 0}, \ -{"ue-nb-ant-tx", "", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \ -{"ue-scan-carrier", "", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \ -{"ue-max-power", "", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ -{"" , "r", CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:0, TYPE_UINT8, 0}, \ +{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \ +{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \ +{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \ +{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&nb_antenna_rx, defuintval:1, TYPE_UINT8, 0}, \ +{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \ +{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \ +{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ +{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:0, TYPE_UINT8, 0}, \ } extern int16_t dlsch_demod_shift; +/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +/* command line parameters common to eNodeB and UE */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define CMDLINE_PARAMS_DESC { \ -{"rf-config-file", "", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)}, \ -{"ulsch-max-errors", "", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \ -{"phy-test", "", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \ -{"usim-test", "", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \ -{"mmapped-dma", "", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \ -{"external-clock", "", CONFIG_HLP_EXCCLK, PARAMFLAG_BOOL, uptr:&clock_source, defintval:0, TYPE_INT, 0}, \ -{"wait-for-sync", "", NULL, PARAMFLAG_BOOL, iptr:&wait_for_sync, defintval:0, TYPE_INT, 0}, \ -{"single-thread-disable","", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \ -{"threadIQ", "", NULL, 0, iptr:&(threads.iq), defintval:1, TYPE_INT, 0}, \ -{"threadOddSubframe", "", NULL, 0, iptr:&(threads.odd), defintval:1, TYPE_INT, 0}, \ -{"threadEvenSubframe", "", NULL, 0, iptr:&(threads.even), defintval:1, TYPE_INT, 0}, \ -{"dlsch-demod-shift", "", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ -{"" , "A", CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \ -{"" , "C", CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \ -{"" , "a", CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \ -{"" , "d", CONFIG_HLP_SOFTS, 0, i8ptr:&do_forms, defintval:0, TYPE_INT8, 0}, \ -{"" , "E", CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \ -{"" , "K", CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \ -{"" , "U", CONFIG_HLP_UE, PARAMFLAG_BOOL, i8ptr:&UE_flag, defintval:0, TYPE_INT8, 0}, \ -{"" , "m", CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \ -{"" , "t", CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \ -{"" , "W", CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \ -{"" , "P", CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \ -{"" , "V", CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&ouput_vcd, defintval:0, TYPE_INT, 0}, \ -{"" , "q", CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ -{"" , "R", CONFIG_HLP_FLOG, PARAMFLAG_BOOL, iptr:&online_log_messages, defintval:0, TYPE_INT, 0}, \ -{"" , "g", CONFIG_HLP_LOGL, 0, i16ptr:&glog_level, defintval:1, TYPE_INT16, 0}, \ -{"" , "G", CONFIG_HLP_LOGV, 0, i16ptr:&glog_verbosity, defintval:0, TYPE_INT16, 0}, \ -{"" , "S", CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \ -{"" , "T", CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0} \ +{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)}, \ +{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \ +{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \ +{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&usim_test, defintval:0, TYPE_UINT8, 0}, \ +{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \ +{"external-clock", CONFIG_HLP_EXCCLK, PARAMFLAG_BOOL, uptr:&clock_source, defintval:0, TYPE_INT, 0}, \ +{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&wait_for_sync, defintval:0, TYPE_INT, 0}, \ +{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \ +{"threadIQ", NULL, 0, iptr:&(threads.iq), defintval:1, TYPE_INT, 0}, \ +{"threadOddSubframe", NULL, 0, iptr:&(threads.odd), defintval:1, TYPE_INT, 0}, \ +{"threadEvenSubframe", NULL, 0, iptr:&(threads.even), defintval:1, TYPE_INT, 0}, \ +{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ +{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \ +{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \ +{"a" , CONFIG_HLP_CHOFF, 0, iptr:&chain_offset, defintval:0, TYPE_INT, 0}, \ +{"d" , CONFIG_HLP_SOFTS, 0, i8ptr:&do_forms, defintval:0, TYPE_INT8, 0}, \ +{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \ +{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \ +{"U" , CONFIG_HLP_UE, PARAMFLAG_BOOL, i8ptr:&UE_flag, defintval:0, TYPE_INT8, 0}, \ +{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \ +{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \ +{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \ +{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \ +{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&ouput_vcd, defintval:0, TYPE_INT, 0}, \ +{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ +{"R" , CONFIG_HLP_FLOG, PARAMFLAG_BOOL, iptr:&online_log_messages, defintval:0, TYPE_INT, 0}, \ +{"g" , CONFIG_HLP_LOGL, 0, i16ptr:&glog_level, defintval:1, TYPE_INT16, 0}, \ +{"G" , CONFIG_HLP_LOGV, 0, i16ptr:&glog_verbosity, defintval:0, TYPE_INT16, 0}, \ +{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \ +{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0} \ } extern int T_port; extern int T_wait; extern int T_dont_fork; +/*------------------------------------------------------------------------------------------------------------------------------------------*/ +/* command line parameters for TTRACE utility */ +/* optname helpstr paramflags XXXptr defXXXval type numelt */ +/*------------------------------------------------------------------------------------------------------------------------------------------*/ #define CMDLINE_TTRACEPARAMS_DESC { \ -{"T_port", "", CONFIG_HLP_TPORT, 0, uptr:&T_port, defuintval:0, TYPE_UINT, 0}, \ -{"T_nowait", "", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, uptr:&T_nowait, defuintval:0, TYPE_UINT, 0}, \ -{"T_dont_fork", "", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, uptr:&T_dont_fork, defuintval:1, TYPE_UINT, 0}, \ +{"T_port", CONFIG_HLP_TPORT, 0, uptr:&T_port, defuintval:0, TYPE_UINT, 0}, \ +{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, uptr:&T_nowait, defuintval:0, TYPE_UINT, 0}, \ +{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, uptr:&T_dont_fork, defuintval:1, TYPE_UINT, 0}, \ } - + + +/***************************************************************************************************************************************/ /* */ extern pthread_cond_t sync_cond; extern pthread_mutex_t sync_mutex;