mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2026-05-01 03:01:24 +00:00
Switch to GNU Radio 3.7.x API
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@368 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
@@ -23,10 +23,9 @@ include_directories(
|
||||
$(CMAKE_CURRENT_SOURCE_DIR)
|
||||
${CMAKE_SOURCE_DIR}/src/core/system_parameters
|
||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||
${GNURADIO_CORE_INCLUDE_DIRS}
|
||||
${GNURADIO_GRUEL_INCLUDE_DIRS}
|
||||
${GR_BLOCKS_INCLUDE_DIRS}
|
||||
${GLOG_INCLUDE_DIRS}
|
||||
${GNURADIO_RUNTIME_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
add_library(datatype_adapters ${DATATYPE_ADAPTER_SOURCES})
|
||||
target_link_libraries(datatype_adapters ${GR_FILTER_LIBRARIES} ${GR_BLOCKS_LIBRARIES})
|
||||
target_link_libraries(datatype_adapters ${GNURADIO_FILTER_LIBRARIES} ${GNURADIO_BLOCKS_LIBRARIES})
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "ishort_to_complex.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <gnuradio/gr_io_signature.h>
|
||||
#include <gnuradio/gr_file_sink.h>
|
||||
#include <glog/log_severity.h>
|
||||
#include <glog/logging.h>
|
||||
|
||||
@@ -39,7 +37,7 @@ using google::LogMessage;
|
||||
|
||||
IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
gr_msg_queue_sptr queue) :
|
||||
boost::shared_ptr<gr::msg_queue> queue) :
|
||||
config_(configuration), role_(role), in_streams_(in_streams),
|
||||
out_streams_(out_streams), queue_(queue)
|
||||
{
|
||||
@@ -51,13 +49,13 @@ IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::str
|
||||
DLOG(INFO) << "role " << role_;
|
||||
|
||||
input_item_type_ = config_->property(role_ + ".input_item_type",
|
||||
default_input_item_type);
|
||||
default_input_item_type);
|
||||
|
||||
dump_ = config_->property(role_ + ".dump", false);
|
||||
dump_filename_ = config_->property(role_ + ".dump_filename",
|
||||
default_dump_filename);
|
||||
default_dump_filename);
|
||||
|
||||
size_t item_size=sizeof(gr_complex);
|
||||
size_t item_size = sizeof(gr_complex);
|
||||
|
||||
gr_interleaved_short_to_complex_ = gr::blocks::interleaved_short_to_complex::make();
|
||||
|
||||
@@ -66,7 +64,7 @@ IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::str
|
||||
if (dump_)
|
||||
{
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr_make_file_sink(item_size, dump_filename_.c_str());
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -76,7 +74,7 @@ IshortToComplex::~IshortToComplex()
|
||||
{}
|
||||
|
||||
|
||||
void IshortToComplex::connect(gr_top_block_sptr top_block)
|
||||
void IshortToComplex::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (dump_)
|
||||
{
|
||||
@@ -89,7 +87,7 @@ void IshortToComplex::connect(gr_top_block_sptr top_block)
|
||||
}
|
||||
|
||||
|
||||
void IshortToComplex::disconnect(gr_top_block_sptr top_block)
|
||||
void IshortToComplex::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (dump_)
|
||||
{
|
||||
@@ -99,14 +97,14 @@ void IshortToComplex::disconnect(gr_top_block_sptr top_block)
|
||||
|
||||
|
||||
|
||||
gr_basic_block_sptr IshortToComplex::get_left_block()
|
||||
gr::basic_block_sptr IshortToComplex::get_left_block()
|
||||
{
|
||||
return gr_interleaved_short_to_complex_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
gr_basic_block_sptr IshortToComplex::get_right_block()
|
||||
gr::basic_block_sptr IshortToComplex::get_right_block()
|
||||
{
|
||||
return gr_interleaved_short_to_complex_;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/interleaved_short_to_complex.h>
|
||||
#include <gnuradio/gr_msg_queue.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
|
||||
class ConfigurationInterface;
|
||||
|
||||
@@ -47,7 +48,7 @@ class IshortToComplex: public GNSSBlockInterface
|
||||
public:
|
||||
IshortToComplex(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams,
|
||||
unsigned int out_streams, gr_msg_queue_sptr queue);
|
||||
unsigned int out_streams, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
virtual ~IshortToComplex();
|
||||
|
||||
@@ -65,10 +66,10 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void connect(gr_top_block_sptr top_block);
|
||||
void disconnect(gr_top_block_sptr top_block);
|
||||
gr_basic_block_sptr get_left_block();
|
||||
gr_basic_block_sptr get_right_block();
|
||||
void connect(gr::top_block_sptr top_block);
|
||||
void disconnect(gr::top_block_sptr top_block);
|
||||
gr::basic_block_sptr get_left_block();
|
||||
gr::basic_block_sptr get_right_block();
|
||||
|
||||
private:
|
||||
gr::blocks::interleaved_short_to_complex::sptr gr_interleaved_short_to_complex_;
|
||||
@@ -80,8 +81,8 @@ private:
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
gr_msg_queue_sptr queue_;
|
||||
gr_block_sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user