1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-08-02 20:05:48 +00:00

fixing includes

This commit is contained in:
Carles Fernandez 2015-01-09 13:47:52 +01:00
parent f80ef7a15b
commit f978f8e3e7
18 changed files with 218 additions and 55 deletions

View File

@ -32,8 +32,7 @@
#define GNSS_SDR_CONCURRENT_QUEUE_H #define GNSS_SDR_CONCURRENT_QUEUE_H
#include <queue> #include <queue>
#include <boost/thread/mutex.hpp> #include <boost/thread.hpp>
#include <boost/thread/thread.hpp>
template<typename Data> template<typename Data>

View File

@ -36,11 +36,9 @@
#include <unistd.h> #include <unistd.h>
#include <iostream> #include <iostream>
#include <map> #include <map>
#include <memory>
#include <string> #include <string>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/chrono.hpp> #include <boost/chrono.hpp>
#include <boost/thread.hpp>
#include <gnuradio/message.h> #include <gnuradio/message.h>
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>

View File

@ -37,7 +37,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <boost/thread/thread.hpp> #include <boost/thread.hpp>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>
#include "control_message_factory.h" #include "control_message_factory.h"
#include "gnss_sdr_supl_client.h" #include "gnss_sdr_supl_client.h"

View File

@ -31,7 +31,7 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_VERSION #ifndef GNSS_SDR_VERSION
#define GNSS_SDR_VERSION "0.0.2" #define GNSS_SDR_VERSION "0.0.4"
#endif #endif
#include <ctime> #include <ctime>
@ -40,8 +40,7 @@
#include <boost/exception/diagnostic_information.hpp> #include <boost/exception/diagnostic_information.hpp>
#include <boost/exception_ptr.hpp> #include <boost/exception_ptr.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread.hpp>
#include <boost/thread/thread.hpp>
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>

View File

@ -35,7 +35,7 @@
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread.hpp>
#include <boost/exception/diagnostic_information.hpp> #include <boost/exception/diagnostic_information.hpp>
#include <boost/exception_ptr.hpp> #include <boost/exception_ptr.hpp>
#include <gtest/gtest.h> #include <gtest/gtest.h>

View File

@ -33,6 +33,7 @@
#include <ctime> #include <ctime>
#include <iostream> #include <iostream>
#include <boost/chrono.hpp>
#include <gnuradio/top_block.h> #include <gnuradio/top_block.h>
#include <gnuradio/blocks/file_source.h> #include <gnuradio/blocks/file_source.h>
#include <gnuradio/analog/sig_source_waveform.h> #include <gnuradio/analog/sig_source_waveform.h>
@ -47,7 +48,6 @@
#include "signal_generator_c.h" #include "signal_generator_c.h"
#include "fir_filter.h" #include "fir_filter.h"
#include "gen_signal_source.h" #include "gen_signal_source.h"
#include "boost/shared_ptr.hpp"
#include "gnss_sdr_valve.h" #include "gnss_sdr_valve.h"
@ -483,6 +483,16 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
{ {
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL."; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }
@ -570,5 +580,15 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoC2013Test, ValidationOfResultsProbabi
std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl; std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl; std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }

View File

@ -246,18 +246,20 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionGSoCTest, ValidationOfResults)
}) << "Failure running the top_block." << std::endl; }) << "Failure running the top_block." << std::endl;
#ifdef OLD_BOOST #ifdef OLD_BOOST
ASSERT_NO_THROW( { ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1)); ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl; }) << "Failure while waiting the queue to stop" << std::endl;
#endif #endif
#ifndef OLD_BOOST #ifndef OLD_BOOST
ASSERT_NO_THROW( { ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50)); ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl; }) << "Failure while waiting the queue to stop" << std::endl;
#endif #endif
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
std::cout << "Acquired " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl; std::cout << "Acquired " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl;
EXPECT_EQ(0, message) << "Acquisition failure. Expected message: 0=ACQ STOP."; EXPECT_EQ(0, message) << "Acquisition failure. Expected message: 0=ACQ STOP.";
} }

View File

@ -230,9 +230,16 @@ TEST_F(GalileoE1PcpsAmbiguousAcquisitionTest, ValidationOfResults)
end = tv.tv_sec *1000000 + tv.tv_usec; end = tv.tv_sec *1000000 + tv.tv_usec;
}) << "Failure running the top_block." << std::endl; }) << "Failure running the top_block." << std::endl;
//ASSERT_NO_THROW( { #ifdef OLD_BOOST
// ch_thread.timed_join(boost::posix_time::seconds(1)); ASSERT_NO_THROW( {
//}) << "Failure while waiting the queue to stop" << std::endl; ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
std::cout << "Acquired " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl; std::cout << "Acquired " << nsamples << " samples in " << (end - begin) << " microseconds" << std::endl;

View File

@ -481,6 +481,16 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResults)
{ {
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL."; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }
@ -566,5 +576,15 @@ TEST_F(GalileoE1PcpsCccwsrAmbiguousAcquisitionTest, ValidationOfResultsProbabili
std::cout << "Probability of false alarm (satellite absent) = " << Pfa_a << std::endl; std::cout << "Probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl; std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }

View File

@ -614,6 +614,16 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
{ {
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL."; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
LOG(INFO) << "End validation of results test"; LOG(INFO) << "End validation of results test";
} }
@ -700,6 +710,16 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
{ {
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL."; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
LOG(INFO) << "End validation of results with noise+interference test"; LOG(INFO) << "End validation of results with noise+interference test";
} }
@ -814,5 +834,15 @@ TEST_F(GalileoE1PcpsQuickSyncAmbiguousAcquisitionGSoC2014Test, ValidationOfResul
pdpfafile.close(); pdpfafile.close();
} }
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }

View File

@ -37,6 +37,7 @@
#include <iostream> #include <iostream>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/chrono.hpp> #include <boost/chrono.hpp>
#include <boost/thread.hpp>
#include <gnuradio/top_block.h> #include <gnuradio/top_block.h>
#include <gnuradio/blocks/file_source.h> #include <gnuradio/blocks/file_source.h>
#include <gnuradio/analog/sig_source_waveform.h> #include <gnuradio/analog/sig_source_waveform.h>
@ -486,6 +487,17 @@ TEST_F(GalileoE1PcpsTongAmbiguousAcquisitionGSoC2013Test, ValidationOfResults)
{ {
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL."; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }

View File

@ -31,6 +31,7 @@
#include <ctime> #include <ctime>
#include <iostream> #include <iostream>
#include <boost/chrono.hpp>
#include <gnuradio/top_block.h> #include <gnuradio/top_block.h>
#include <gnuradio/blocks/file_source.h> #include <gnuradio/blocks/file_source.h>
#include <gnuradio/analog/sig_source_waveform.h> #include <gnuradio/analog/sig_source_waveform.h>
@ -48,7 +49,6 @@
#include "fir_filter.h" #include "fir_filter.h"
#include "gen_signal_source.h" #include "gen_signal_source.h"
#include "gnss_sdr_valve.h" #include "gnss_sdr_valve.h"
#include "boost/shared_ptr.hpp"
#include "pass_through.h" #include "pass_through.h"
#include "file_output_filter.h" #include "file_output_filter.h"
@ -709,7 +709,16 @@ TEST_F(GalileoE5aPcpsAcquisitionGSoC2014GensourceTest, ValidationOfSIM)
EXPECT_NO_THROW( { EXPECT_NO_THROW( {
top_block->run(); // Start threads and wait top_block->run(); // Start threads and wait
}) << "Failure running the top_block."<< std::endl; }) << "Failure running the top_block."<< std::endl;
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
//std::cout << gnss_synchro.Acq_delay_samples << "acq delay" <<std::endl; //std::cout << gnss_synchro.Acq_delay_samples << "acq delay" <<std::endl;
//std::cout << gnss_synchro.Acq_doppler_hz << "acq doppler" <<std::endl; //std::cout << gnss_synchro.Acq_doppler_hz << "acq doppler" <<std::endl;
//std::cout << gnss_synchro.Acq_samplestamp_samples << "acq samples" <<std::endl; //std::cout << gnss_synchro.Acq_samplestamp_samples << "acq samples" <<std::endl;

View File

@ -476,6 +476,16 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResults)
{ {
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL."; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
delete acquisition; delete acquisition;
@ -561,6 +571,16 @@ TEST_F(GpsL1CaPcpsAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl; std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl; std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
delete acquisition; delete acquisition;

View File

@ -597,6 +597,16 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResults)
EXPECT_EQ(2, message) EXPECT_EQ(2, message)
<< "Acquisition failure. Expected message: 2=ACQ FAIL."; << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
std::cout << "----Acquired: " << nsamples << " samples"<< std::endl; std::cout << "----Acquired: " << nsamples << " samples"<< std::endl;
@ -687,6 +697,16 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsWithNoise
EXPECT_EQ(2, message) EXPECT_EQ(2, message)
<< "Acquisition failure. Expected message: 2=ACQ FAIL."; << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples; unsigned long int nsamples = gnss_synchro.Acq_samplestamp_samples;
std::cout << "----Acquired: " << nsamples << " samples"<< std::endl; std::cout << "----Acquired: " << nsamples << " samples"<< std::endl;
@ -769,19 +789,19 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili
std::cout << "Estimated probability of false alarm (satellite present) = " << Pfa_p << std::endl; std::cout << "Estimated probability of false alarm (satellite present) = " << Pfa_p << std::endl;
std::cout << "Estimated probability of miss detection (satellite present) = " << Pmd << std::endl; std::cout << "Estimated probability of miss detection (satellite present) = " << Pmd << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl; std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
if(dump_test_results)
{
std::stringstream filenamepd;
filenamepd.str("");
filenamepd << "../data/test_statistics_" << gnss_synchro.System
<< "_" << gnss_synchro.Signal << "_sat_"
<< gnss_synchro.PRN << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
pdpfafile.open(filenamepd.str().c_str(), std::ios::app | std::ios::out); if(dump_test_results)
pdpfafile << FLAGS_value_threshold << "," << Pd << "," << Pfa_p << "," << Pmd << std::endl; {
pdpfafile.close(); std::stringstream filenamepd;
} filenamepd.str("");
filenamepd << "../data/test_statistics_" << gnss_synchro.System
<< "_" << gnss_synchro.Signal << "_sat_"
<< gnss_synchro.PRN << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
pdpfafile.open(filenamepd.str().c_str(), std::ios::app | std::ios::out);
pdpfafile << FLAGS_value_threshold << "," << Pd << "," << Pfa_p << "," << Pmd << std::endl;
pdpfafile.close();
}
} }
@ -789,19 +809,29 @@ TEST_F(GpsL1CaPcpsQuickSyncAcquisitionGSoC2014Test, ValidationOfResultsProbabili
{ {
std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl; std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl; std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
if(dump_test_results)
{
std::stringstream filenamepf;
filenamepf.str("");
filenamepf << "../data/test_statistics_" << gnss_synchro.System
<< "_" << gnss_synchro.Signal << "_sat_"
<< gnss_synchro.PRN << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
pdpfafile.open(filenamepf.str().c_str(), std::ios::app | std::ios::out); if(dump_test_results)
pdpfafile << FLAGS_value_threshold << "," << Pfa_a << std::endl; {
pdpfafile.close(); std::stringstream filenamepf;
} filenamepf.str("");
filenamepf << "../data/test_statistics_" << gnss_synchro.System
<< "_" << gnss_synchro.Signal << "_sat_"
<< gnss_synchro.PRN << "CN0_dB_0_" << FLAGS_value_CN0_dB_0 << "_dBHz.csv";
pdpfafile.open(filenamepf.str().c_str(), std::ios::app | std::ios::out);
pdpfafile << FLAGS_value_threshold << "," << Pfa_a << std::endl;
pdpfafile.close();
}
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }

View File

@ -476,6 +476,16 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResults)
{ {
EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL."; EXPECT_EQ(2, message) << "Acquisition failure. Expected message: 2=ACQ FAIL.";
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }
@ -560,5 +570,15 @@ TEST_F(GpsL1CaPcpsTongAcquisitionGSoC2013Test, ValidationOfResultsProbabilities)
std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl; std::cout << "Estimated probability of false alarm (satellite absent) = " << Pfa_a << std::endl;
std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl; std::cout << "Mean acq time = " << mean_acq_time_us << " microseconds." << std::endl;
} }
#ifdef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.timed_join(boost::posix_time::seconds(1));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
#ifndef OLD_BOOST
ASSERT_NO_THROW( {
ch_thread.try_join_until(boost::chrono::steady_clock::now() + boost::chrono::milliseconds(50));
}) << "Failure while waiting the queue to stop" << std::endl;
#endif
} }
} }

View File

@ -31,8 +31,7 @@
#include <iostream> #include <iostream>
#include <queue> #include <queue>
#include <boost/thread/mutex.hpp> #include <boost/thread.hpp>
#include <boost/thread/thread.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>

View File

@ -35,13 +35,12 @@
#include <iostream> #include <iostream>
#include <queue> #include <queue>
#include <memory> #include <memory>
#include <gtest/gtest.h> #include <boost/thread.hpp>
#include <glog/logging.h>
#include <gflags/gflags.h>
#include <gnuradio/msg_queue.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <gflags/gflags.h>
#include <glog/logging.h>
#include <gnuradio/msg_queue.h>
#include <gtest/gtest.h>
#include "concurrent_queue.h" #include "concurrent_queue.h"
#include "concurrent_map.h" #include "concurrent_map.h"
#include "control_thread.h" #include "control_thread.h"

View File

@ -39,8 +39,7 @@
#include <vector> #include <vector>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread.hpp>
#include <boost/thread/thread.hpp>
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include <gnuradio/msg_queue.h> #include <gnuradio/msg_queue.h>