1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-28 14:07:38 +00:00

Stop the Labsat_Signal_Source when the end of file is reached. This allows to use this source for automated testing.

Now the block also accepts directly *.ls2 names in filename parameter

Remove samples parameter, it was not used. This source reads the full file(s).

Make labsat23_source constructor private, so only the smart pointer wrapper can be called
This commit is contained in:
Carles Fernandez
2019-04-12 12:59:57 +02:00
parent b315118654
commit 35c42c41d7
5 changed files with 78 additions and 40 deletions

View File

@@ -40,21 +40,20 @@ LabsatSignalSource::LabsatSignalSource(ConfigurationInterface* configuration,
const std::string& role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
{
std::string default_item_type = "gr_complex";
std::string default_dump_file = "./data/source.bin";
std::string default_dump_file = "./labsat_output.dat";
item_type_ = configuration->property(role + ".item_type", default_item_type);
dump_ = configuration->property(role + ".dump", false);
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
int channel_selector = configuration->property(role + ".selected_channel", 1);
std::string default_filename = "./example_capture.LS3";
samples_ = configuration->property(role + ".samples", 0);
std::string default_filename = "./example_capture.LS3";
filename_ = configuration->property(role + ".filename", default_filename);
if (item_type_ == "gr_complex")
{
item_size_ = sizeof(gr_complex);
labsat23_source_ = labsat23_make_source(filename_.c_str(), channel_selector);
labsat23_source_ = labsat23_make_source_sptr(filename_.c_str(), channel_selector, queue_);
DLOG(INFO) << "Item size " << item_size_;
DLOG(INFO) << "labsat23_source_(" << labsat23_source_->unique_id() << ")";
}

View File

@@ -81,7 +81,6 @@ private:
unsigned int out_stream_;
std::string item_type_;
size_t item_size_;
uint64_t samples_;
std::string filename_;
bool dump_;
std::string dump_filename_;