Commit e76b0568 authored by winckel's avatar winckel

Fixed log init issue.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5040 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f13b4100
......@@ -1079,18 +1079,6 @@ static void *UE_thread(void *arg)
return 0;
}
enum {
LONG_OPTION_START = 0x100, /* Start after regular single char options */
LONG_OPTION_CALIB_UE_RX,
LONG_OPTION_CALIB_UE_RX_MED,
LONG_OPTION_CALIB_UE_RX_BYP,
LONG_OPTION_DEBUG_UE_PRACH,
LONG_OPTION_NO_L2_CONNECT,
} long_option_e;
static void get_options (int argc, char **argv)
{
int c;
......@@ -1098,6 +1086,18 @@ static void get_options (int argc, char **argv)
int l;
const Enb_properties_array_t *enb_properties;
enum long_option_e {
LONG_OPTION_START = 0x100, /* Start after regular single char options */
LONG_OPTION_CALIB_UE_RX,
LONG_OPTION_CALIB_UE_RX_MED,
LONG_OPTION_CALIB_UE_RX_BYP,
LONG_OPTION_DEBUG_UE_PRACH,
LONG_OPTION_NO_L2_CONNECT,
};
static const struct option long_options[] = {
{"calib-ue-rx", required_argument, NULL, LONG_OPTION_CALIB_UE_RX},
{"calib-ue-rx-med", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_MED},
......@@ -1313,6 +1313,12 @@ int main(int argc, char **argv) {
get_options (argc, argv); //Command-line options
//randominit (0);
set_taus_seed (0);
// initialize the log (see log.h for details)
logInit();
set_glog(LOG_WARNING, LOG_MED);
if (UE_flag==1)
{
......@@ -1361,12 +1367,6 @@ int main(int argc, char **argv) {
set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1);;
}
//randominit (0);
set_taus_seed (0);
// initialize the log (see log.h for details)
logInit();
if (ouput_vcd) {
if (UE_flag==1)
vcd_signal_dumper_init("/tmp/openair_dump_UE.vcd");
......
......@@ -116,62 +116,62 @@ extern pdcp_mbms_t pdcp_mbms_array[MAX_MODULES][16*29];
extern void help (void);
enum {
LONG_OPTION_START = 0x100, /* Start after regular single char options */
void get_simulation_options(int argc, char *argv[]) {
int option;
const Enb_properties_array_t *enb_properties;
LONG_OPTION_ENB_CONF,
enum long_option_e {
LONG_OPTION_START = 0x100, /* Start after regular single char options */
LONG_OPTION_PDNC_PERIOD,
LONG_OPTION_OMG_PERIOD,
LONG_OPTION_ENB_CONF,
LONG_OPTION_ENB_RAL_LISTENING_PORT,
LONG_OPTION_ENB_RAL_IP_ADDRESS,
LONG_OPTION_ENB_RAL_LINK_ID,
LONG_OPTION_ENB_RAL_LINK_ADDRESS,
LONG_OPTION_PDNC_PERIOD,
LONG_OPTION_OMG_PERIOD,
LONG_OPTION_ENB_MIHF_REMOTE_PORT,
LONG_OPTION_ENB_MIHF_IP_ADDRESS,
LONG_OPTION_ENB_MIHF_ID,
LONG_OPTION_ENB_RAL_LISTENING_PORT,
LONG_OPTION_ENB_RAL_IP_ADDRESS,
LONG_OPTION_ENB_RAL_LINK_ID,
LONG_OPTION_ENB_RAL_LINK_ADDRESS,
LONG_OPTION_UE_RAL_LISTENING_PORT,
LONG_OPTION_UE_RAL_IP_ADDRESS,
LONG_OPTION_UE_RAL_LINK_ID,
LONG_OPTION_UE_RAL_LINK_ADDRESS,
LONG_OPTION_ENB_MIHF_REMOTE_PORT,
LONG_OPTION_ENB_MIHF_IP_ADDRESS,
LONG_OPTION_ENB_MIHF_ID,
LONG_OPTION_UE_MIHF_REMOTE_PORT,
LONG_OPTION_UE_MIHF_IP_ADDRESS,
LONG_OPTION_UE_MIHF_ID,
} long_option_e;
LONG_OPTION_UE_RAL_LISTENING_PORT,
LONG_OPTION_UE_RAL_IP_ADDRESS,
LONG_OPTION_UE_RAL_LINK_ID,
LONG_OPTION_UE_RAL_LINK_ADDRESS,
static struct option long_options[] = {
{"enb-conf", required_argument, 0, LONG_OPTION_ENB_CONF},
LONG_OPTION_UE_MIHF_REMOTE_PORT,
LONG_OPTION_UE_MIHF_IP_ADDRESS,
LONG_OPTION_UE_MIHF_ID,
};
{"pdcp_period", required_argument, 0, LONG_OPTION_PDNC_PERIOD},
{"omg_period", required_argument, 0, LONG_OPTION_OMG_PERIOD},
static struct option long_options[] = {
{"enb-conf", required_argument, 0, LONG_OPTION_ENB_CONF},
{"enb-ral-listening-port", required_argument, 0, LONG_OPTION_ENB_RAL_LISTENING_PORT},
{"enb-ral-ip-address", required_argument, 0, LONG_OPTION_ENB_RAL_IP_ADDRESS},
{"enb-ral-link-id", required_argument, 0, LONG_OPTION_ENB_RAL_LINK_ID},
{"enb-ral-link-address", required_argument, 0, LONG_OPTION_ENB_RAL_LINK_ADDRESS},
{"pdcp_period", required_argument, 0, LONG_OPTION_PDNC_PERIOD},
{"omg_period", required_argument, 0, LONG_OPTION_OMG_PERIOD},
{"enb-mihf-remote-port", required_argument, 0, LONG_OPTION_ENB_MIHF_REMOTE_PORT},
{"enb-mihf-ip-address", required_argument, 0, LONG_OPTION_ENB_MIHF_IP_ADDRESS},
{"enb-mihf-id", required_argument, 0, LONG_OPTION_ENB_MIHF_ID},
{"enb-ral-listening-port", required_argument, 0, LONG_OPTION_ENB_RAL_LISTENING_PORT},
{"enb-ral-ip-address", required_argument, 0, LONG_OPTION_ENB_RAL_IP_ADDRESS},
{"enb-ral-link-id", required_argument, 0, LONG_OPTION_ENB_RAL_LINK_ID},
{"enb-ral-link-address", required_argument, 0, LONG_OPTION_ENB_RAL_LINK_ADDRESS},
{"ue-ral-listening-port", required_argument, 0, LONG_OPTION_UE_RAL_LISTENING_PORT},
{"ue-ral-ip-address", required_argument, 0, LONG_OPTION_UE_RAL_IP_ADDRESS},
{"ue-ral-link-id", required_argument, 0, LONG_OPTION_UE_RAL_LINK_ID},
{"ue-ral-link-address", required_argument, 0, LONG_OPTION_UE_RAL_LINK_ADDRESS},
{"enb-mihf-remote-port", required_argument, 0, LONG_OPTION_ENB_MIHF_REMOTE_PORT},
{"enb-mihf-ip-address", required_argument, 0, LONG_OPTION_ENB_MIHF_IP_ADDRESS},
{"enb-mihf-id", required_argument, 0, LONG_OPTION_ENB_MIHF_ID},
{"ue-mihf-remote-port", required_argument, 0, LONG_OPTION_UE_MIHF_REMOTE_PORT},
{"ue-mihf-ip-address", required_argument, 0, LONG_OPTION_UE_MIHF_IP_ADDRESS},
{"ue-mihf-id", required_argument, 0, LONG_OPTION_UE_MIHF_ID},
{NULL, 0, NULL, 0}
};
{"ue-ral-listening-port", required_argument, 0, LONG_OPTION_UE_RAL_LISTENING_PORT},
{"ue-ral-ip-address", required_argument, 0, LONG_OPTION_UE_RAL_IP_ADDRESS},
{"ue-ral-link-id", required_argument, 0, LONG_OPTION_UE_RAL_LINK_ID},
{"ue-ral-link-address", required_argument, 0, LONG_OPTION_UE_RAL_LINK_ADDRESS},
void get_simulation_options(int argc, char *argv[]) {
int option;
const Enb_properties_array_t *enb_properties;
{"ue-mihf-remote-port", required_argument, 0, LONG_OPTION_UE_MIHF_REMOTE_PORT},
{"ue-mihf-ip-address", required_argument, 0, LONG_OPTION_UE_MIHF_IP_ADDRESS},
{"ue-mihf-id", required_argument, 0, LONG_OPTION_UE_MIHF_ID},
{NULL, 0, NULL, 0}
};
while ((option = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hHi:IJ:j:k:K:l:L:m:M:n:N:oO:p:P:Q:rR:s:S:t:T:u:U:vV:w:W:x:X:y:Y:z:Z:", long_options, NULL)) != -1) {
switch (option) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment