mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-30 23:03:05 +00:00 
			
		
		
		
	Fix building
This commit is contained in:
		| @@ -44,8 +44,13 @@ using google::LogMessage; | ||||
|  | ||||
|  | ||||
| TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, | ||||
|     std::string role, unsigned int in_streams, unsigned int out_streams, | ||||
|     boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue) | ||||
|     std::string role, | ||||
|     unsigned int in_streams, | ||||
|     unsigned int out_streams, | ||||
|     boost::shared_ptr<gr::msg_queue> queue) : role_(role), | ||||
|                                               in_streams_(in_streams), | ||||
|                                               out_streams_(out_streams), | ||||
|                                               queue_(queue) | ||||
| { | ||||
|     std::string default_filename = "../data/my_capture.dat"; | ||||
|     std::string default_item_type = "byte"; | ||||
| @@ -56,8 +61,8 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con | ||||
|     filename_ = configuration->property(role + ".filename", default_filename); | ||||
|  | ||||
|     // override value with commandline flag, if present | ||||
|     if (FLAGS_signal_source.compare("-") != 0) filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s.compare("-") != 0) filename_ = FLAGS_s; | ||||
|     if (FLAGS_signal_source != "-") filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s != "-") filename_ = FLAGS_s; | ||||
|  | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     repeat_ = configuration->property(role + ".repeat", false); | ||||
| @@ -65,7 +70,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con | ||||
|     dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); | ||||
|     enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false); | ||||
|  | ||||
|     if (item_type_.compare("byte") == 0) | ||||
|     if (item_type_ == "byte") | ||||
|         { | ||||
|             item_size_ = sizeof(char); | ||||
|         } | ||||
| @@ -177,9 +182,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con | ||||
| } | ||||
|  | ||||
|  | ||||
| TwoBitCpxFileSignalSource::~TwoBitCpxFileSignalSource() | ||||
| { | ||||
| } | ||||
| TwoBitCpxFileSignalSource::~TwoBitCpxFileSignalSource() = default; | ||||
|  | ||||
|  | ||||
| void TwoBitCpxFileSignalSource::connect(gr::top_block_sptr top_block) | ||||
|   | ||||
| @@ -42,6 +42,7 @@ | ||||
| #include <gnuradio/hier_block2.h> | ||||
| #include <gnuradio/msg_queue.h> | ||||
| #include <gnuradio/blocks/interleaved_short_to_complex.h> | ||||
| #include <cstdint> | ||||
| #include <string> | ||||
|  | ||||
|  | ||||
| @@ -54,8 +55,10 @@ class ConfigurationInterface; | ||||
| class TwoBitCpxFileSignalSource : public GNSSBlockInterface | ||||
| { | ||||
| public: | ||||
|     TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, std::string role, | ||||
|         unsigned int in_streams, unsigned int out_streams, | ||||
|     TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, | ||||
|         std::string role, | ||||
|         unsigned int in_streams, | ||||
|         unsigned int out_streams, | ||||
|         boost::shared_ptr<gr::msg_queue> queue); | ||||
|  | ||||
|     virtual ~TwoBitCpxFileSignalSource(); | ||||
| @@ -97,19 +100,19 @@ public: | ||||
|         return repeat_; | ||||
|     } | ||||
|  | ||||
|     inline long sampling_frequency() const | ||||
|     inline int64_t sampling_frequency() const | ||||
|     { | ||||
|         return sampling_frequency_; | ||||
|     } | ||||
|  | ||||
|     inline long samples() const | ||||
|     inline uint64_t samples() const | ||||
|     { | ||||
|         return samples_; | ||||
|     } | ||||
|  | ||||
| private: | ||||
|     unsigned long long samples_; | ||||
|     long sampling_frequency_; | ||||
|     uint64_t samples_; | ||||
|     int64_t sampling_frequency_; | ||||
|     std::string filename_; | ||||
|     std::string item_type_; | ||||
|     bool repeat_; | ||||
|   | ||||
| @@ -60,13 +60,13 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | ||||
|     std::string default_sample_type = "real"; | ||||
|     double default_seconds_to_skip = 0.0; | ||||
|  | ||||
|     samples_ = configuration->property(role + ".samples", 0ULL); | ||||
|     sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0LL); | ||||
|     samples_ = configuration->property(role + ".samples", 0); | ||||
|     sampling_frequency_ = configuration->property(role + ".sampling_frequency", 0); | ||||
|     filename_ = configuration->property(role + ".filename", default_filename); | ||||
|  | ||||
|     // override value with commandline flag, if present | ||||
|     if (FLAGS_signal_source.compare("-") != 0) filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s.compare("-") != 0) filename_ = FLAGS_s; | ||||
|     if (FLAGS_signal_source != "-") filename_ = FLAGS_signal_source; | ||||
|     if (FLAGS_s != "-") filename_ = FLAGS_s; | ||||
|  | ||||
|     item_type_ = configuration->property(role + ".item_type", default_item_type); | ||||
|     big_endian_items_ = configuration->property(role + ".big_endian_items", true); | ||||
| @@ -79,11 +79,11 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | ||||
|     double seconds_to_skip = configuration->property(role + ".seconds_to_skip", default_seconds_to_skip); | ||||
|     int64_t bytes_to_skip = 0; | ||||
|  | ||||
|     if (item_type_.compare("byte") == 0) | ||||
|     if (item_type_ == "byte") | ||||
|         { | ||||
|             item_size_ = sizeof(char); | ||||
|         } | ||||
|     else if (item_type_.compare("short") == 0) | ||||
|     else if (item_type_ == "short") | ||||
|         { | ||||
|             // If we have shorts stored in little endian format, might as | ||||
|             // well read them in as bytes. | ||||
| @@ -102,16 +102,16 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac | ||||
|             item_size_ = sizeof(char); | ||||
|         } | ||||
|  | ||||
|     if (sample_type_.compare("real") == 0) | ||||
|     if (sample_type_ == "real") | ||||
|         { | ||||
|             is_complex_ = false; | ||||
|         } | ||||
|     else if (sample_type_.compare("iq") == 0) | ||||
|     else if (sample_type_ == "iq") | ||||
|         { | ||||
|             is_complex_ = true; | ||||
|             reverse_interleaving_ = false; | ||||
|         } | ||||
|     else if (sample_type_.compare("qi") == 0) | ||||
|     else if (sample_type_ == "qi") | ||||
|         { | ||||
|             is_complex_ = true; | ||||
|             reverse_interleaving_ = true; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez