mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-24 12:07:40 +00:00
Add compatibility with the new GNU Radio 3.9 API that uses C++11 standard smart pointers instead of Boost smart pointers
This commit is contained in:
@@ -100,6 +100,12 @@ target_link_libraries(acquisition_adapters
|
||||
Gnuradio::fft
|
||||
)
|
||||
|
||||
if(GNURADIO_USES_STD_POINTERS)
|
||||
target_compile_definitions(acquisition_adapters
|
||||
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_FPGA)
|
||||
target_link_libraries(acquisition_adapters
|
||||
PRIVATE
|
||||
|
||||
@@ -161,7 +161,7 @@ void GpsL1CaPcpsAcquisitionFineDoppler::set_state(int state)
|
||||
acquisition_cc_->set_state(state);
|
||||
}
|
||||
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::connect(std::shared_ptr<gr::top_block> top_block)
|
||||
{
|
||||
if (top_block)
|
||||
@@ -179,7 +179,6 @@ void GpsL1CaPcpsAcquisitionFineDoppler::disconnect(std::shared_ptr<gr::top_block
|
||||
// nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<gr::basic_block> GpsL1CaPcpsAcquisitionFineDoppler::get_left_block()
|
||||
{
|
||||
return acquisition_cc_;
|
||||
@@ -190,3 +189,32 @@ std::shared_ptr<gr::basic_block> GpsL1CaPcpsAcquisitionFineDoppler::get_right_bl
|
||||
{
|
||||
return acquisition_cc_;
|
||||
}
|
||||
#else
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::connect(boost::shared_ptr<gr::top_block> top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
// nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
|
||||
void GpsL1CaPcpsAcquisitionFineDoppler::disconnect(boost::shared_ptr<gr::top_block> top_block)
|
||||
{
|
||||
if (top_block)
|
||||
{ /* top_block is not null */
|
||||
};
|
||||
// nothing to disconnect, now the tracking uses gr_sync_decimator
|
||||
}
|
||||
|
||||
boost::shared_ptr<gr::basic_block> GpsL1CaPcpsAcquisitionFineDoppler::get_left_block()
|
||||
{
|
||||
return acquisition_cc_;
|
||||
}
|
||||
|
||||
|
||||
boost::shared_ptr<gr::basic_block> GpsL1CaPcpsAcquisitionFineDoppler::get_right_block()
|
||||
{
|
||||
return acquisition_cc_;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,12 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using pcps_acquisition_fine_doppler_cc_sptr = std::shared_ptr<pcps_acquisition_fine_doppler_cc>;
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
using pcps_acquisition_fine_doppler_cc_sptr = boost::shared_ptr<pcps_acquisition_fine_doppler_cc>;
|
||||
#endif
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
@@ -64,11 +70,17 @@ public:
|
||||
return item_size_;
|
||||
}
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
void connect(std::shared_ptr<gr::top_block> top_block) override;
|
||||
void disconnect(std::shared_ptr<gr::top_block> top_block) override;
|
||||
std::shared_ptr<gr::basic_block> get_left_block() override;
|
||||
std::shared_ptr<gr::basic_block> get_right_block() override;
|
||||
|
||||
#else
|
||||
void connect(boost::shared_ptr<gr::top_block> top_block) override;
|
||||
void disconnect(boost::shared_ptr<gr::top_block> top_block) override;
|
||||
boost::shared_ptr<gr::basic_block> get_left_block() override;
|
||||
boost::shared_ptr<gr::basic_block> get_right_block() override;
|
||||
#endif
|
||||
/*!
|
||||
* \brief Set acquisition/tracking common Gnss_Synchro object pointer
|
||||
* to efficiently exchange synchronization data between acquisition and
|
||||
|
||||
@@ -81,6 +81,12 @@ target_include_directories(acquisition_gr_blocks
|
||||
${CMAKE_SOURCE_DIR}/src/core/receiver
|
||||
)
|
||||
|
||||
if(GNURADIO_USES_STD_POINTERS)
|
||||
target_compile_definitions(acquisition_gr_blocks
|
||||
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ARMA_NO_DEBUG)
|
||||
target_compile_definitions(acquisition_gr_blocks
|
||||
PUBLIC -DARMA_NO_BOUND_CHECKING=1
|
||||
|
||||
@@ -37,10 +37,18 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
class galileo_e5a_noncoherentIQ_acquisition_caf_cc;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr = std::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc>;
|
||||
#else
|
||||
using galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr = boost::shared_ptr<galileo_e5a_noncoherentIQ_acquisition_caf_cc>;
|
||||
#endif
|
||||
|
||||
galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make_acquisition_caf_cc(
|
||||
unsigned int sampled_ms,
|
||||
|
||||
@@ -31,10 +31,18 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
class galileo_pcps_8ms_acquisition_cc;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using galileo_pcps_8ms_acquisition_cc_sptr = std::shared_ptr<galileo_pcps_8ms_acquisition_cc>;
|
||||
#else
|
||||
using galileo_pcps_8ms_acquisition_cc_sptr = boost::shared_ptr<galileo_pcps_8ms_acquisition_cc>;
|
||||
#endif
|
||||
|
||||
galileo_pcps_8ms_acquisition_cc_sptr
|
||||
galileo_pcps_8ms_make_acquisition_cc(uint32_t sampled_ms,
|
||||
|
||||
@@ -62,11 +62,19 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
class Gnss_Synchro;
|
||||
class pcps_acquisition;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using pcps_acquisition_sptr = std::shared_ptr<pcps_acquisition>;
|
||||
#else
|
||||
using pcps_acquisition_sptr = boost::shared_ptr<pcps_acquisition>;
|
||||
#endif
|
||||
|
||||
pcps_acquisition_sptr pcps_make_acquisition(const Acq_Conf& conf_);
|
||||
|
||||
|
||||
@@ -55,10 +55,19 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
class pcps_acquisition_fine_doppler_cc;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using pcps_acquisition_fine_doppler_cc_sptr = std::shared_ptr<pcps_acquisition_fine_doppler_cc>;
|
||||
#else
|
||||
using pcps_acquisition_fine_doppler_cc_sptr = boost::shared_ptr<pcps_acquisition_fine_doppler_cc>;
|
||||
#endif
|
||||
|
||||
pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(const Acq_Conf& conf_);
|
||||
|
||||
|
||||
@@ -47,10 +47,18 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
class pcps_assisted_acquisition_cc;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using pcps_assisted_acquisition_cc_sptr = std::shared_ptr<pcps_assisted_acquisition_cc>;
|
||||
#else
|
||||
using pcps_assisted_acquisition_cc_sptr = boost::shared_ptr<pcps_assisted_acquisition_cc>;
|
||||
#endif
|
||||
|
||||
pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
|
||||
int32_t max_dwells,
|
||||
|
||||
@@ -36,11 +36,19 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
class pcps_cccwsr_acquisition_cc;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using pcps_cccwsr_acquisition_cc_sptr = std::shared_ptr<pcps_cccwsr_acquisition_cc>;
|
||||
#else
|
||||
using pcps_cccwsr_acquisition_cc_sptr = boost::shared_ptr<pcps_cccwsr_acquisition_cc>;
|
||||
#endif
|
||||
|
||||
pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
|
||||
@@ -53,10 +53,18 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
class pcps_quicksync_acquisition_cc;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using pcps_quicksync_acquisition_cc_sptr = std::shared_ptr<pcps_quicksync_acquisition_cc>;
|
||||
#else
|
||||
using pcps_quicksync_acquisition_cc_sptr = boost::shared_ptr<pcps_quicksync_acquisition_cc>;
|
||||
#endif
|
||||
|
||||
pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc(
|
||||
uint32_t folding_factor,
|
||||
|
||||
@@ -50,11 +50,18 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
#else
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#endif
|
||||
|
||||
class pcps_tong_acquisition_cc;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
using pcps_tong_acquisition_cc_sptr = std::shared_ptr<pcps_tong_acquisition_cc>;
|
||||
#else
|
||||
using pcps_tong_acquisition_cc_sptr = boost::shared_ptr<pcps_tong_acquisition_cc>;
|
||||
#endif
|
||||
|
||||
pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc(
|
||||
uint32_t sampled_ms,
|
||||
|
||||
Reference in New Issue
Block a user