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:
Carles Fernandez 2020-04-02 23:59:35 +02:00
parent 5f974a8f17
commit 3519107131
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
142 changed files with 1252 additions and 200 deletions

View File

@ -270,6 +270,18 @@ endif()
find_package_handle_standard_args(GNURADIO DEFAULT_MSG GNURADIO_RUNTIME_FOUND)
# Detect if using standard pointers
set(GNURADIO_USES_STD_POINTERS FALSE)
if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
file(STRINGS ${GNURADIO_RUNTIME_INCLUDE_DIRS}/gnuradio/basic_block.h _basic_block)
foreach(_loop_var IN LISTS _basic_block)
string(STRIP "${_loop_var}" _file_line)
if("public std::enable_shared_from_this<basic_block>" STREQUAL "${_file_line}")
set(GNURADIO_USES_STD_POINTERS TRUE)
endif()
endforeach()
endif()
# Search for IIO component
if(GNURADIO_VERSION VERSION_GREATER 3.8.99)
pkg_check_modules(PC_GNURADIO_IIO QUIET gnuradio-iio)

View File

@ -10,6 +10,11 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
## Unreleased
### Improvements in Maintainability:
- The software can now be built against the GNU Radio 3.9 API that uses C++11
smart pointers instead of Boost smart pointers.
### Improvements in Reproducibility:
- Improved reproducibility of the volk_gnsssdr library: Drop compile-time CPU

View File

@ -43,6 +43,12 @@ target_link_libraries(pvt_gr_blocks
Boost::serialization
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(pvt_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(pvt_gr_blocks

View File

@ -37,6 +37,10 @@
#include <sys/types.h> // for key_t
#include <utility> // for pair
#include <vector> // for vector
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class Beidou_Dnav_Almanac;
class Beidou_Dnav_Ephemeris;
@ -55,7 +59,11 @@ class Rtcm_Printer;
class Rtklib_Solver;
class rtklib_pvt_gs;
#if GNURADIO_USES_STD_POINTERS
using rtklib_pvt_gs_sptr = std::shared_ptr<rtklib_pvt_gs>;
#else
using rtklib_pvt_gs_sptr = boost::shared_ptr<rtklib_pvt_gs>;
#endif
rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
const Pvt_Conf& conf_,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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_);

View File

@ -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_);

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -41,6 +41,12 @@ target_include_directories(channel_libs
${CMAKE_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(channel_libs
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(channel_libs

View File

@ -24,10 +24,18 @@
#include <gnuradio/block.h>
#include <pmt/pmt.h>
#include <memory>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class channel_msg_receiver_cc;
#if GNURADIO_USES_STD_POINTERS
using channel_msg_receiver_cc_sptr = std::shared_ptr<channel_msg_receiver_cc>;
#else
using channel_msg_receiver_cc_sptr = boost::shared_ptr<channel_msg_receiver_cc>;
#endif
channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat);

View File

@ -38,6 +38,12 @@ target_link_libraries(data_type_gr_blocks
Volk::volk
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(data_type_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
set_property(TARGET data_type_gr_blocks
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

View File

@ -21,11 +21,19 @@
#define GNSS_SDR_INTERLEAVED_BYTE_TO_COMPLEX_BYTE_H
#include <gnuradio/sync_decimator.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class interleaved_byte_to_complex_byte;
#if GNURADIO_USES_STD_POINTERS
using interleaved_byte_to_complex_byte_sptr = std::shared_ptr<interleaved_byte_to_complex_byte>;
#else
using interleaved_byte_to_complex_byte_sptr = boost::shared_ptr<interleaved_byte_to_complex_byte>;
#endif
interleaved_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte();

View File

@ -20,12 +20,20 @@
#ifndef GNSS_SDR_INTERLEAVED_BYTE_TO_COMPLEX_SHORT_H
#define GNSS_SDR_INTERLEAVED_BYTE_TO_COMPLEX_SHORT_H
#include <memory>
#include <gnuradio/sync_decimator.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class interleaved_byte_to_complex_short;
#if GNURADIO_USES_STD_POINTERS
using interleaved_byte_to_complex_short_sptr = std::shared_ptr<interleaved_byte_to_complex_short>;
#else
using interleaved_byte_to_complex_short_sptr = boost::shared_ptr<interleaved_byte_to_complex_short>;
#endif
interleaved_byte_to_complex_short_sptr make_interleaved_byte_to_complex_short();

View File

@ -20,12 +20,20 @@
#ifndef GNSS_SDR_INTERLEAVED_SHORT_TO_COMPLEX_SHORT_H
#define GNSS_SDR_INTERLEAVED_SHORT_TO_COMPLEX_SHORT_H
#include <memory>
#include <gnuradio/sync_decimator.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class interleaved_short_to_complex_short;
#if GNURADIO_USES_STD_POINTERS
using interleaved_short_to_complex_short_sptr = std::shared_ptr<interleaved_short_to_complex_short>;
#else
using interleaved_short_to_complex_short_sptr = boost::shared_ptr<interleaved_short_to_complex_short>;
#endif
interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short();

View File

@ -40,6 +40,12 @@ target_link_libraries(input_filter_gr_blocks
Log4cpp::log4cpp
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(input_filter_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(input_filter_gr_blocks

View File

@ -22,10 +22,19 @@
#include <gnuradio/sync_block.h>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class beamformer;
#if GNURADIO_USES_STD_POINTERS
using beamformer_sptr = std::shared_ptr<beamformer>;
#else
using beamformer_sptr = boost::shared_ptr<beamformer>;
#endif
beamformer_sptr make_beamformer_sptr();

View File

@ -20,15 +20,22 @@
#ifndef GNSS_SDR_NOTCH_H
#define GNSS_SDR_NOTCH_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/block.h>
#include <gnuradio/fft/fft.h>
#include <cstdint>
#include <memory>
class Notch;
#if GNURADIO_USES_STD_POINTERS
using notch_sptr = std::shared_ptr<Notch>;
#else
using notch_sptr = boost::shared_ptr<Notch>;
#endif
notch_sptr make_notch_filter(
float pfa,

View File

@ -20,15 +20,22 @@
#ifndef GNSS_SDR_NOTCH_LITE_H
#define GNSS_SDR_NOTCH_LITE_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/block.h>
#include <gnuradio/fft/fft.h>
#include <cstdint>
#include <memory>
class NotchLite;
#if GNURADIO_USES_STD_POINTERS
using notch_lite_sptr = std::shared_ptr<NotchLite>;
#else
using notch_lite_sptr = boost::shared_ptr<NotchLite>;
#endif
notch_lite_sptr make_notch_filter_lite(
float p_c_factor,

View File

@ -20,13 +20,21 @@
#ifndef GNSS_SDR_PULSE_BLANKING_H
#define GNSS_SDR_PULSE_BLANKING_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/block.h>
#include <cstdint>
class pulse_blanking_cc;
#if GNURADIO_USES_STD_POINTERS
using pulse_blanking_cc_sptr = std::shared_ptr<pulse_blanking_cc>;
#else
using pulse_blanking_cc_sptr = boost::shared_ptr<pulse_blanking_cc>;
#endif
pulse_blanking_cc_sptr make_pulse_blanking_cc(
float pfa,

View File

@ -104,6 +104,12 @@ target_link_libraries(algorithms_libs
Glog::glog
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(algorithms_libs
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_OPENCL)
target_link_libraries(algorithms_libs PUBLIC OpenCL::OpenCL)
target_include_directories(algorithms_libs PUBLIC

View File

@ -20,14 +20,22 @@
#ifndef GNSS_SDR_BYTE_X2_TO_COMPLEX_BYTE_H
#define GNSS_SDR_BYTE_X2_TO_COMPLEX_BYTE_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class byte_x2_to_complex_byte;
#if GNURADIO_USES_STD_POINTERS
using byte_x2_to_complex_byte_sptr = std::shared_ptr<byte_x2_to_complex_byte>;
#else
using byte_x2_to_complex_byte_sptr = boost::shared_ptr<byte_x2_to_complex_byte>;
#endif
byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();

View File

@ -21,13 +21,21 @@
#define GNSS_SDR_COMPLEX_BYTE_TO_FLOAT_X2_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class complex_byte_to_float_x2;
#if GNURADIO_USES_STD_POINTERS
using complex_byte_to_float_x2_sptr = std::shared_ptr<complex_byte_to_float_x2>;
#else
using complex_byte_to_float_x2_sptr = boost::shared_ptr<complex_byte_to_float_x2>;
#endif
complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();

View File

@ -20,14 +20,22 @@
#ifndef GNSS_SDR_COMPLEX_FLOAT_TO_COMPLEX_BYTE_H
#define GNSS_SDR_COMPLEX_FLOAT_TO_COMPLEX_BYTE_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class complex_float_to_complex_byte;
#if GNURADIO_USES_STD_POINTERS
using complex_float_to_complex_byte_sptr = std::shared_ptr<complex_float_to_complex_byte>;
#else
using complex_float_to_complex_byte_sptr = boost::shared_ptr<complex_float_to_complex_byte>;
#endif
complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();

View File

@ -20,13 +20,21 @@
#ifndef GNSS_SDR_CONJUGATE_CC_H
#define GNSS_SDR_CONJUGATE_CC_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_cc;
#if GNURADIO_USES_STD_POINTERS
using conjugate_cc_sptr = std::shared_ptr<conjugate_cc>;
#else
using conjugate_cc_sptr = boost::shared_ptr<conjugate_cc>;
#endif
conjugate_cc_sptr make_conjugate_cc();

View File

@ -22,11 +22,19 @@
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class conjugate_ic;
#if GNURADIO_USES_STD_POINTERS
using conjugate_ic_sptr = std::shared_ptr<conjugate_ic>;
#else
using conjugate_ic_sptr = boost::shared_ptr<conjugate_ic>;
#endif
conjugate_ic_sptr make_conjugate_ic();

View File

@ -20,13 +20,21 @@
#ifndef GNSS_SDR_CONJUGATE_SC_H
#define GNSS_SDR_CONJUGATE_SC_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class conjugate_sc;
#if GNURADIO_USES_STD_POINTERS
using conjugate_sc_sptr = std::shared_ptr<conjugate_sc>;
#else
using conjugate_sc_sptr = boost::shared_ptr<conjugate_sc>;
#endif
conjugate_sc_sptr make_conjugate_sc();

View File

@ -21,13 +21,21 @@
#define GNSS_SDR_CSHORT_TO_FLOAT_X2_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class cshort_to_float_x2;
#if GNURADIO_USES_STD_POINTERS
using cshort_to_float_x2_sptr = std::shared_ptr<cshort_to_float_x2>;
#else
using cshort_to_float_x2_sptr = boost::shared_ptr<cshort_to_float_x2>;
#endif
cshort_to_float_x2_sptr make_cshort_to_float_x2();

View File

@ -21,13 +21,21 @@
#define GNSS_SDR_SHORT_X2_TO_CSHORT_H
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#include <gnuradio/sync_block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
class short_x2_to_cshort;
#if GNURADIO_USES_STD_POINTERS
using short_x2_to_cshort_sptr = std::shared_ptr<short_x2_to_cshort>;
#else
using short_x2_to_cshort_sptr = boost::shared_ptr<short_x2_to_cshort>;
#endif
short_x2_to_cshort_sptr make_short_x2_to_cshort();

View File

@ -25,7 +25,6 @@
#include "obs_conf.h"
#include <boost/circular_buffer.hpp> // for boost::circular_buffer
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_int
#include <cstdint> // for int32_t
@ -34,6 +33,11 @@
#include <memory> // for std:shared_ptr
#include <string> // for std::string
#include <vector> // for std::vector
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Gnss_Synchro;
class hybrid_observables_gs;
@ -41,7 +45,11 @@ class hybrid_observables_gs;
template <class T>
class Gnss_circular_deque;
#if GNURADIO_USES_STD_POINTERS
using hybrid_observables_gs_sptr = std::shared_ptr<hybrid_observables_gs>;
#else
using hybrid_observables_gs_sptr = boost::shared_ptr<hybrid_observables_gs>;
#endif
hybrid_observables_gs_sptr hybrid_observables_gs_make(const Obs_Conf& conf_);

View File

@ -38,6 +38,12 @@ target_link_libraries(resampler_gr_blocks
Volk::volk
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(resampler_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(resampler_gr_blocks

View File

@ -21,12 +21,21 @@
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H
#include <memory>
#include <gnuradio/block.h>
#include <cstdint>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class direct_resampler_conditioner_cb;
#if GNURADIO_USES_STD_POINTERS
using direct_resampler_conditioner_cb_sptr = std::shared_ptr<direct_resampler_conditioner_cb>;
#else
using direct_resampler_conditioner_cb_sptr = boost::shared_ptr<direct_resampler_conditioner_cb>;
#endif
direct_resampler_conditioner_cb_sptr direct_resampler_make_conditioner_cb(
double sample_freq_in,

View File

@ -28,13 +28,21 @@
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CC_H
#include <memory>
#include <gnuradio/block.h>
#include <cstdint>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class direct_resampler_conditioner_cc;
#if GNURADIO_USES_STD_POINTERS
using direct_resampler_conditioner_cc_sptr = std::shared_ptr<direct_resampler_conditioner_cc>;
#else
using direct_resampler_conditioner_cc_sptr = boost::shared_ptr<direct_resampler_conditioner_cc>;
#endif
direct_resampler_conditioner_cc_sptr direct_resampler_make_conditioner_cc(
double sample_freq_in,

View File

@ -21,12 +21,20 @@
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H
#include <memory>
#include <gnuradio/block.h>
#include <cstdint>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class direct_resampler_conditioner_cs;
#if GNURADIO_USES_STD_POINTERS
using direct_resampler_conditioner_cs_sptr = std::shared_ptr<direct_resampler_conditioner_cs>;
#else
using direct_resampler_conditioner_cs_sptr = boost::shared_ptr<direct_resampler_conditioner_cs>;
#endif
direct_resampler_conditioner_cs_sptr direct_resampler_make_conditioner_cs(
double sample_freq_in,

View File

@ -33,6 +33,12 @@ target_include_directories(signal_generator_adapters
${CMAKE_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(signal_generator_adapters
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(signal_generator_adapters

View File

@ -79,7 +79,11 @@ private:
size_t item_size_;
bool dump_;
std::string dump_filename_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> gen_source_;
#else
boost::shared_ptr<gr::block> gen_source_;
#endif
gr::blocks::vector_to_stream::sptr vector_to_stream_;
gr::blocks::file_sink::sptr file_sink_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t> > queue_;

View File

@ -31,6 +31,12 @@ target_include_directories(signal_generator_gr_blocks
${CMAKE_SOURCE_DIR}/src/algorithms/libs
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(signal_generator_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(signal_generator_gr_blocks

View File

@ -25,6 +25,11 @@
#include <random>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class signal_generator_c;
@ -39,7 +44,11 @@ class signal_generator_c;
*
* As a convention, the _sptr suffix indicates a std::shared_ptr
*/
#if GNURADIO_USES_STD_POINTERS
using signal_generator_c_sptr = std::shared_ptr<signal_generator_c>;
#else
using signal_generator_c_sptr = boost::shared_ptr<signal_generator_c>;
#endif
/*!
* \brief Return a shared_ptr to a new instance of gen_source.

View File

@ -152,6 +152,12 @@ target_link_libraries(signal_source_adapters
Volk::volk
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(signal_source_adapters
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_RAW_UDP AND PCAP_FOUND)
target_link_libraries(signal_source_adapters
PRIVATE

View File

@ -24,7 +24,6 @@
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "gr_complex_ip_packet_source.h"
#include <memory>
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/blocks/null_sink.h>
#include <pmt/pmt.h>
@ -32,6 +31,10 @@
#include <stdexcept>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -86,9 +89,16 @@ private:
size_t item_size_;
bool dump_;
std::string dump_filename_;
#if GNURADIO_USES_STD_POINTERS
std::vector<std::shared_ptr<gr::block>> null_sinks_;
Gr_Complex_Ip_Packet_Source::sptr udp_gnss_rx_source_;
std::vector<std::shared_ptr<gr::block>> file_sink_;
#else
std::vector<boost::shared_ptr<gr::block>> null_sinks_;
std::vector<boost::shared_ptr<gr::block>> file_sink_;
#endif
Gr_Complex_Ip_Packet_Source::sptr udp_gnss_rx_source_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
};

View File

@ -34,6 +34,10 @@
#include <cstdint>
#include <memory>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -110,7 +114,11 @@ private:
uint32_t in_streams_;
uint32_t out_streams_;
gr::blocks::file_source::sptr file_source_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> valve_;
#else
boost::shared_ptr<gr::block> valve_;
#endif
gr::blocks::file_sink::sptr sink_;
gr::blocks::throttle::sptr throttle_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -35,6 +35,10 @@
#include <memory>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -110,7 +114,11 @@ private:
uint32_t in_streams_;
uint32_t out_streams_;
std::vector<gr::blocks::file_source::sptr> file_source_vec_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> valve_;
#else
boost::shared_ptr<gr::block> valve_;
#endif
gr::blocks::file_sink::sptr sink_;
std::vector<gr::blocks::throttle::sptr> throttle_vec_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -34,6 +34,10 @@
#include <pmt/pmt.h>
#include <memory>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -110,7 +114,11 @@ private:
uint32_t out_streams_;
gr::blocks::file_source::sptr file_source_;
unpack_byte_2bit_samples_sptr unpack_byte_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> valve_;
#else
boost::shared_ptr<gr::block> valve_;
#endif
gr::blocks::file_sink::sptr sink_;
gr::blocks::throttle::sptr throttle_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -24,7 +24,6 @@
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "rtl_tcp_signal_source_c.h"
#include <memory>
#include <gnuradio/blocks/deinterleave.h>
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/blocks/float_to_complex.h>
@ -32,6 +31,10 @@
#include <memory>
#include <stdexcept>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -102,7 +105,11 @@ private:
rtl_tcp_signal_source_c_sptr signal_source_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> valve_;
#else
boost::shared_ptr<gr::block> valve_;
#endif
gr::blocks::file_sink::sptr file_sink_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
};

View File

@ -32,6 +32,10 @@
#include <cstdint>
#include <memory>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -108,7 +112,11 @@ private:
unsigned int out_streams_;
gr::blocks::file_source::sptr file_source_;
unpack_intspir_1bit_samples_sptr unpack_intspir_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> valve_;
#else
boost::shared_ptr<gr::block> valve_;
#endif
gr::blocks::file_sink::sptr sink_;
gr::blocks::throttle::sptr throttle_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -37,6 +37,10 @@
#include <memory>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -119,7 +123,11 @@ private:
std::vector<gr::blocks::endian_swap::sptr> endian_vec_;
std::vector<gr::blocks::null_sink::sptr> null_sinks_;
std::vector<unpack_spir_gss6450_samples_sptr> unpack_spir_vec_;
#if GNURADIO_USES_STD_POINTERS
std::vector<std::shared_ptr<gr::block>> valve_vec_;
#else
std::vector<boost::shared_ptr<gr::block>> valve_vec_;
#endif
std::vector<gr::blocks::file_sink::sptr> sink_vec_;
std::vector<gr::blocks::throttle::sptr> throttle_vec_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -35,6 +35,10 @@
#include <cstdint>
#include <memory>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -115,7 +119,11 @@ private:
gr::blocks::file_source::sptr file_source_;
unpack_byte_2bit_cpx_samples_sptr unpack_byte_;
gr::blocks::interleaved_short_to_complex::sptr inter_shorts_to_cpx_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> valve_;
#else
boost::shared_ptr<gr::block> valve_;
#endif
gr::blocks::file_sink::sptr sink_;
gr::blocks::throttle::sptr throttle_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -36,6 +36,10 @@
#include <cstdint>
#include <memory>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -134,7 +138,11 @@ private:
gr::blocks::file_source::sptr file_source_;
unpack_2bit_samples_sptr unpack_samples_;
gr::basic_block_sptr char_to_float_;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<gr::block> valve_;
#else
boost::shared_ptr<gr::block> valve_;
#endif
gr::blocks::file_sink::sptr sink_;
gr::blocks::throttle::sptr throttle_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -22,7 +22,6 @@
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <memory>
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/hier_block2.h>
#include <gnuradio/uhd/usrp_source.h>
@ -31,6 +30,10 @@
#include <memory>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class ConfigurationInterface;
@ -94,8 +97,11 @@ private:
std::vector<uint64_t> samples_;
std::vector<bool> dump_;
std::vector<std::string> dump_filename_;
#if GNURADIO_USES_STD_POINTERS
std::vector<std::shared_ptr<gr::block>> valve_;
#else
std::vector<boost::shared_ptr<gr::block>> valve_;
#endif
std::vector<gr::blocks::file_sink::sptr> file_sink_;
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;

View File

@ -66,6 +66,12 @@ target_include_directories(signal_source_gr_blocks
${CMAKE_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(signal_source_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_RAW_UDP AND PCAP_FOUND)
target_link_libraries(signal_source_gr_blocks
PUBLIC

View File

@ -31,11 +31,20 @@
#include <pcap.h>
#include <string>
#include <sys/ioctl.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Gr_Complex_Ip_Packet_Source : virtual public gr::sync_block
{
public:
#if GNURADIO_USES_STD_POINTERS
typedef std::shared_ptr<Gr_Complex_Ip_Packet_Source> sptr;
#else
typedef boost::shared_ptr<Gr_Complex_Ip_Packet_Source> sptr;
#endif
static sptr make(std::string src_device,
const std::string &origin_address,
int udp_port,

View File

@ -25,13 +25,20 @@
#include <pmt/pmt.h>
#include <cstdint>
#include <fstream>
#include <memory>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class labsat23_source;
#if GNURADIO_USES_STD_POINTERS
using labsat23_source_sptr = std::shared_ptr<labsat23_source>;
#else
using labsat23_source_sptr = boost::shared_ptr<labsat23_source>;
#endif
labsat23_source_sptr labsat23_make_source_sptr(
const char *signal_file_basename,

View File

@ -37,10 +37,19 @@
#include <cstdint>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class rtl_tcp_signal_source_c;
#if GNURADIO_USES_STD_POINTERS
using rtl_tcp_signal_source_c_sptr = std::shared_ptr<rtl_tcp_signal_source_c>;
#else
using rtl_tcp_signal_source_c_sptr = boost::shared_ptr<rtl_tcp_signal_source_c>;
#endif
#if BOOST_GREATER_1_65
using b_io_context = boost::asio::io_context;

View File

@ -60,10 +60,19 @@
#include <gnuradio/sync_interpolator.h>
#include <cstdint>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class unpack_2bit_samples;
#if GNURADIO_USES_STD_POINTERS
using unpack_2bit_samples_sptr = std::shared_ptr<unpack_2bit_samples>;
#else
using unpack_2bit_samples_sptr = boost::shared_ptr<unpack_2bit_samples>;
#endif
unpack_2bit_samples_sptr make_unpack_2bit_samples(
bool big_endian_bytes,

View File

@ -25,10 +25,19 @@
#define GNSS_SDR_UNPACK_BYTE_2BIT_CPX_SAMPLES_H
#include <gnuradio/sync_interpolator.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class unpack_byte_2bit_cpx_samples;
#if GNURADIO_USES_STD_POINTERS
using unpack_byte_2bit_cpx_samples_sptr = std::shared_ptr<unpack_byte_2bit_cpx_samples>;
#else
using unpack_byte_2bit_cpx_samples_sptr = boost::shared_ptr<unpack_byte_2bit_cpx_samples>;
#endif
unpack_byte_2bit_cpx_samples_sptr make_unpack_byte_2bit_cpx_samples();

View File

@ -21,10 +21,19 @@
#define GNSS_SDR_UNPACK_BYTE_2BIT_SAMPLES_H
#include <gnuradio/sync_interpolator.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class unpack_byte_2bit_samples;
#if GNURADIO_USES_STD_POINTERS
using unpack_byte_2bit_samples_sptr = std::shared_ptr<unpack_byte_2bit_samples>;
#else
using unpack_byte_2bit_samples_sptr = boost::shared_ptr<unpack_byte_2bit_samples>;
#endif
unpack_byte_2bit_samples_sptr make_unpack_byte_2bit_samples();

View File

@ -21,10 +21,19 @@
#define GNSS_SDR_UNPACK_INTSPIR_1BIT_SAMPLES_H
#include <gnuradio/sync_interpolator.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class unpack_intspir_1bit_samples;
#if GNURADIO_USES_STD_POINTERS
using unpack_intspir_1bit_samples_sptr = std::shared_ptr<unpack_intspir_1bit_samples>;
#else
using unpack_intspir_1bit_samples_sptr = boost::shared_ptr<unpack_intspir_1bit_samples>;
#endif
unpack_intspir_1bit_samples_sptr make_unpack_intspir_1bit_samples();

View File

@ -22,10 +22,19 @@
#define GNSS_SDR_UNPACK_SPIR_GSS6450_SAMPLES_H
#include <gnuradio/sync_interpolator.h>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class unpack_spir_gss6450_samples;
#if GNURADIO_USES_STD_POINTERS
using unpack_spir_gss6450_samples_sptr = std::shared_ptr<unpack_spir_gss6450_samples>;
#else
using unpack_spir_gss6450_samples_sptr = boost::shared_ptr<unpack_spir_gss6450_samples>;
#endif
unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples(unsigned int adc_nbit_);

View File

@ -55,6 +55,12 @@ target_include_directories(signal_source_libs
${CMAKE_SOURCE_DIR}/src/core/receiver
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(signal_source_libs
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_FMCOMMS2 OR ENABLE_AD9361)
target_link_libraries(signal_source_libs
PUBLIC

View File

@ -43,7 +43,7 @@ Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
d_open_valve = false;
}
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue, bool stop_flowgraph)
{
std::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph));
@ -56,6 +56,20 @@ std::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(size_t sizeof_stream_item, u
std::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), true));
return valve_;
}
#else
boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue, bool stop_flowgraph)
{
boost::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph));
return valve_;
}
boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue)
{
boost::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), true));
return valve_;
}
#endif
void Gnss_Sdr_Valve::open_valve()

View File

@ -24,16 +24,20 @@
#define GNSS_SDR_GNSS_SDR_VALVE_H
#include "concurrent_queue.h"
#include <memory>
#include <gnuradio/sync_block.h> // for sync_block
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <pmt/pmt.h>
#include <cstddef> // for size_t
#include <cstdint>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Gnss_Sdr_Valve;
#if GNURADIO_USES_STD_POINTERS
std::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
size_t sizeof_stream_item,
uint64_t nitems,
@ -44,6 +48,18 @@ std::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
uint64_t nitems,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue,
bool stop_flowgraph);
#else
boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
size_t sizeof_stream_item,
uint64_t nitems,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
size_t sizeof_stream_item,
uint64_t nitems,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue,
bool stop_flowgraph);
#endif
/*!
* \brief Implementation of a GNU Radio block that sends a STOP message to the
@ -59,6 +75,7 @@ public:
gr_vector_void_star &output_items);
private:
#if GNURADIO_USES_STD_POINTERS
friend std::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
size_t sizeof_stream_item,
uint64_t nitems,
@ -69,7 +86,18 @@ private:
uint64_t nitems,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue,
bool stop_flowgraph);
#else
friend boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
size_t sizeof_stream_item,
uint64_t nitems,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
friend boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
size_t sizeof_stream_item,
uint64_t nitems,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue,
bool stop_flowgraph);
#endif
Gnss_Sdr_Valve(size_t sizeof_stream_item,
uint64_t nitems,
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue, bool stop_flowgraph);

View File

@ -53,6 +53,12 @@ target_link_libraries(telemetry_decoder_gr_blocks
Glog::glog
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(telemetry_decoder_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(telemetry_decoder_gr_blocks

View File

@ -26,18 +26,26 @@
#include "beidou_dnav_navigation_message.h"
#include "gnss_satellite.h"
#include <boost/circular_buffer.hpp>
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <array>
#include <cstdint>
#include <fstream>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class beidou_b1i_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using beidou_b1i_telemetry_decoder_gs_sptr = std::shared_ptr<beidou_b1i_telemetry_decoder_gs>;
#else
using beidou_b1i_telemetry_decoder_gs_sptr = boost::shared_ptr<beidou_b1i_telemetry_decoder_gs>;
#endif
beidou_b1i_telemetry_decoder_gs_sptr beidou_b1i_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -23,18 +23,27 @@
#include "beidou_dnav_navigation_message.h"
#include "gnss_satellite.h"
#include <boost/circular_buffer.hpp>
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <array>
#include <cstdint>
#include <fstream>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class beidou_b3i_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using beidou_b3i_telemetry_decoder_gs_sptr =
std::shared_ptr<beidou_b3i_telemetry_decoder_gs>;
#else
using beidou_b3i_telemetry_decoder_gs_sptr =
boost::shared_ptr<beidou_b3i_telemetry_decoder_gs>;
#endif
beidou_b3i_telemetry_decoder_gs_sptr beidou_b3i_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -36,7 +36,7 @@
#include <cstdlib> // for abs
#include <exception> // for exception
#include <iostream> // for cout
#include <memory> // for shared_ptr, make_shared
#include <memory> // for make_shared
#define CRC_ERROR_LIMIT 6

View File

@ -26,7 +26,6 @@
#include "galileo_navigation_message.h"
#include "gnss_satellite.h"
#include <boost/circular_buffer.hpp>
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <array>
@ -34,10 +33,19 @@
#include <fstream>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#include <memory> // for std::shared_ptr
#else
#include <boost/shared_ptr.hpp>
#endif
class galileo_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using galileo_telemetry_decoder_gs_sptr = std::shared_ptr<galileo_telemetry_decoder_gs>;
#else
using galileo_telemetry_decoder_gs_sptr = boost::shared_ptr<galileo_telemetry_decoder_gs>;
#endif
galileo_telemetry_decoder_gs_sptr galileo_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -27,18 +27,26 @@
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include <boost/circular_buffer.hpp>
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <array>
#include <cstdint>
#include <fstream> // for ofstream
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory> // for std::shared_ptr
#else
#include <boost/shared_ptr.hpp>
#endif
class glonass_l1_ca_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using glonass_l1_ca_telemetry_decoder_gs_sptr = std::shared_ptr<glonass_l1_ca_telemetry_decoder_gs>;
#else
using glonass_l1_ca_telemetry_decoder_gs_sptr = boost::shared_ptr<glonass_l1_ca_telemetry_decoder_gs>;
#endif
glonass_l1_ca_telemetry_decoder_gs_sptr glonass_l1_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -26,18 +26,25 @@
#include "gnss_satellite.h"
#include "gnss_synchro.h"
#include <boost/circular_buffer.hpp>
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <array>
#include <cstdint>
#include <fstream>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory> // for std::shared_ptr
#else
#include <boost/shared_ptr.hpp>
#endif
class glonass_l2_ca_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using glonass_l2_ca_telemetry_decoder_gs_sptr = std::shared_ptr<glonass_l2_ca_telemetry_decoder_gs>;
#else
using glonass_l2_ca_telemetry_decoder_gs_sptr = boost::shared_ptr<glonass_l2_ca_telemetry_decoder_gs>;
#endif
glonass_l2_ca_telemetry_decoder_gs_sptr glonass_l2_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -25,18 +25,25 @@
#include "gnss_synchro.h"
#include "gps_navigation_message.h"
#include <boost/circular_buffer.hpp>
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <array> // for array
#include <cstdint> // for int32_t
#include <fstream> // for ofstream
#include <string> // for string
#if GNURADIO_USES_STD_POINTERS
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h> // for block
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <array> // for array
#include <cstdint> // for int32_t
#include <fstream> // for ofstream
#include <string> // for string
#else
#include <boost/shared_ptr.hpp>
#endif
class gps_l1_ca_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using gps_l1_ca_telemetry_decoder_gs_sptr = std::shared_ptr<gps_l1_ca_telemetry_decoder_gs>;
#else
using gps_l1_ca_telemetry_decoder_gs_sptr = boost::shared_ptr<gps_l1_ca_telemetry_decoder_gs>;
#endif
gps_l1_ca_telemetry_decoder_gs_sptr gps_l1_ca_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -26,8 +26,12 @@
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <cstdint>
#include <fstream>
#include <memory> // for std::shared_ptr
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory> // for std::shared_ptr
#else
#include <boost/shared_ptr.hpp>
#endif
extern "C"
{
@ -37,7 +41,11 @@ extern "C"
class gps_l2c_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using gps_l2c_telemetry_decoder_gs_sptr = std::shared_ptr<gps_l2c_telemetry_decoder_gs>;
#else
using gps_l2c_telemetry_decoder_gs_sptr = boost::shared_ptr<gps_l2c_telemetry_decoder_gs>;
#endif
gps_l2c_telemetry_decoder_gs_sptr gps_l2c_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -24,12 +24,16 @@
#include "gnss_satellite.h" // for Gnss_Satellite
#include "gps_cnav_navigation_message.h" // for Gps_CNAV_Navigation_Message
#include <boost/circular_buffer.hpp>
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <cstdint>
#include <fstream>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory> // for std::shared_ptr
#else
#include <boost/shared_ptr.hpp>
#endif
extern "C"
{
@ -39,7 +43,11 @@ extern "C"
class gps_l5_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using gps_l5_telemetry_decoder_gs_sptr = std::shared_ptr<gps_l5_telemetry_decoder_gs>;
#else
using gps_l5_telemetry_decoder_gs_sptr = boost::shared_ptr<gps_l5_telemetry_decoder_gs>;
#endif
gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -29,16 +29,24 @@
#include <cstdint>
#include <deque>
#include <fstream>
#include <memory>
#include <string>
#include <utility> // for pair
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#include <memory> // for std::shared_ptr
#else
#include <boost/shared_ptr.hpp>
#endif
class Viterbi_Decoder;
class sbas_l1_telemetry_decoder_gs;
#if GNURADIO_USES_STD_POINTERS
using sbas_l1_telemetry_decoder_gs_sptr = std::shared_ptr<sbas_l1_telemetry_decoder_gs>;
#else
using sbas_l1_telemetry_decoder_gs_sptr = boost::shared_ptr<sbas_l1_telemetry_decoder_gs>;
#endif
sbas_l1_telemetry_decoder_gs_sptr sbas_l1_make_telemetry_decoder_gs(
const Gnss_Satellite &satellite,

View File

@ -92,6 +92,12 @@ target_link_libraries(tracking_gr_blocks
Glog::glog
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(tracking_gr_blocks
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CUDA AND NOT CMAKE_VERSION VERSION_GREATER 3.11)
target_link_libraries(tracking_gr_blocks
PUBLIC

View File

@ -27,7 +27,6 @@
#include "tracking_FLL_PLL_filter.h" // for PLL/FLL filter
#include "tracking_loop_filter.h" // for DLL filter
#include <boost/circular_buffer.hpp>
#include <memory> // for std::shared_ptr
#include <gnuradio/block.h> // for block
#include <gnuradio/gr_complex.h> // for gr_complex
#include <gnuradio/types.h> // for gr_vector_int, gr_vector...
@ -37,11 +36,21 @@
#include <fstream> // for string, ofstream
#include <string>
#include <utility> // for pair
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Gnss_Synchro;
class dll_pll_veml_tracking;
#if GNURADIO_USES_STD_POINTERS
using dll_pll_veml_tracking_sptr = std::shared_ptr<dll_pll_veml_tracking>;
#else
using dll_pll_veml_tracking_sptr = boost::shared_ptr<dll_pll_veml_tracking>;
#endif
dll_pll_veml_tracking_sptr dll_pll_veml_make_tracking(const Dll_Pll_Conf &conf_);

View File

@ -37,12 +37,20 @@
#include <memory>
#include <string>
#include <utility> // for pair
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class Fpga_Multicorrelator_8sc;
class Gnss_Synchro;
class dll_pll_veml_tracking_fpga;
#if GNURADIO_USES_STD_POINTERS
using dll_pll_veml_tracking_fpga_sptr = std::shared_ptr<dll_pll_veml_tracking_fpga>;
#else
using dll_pll_veml_tracking_fpga_sptr = boost::shared_ptr<dll_pll_veml_tracking_fpga>;
#endif
dll_pll_veml_tracking_fpga_sptr dll_pll_veml_make_tracking_fpga(const Dll_Pll_Conf_Fpga &conf_);

View File

@ -36,11 +36,20 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Galileo_E1_Tcp_Connector_Tracking_cc;
#if GNURADIO_USES_STD_POINTERS
using galileo_e1_tcp_connector_tracking_cc_sptr = std::shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc>;
#else
using galileo_e1_tcp_connector_tracking_cc_sptr = boost::shared_ptr<Galileo_E1_Tcp_Connector_Tracking_cc>;
#endif
galileo_e1_tcp_connector_tracking_cc_sptr
galileo_e1_tcp_connector_make_tracking_cc(

View File

@ -40,11 +40,20 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class glonass_l1_ca_dll_pll_c_aid_tracking_cc;
#if GNURADIO_USES_STD_POINTERS
using glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr = std::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_cc>;
#else
using glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_cc>;
#endif
glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr
glonass_l1_ca_dll_pll_c_aid_make_tracking_cc(

View File

@ -40,10 +40,19 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class glonass_l1_ca_dll_pll_c_aid_tracking_sc;
#if GNURADIO_USES_STD_POINTERS
using glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr = std::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_sc>;
#else
using glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<glonass_l1_ca_dll_pll_c_aid_tracking_sc>;
#endif
glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr
glonass_l1_ca_dll_pll_c_aid_make_tracking_sc(

View File

@ -37,10 +37,19 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Glonass_L1_Ca_Dll_Pll_Tracking_cc;
#if GNURADIO_USES_STD_POINTERS
using glonass_l1_ca_dll_pll_tracking_cc_sptr = std::shared_ptr<Glonass_L1_Ca_Dll_Pll_Tracking_cc>;
#else
using glonass_l1_ca_dll_pll_tracking_cc_sptr = boost::shared_ptr<Glonass_L1_Ca_Dll_Pll_Tracking_cc>;
#endif
glonass_l1_ca_dll_pll_tracking_cc_sptr
glonass_l1_ca_dll_pll_make_tracking_cc(

View File

@ -37,10 +37,19 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class glonass_l2_ca_dll_pll_c_aid_tracking_cc;
#if GNURADIO_USES_STD_POINTERS
using glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr = std::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_cc>;
#else
using glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr = boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_cc>;
#endif
glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr
glonass_l2_ca_dll_pll_c_aid_make_tracking_cc(

View File

@ -37,10 +37,20 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class glonass_l2_ca_dll_pll_c_aid_tracking_sc;
#if GNURADIO_USES_STD_POINTERS
using glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr = std::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_sc>;
#else
using glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr = boost::shared_ptr<glonass_l2_ca_dll_pll_c_aid_tracking_sc>;
#endif
glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr
glonass_l2_ca_dll_pll_c_aid_make_tracking_sc(

View File

@ -35,10 +35,19 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Glonass_L2_Ca_Dll_Pll_Tracking_cc;
#if GNURADIO_USES_STD_POINTERS
using glonass_l2_ca_dll_pll_tracking_cc_sptr = std::shared_ptr<Glonass_L2_Ca_Dll_Pll_Tracking_cc>;
#else
using glonass_l2_ca_dll_pll_tracking_cc_sptr = boost::shared_ptr<Glonass_L2_Ca_Dll_Pll_Tracking_cc>;
#endif
glonass_l2_ca_dll_pll_tracking_cc_sptr
glonass_l2_ca_dll_pll_make_tracking_cc(

View File

@ -44,10 +44,19 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Gps_L1_Ca_Kf_Tracking_cc;
#if GNURADIO_USES_STD_POINTERS
using gps_l1_ca_kf_tracking_cc_sptr = std::shared_ptr<Gps_L1_Ca_Kf_Tracking_cc>;
#else
using gps_l1_ca_kf_tracking_cc_sptr = boost::shared_ptr<Gps_L1_Ca_Kf_Tracking_cc>;
#endif
gps_l1_ca_kf_tracking_cc_sptr
gps_l1_ca_kf_make_tracking_cc(uint32_t order,

View File

@ -34,11 +34,20 @@
#include <fstream>
#include <map>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class Gps_L1_Ca_Tcp_Connector_Tracking_cc;
#if GNURADIO_USES_STD_POINTERS
using gps_l1_ca_tcp_connector_tracking_cc_sptr = std::shared_ptr<Gps_L1_Ca_Tcp_Connector_Tracking_cc>;
#else
using gps_l1_ca_tcp_connector_tracking_cc_sptr = boost::shared_ptr<Gps_L1_Ca_Tcp_Connector_Tracking_cc>;
#endif
gps_l1_ca_tcp_connector_tracking_cc_sptr
gps_l1_ca_tcp_connector_make_tracking_cc(

View File

@ -65,6 +65,11 @@ target_link_libraries(core_libs
Pugixml::pugixml
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(core_libs
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)

View File

@ -26,10 +26,18 @@
#include <pmt/pmt.h>
#include <map>
#include <memory>
#if GNURADIO_USES_STD_POINTERS
#else
#include <boost/shared_ptr.hpp>
#endif
class channel_status_msg_receiver;
#if GNURADIO_USES_STD_POINTERS
using channel_status_msg_receiver_sptr = std::shared_ptr<channel_status_msg_receiver>;
#else
using channel_status_msg_receiver_sptr = boost::shared_ptr<channel_status_msg_receiver>;
#endif
channel_status_msg_receiver_sptr channel_status_msg_receiver_make();

View File

@ -22,15 +22,23 @@
#ifndef GNSS_SDR_GNSS_SDR_FPGA_SAMPLE_COUNTER_H
#define GNSS_SDR_GNSS_SDR_FPGA_SAMPLE_COUNTER_H
#include <memory>
#include <gnuradio/block.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <cstdint>
#include <string>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class gnss_sdr_fpga_sample_counter;
#if GNURADIO_USES_STD_POINTERS
using gnss_sdr_fpga_sample_counter_sptr = std::shared_ptr<gnss_sdr_fpga_sample_counter>;
#else
using gnss_sdr_fpga_sample_counter_sptr = boost::shared_ptr<gnss_sdr_fpga_sample_counter>;
#endif
gnss_sdr_fpga_sample_counter_sptr gnss_sdr_make_fpga_sample_counter(double _fs, int32_t _interval_ms);

View File

@ -21,16 +21,23 @@
#ifndef GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H
#define GNSS_SDR_GNSS_SDR_SAMPLE_COUNTER_H
#include <memory>
#include <gnuradio/sync_decimator.h>
#include <gnuradio/types.h> // for gr_vector_const_void_star
#include <cstddef> // for size_t
#include <cstdint>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class gnss_sdr_sample_counter;
#if GNURADIO_USES_STD_POINTERS
using gnss_sdr_sample_counter_sptr = std::shared_ptr<gnss_sdr_sample_counter>;
#else
using gnss_sdr_sample_counter_sptr = boost::shared_ptr<gnss_sdr_sample_counter>;
#endif
gnss_sdr_sample_counter_sptr gnss_sdr_make_sample_counter(
double _fs,

View File

@ -51,6 +51,11 @@ target_include_directories(core_monitor
${PROTO_INCLUDE_HEADERS}
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(core_monitor
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(Boost_VERSION_STRING VERSION_GREATER 1.65.99)
target_compile_definitions(core_monitor

View File

@ -24,17 +24,24 @@
#define GNSS_SDR_GNSS_SYNCHRO_MONITOR_H
#include "gnss_synchro_udp_sink.h"
#include <memory>
#include <gnuradio/runtime_types.h> // for gr_vector_void_star
#include <gnuradio/sync_block.h>
#include <memory>
#include <string>
#include <vector>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
class gnss_synchro_monitor;
#if GNURADIO_USES_STD_POINTERS
using gnss_synchro_monitor_sptr = std::shared_ptr<gnss_synchro_monitor>;
#else
using gnss_synchro_monitor_sptr = boost::shared_ptr<gnss_synchro_monitor>;
#endif
gnss_synchro_monitor_sptr gnss_synchro_make_monitor(unsigned int n_channels,
int decimation_factor,

View File

@ -497,6 +497,11 @@ if(ENABLE_UNIT_TESTING)
core_receiver
core_system_parameters
)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(run_tests
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_UNIT_TESTING_EXTRA)
target_link_libraries(run_tests PUBLIC Gpstk::gpstk)
endif()
@ -610,6 +615,11 @@ function(add_system_test executable)
target_include_directories(${executable} PUBLIC ${OPT_INCLUDES_} ${CMAKE_SOURCE_DIR}/src/algorithms/libs)
target_link_libraries(${executable} PUBLIC ${OPT_LIBS_} algorithms_libs)
if(GNURADIO_USES_STD_POINTERS)
target_compile_definitions(${executable}
PUBLIC -DGNURADIO_USES_STD_POINTERS=1
)
endif()
if(ENABLE_INSTALL_TESTS)
if(EXISTS ${CMAKE_SOURCE_DIR}/install/${executable})

View File

@ -44,6 +44,11 @@
#include <pmt/pmt.h>
#include <thread>
#include <utility>
#if GNURADIO_USES_STD_POINTERS
#include <memory>
#else
#include <boost/shared_ptr.hpp>
#endif
#if HAS_STD_FILESYSTEM
#include <system_error>
@ -100,7 +105,11 @@ DEFINE_bool(acq_test_dump, false, "Dump the results of an acquisition block into
// ######## GNURADIO BLOCK MESSAGE RECEVER #########
class AcqPerfTest_msg_rx;
#if GNURADIO_USES_STD_POINTERS
using AcqPerfTest_msg_rx_sptr = std::shared_ptr<AcqPerfTest_msg_rx>;
#else
using AcqPerfTest_msg_rx_sptr = boost::shared_ptr<AcqPerfTest_msg_rx>;
#endif
AcqPerfTest_msg_rx_sptr AcqPerfTest_msg_rx_make(Concurrent_Queue<int>& queue);
@ -577,7 +586,7 @@ int AcquisitionPerformanceTest::run_receiver()
gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex = gr::blocks::interleaved_char_to_complex::make();
top_block = gr::make_top_block("Acquisition test");
std::shared_ptr<AcqPerfTest_msg_rx> msg_rx = AcqPerfTest_msg_rx_make(channel_internal_queue);
auto 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 = std::make_shared<Concurrent_Queue<pmt::pmt_t>>();
@ -585,7 +594,7 @@ int AcquisitionPerformanceTest::run_receiver()
init();
int nsamples = floor(config->property("GNSS-SDR.internal_fs_sps", 2000000) * generated_signal_duration_s);
std::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
auto valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
if (implementation == "GPS_L1_CA_PCPS_Acquisition")
{
acquisition = std::make_shared<GpsL1CaPcpsAcquisition>(config.get(), "Acquisition", 1, 0);

View File

@ -260,8 +260,8 @@ TEST_F(BeidouB1iPcpsAcquisitionTest, ConnectAndRun)
ASSERT_NO_THROW({
acquisition->connect(top_block);
std::shared_ptr<gr::analog::sig_source_c> source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000, 1, gr_complex(0));
std::shared_ptr<gr::block> valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
auto source = gr::analog::sig_source_c::make(fs_in, gr::analog::GR_SIN_WAVE, 1000, 1, gr_complex(0));
auto valve = gnss_sdr_make_valve(sizeof(gr_complex), nsamples, queue);
top_block->connect(source, 0, valve, 0);
top_block->connect(valve, 0, acquisition->get_left_block(), 0);
top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));

Some files were not shown because too many files have changed in this diff Show More