SRSUE: Improved internal channel emulator help

master
Xavier Arteaga 6 years ago committed by Andre Puschmann
parent 9ab2b2de81
commit 7c97e40e63

@ -38,12 +38,14 @@ public:
bool enable = false; bool enable = false;
// Fading options // Fading options
std::string fading_model = ""; bool fading_enable = false;
std::string fading_model = "none";
// Delay options // Delay options
float delay_min_us = 0; bool delay_enable = false;
float delay_max_us = 0; float delay_min_us = 10;
uint32_t delay_period_s = 0; float delay_max_us = 100;
uint32_t delay_period_s = 3600;
} args_t; } args_t;
channel(const args_t& channel_args, uint32_t _nof_ports); channel(const args_t& channel_args, uint32_t _nof_ports);

@ -44,7 +44,8 @@ channel::channel(const channel::args_t& channel_args, uint32_t _nof_ports)
nof_ports = _nof_ports; nof_ports = _nof_ports;
for (uint32_t i = 0; i < nof_ports; i++) { for (uint32_t i = 0; i < nof_ports; i++) {
// Create fading channel // Create fading channel
if (!channel_args.fading_model.empty() && channel_args.fading_model != "none" && ret == SRSLTE_SUCCESS) { if (channel_args.fading_enable && !channel_args.fading_model.empty() && channel_args.fading_model != "none" &&
ret == SRSLTE_SUCCESS) {
fading[i] = (srslte_channel_fading_t*)calloc(sizeof(srslte_channel_fading_t), 1); fading[i] = (srslte_channel_fading_t*)calloc(sizeof(srslte_channel_fading_t), 1);
ret = srslte_channel_fading_init(fading[i], srate_max, channel_args.fading_model.c_str(), 0x1234 * i); ret = srslte_channel_fading_init(fading[i], srate_max, channel_args.fading_model.c_str(), 0x1234 * i);
} else { } else {
@ -52,7 +53,7 @@ channel::channel(const channel::args_t& channel_args, uint32_t _nof_ports)
} }
// Create delay // Create delay
if (channel_args.delay_period_s && ret == SRSLTE_SUCCESS) { if (channel_args.delay_enable && ret == SRSLTE_SUCCESS) {
delay[i] = (srslte_channel_delay_t*)calloc(sizeof(srslte_channel_delay_t), 1); delay[i] = (srslte_channel_delay_t*)calloc(sizeof(srslte_channel_delay_t), 1);
ret = srslte_channel_delay_init( ret = srslte_channel_delay_init(
delay[i], channel_args.delay_min_us, channel_args.delay_max_us, channel_args.delay_period_s, srate_max); delay[i], channel_args.delay_min_us, channel_args.delay_max_us, channel_args.delay_period_s, srate_max);

@ -149,10 +149,12 @@ void parse_args(all_args_t* args, int argc, char* argv[])
/* Channel emulator section */ /* Channel emulator section */
("channel.dl.enable", bpo::value<bool>(&args->phy.dl_channel_args.enable)->default_value(false), "Enable/Disable internal Downlink channel emulator") ("channel.dl.enable", bpo::value<bool>(&args->phy.dl_channel_args.enable)->default_value(false), "Enable/Disable internal Downlink channel emulator")
("channel.dl.fading_model", bpo::value<std::string>(&args->phy.dl_channel_args.fading_model)->default_value("none"), "Fading model (none, EPA5, EVA70, ETU300, etc)") ("channel.dl.fading.enable", bpo::value<bool>(&args->phy.dl_channel_args.fading_enable)->default_value(false), "Enable/Disable Fading model")
("channel.dl.delay_period", bpo::value<uint32_t >(&args->phy.dl_channel_args.delay_period_s)->default_value(3600), "Delay period in seconds (integer)") ("channel.dl.fading.model", bpo::value<std::string>(&args->phy.dl_channel_args.fading_model)->default_value("none"), "Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc)")
("channel.dl.delay_maximum_us", bpo::value<float >(&args->phy.dl_channel_args.delay_max_us)->default_value(100.0f), "Maximum delay in microseconds") ("channel.dl.delay.enable", bpo::value<bool >(&args->phy.dl_channel_args.delay_enable)->default_value(false), "Enable/Disable Delay simulator")
("channel.dl.delay_minimum_us", bpo::value<float >(&args->phy.dl_channel_args.delay_min_us)->default_value(0.0f), "Maximum delay in microseconds") ("channel.dl.delay.period", bpo::value<uint32_t >(&args->phy.dl_channel_args.delay_period_s)->default_value(3600), "Delay period in seconds (integer)")
("channel.dl.delay.maximum_us", bpo::value<float >(&args->phy.dl_channel_args.delay_max_us)->default_value(100.0f), "Maximum delay in microseconds")
("channel.dl.delay.minimum_us", bpo::value<float >(&args->phy.dl_channel_args.delay_min_us)->default_value(10.0f), "Minimum delay in microseconds")
/* Expert section */ /* Expert section */
("expert.phy.worker_cpu_mask", ("expert.phy.worker_cpu_mask",

@ -184,19 +184,24 @@ enable = false
# dl.enable: Enable/Disable internal Downlink channel emulator # dl.enable: Enable/Disable internal Downlink channel emulator
# #
# -- Fading emulator # -- Fading emulator
# dl.fading_model: Fading model (none, EPA5, EVA70, ETU300, etc) # dl.fading.enable: Enable/disable fading simulator
# dl.fading.model: Fading model + maximum doppler (E.g. none, epa5, eva70, etu300, etc)
# #
# -- Delay Emulator: d(t) = d_min + (d_max - d_min) * sin(2pi*t/period) / 2 # -- Delay Emulator delay(t) = delay_min + (delay_max - delay_min) * sin(2pi*t/period) / 2
# dl.delay_period: Delay period in seconds (integer). # Maximum speed [m/s]: (delay_max - delay_min) * pi * 300 / period
# dl.delay_maximum_us: Maximum delay in microseconds # dl.delay.enable: Enable/disable delay simulator
# dl.delay_minumum_us: Minimum delay in microseconds # dl.delay.period: Delay period in seconds (integer).
# dl.delay.maximum_us: Maximum delay in microseconds
# dl.delay.minumum_us: Minimum delay in microseconds
##################################################################### #####################################################################
[channel] [channel]
#dl.enable = false #dl.enable = false
#dl.fading_model = none #dl.fading.enable = false
#dl.delay_period = 3600 #dl.fading.model = none
#dl.delay_maximum_us = 100 #dl.delay.enable = false
#dl.delay_minimum_us = 10 #dl.delay.period = 3600
#dl.delay.maximum_us = 100
#dl.delay.minimum_us = 10
##################################################################### #####################################################################
# Expert configuration options # Expert configuration options

Loading…
Cancel
Save