mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-30 23:03:05 +00:00 
			
		
		
		
	Replacing the old gnuradio message queue with the new ConcurrentQueue
This commit is contained in:
		| @@ -33,6 +33,8 @@ | ||||
|  */ | ||||
|  | ||||
| #include "control_thread.h" | ||||
| #include "channel_event.h" | ||||
| #include "command_event.h" | ||||
| #include "concurrent_map.h" | ||||
| #include "configuration_interface.h" | ||||
| #include "file_configuration.h" | ||||
| @@ -60,7 +62,6 @@ | ||||
| #include "rtklib_rtkcmn.h"         // for utc2gpst | ||||
| #include <boost/lexical_cast.hpp>  // for bad_lexical_cast | ||||
| #include <glog/logging.h>          // for LOG | ||||
| #include <gnuradio/message.h>      // for message::sptr | ||||
| #include <pmt/pmt.h>               // for make_any | ||||
| #include <algorithm>               // for find, min | ||||
| #include <chrono>                  // for milliseconds | ||||
| @@ -282,15 +283,49 @@ int ControlThread::run() | ||||
|         flowgraph_); | ||||
| #endif | ||||
|     // Main loop to read and process the control messages | ||||
|     pmt::pmt_t msg; | ||||
|     while (flowgraph_->running() && !stop_) | ||||
|         { | ||||
|             //TODO call here the new sat dispatcher and receiver controller | ||||
|             //            read_control_messages(); | ||||
|             //            if (control_messages_ != nullptr) | ||||
|             //                { | ||||
|             //                    process_control_messages(); | ||||
|             //                } | ||||
|             std::cout << "tick\n"; | ||||
|             bool valid_event = control_queue_->timed_wait_and_pop(msg, 100); | ||||
|             if (valid_event) | ||||
|                 { | ||||
|                     if (pmt::any_ref(msg).type() == typeid(channel_event_sptr)) | ||||
|                         { | ||||
|                             channel_event_sptr new_event; | ||||
|                             new_event = boost::any_cast<channel_event_sptr>(pmt::any_ref(msg)); | ||||
|                             DLOG(INFO) << "New channel event rx from ch id: " << new_event->channel_id | ||||
|                                        << " what: " << new_event->event_type; | ||||
|                             flowgraph_->apply_action(new_event->channel_id, new_event->event_type); | ||||
|                         } | ||||
|                     else if (pmt::any_ref(msg).type() == typeid(command_event_sptr)) | ||||
|                         { | ||||
|                             command_event_sptr new_event; | ||||
|                             new_event = boost::any_cast<command_event_sptr>(pmt::any_ref(msg)); | ||||
|                             DLOG(INFO) << "New command event rx from ch id: " << new_event->command_id | ||||
|                                        << " what: " << new_event->event_type; | ||||
|  | ||||
|                             if (new_event->command_id == 200) | ||||
|                                 { | ||||
|                                     apply_action(new_event->event_type); | ||||
|                                 } | ||||
|                             else | ||||
|                                 { | ||||
|                                     if (new_event->command_id == 300)  // some TC commands require also actions from control_thread | ||||
|                                         { | ||||
|                                             apply_action(new_event->event_type); | ||||
|                                         } | ||||
|                                     flowgraph_->apply_action(new_event->command_id, new_event->event_type); | ||||
|                                 } | ||||
|                         } | ||||
|                     else | ||||
|                         { | ||||
|                             DLOG(INFO) << "Control Queue: unknown object type!\n"; | ||||
|                         } | ||||
|                 } | ||||
|             else | ||||
|                 { | ||||
|                 } | ||||
|         } | ||||
|     std::cout << "Stopping GNSS-SDR, please wait!" << std::endl; | ||||
|     flowgraph_->stop(); | ||||
| @@ -788,50 +823,6 @@ void ControlThread::assist_GNSS() | ||||
|         } | ||||
| } | ||||
|  | ||||
|  | ||||
| void ControlThread::read_control_messages() | ||||
| { | ||||
|     DLOG(INFO) << "Reading control messages from queue"; | ||||
|     //    gr::message::sptr queue_message = control_queue_->delete_head(); | ||||
|     //    if (queue_message != nullptr) | ||||
|     //        { | ||||
|     //            control_messages_ = control_message_factory_->GetControlMessages(queue_message); | ||||
|     //        } | ||||
|     //    else | ||||
|     //        { | ||||
|     //            control_messages_->clear(); | ||||
|     //        } | ||||
| } | ||||
|  | ||||
|  | ||||
| // Apply the corresponding control actions | ||||
| void ControlThread::process_control_messages() | ||||
| { | ||||
|     //    for (auto &i : *control_messages_) | ||||
|     //        { | ||||
|     //            if (stop_) | ||||
|     //                { | ||||
|     //                    break; | ||||
|     //                } | ||||
|     //            if (i->who == 200) | ||||
|     //                { | ||||
|     //                    apply_action(i->what); | ||||
|     //                } | ||||
|     //            else | ||||
|     //                { | ||||
|     //                    if (i->who == 300)  // some TC commands require also actions from control_thread | ||||
|     //                        { | ||||
|     //                            apply_action(i->what); | ||||
|     //                        } | ||||
|     //                    flowgraph_->apply_action(i->who, i->what); | ||||
|     //                } | ||||
|     //            processed_control_messages_++; | ||||
|     //        } | ||||
|     //    control_messages_->clear(); | ||||
|     DLOG(INFO) << "Processed all control messages"; | ||||
| } | ||||
|  | ||||
|  | ||||
| void ControlThread::apply_action(unsigned int what) | ||||
| { | ||||
|     std::shared_ptr<PvtInterface> pvt_ptr; | ||||
| @@ -1090,12 +1081,7 @@ void ControlThread::sysv_queue_listener() | ||||
|                     if ((std::abs(received_message - (-200.0)) < 10 * std::numeric_limits<double>::epsilon())) | ||||
|                         { | ||||
|                             std::cout << "Quit order received, stopping GNSS-SDR !!" << std::endl; | ||||
|                             //todo: remplace old shutdown mechanism | ||||
|                             //                            std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                             //                            if (control_queue_ != std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>()) | ||||
|                             //                                { | ||||
|                             //                                    control_queue_->handle(cmf->GetQueueMessage(200, 0)); | ||||
|                             //                                } | ||||
|                             control_queue_->push(pmt::make_any(command_event_make(200, 0))); | ||||
|                             read_queue = false; | ||||
|                         } | ||||
|                 } | ||||
| @@ -1113,12 +1099,7 @@ void ControlThread::keyboard_listener() | ||||
|             if (c == 'q') | ||||
|                 { | ||||
|                     std::cout << "Quit keystroke order received, stopping GNSS-SDR !!" << std::endl; | ||||
|                     //todo: remplace old shutdown mechanism | ||||
|                     //                    std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                     //                    if (control_queue_ != std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>()) | ||||
|                     //                        { | ||||
|                     //                            control_queue_->handle(cmf->GetQueueMessage(200, 0)); | ||||
|                     //                        } | ||||
|                     control_queue_->push(pmt::make_any(command_event_make(200, 0))); | ||||
|                     read_keys = false; | ||||
|                 } | ||||
|             std::this_thread::sleep_for(std::chrono::milliseconds(100)); | ||||
|   | ||||
| @@ -95,7 +95,7 @@ public: | ||||
|     /*! | ||||
|      * \brief Sets the control_queue | ||||
|      * | ||||
|      * \param[in] boost::shared_ptr<gr::msg_queue> control_queue | ||||
|      * \param[in] std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue | ||||
|      */ | ||||
|     void set_control_queue(const std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue);  // NOLINT(performance-unnecessary-value-param) | ||||
|  | ||||
| @@ -140,10 +140,6 @@ private: | ||||
|     // Save {ephemeris, iono, utc, ref loc, ref time} assistance to a local XML file | ||||
|     //bool save_assistance_to_XML(); | ||||
|  | ||||
|     void read_control_messages(); | ||||
|  | ||||
|     void process_control_messages(); | ||||
|  | ||||
|     /* | ||||
|      * Blocking function that reads the GPS assistance queue | ||||
|      */ | ||||
|   | ||||
| @@ -1262,9 +1262,6 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) | ||||
|                             else | ||||
|                                 { | ||||
|                                     push_back_signal(gnss_signal); | ||||
|                                     //todo: rewrite all | ||||
|                                     //                                    std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                                     //                                    queue_->handle(cmf->GetQueueMessage(i, 0)); | ||||
|                                     DLOG(INFO) << "Channel " << ch_index << " secondary frequency acquisition assistance not available in " << channels_[ch_index]->get_signal().get_satellite() << ", Signal " << channels_[ch_index]->get_signal().get_signal_str(); | ||||
|                                 } | ||||
|                         } | ||||
| @@ -1327,9 +1324,6 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) | ||||
|                             else | ||||
|                                 { | ||||
|                                     push_back_signal(gnss_signal); | ||||
|                                     //todo: rewrite all | ||||
|                                     //                                    std::unique_ptr<ControlMessageFactory> cmf(new ControlMessageFactory()); | ||||
|                                     //                                    queue_->handle(cmf->GetQueueMessage(i, 0)); | ||||
|                                     DLOG(INFO) << "Channel " << i << " secondary frequency acquisition assistance not available in " << channels_[i]->get_signal().get_satellite() << ", Signal " << channels_[i]->get_signal().get_signal_str(); | ||||
|                                     std::cout << "Channel " << i << " secondary frequency acquisition assistance not available in " << channels_[i]->get_signal().get_satellite() << ", Signal " << channels_[i]->get_signal().get_signal_str(); | ||||
|                                 } | ||||
|   | ||||
| @@ -869,7 +869,6 @@ endif() | ||||
| if(NOT ENABLE_PACKAGING AND NOT ENABLE_FPGA) | ||||
|     add_executable(control_thread_test | ||||
|         ${CMAKE_CURRENT_SOURCE_DIR}/single_test_main.cc | ||||
|         ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_message_factory_test.cc | ||||
|         ${CMAKE_CURRENT_SOURCE_DIR}/unit-tests/control-plane/control_thread_test.cc | ||||
|     ) | ||||
|     if(${FILESYSTEM_FOUND}) | ||||
|   | ||||
| @@ -60,7 +60,6 @@ DECLARE_string(log_dir); | ||||
| #include "unit-tests/arithmetic/fft_speed_test.cc" | ||||
| #include "unit-tests/arithmetic/magnitude_squared_test.cc" | ||||
| #include "unit-tests/arithmetic/multiply_test.cc" | ||||
| #include "unit-tests/control-plane/control_message_factory_test.cc" | ||||
| #include "unit-tests/control-plane/control_thread_test.cc" | ||||
| #include "unit-tests/control-plane/file_configuration_test.cc" | ||||
| #include "unit-tests/control-plane/gnss_block_factory_test.cc" | ||||
|   | ||||
| @@ -1,89 +0,0 @@ | ||||
| /*! | ||||
|  * \file control message_factory_test.cc | ||||
|  * \brief  This file implements tests for the ControlMessageFactory. | ||||
|  * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com | ||||
|  *         Carles Fernandez-Prades, 2012. cfernandez(at)cttc.es | ||||
|  * | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  * | ||||
|  * Copyright (C) 2010-2018  (see AUTHORS file for a list of contributors) | ||||
|  * | ||||
|  * GNSS-SDR is a software defined Global Navigation | ||||
|  *          Satellite Systems receiver | ||||
|  * | ||||
|  * This file is part of GNSS-SDR. | ||||
|  * | ||||
|  * GNSS-SDR is free software: you can redistribute it and/or modify | ||||
|  * it under the terms of the GNU General Public License as published by | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  * | ||||
|  * GNSS-SDR is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU General Public License for more details. | ||||
|  * | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>. | ||||
|  * | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include <gtest/gtest.h> | ||||
| #include <string> | ||||
|  | ||||
|  | ||||
| TEST(ControlMessageFactoryTest, GetQueueMessage) | ||||
| { | ||||
|     std::shared_ptr<ControlMessageFactory> factory = std::make_shared<ControlMessageFactory>(); | ||||
|     gr::message::sptr queue_message = factory->GetQueueMessage(0, 2); | ||||
|     auto control_messages = factory->GetControlMessages(queue_message); | ||||
|     unsigned int expected0 = 0; | ||||
|     unsigned int expected2 = 2; | ||||
|     EXPECT_EQ(expected0, control_messages->at(0)->who); | ||||
|     EXPECT_EQ(expected2, control_messages->at(0)->what); | ||||
|     EXPECT_EQ(sizeof(ControlMessage), queue_message->length()); | ||||
| } | ||||
|  | ||||
|  | ||||
| TEST(ControlMessageFactoryTest, GetControlMessages) | ||||
| { | ||||
|     std::shared_ptr<ControlMessageFactory> factory = std::make_shared<ControlMessageFactory>(); | ||||
|     gr::message::sptr queue_message = gr::message::make(0, 0, 0, sizeof(ControlMessage)); | ||||
|     std::shared_ptr<ControlMessage> control_message = std::make_shared<ControlMessage>(); | ||||
|  | ||||
|     control_message->who = 1; | ||||
|     control_message->what = 4; | ||||
|  | ||||
|     memcpy(queue_message->msg(), control_message.get(), sizeof(ControlMessage)); | ||||
|     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages = factory->GetControlMessages(queue_message); | ||||
|  | ||||
|     unsigned int expected1 = 1; | ||||
|     unsigned int expected4 = 4; | ||||
|     EXPECT_EQ(expected1, control_messages->size()); | ||||
|     EXPECT_EQ(expected1, control_messages->at(0)->who); | ||||
|     EXPECT_EQ(expected4, control_messages->at(0)->what); | ||||
| } | ||||
|  | ||||
| /* | ||||
|  | ||||
| TEST(ControlMessageFactoryTest, GetControlMessagesWrongSize) | ||||
| { | ||||
|  | ||||
|     std::shared_ptr<ControlMessageFactory> factory = std::make_shared<ControlMessageFactory>(); | ||||
|     std::shared_ptr<ControlMessage> control_message = std::make_shared<ControlMessage>(); | ||||
|  | ||||
|     control_message->who = 1; | ||||
|     control_message->what = 4; | ||||
|     int another_int = 10; | ||||
|  | ||||
|     gr::message::sptr queue_message = gr::message::make(0, 0, 0, sizeof(ControlMessage) + sizeof(int)); | ||||
|     memcpy(queue_message->msg(), control_message.get(), sizeof(ControlMessage)); | ||||
|     memcpy(queue_message->msg() + sizeof(ControlMessage), &another_int, sizeof(int)); | ||||
|     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages = factory->GetControlMessages(queue_message); | ||||
|  | ||||
|     unsigned int expected0 = 0; | ||||
|     EXPECT_EQ(expected0, control_messages->size()); | ||||
| } */ | ||||
| @@ -32,6 +32,8 @@ | ||||
|  | ||||
|  | ||||
| #include "control_thread.h" | ||||
| #include "channel_event.h" | ||||
| #include "command_event.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "in_memory_configuration.h" | ||||
| #include <boost/exception/diagnostic_information.hpp> | ||||
| @@ -39,8 +41,8 @@ | ||||
| #include <boost/lexical_cast.hpp> | ||||
| #include <gflags/gflags.h> | ||||
| #include <glog/logging.h> | ||||
| #include <gnuradio/message.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <exception> | ||||
| #include <memory> | ||||
| @@ -120,13 +122,10 @@ TEST_F(ControlThreadTest /*unused*/, InstantiateRunControlMessages /*unused*/) | ||||
|  | ||||
|     std::shared_ptr<ControlThread> control_thread = std::make_shared<ControlThread>(config); | ||||
|  | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue = gr::msg_queue::make(0); | ||||
|  | ||||
|     std::unique_ptr<ControlMessageFactory> control_msg_factory(new ControlMessageFactory()); | ||||
|  | ||||
|     control_queue->handle(control_msg_factory->GetQueueMessage(0, 0)); | ||||
|     control_queue->handle(control_msg_factory->GetQueueMessage(1, 0)); | ||||
|     control_queue->handle(control_msg_factory->GetQueueMessage(200, 0)); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     control_queue->push(pmt::make_any(channel_event_make(0, 0))); | ||||
|     control_queue->push(pmt::make_any(channel_event_make(1, 0))); | ||||
|     control_queue->push(pmt::make_any(command_event_make(200, 0))); | ||||
|  | ||||
|     control_thread->set_control_queue(control_queue); | ||||
|     try | ||||
| @@ -180,16 +179,14 @@ TEST_F(ControlThreadTest /*unused*/, InstantiateRunControlMessages2 /*unused*/) | ||||
|     config->set_property("GNSS-SDR.internal_fs_sps", "4000000"); | ||||
|  | ||||
|     std::unique_ptr<ControlThread> control_thread2(new ControlThread(config)); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue2 = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue2 = gr::msg_queue::make(0); | ||||
|     control_queue2->push(pmt::make_any(channel_event_make(0, 0))); | ||||
|     control_queue2->push(pmt::make_any(channel_event_make(2, 0))); | ||||
|     control_queue2->push(pmt::make_any(channel_event_make(1, 0))); | ||||
|     control_queue2->push(pmt::make_any(channel_event_make(3, 0))); | ||||
|     control_queue2->push(pmt::make_any(command_event_make(200, 0))); | ||||
|  | ||||
|     std::unique_ptr<ControlMessageFactory> control_msg_factory2(new ControlMessageFactory()); | ||||
|  | ||||
|     control_queue2->handle(control_msg_factory2->GetQueueMessage(0, 0)); | ||||
|     control_queue2->handle(control_msg_factory2->GetQueueMessage(2, 0)); | ||||
|     control_queue2->handle(control_msg_factory2->GetQueueMessage(1, 0)); | ||||
|     control_queue2->handle(control_msg_factory2->GetQueueMessage(3, 0)); | ||||
|     control_queue2->handle(control_msg_factory2->GetQueueMessage(200, 0)); | ||||
|  | ||||
|     control_thread2->set_control_queue(control_queue2); | ||||
|  | ||||
| @@ -244,7 +241,7 @@ TEST_F(ControlThreadTest /*unused*/, StopReceiverProgrammatically /*unused*/) | ||||
|     config->set_property("GNSS-SDR.internal_fs_sps", "4000000"); | ||||
|  | ||||
|     std::shared_ptr<ControlThread> control_thread = std::make_shared<ControlThread>(config); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> control_queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     control_thread->set_control_queue(control_queue); | ||||
|  | ||||
|     std::thread stop_receiver_thread(stop_receiver); | ||||
|   | ||||
| @@ -36,14 +36,15 @@ | ||||
| #include "gnss_block_factory.h" | ||||
| #include "acquisition_interface.h" | ||||
| #include "channel.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "in_memory_configuration.h" | ||||
| #include "observables_interface.h" | ||||
| #include "pvt_interface.h" | ||||
| #include "telemetry_decoder_interface.h" | ||||
| #include "tracking_interface.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <vector> | ||||
|  | ||||
| TEST(GNSSBlockFactoryTest, InstantiateFileSignalSource) | ||||
| @@ -53,7 +54,7 @@ TEST(GNSSBlockFactoryTest, InstantiateFileSignalSource) | ||||
|     std::string path = std::string(TEST_PATH); | ||||
|     std::string filename = path + "signal_samples/GPS_L1_CA_ID_1_Fs_4Msps_2ms.dat"; | ||||
|     configuration->set_property("SignalSource.filename", filename); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     // Example of a factory as a shared_ptr | ||||
|     std::shared_ptr<GNSSBlockFactory> factory = std::make_shared<GNSSBlockFactory>(); | ||||
|     // Example of a block as a shared_ptr | ||||
| @@ -67,7 +68,7 @@ TEST(GNSSBlockFactoryTest, InstantiateWrongSignalSource) | ||||
| { | ||||
|     std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>(); | ||||
|     configuration->set_property("SignalSource.implementation", "Pepito"); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     // Example of a factory as a unique_ptr | ||||
|     std::unique_ptr<GNSSBlockFactory> factory; | ||||
|     // Example of a block as a unique_ptr | ||||
| @@ -90,7 +91,7 @@ TEST(GNSSBlockFactoryTest, InstantiateSignalConditioner) | ||||
| TEST(GNSSBlockFactoryTest, InstantiateFIRFilter) | ||||
| { | ||||
|     std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>(); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     configuration->set_property("InputFilter.implementation", "Fir_Filter"); | ||||
|  | ||||
| @@ -123,7 +124,7 @@ TEST(GNSSBlockFactoryTest, InstantiateFIRFilter) | ||||
| TEST(GNSSBlockFactoryTest, InstantiateFreqXlatingFIRFilter) | ||||
| { | ||||
|     std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>(); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     configuration->set_property("InputFilter.implementation", "Freq_Xlating_Fir_Filter"); | ||||
|  | ||||
| @@ -158,7 +159,7 @@ TEST(GNSSBlockFactoryTest, InstantiateFreqXlatingFIRFilter) | ||||
| TEST(GNSSBlockFactoryTest, InstantiatePulseBlankingFilter) | ||||
| { | ||||
|     std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>(); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     configuration->set_property("InputFilter.implementation", "Pulse_Blanking_Filter"); | ||||
|  | ||||
|     std::unique_ptr<GNSSBlockFactory> factory; | ||||
| @@ -171,7 +172,7 @@ TEST(GNSSBlockFactoryTest, InstantiatePulseBlankingFilter) | ||||
| TEST(GNSSBlockFactoryTest, InstantiateNotchFilter) | ||||
| { | ||||
|     std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>(); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     configuration->set_property("InputFilter.implementation", "Notch_Filter"); | ||||
|  | ||||
|     std::unique_ptr<GNSSBlockFactory> factory; | ||||
| @@ -184,7 +185,7 @@ TEST(GNSSBlockFactoryTest, InstantiateNotchFilter) | ||||
| TEST(GNSSBlockFactoryTest, InstantiateNotchFilterLite) | ||||
| { | ||||
|     std::shared_ptr<InMemoryConfiguration> configuration = std::make_shared<InMemoryConfiguration>(); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     configuration->set_property("InputFilter.implementation", "Notch_Filter_Lite"); | ||||
|  | ||||
|     std::unique_ptr<GNSSBlockFactory> factory; | ||||
| @@ -309,7 +310,7 @@ TEST(GNSSBlockFactoryTest, InstantiateChannels) | ||||
|     configuration->set_property("Channel0.item_type", "gr_complex"); | ||||
|     configuration->set_property("Acquisition_1C.implementation", "GPS_L1_CA_PCPS_Acquisition"); | ||||
|     configuration->set_property("Channel1.item_type", "gr_complex"); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::unique_ptr<GNSSBlockFactory> factory; | ||||
|     std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> channels = factory->GetChannels(configuration, queue); | ||||
|     EXPECT_EQ(static_cast<unsigned int>(2), channels->size()); | ||||
|   | ||||
| @@ -30,17 +30,17 @@ | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
| #include "gnss_flowgraph.h" | ||||
| #include "acquisition_interface.h" | ||||
| #include "channel.h" | ||||
| #include "channel_interface.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "file_configuration.h" | ||||
| #include "file_signal_source.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_flowgraph.h" | ||||
| #include "in_memory_configuration.h" | ||||
| #include "pass_through.h" | ||||
| #include "tracking_interface.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include <gtest/gtest.h> | ||||
|  | ||||
|  | ||||
| @@ -68,7 +68,7 @@ TEST(GNSSFlowgraph /*unused*/, InstantiateConnectStartStopOldNotation /*unused*/ | ||||
|     config->set_property("Observables.implementation", "Hybrid_Observables"); | ||||
|     config->set_property("PVT.implementation", "RTKLIB_PVT"); | ||||
|  | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, gr::msg_queue::make(0)); | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, std::make_shared<Concurrent_Queue<pmt::pmt_t>>()); | ||||
|  | ||||
|     EXPECT_NO_THROW(flowgraph->connect()); | ||||
|     EXPECT_TRUE(flowgraph->connected()); | ||||
| @@ -103,7 +103,7 @@ TEST(GNSSFlowgraph /*unused*/, InstantiateConnectStartStop /*unused*/) | ||||
|     config->set_property("Observables.implementation", "Hybrid_Observables"); | ||||
|     config->set_property("PVT.implementation", "RTKLIB_PVT"); | ||||
|  | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, gr::msg_queue::make(0)); | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, std::make_shared<Concurrent_Queue<pmt::pmt_t>>()); | ||||
|  | ||||
|     EXPECT_NO_THROW(flowgraph->connect()); | ||||
|     EXPECT_TRUE(flowgraph->connected()); | ||||
| @@ -137,7 +137,7 @@ TEST(GNSSFlowgraph /*unused*/, InstantiateConnectStartStopGalileoE1B /*unused*/) | ||||
|     config->set_property("Observables.implementation", "Hybrid_Observables"); | ||||
|     config->set_property("PVT.implementation", "RTKLIB_PVT"); | ||||
|  | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, gr::msg_queue::make(0)); | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, std::make_shared<Concurrent_Queue<pmt::pmt_t>>()); | ||||
|  | ||||
|     EXPECT_NO_THROW(flowgraph->connect()); | ||||
|     EXPECT_TRUE(flowgraph->connected()); | ||||
| @@ -253,7 +253,7 @@ TEST(GNSSFlowgraph /*unused*/, InstantiateConnectStartStopHybrid /*unused*/) | ||||
|     config->set_property("Observables.implementation", "Hybrid_Observables"); | ||||
|     config->set_property("PVT.implementation", "RTKLIB_PVT"); | ||||
|  | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, gr::msg_queue::make(0)); | ||||
|     std::shared_ptr<GNSSFlowgraph> flowgraph = std::make_shared<GNSSFlowgraph>(config, std::make_shared<Concurrent_Queue<pmt::pmt_t>>()); | ||||
|  | ||||
|     EXPECT_NO_THROW(flowgraph->connect()); | ||||
|     EXPECT_TRUE(flowgraph->connected()); | ||||
|   | ||||
| @@ -51,6 +51,7 @@ | ||||
| #include <gnuradio/blocks/interleaved_char_to_complex.h> | ||||
| #include <gnuradio/blocks/skiphead.h> | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <thread> | ||||
| #include <utility> | ||||
|  | ||||
| @@ -598,7 +599,7 @@ int AcquisitionPerformanceTest::run_receiver() | ||||
|     boost::shared_ptr<AcqPerfTest_msg_rx> msg_rx = AcqPerfTest_msg_rx_make(channel_internal_queue); | ||||
|     gr::blocks::skiphead::sptr skiphead = gr::blocks::skiphead::make(sizeof(gr_complex), FLAGS_acq_test_skiphead); | ||||
|  | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     gnss_synchro = Gnss_Synchro(); | ||||
|     init(); | ||||
|  | ||||
|   | ||||
| @@ -31,9 +31,10 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "beidou_b1i_pcps_acquisition.h" | ||||
| #include "Beidou_B1I.h" | ||||
| #include "acquisition_dump_reader.h" | ||||
| #include "beidou_b1i_pcps_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -46,9 +47,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <utility> | ||||
|  | ||||
| @@ -261,7 +262,7 @@ TEST_F(BeidouB1iPcpsAcquisitionTest, ConnectAndRun) | ||||
|     int nsamples = 25000; | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> | ||||
|  | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     init(); | ||||
|   | ||||
| @@ -31,9 +31,10 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "beidou_b3i_pcps_acquisition.h" | ||||
| #include "Beidou_B3I.h" | ||||
| #include "acquisition_dump_reader.h" | ||||
| #include "beidou_b3i_pcps_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -46,9 +47,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <utility> | ||||
|  | ||||
| @@ -260,7 +261,7 @@ TEST_F(BeidouB3iPcpsAcquisitionTest, ConnectAndRun) | ||||
|     int nsamples = 50000; | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     init(); | ||||
|   | ||||
| @@ -30,8 +30,9 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "fir_filter.h" | ||||
| #include "galileo_e1_pcps_8ms_ambiguous_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "fir_filter.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -43,8 +44,8 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <thread> | ||||
| #include <utility> | ||||
| @@ -433,7 +434,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ConnectAndRun) | ||||
|     std::chrono::duration<double> elapsed_seconds(0.0); | ||||
|  | ||||
|     config_1(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 0); | ||||
| @@ -483,7 +484,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ConnectAndRun) | ||||
| TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 0, queue); | ||||
| @@ -572,7 +573,7 @@ TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResults) | ||||
| TEST_F(GalileoE1Pcps8msAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabilities) | ||||
| { | ||||
|     config_2(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_8ms_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1Pcps8msAmbiguousAcquisition>(acq_); | ||||
|   | ||||
| @@ -31,8 +31,9 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "fir_filter.h" | ||||
| #include "galileo_e1_pcps_ambiguous_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "fir_filter.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -43,7 +44,6 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <chrono> | ||||
| #include <utility> | ||||
| @@ -435,7 +435,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     config_1(); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 0); | ||||
| @@ -466,7 +466,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_); | ||||
|     boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
| @@ -551,7 +551,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi | ||||
| { | ||||
|     config_2(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsAmbiguousAcquisition>(acq_); | ||||
|     boost::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|   | ||||
| @@ -42,6 +42,7 @@ | ||||
|  | ||||
|  | ||||
| #include "galileo_e1_pcps_ambiguous_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -52,8 +53,8 @@ | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include <gnuradio/blocks/skiphead.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <utility> | ||||
| #ifdef GR_GREATER_38 | ||||
| @@ -217,7 +218,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ConnectAndRun) | ||||
|     int nsamples = 4 * fs_in; | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     init(); | ||||
| @@ -248,7 +249,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults) | ||||
| { | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     init(); | ||||
|   | ||||
| @@ -31,9 +31,10 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "galileo_e1_pcps_ambiguous_acquisition.h" | ||||
| #include "Galileo_E1.h" | ||||
| #include "acquisition_dump_reader.h" | ||||
| #include "galileo_e1_pcps_ambiguous_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -47,9 +48,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <utility> | ||||
|  | ||||
| @@ -265,7 +266,7 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     init(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Ambiguous_Acquisition", 1, 0); | ||||
|     std::shared_ptr<AcquisitionInterface> acquisition = std::dynamic_pointer_cast<AcquisitionInterface>(acq_); | ||||
|   | ||||
| @@ -31,8 +31,9 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "fir_filter.h" | ||||
| #include "galileo_e1_pcps_cccwsr_ambiguous_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "fir_filter.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -44,8 +45,8 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <thread> | ||||
| #include <utility> | ||||
| @@ -438,7 +439,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ConnectAndRun) | ||||
|  | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_); | ||||
| @@ -468,7 +469,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_); | ||||
|     boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue); | ||||
| @@ -561,7 +562,7 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResultsProbabili | ||||
| { | ||||
|     config_2(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_CCCWSR_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsCccwsrAmbiguousAcquisition>(acq_); | ||||
|     boost::shared_ptr<GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx> msg_rx = GalileoE1PcpsCccwsrAmbiguousAcquisitionTest_msg_rx_make(channel_internal_queue); | ||||
|   | ||||
| @@ -31,8 +31,8 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "fir_filter.h" | ||||
| #include "galileo_e1_pcps_quicksync_ambiguous_acquisition.h" | ||||
| #include "fir_filter.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -46,6 +46,7 @@ | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <fstream> | ||||
| #include <stdexcept> | ||||
| @@ -560,7 +561,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> begin, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     config_1(); | ||||
|  | ||||
| @@ -597,7 +598,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul | ||||
|     LOG(INFO) << "Start validation of results test"; | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_); | ||||
| @@ -688,7 +689,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul | ||||
|     LOG(INFO) << "Start validation of results with noise+interference test"; | ||||
|     config_3(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_); | ||||
| @@ -776,7 +777,7 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul | ||||
| { | ||||
|     config_2(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_QuickSync_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsQuickSyncAmbiguousAcquisition>(acq_); | ||||
|   | ||||
| @@ -30,9 +30,10 @@ | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
| #include "galileo_e1_pcps_tong_ambiguous_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "configuration_interface.h" | ||||
| #include "fir_filter.h" | ||||
| #include "galileo_e1_pcps_tong_ambiguous_acquisition.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -44,9 +45,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <thread> | ||||
| #include <utility> | ||||
| @@ -438,7 +439,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0.0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     config_1(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_); | ||||
| @@ -466,7 +467,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_); | ||||
|     boost::shared_ptr<GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
| @@ -555,7 +556,7 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsPro | ||||
| { | ||||
|     config_2(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<GNSSBlockInterface> acq_ = factory->GetBlock(config, "Acquisition_1B", "Galileo_E1_PCPS_Tong_Ambiguous_Acquisition", 1, 0); | ||||
|     acquisition = std::dynamic_pointer_cast<GalileoE1PcpsTongAmbiguousAcquisition>(acq_); | ||||
|     boost::shared_ptr<GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx> msg_rx = GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|   | ||||
| @@ -29,6 +29,7 @@ | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
| #include "concurrent_queue.h" | ||||
| #include "fir_filter.h" | ||||
| #include "galileo_e5a_noncoherent_iq_acquisition_caf.h" | ||||
| #include "gen_signal_source.h" | ||||
| @@ -42,8 +43,8 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <utility> | ||||
| #ifdef GR_GREATER_38 | ||||
| @@ -540,7 +541,7 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ConnectAndRun) | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition_5X", 1, 0); | ||||
|     boost::shared_ptr<GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx> msg_rx = GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx_make(channel_internal_queue); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     ASSERT_NO_THROW({ | ||||
| @@ -566,7 +567,7 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ConnectAndRun) | ||||
| TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM) | ||||
| { | ||||
|     config_1(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     acquisition = std::make_shared<GalileoE5aNoncoherentIQAcquisitionCaf>(config.get(), "Acquisition_5X", 1, 0); | ||||
|     boost::shared_ptr<GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx> msg_rx = GalileoE5aPcpsAcquisitionGSoC2014GensourceTest_msg_rx_make(channel_internal_queue); | ||||
|   | ||||
| @@ -31,10 +31,11 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "glonass_l1_ca_pcps_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "configuration_interface.h" | ||||
| #include "freq_xlating_fir_filter.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "glonass_l1_ca_pcps_acquisition.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| #include "gnss_synchro.h" | ||||
| @@ -46,9 +47,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <thread> | ||||
| #include <utility> | ||||
| @@ -442,7 +443,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ConnectAndRun) | ||||
|     int nsamples = floor(fs_in * integration_time_ms * 1e-3); | ||||
|     std::chrono::time_point<std::chrono::system_clock> begin, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     config_1(); | ||||
| @@ -474,7 +475,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ConnectAndRun) | ||||
| TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     acquisition = new GlonassL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 0); | ||||
| @@ -563,7 +564,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResults) | ||||
| TEST_F(GlonassL1CaPcpsAcquisitionGSoC2017Test, ValidationOfResultsProbabilities) | ||||
| { | ||||
|     config_2(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     acquisition = new GlonassL1CaPcpsAcquisition(config.get(), "Acquisition", 1, 0); | ||||
|     boost::shared_ptr<GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx> msg_rx = GlonassL1CaPcpsAcquisitionGSoC2017Test_msg_rx_make(channel_internal_queue); | ||||
|   | ||||
| @@ -30,8 +30,9 @@ | ||||
|  * ------------------------------------------------------------------------- | ||||
|  */ | ||||
|  | ||||
| #include "freq_xlating_fir_filter.h" | ||||
| #include "glonass_l1_ca_pcps_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "freq_xlating_fir_filter.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| @@ -41,9 +42,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <cstdlib> | ||||
| #include <utility> | ||||
| @@ -184,7 +185,7 @@ TEST_F(GlonassL1CaPcpsAcquisitionTest, ConnectAndRun) | ||||
|     int nsamples = 62314; | ||||
|     std::chrono::time_point<std::chrono::system_clock> begin, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     init(); | ||||
|   | ||||
| @@ -30,10 +30,11 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "glonass_l2_ca_pcps_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "configuration_interface.h" | ||||
| #include "fir_filter.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "glonass_l2_ca_pcps_acquisition.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| #include "gnss_synchro.h" | ||||
| @@ -45,9 +46,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <thread> | ||||
| #ifdef GR_GREATER_38 | ||||
| @@ -440,7 +441,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ConnectAndRun) | ||||
|     int nsamples = floor(fs_in * integration_time_ms * 1e-3); | ||||
|     std::chrono::time_point<std::chrono::system_clock> begin, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     config_1(); | ||||
| @@ -472,7 +473,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ConnectAndRun) | ||||
| TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition_2G", 1, 0); | ||||
| @@ -562,7 +563,7 @@ TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResults) | ||||
| TEST_F(GlonassL2CaPcpsAcquisitionTest, ValidationOfResultsProbabilities) | ||||
| { | ||||
|     config_2(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     acquisition = new GlonassL2CaPcpsAcquisition(config.get(), "Acquisition_2G", 1, 0); | ||||
|     boost::shared_ptr<GlonassL2CaPcpsAcquisitionTest_msg_rx> msg_rx = GlonassL2CaPcpsAcquisitionTest_msg_rx_make(channel_internal_queue); | ||||
|   | ||||
| @@ -31,13 +31,14 @@ | ||||
|  */ | ||||
|  | ||||
|  | ||||
| #include "gps_l1_ca_pcps_acquisition.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "configuration_interface.h" | ||||
| #include "fir_filter.h" | ||||
| #include "gen_signal_source.h" | ||||
| #include "gnss_block_interface.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| #include "gnss_synchro.h" | ||||
| #include "gps_l1_ca_pcps_acquisition.h" | ||||
| #include "in_memory_configuration.h" | ||||
| #include "pass_through.h" | ||||
| #include "signal_generator.h" | ||||
| @@ -46,9 +47,9 @@ | ||||
| #include <gnuradio/analog/sig_source_waveform.h> | ||||
| #include <gnuradio/blocks/file_source.h> | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <thread> | ||||
| #include <utility> | ||||
| @@ -435,7 +436,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ConnectAndRun) | ||||
|     int nsamples = floor(fs_in * integration_time_ms * 1e-3); | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     config_1(); | ||||
| @@ -467,7 +468,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ConnectAndRun) | ||||
| TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition_1C", 1, 0); | ||||
| @@ -557,7 +558,7 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults) | ||||
| TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities) | ||||
| { | ||||
|     config_2(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     acquisition = new GpsL1CaPcpsAcquisition(config.get(), "Acquisition_1C", 1, 0); | ||||
|     boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|   | ||||
| @@ -262,7 +262,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTest, ConnectAndRun) | ||||
|     int nsamples = 4000; | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     init(); | ||||
|   | ||||
| @@ -118,7 +118,7 @@ class GpsL1CaPcpsOpenClAcquisitionGSoC2013Test : public ::testing::Test | ||||
| protected: | ||||
|     GpsL1CaPcpsOpenClAcquisitionGSoC2013Test() | ||||
|     { | ||||
|         queue = gr::msg_queue::make(0); | ||||
|         queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|         top_block = gr::make_top_block("Acquisition test"); | ||||
|         item_size = sizeof(gr_complex); | ||||
|         stop = false; | ||||
|   | ||||
| @@ -545,7 +545,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0.0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|  | ||||
|     config_1(); | ||||
| @@ -575,7 +575,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 0); | ||||
|     boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|  | ||||
| @@ -669,7 +669,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsWithNoise | ||||
|     //config_3(); | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 0); | ||||
|     boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|  | ||||
| @@ -760,7 +760,7 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili | ||||
| { | ||||
|     config_2(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     acquisition = std::make_shared<GpsL1CaPcpsQuickSyncAcquisition>(config.get(), "Acquisition_1C", 1, 0); | ||||
|     boost::shared_ptr<GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|  | ||||
|   | ||||
| @@ -431,7 +431,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     config_1(); | ||||
|     acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition_1C", 1, 0); | ||||
| @@ -461,7 +461,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResults) | ||||
| { | ||||
|     config_1(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition_1C", 1, 0); | ||||
|     boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
| @@ -550,7 +550,7 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResultsProbabilities) | ||||
| { | ||||
|     config_2(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     acquisition = std::make_shared<GpsL1CaPcpsTongAcquisition>(config.get(), "Acquisition_1C", 1, 0); | ||||
|     boost::shared_ptr<GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx> msg_rx = GpsL1CaPcpsTongAcquisitionGSoC2013Test_msg_rx_make(channel_internal_queue); | ||||
|  | ||||
|   | ||||
| @@ -255,7 +255,7 @@ void GpsL2MPcpsAcquisitionTest::plot_grid() | ||||
| TEST_F(GpsL2MPcpsAcquisitionTest, Instantiate) | ||||
| { | ||||
|     init(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition_2S", 1, 0); | ||||
| } | ||||
|  | ||||
| @@ -265,7 +265,7 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     init(); | ||||
|     std::shared_ptr<GpsL2MPcpsAcquisition> acquisition = std::make_shared<GpsL2MPcpsAcquisition>(config.get(), "Acquisition_2S", 1, 0); | ||||
| @@ -295,7 +295,7 @@ TEST_F(GpsL2MPcpsAcquisitionTest, ValidationOfResults) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     double expected_delay_samples = 1;  //2004; | ||||
|     double expected_doppler_hz = 1200;  //3000; | ||||
|  | ||||
|   | ||||
| @@ -39,6 +39,7 @@ | ||||
| #else | ||||
| #include <gnuradio/analog/sig_source_c.h> | ||||
| #endif | ||||
| #include "concurrent_queue.h" | ||||
| #include "file_signal_source.h" | ||||
| #include "fir_filter.h" | ||||
| #include "gnss_block_factory.h" | ||||
| @@ -48,7 +49,6 @@ | ||||
| #include "interleaved_byte_to_complex_byte.h" | ||||
| #include "interleaved_short_to_complex_short.h" | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gtest/gtest.h> | ||||
|  | ||||
|  | ||||
| @@ -59,7 +59,7 @@ class FirFilterTest : public ::testing::Test | ||||
| protected: | ||||
|     FirFilterTest() | ||||
|     { | ||||
|         queue = gr::msg_queue::make(0); | ||||
|         queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|         item_size = sizeof(gr_complex); | ||||
|         config = std::make_shared<InMemoryConfiguration>(); | ||||
|     } | ||||
| @@ -70,7 +70,7 @@ protected: | ||||
|     void configure_cbyte_gr_complex(); | ||||
|     void configure_gr_complex_gr_complex(); | ||||
|     void configure_cshort_cshort(); | ||||
|     boost::shared_ptr<gr::msg_queue> queue; | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; | ||||
|     gr::top_block_sptr top_block; | ||||
|     std::shared_ptr<InMemoryConfiguration> config; | ||||
|     size_t item_size; | ||||
|   | ||||
| @@ -39,6 +39,7 @@ | ||||
| #else | ||||
| #include <gnuradio/analog/sig_source_c.h> | ||||
| #endif | ||||
| #include "concurrent_queue.h" | ||||
| #include "file_signal_source.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| @@ -46,7 +47,6 @@ | ||||
| #include "in_memory_configuration.h" | ||||
| #include "notch_filter_lite.h" | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gtest/gtest.h> | ||||
|  | ||||
|  | ||||
| @@ -57,7 +57,7 @@ class NotchFilterLiteTest : public ::testing::Test | ||||
| protected: | ||||
|     NotchFilterLiteTest() | ||||
|     { | ||||
|         queue = gr::msg_queue::make(0); | ||||
|         queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|         item_size = sizeof(gr_complex); | ||||
|         config = std::make_shared<InMemoryConfiguration>(); | ||||
|         nsamples = FLAGS_notch_filter_lite_test_nsamples; | ||||
| @@ -66,7 +66,7 @@ protected: | ||||
|  | ||||
|     void init(); | ||||
|     void configure_gr_complex_gr_complex(); | ||||
|     boost::shared_ptr<gr::msg_queue> queue; | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; | ||||
|     gr::top_block_sptr top_block; | ||||
|     std::shared_ptr<InMemoryConfiguration> config; | ||||
|     size_t item_size; | ||||
|   | ||||
| @@ -39,6 +39,7 @@ | ||||
| #else | ||||
| #include <gnuradio/analog/sig_source_c.h> | ||||
| #endif | ||||
| #include "concurrent_queue.h" | ||||
| #include "file_signal_source.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| @@ -46,7 +47,6 @@ | ||||
| #include "in_memory_configuration.h" | ||||
| #include "notch_filter.h" | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gtest/gtest.h> | ||||
|  | ||||
|  | ||||
| @@ -57,7 +57,7 @@ class NotchFilterTest : public ::testing::Test | ||||
| protected: | ||||
|     NotchFilterTest() | ||||
|     { | ||||
|         queue = gr::msg_queue::make(0); | ||||
|         queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|         item_size = sizeof(gr_complex); | ||||
|         config = std::make_shared<InMemoryConfiguration>(); | ||||
|         nsamples = FLAGS_notch_filter_test_nsamples; | ||||
| @@ -66,7 +66,7 @@ protected: | ||||
|  | ||||
|     void init(); | ||||
|     void configure_gr_complex_gr_complex(); | ||||
|     boost::shared_ptr<gr::msg_queue> queue; | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; | ||||
|     gr::top_block_sptr top_block; | ||||
|     std::shared_ptr<InMemoryConfiguration> config; | ||||
|     size_t item_size; | ||||
|   | ||||
| @@ -39,6 +39,7 @@ | ||||
| #else | ||||
| #include <gnuradio/analog/sig_source_c.h> | ||||
| #endif | ||||
| #include "concurrent_queue.h" | ||||
| #include "file_signal_source.h" | ||||
| #include "gnss_block_factory.h" | ||||
| #include "gnss_block_interface.h" | ||||
| @@ -46,7 +47,6 @@ | ||||
| #include "in_memory_configuration.h" | ||||
| #include "pulse_blanking_filter.h" | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <gtest/gtest.h> | ||||
|  | ||||
|  | ||||
| @@ -57,7 +57,7 @@ class PulseBlankingFilterTest : public ::testing::Test | ||||
| protected: | ||||
|     PulseBlankingFilterTest() | ||||
|     { | ||||
|         queue = gr::msg_queue::make(0); | ||||
|         queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|         item_size = sizeof(gr_complex); | ||||
|         config = std::make_shared<InMemoryConfiguration>(); | ||||
|         nsamples = FLAGS_pb_filter_test_nsamples; | ||||
| @@ -66,7 +66,7 @@ protected: | ||||
|  | ||||
|     void init(); | ||||
|     void configure_gr_complex_gr_complex(); | ||||
|     boost::shared_ptr<gr::msg_queue> queue; | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; | ||||
|     gr::top_block_sptr top_block; | ||||
|     std::shared_ptr<InMemoryConfiguration> config; | ||||
|     size_t item_size; | ||||
|   | ||||
| @@ -52,7 +52,7 @@ TEST(DirectResamplerConditionerCcTest, InstantiationAndRunTest) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     int nsamples = 1000000;  //Number of samples to be computed | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     gr::top_block_sptr top_block = gr::make_top_block("direct_resampler_conditioner_cc_test"); | ||||
|     boost::shared_ptr<gr::analog::sig_source_c> source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000.0, 1.0, gr_complex(0.0)); | ||||
|     boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); | ||||
|   | ||||
| @@ -49,7 +49,7 @@ TEST(MmseResamplerTest, InstantiationAndRunTestWarning) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     int nsamples = 1000000;  //Number of samples to be computed | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     gr::top_block_sptr top_block = gr::make_top_block("mmse_resampler_conditioner_cc_test"); | ||||
|     boost::shared_ptr<gr::analog::sig_source_c> source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000.0, 1.0, gr_complex(0.0)); | ||||
|     boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); | ||||
| @@ -90,7 +90,7 @@ TEST(MmseResamplerTest, InstantiationAndRunTest2) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     int nsamples = 1000000;  //Number of samples to be computed | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     gr::top_block_sptr top_block = gr::make_top_block("mmse_resampler_conditioner_cc_test"); | ||||
|     boost::shared_ptr<gr::analog::sig_source_c> source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000.0, 1.0, gr_complex(0.0)); | ||||
|     boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue); | ||||
|   | ||||
| @@ -30,15 +30,15 @@ | ||||
|  */ | ||||
|  | ||||
| #include "file_signal_source.h" | ||||
| #include "in_memory_configuration.h" | ||||
| #include "concurrent_queue.h" | ||||
| #include "in_memory_configuration.h" | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <stdexcept> | ||||
|  | ||||
| TEST(FileSignalSource, Instantiate) | ||||
| { | ||||
|     boost::shared_ptr<gr::msg_queue> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<InMemoryConfiguration> config = std::make_shared<InMemoryConfiguration>(); | ||||
|  | ||||
|     config->set_property("Test.samples", "0"); | ||||
| @@ -57,7 +57,7 @@ TEST(FileSignalSource, Instantiate) | ||||
|  | ||||
| TEST(FileSignalSource, InstantiateFileNotExists) | ||||
| { | ||||
|     boost::shared_ptr<gr::msg_queue> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     std::shared_ptr<InMemoryConfiguration> config = std::make_shared<InMemoryConfiguration>(); | ||||
|  | ||||
|     config->set_property("Test.samples", "0"); | ||||
|   | ||||
| @@ -38,13 +38,14 @@ | ||||
| #else | ||||
| #include <gnuradio/analog/sig_source_f.h> | ||||
| #endif | ||||
| #include "concurrent_queue.h" | ||||
| #include "gnss_sdr_valve.h" | ||||
| #include <gnuradio/blocks/null_sink.h> | ||||
| #include "concurrent_queue.h" | ||||
| #include <pmt/pmt.h> | ||||
|  | ||||
| TEST(ValveTest, CheckEventSentAfter100Samples) | ||||
| { | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = gr::msg_queue::make(0); | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|  | ||||
|     gr::top_block_sptr top_block = gr::make_top_block("gnss_sdr_valve_test"); | ||||
|  | ||||
| @@ -52,8 +53,9 @@ TEST(ValveTest, CheckEventSentAfter100Samples) | ||||
|     boost::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(float), 100, queue); | ||||
|     gr::blocks::null_sink::sptr sink = gr::blocks::null_sink::make(sizeof(float)); | ||||
|  | ||||
|     unsigned int expected0 = 0; | ||||
|     EXPECT_EQ(expected0, queue->count()); | ||||
|     bool expected0 = false; | ||||
|     pmt::pmt_t msg; | ||||
|     EXPECT_EQ(expected0, queue->timed_wait_and_pop(msg, 100)); | ||||
|  | ||||
|     top_block->connect(source, 0, valve, 0); | ||||
|     top_block->connect(valve, 0, sink, 0); | ||||
| @@ -61,6 +63,6 @@ TEST(ValveTest, CheckEventSentAfter100Samples) | ||||
|     top_block->run(); | ||||
|     top_block->stop(); | ||||
|  | ||||
|     unsigned int expected1 = 1; | ||||
|     EXPECT_EQ(expected1, queue->count()); | ||||
|     bool expected1 = true; | ||||
|     EXPECT_EQ(expected1, queue->timed_wait_and_pop(msg, 100)); | ||||
| } | ||||
|   | ||||
| @@ -114,7 +114,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ConnectAndRun) | ||||
|     std::chrono::time_point<std::chrono::system_clock> start, end; | ||||
|     std::chrono::duration<double> elapsed_seconds(0); | ||||
|     init(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Tracking test"); | ||||
|  | ||||
|     // Example using smart pointers and the block factory | ||||
| @@ -161,7 +161,7 @@ TEST_F(GalileoE1DllPllVemlTrackingInternalTest, ValidationOfResults) | ||||
|     int num_samples = 80000000;           // 8 Msps | ||||
|     unsigned int skiphead_sps = 8000000;  // 8 Msps | ||||
|     init(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Tracking test"); | ||||
|  | ||||
|     // Example using smart pointers and the block factory | ||||
|   | ||||
| @@ -110,7 +110,7 @@ TEST_F(GalileoE5aTrackingTest, ValidationOfResults) | ||||
|     int fs_in = 32000000; | ||||
|     int nsamples = 32000000 * 5; | ||||
|     init(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Tracking test"); | ||||
|  | ||||
|     // Example using smart pointers and the block factory | ||||
|   | ||||
| @@ -156,7 +156,7 @@ TEST_F(GlonassL1CaDllPllCAidTrackingTest, ValidationOfResults) | ||||
|     int nsamples = fs_in * 4e-3 * 2; | ||||
|  | ||||
|     init(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Tracking test"); | ||||
|     std::shared_ptr<TrackingInterface> tracking = std::make_shared<GlonassL1CaDllPllCAidTracking>(config.get(), "Tracking_1G", 1, 1); | ||||
|     boost::shared_ptr<GlonassL1CaDllPllCAidTrackingTest_msg_rx> msg_rx = GlonassL1CaDllPllCAidTrackingTest_msg_rx_make(); | ||||
|   | ||||
| @@ -156,7 +156,7 @@ TEST_F(GlonassL1CaDllPllTrackingTest, ValidationOfResults) | ||||
|     int nsamples = fs_in * 4e-3 * 2; | ||||
|  | ||||
|     init(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Tracking test"); | ||||
|     std::shared_ptr<TrackingInterface> tracking = std::make_shared<GlonassL1CaDllPllTracking>(config.get(), "Tracking_1G", 1, 1); | ||||
|     boost::shared_ptr<GlonassL1CaDllPllTrackingTest_msg_rx> msg_rx = GlonassL1CaDllPllTrackingTest_msg_rx_make(); | ||||
|   | ||||
| @@ -160,7 +160,7 @@ TEST_F(GpsL2MDllPllTrackingTest, ValidationOfResults) | ||||
|     int nsamples = fs_in * 9; | ||||
|  | ||||
|     init(); | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Tracking test"); | ||||
|     std::shared_ptr<TrackingInterface> tracking = std::make_shared<GpsL2MDllPllTracking>(config.get(), "Tracking_2S", 1, 1); | ||||
|     boost::shared_ptr<GpsL2MDllPllTrackingTest_msg_rx> msg_rx = GpsL2MDllPllTrackingTest_msg_rx_make(); | ||||
|   | ||||
| @@ -63,6 +63,7 @@ | ||||
| #include <gnuradio/filter/firdes.h> | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <gtest/gtest.h> | ||||
| #include <pmt/pmt.h> | ||||
| #include <chrono> | ||||
| #include <cstdint> | ||||
| #include <utility> | ||||
| @@ -794,14 +795,10 @@ TEST_F(TrackingPullInTest, ValidationOfResults) | ||||
|  | ||||
|     // create the msg queue for valve | ||||
|  | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::shared_ptr<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     long long int acq_to_trk_delay_samples = ceil(static_cast<double>(FLAGS_fs_gen_sps) * FLAGS_acq_to_trk_delay_s); | ||||
|     auto resetable_valve_ = gnss_sdr_make_valve(sizeof(gr_complex), acq_to_trk_delay_samples, queue, false); | ||||
|  | ||||
|     std::shared_ptr<ControlMessageFactory> control_message_factory_; | ||||
|     std::shared_ptr<std::vector<std::shared_ptr<ControlMessage>>> control_messages_; | ||||
|  | ||||
|  | ||||
|     //CN0 LOOP | ||||
|     std::vector<std::vector<double>> pull_in_results_v_v; | ||||
|  | ||||
| @@ -882,15 +879,8 @@ TEST_F(TrackingPullInTest, ValidationOfResults) | ||||
|                                         top_block->start(); | ||||
|                                         std::cout << " Waiting for valve...\n"; | ||||
|                                         //wait the valve message indicating the circulation of the amount of samples of the delay | ||||
|                                         gr::message::sptr queue_message = queue->delete_head(); | ||||
|                                         if (queue_message != nullptr) | ||||
|                                             { | ||||
|                                                 control_messages_ = control_message_factory_->GetControlMessages(queue_message); | ||||
|                                             } | ||||
|                                         else | ||||
|                                             { | ||||
|                                                 control_messages_->clear(); | ||||
|                                             } | ||||
|                                         pmt::pmt_t msg; | ||||
|                                         queue->wait_and_pop(msg); | ||||
|                                         std::cout << " Starting tracking...\n"; | ||||
|                                         tracking->start_tracking(); | ||||
|                                         resetable_valve_->open_valve(); | ||||
|   | ||||
| @@ -62,7 +62,6 @@ | ||||
| #include <gnuradio/blocks/skiphead.h> | ||||
| #include <gnuradio/gr_complex.h>     // for gr_complex | ||||
| #include <gnuradio/io_signature.h>   // for io_signature | ||||
| #include "concurrent_queue.h" | ||||
| #include <gnuradio/runtime_types.h>  // for block_sptr | ||||
| #include <gnuradio/top_block.h> | ||||
| #include <pmt/pmt.h>        // for pmt_t, to_long | ||||
| @@ -189,9 +188,9 @@ bool front_end_capture(const std::shared_ptr<ConfigurationInterface>& configurat | ||||
| { | ||||
|     gr::top_block_sptr top_block; | ||||
|     GNSSBlockFactory block_factory; | ||||
|     boost::shared_ptr<gr::msg_queue> queue; | ||||
|     std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue; | ||||
|  | ||||
|     queue = gr::msg_queue::make(0); | ||||
|     queue = std::make_shared<Concurrent_Queue<pmt::pmt_t>>(); | ||||
|     top_block = gr::make_top_block("Acquisition test"); | ||||
|  | ||||
|     std::shared_ptr<GNSSBlockInterface> source; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Javier Arribas
					Javier Arribas