From cd3be227984480232b25f9a22330251aef795cb8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 12 Aug 2022 20:09:11 +0200 Subject: [PATCH] Fix error with C++14 (invalid conversion from const char* to char*) --- .../signal_source/adapters/zmq_signal_source.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/algorithms/signal_source/adapters/zmq_signal_source.cc b/src/algorithms/signal_source/adapters/zmq_signal_source.cc index e87064ff2..a9cab6540 100644 --- a/src/algorithms/signal_source/adapters/zmq_signal_source.cc +++ b/src/algorithms/signal_source/adapters/zmq_signal_source.cc @@ -18,6 +18,7 @@ #include "configuration_interface.h" #include "gnss_sdr_string_literals.h" #include +#include using namespace std::string_literals; @@ -38,11 +39,12 @@ ZmqSignalSource::ZmqSignalSource(const ConfigurationInterface* configuration, auto property = role + ".endpoint"s; auto endpoint = configuration->property(property, ""s); + std::vector address(endpoint.c_str(), endpoint.c_str() + endpoint.size() + 1); - if (not endpoint.empty()) + if (!endpoint.empty()) { LOG(INFO) << "Connecting to ZMQ pub at " << endpoint; - d_source_block = gr::zeromq::sub_source::make(d_item_size, vlen, endpoint.data(), timeout_ms, pass_tags, hwm); + d_source_block = gr::zeromq::sub_source::make(d_item_size, vlen, address.data(), timeout_ms, pass_tags, hwm); } else { @@ -54,6 +56,7 @@ ZmqSignalSource::ZmqSignalSource(const ConfigurationInterface* configuration, auto ZmqSignalSource::item_size() -> size_t { return d_item_size; } + auto ZmqSignalSource::connect(gr::top_block_sptr top_block) -> void { if (d_dump) @@ -63,6 +66,7 @@ auto ZmqSignalSource::connect(gr::top_block_sptr top_block) -> void } } + auto ZmqSignalSource::disconnect(gr::top_block_sptr top_block) -> void { if (d_dump) @@ -71,6 +75,7 @@ auto ZmqSignalSource::disconnect(gr::top_block_sptr top_block) -> void } } + auto ZmqSignalSource::get_right_block() -> gr::basic_block_sptr { return d_source_block;