|
|
@ -53,10 +53,10 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|
|
|
|
|
|
|
|
|
|
|
// Command line only options
|
|
|
|
// Command line only options
|
|
|
|
bpo::options_description general("General options");
|
|
|
|
bpo::options_description general("General options");
|
|
|
|
|
|
|
|
|
|
|
|
general.add_options()
|
|
|
|
general.add_options()
|
|
|
|
("help,h", "Produce help message")
|
|
|
|
("help,h", "Produce help message")
|
|
|
|
("version,v", "Print version information and exit")
|
|
|
|
("version,v", "Print version information and exit");
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Command line or config file options
|
|
|
|
// Command line or config file options
|
|
|
|
bpo::options_description common("Configuration options");
|
|
|
|
bpo::options_description common("Configuration options");
|
|
|
@ -69,15 +69,20 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|
|
|
|
|
|
|
|
|
|
|
("rf.device_name", bpo::value<string>(&args->rf.device_name)->default_value("auto"), "Front-end device name")
|
|
|
|
("rf.device_name", bpo::value<string>(&args->rf.device_name)->default_value("auto"), "Front-end device name")
|
|
|
|
("rf.device_args", bpo::value<string>(&args->rf.device_args)->default_value("auto"), "Front-end device arguments")
|
|
|
|
("rf.device_args", bpo::value<string>(&args->rf.device_args)->default_value("auto"), "Front-end device arguments")
|
|
|
|
("rf.time_adv_nsamples", bpo::value<string>(&args->rf.time_adv_nsamples)->default_value("auto"), "Transmission time advance")
|
|
|
|
("rf.time_adv_nsamples", bpo::value<string>(&args->rf.time_adv_nsamples)->default_value("auto"),
|
|
|
|
("rf.burst_preamble_us", bpo::value<string>(&args->rf.burst_preamble)->default_value("auto"), "Transmission time advance")
|
|
|
|
"Transmission time advance")
|
|
|
|
|
|
|
|
("rf.burst_preamble_us", bpo::value<string>(&args->rf.burst_preamble)->default_value("auto"),
|
|
|
|
|
|
|
|
"Transmission time advance")
|
|
|
|
|
|
|
|
|
|
|
|
("pcap.enable", bpo::value<bool>(&args->pcap.enable)->default_value(false), "Enable MAC packet captures for wireshark")
|
|
|
|
("pcap.enable", bpo::value<bool>(&args->pcap.enable)->default_value(false),
|
|
|
|
|
|
|
|
"Enable MAC packet captures for wireshark")
|
|
|
|
("pcap.filename", bpo::value<string>(&args->pcap.filename)->default_value("ue.pcap"), "MAC layer capture filename")
|
|
|
|
("pcap.filename", bpo::value<string>(&args->pcap.filename)->default_value("ue.pcap"), "MAC layer capture filename")
|
|
|
|
|
|
|
|
|
|
|
|
("trace.enable", bpo::value<bool>(&args->trace.enable)->default_value(false), "Enable PHY and radio timing traces")
|
|
|
|
("trace.enable", bpo::value<bool>(&args->trace.enable)->default_value(false), "Enable PHY and radio timing traces")
|
|
|
|
("trace.phy_filename",bpo::value<string>(&args->trace.phy_filename)->default_value("ue.phy_trace"), "PHY timing traces filename")
|
|
|
|
("trace.phy_filename", bpo::value<string>(&args->trace.phy_filename)->default_value("ue.phy_trace"),
|
|
|
|
("trace.radio_filename",bpo::value<string>(&args->trace.radio_filename)->default_value("ue.radio_trace"), "Radio timing traces filename")
|
|
|
|
"PHY timing traces filename")
|
|
|
|
|
|
|
|
("trace.radio_filename", bpo::value<string>(&args->trace.radio_filename)->default_value("ue.radio_trace"),
|
|
|
|
|
|
|
|
"Radio timing traces filename")
|
|
|
|
|
|
|
|
|
|
|
|
("gui.enable", bpo::value<bool>(&args->gui.enable)->default_value(false), "Enable GUI plots")
|
|
|
|
("gui.enable", bpo::value<bool>(&args->gui.enable)->default_value(false), "Enable GUI plots")
|
|
|
|
|
|
|
|
|
|
|
@ -197,18 +202,19 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|
|
|
"Chooses the coefficients for the 3-tap channel estimator centered filter.")
|
|
|
|
"Chooses the coefficients for the 3-tap channel estimator centered filter.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
("rf_calibration.tx_corr_dc_gain", bpo::value<float>(&args->rf_cal.tx_corr_dc_gain)->default_value(0.0), "TX DC offset gain correction")
|
|
|
|
("rf_calibration.tx_corr_dc_gain", bpo::value<float>(&args->rf_cal.tx_corr_dc_gain)->default_value(0.0),
|
|
|
|
("rf_calibration.tx_corr_dc_phase", bpo::value<float>(&args->rf_cal.tx_corr_dc_phase)->default_value(0.0), "TX DC offset phase correction")
|
|
|
|
"TX DC offset gain correction")
|
|
|
|
("rf_calibration.tx_corr_iq_i", bpo::value<float>(&args->rf_cal.tx_corr_iq_i)->default_value(0.0), "TX IQ imbalance inphase correction")
|
|
|
|
("rf_calibration.tx_corr_dc_phase", bpo::value<float>(&args->rf_cal.tx_corr_dc_phase)->default_value(0.0),
|
|
|
|
("rf_calibration.tx_corr_iq_q", bpo::value<float>(&args->rf_cal.tx_corr_iq_q)->default_value(0.0), "TX IQ imbalance quadrature correction")
|
|
|
|
"TX DC offset phase correction")
|
|
|
|
|
|
|
|
("rf_calibration.tx_corr_iq_i", bpo::value<float>(&args->rf_cal.tx_corr_iq_i)->default_value(0.0),
|
|
|
|
;
|
|
|
|
"TX IQ imbalance inphase correction")
|
|
|
|
|
|
|
|
("rf_calibration.tx_corr_iq_q", bpo::value<float>(&args->rf_cal.tx_corr_iq_q)->default_value(0.0),
|
|
|
|
|
|
|
|
"TX IQ imbalance quadrature correction");
|
|
|
|
|
|
|
|
|
|
|
|
// Positional options - config file location
|
|
|
|
// Positional options - config file location
|
|
|
|
bpo::options_description position("Positional options");
|
|
|
|
bpo::options_description position("Positional options");
|
|
|
|
position.add_options()
|
|
|
|
position.add_options()
|
|
|
|
("config_file", bpo::value< string >(&config_file), "UE configuration file")
|
|
|
|
("config_file", bpo::value<string>(&config_file), "UE configuration file");
|
|
|
|
;
|
|
|
|
|
|
|
|
bpo::positional_options_description p;
|
|
|
|
bpo::positional_options_description p;
|
|
|
|
p.add("config_file", -1);
|
|
|
|
p.add("config_file", -1);
|
|
|
|
|
|
|
|
|
|
|
@ -281,6 +287,7 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Apply all_hex_limit to any unset layers
|
|
|
|
// Apply all_hex_limit to any unset layers
|
|
|
|
if (vm.count("log.all_hex_limit")) {
|
|
|
|
if (vm.count("log.all_hex_limit")) {
|
|
|
|
if (!vm.count("log.phy_hex_limit")) {
|
|
|
|
if (!vm.count("log.phy_hex_limit")) {
|
|
|
@ -313,13 +320,11 @@ void parse_args(all_args_t *args, int argc, char* argv[]) {
|
|
|
|
static bool running = true;
|
|
|
|
static bool running = true;
|
|
|
|
static bool do_metrics = false;
|
|
|
|
static bool do_metrics = false;
|
|
|
|
|
|
|
|
|
|
|
|
void sig_int_handler(int signo)
|
|
|
|
void sig_int_handler(int signo) {
|
|
|
|
{
|
|
|
|
|
|
|
|
running = false;
|
|
|
|
running = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void *input_loop(void *m)
|
|
|
|
void *input_loop(void *m) {
|
|
|
|
{
|
|
|
|
|
|
|
|
metrics_stdout *metrics = (metrics_stdout *) m;
|
|
|
|
metrics_stdout *metrics = (metrics_stdout *) m;
|
|
|
|
char key;
|
|
|
|
char key;
|
|
|
|
while (running) {
|
|
|
|
while (running) {
|
|
|
@ -337,8 +342,7 @@ void *input_loop(void *m)
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
{
|
|
|
|
|
|
|
|
signal(SIGINT, sig_int_handler);
|
|
|
|
signal(SIGINT, sig_int_handler);
|
|
|
|
all_args_t args;
|
|
|
|
all_args_t args;
|
|
|
|
metrics_stdout metrics;
|
|
|
|
metrics_stdout metrics;
|
|
|
|