From fc83b961b132571fdeb8424acfd93c85d63f5808 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 4 Feb 2015 13:06:44 +0100 Subject: [PATCH] Adding more input data types --- .../signal_source/adapters/file_signal_source.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/algorithms/signal_source/adapters/file_signal_source.cc b/src/algorithms/signal_source/adapters/file_signal_source.cc index 60ae43af1..780d93ed0 100644 --- a/src/algorithms/signal_source/adapters/file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/file_signal_source.cc @@ -71,7 +71,7 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false); std::string s = "InputFilter"; - double IF = configuration->property(s + ".IF", 0.0); + //double IF = configuration->property(s + ".IF", 0.0); if (item_type_.compare("gr_complex") == 0) { @@ -85,10 +85,18 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, { item_size_ = sizeof(int16_t); } + else if (item_type_.compare("ishort") == 0) + { + item_size_ = sizeof(int16_t); + } else if (item_type_.compare("byte") == 0) { item_size_ = sizeof(int8_t); } + else if (item_type_.compare("ibyte") == 0) + { + item_size_ = sizeof(int8_t); + } else { LOG(WARNING) << item_type_ @@ -174,7 +182,7 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, double signal_duration_s; signal_duration_s = static_cast(samples_) * ( 1 / static_cast(sampling_frequency_)); - if ((item_type_.compare("gr_complex") != 0) && (IF < 1e6) ) // if IF < BW/2, signal is complex (interleaved) + if ((item_type_.compare("gr_complex") != 0) || (item_type_.compare("ishort") != 0) || (item_type_.compare("ibyte") != 0) ) // signal is complex (interleaved) { signal_duration_s /= 2; }