mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-27 21:47:39 +00:00
Partial implementation of the new event queue and its dependencies. Still NOT usable
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
|
||||
Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./data/signal_source.dat";
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
#ifndef GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "fpga_switch.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -46,7 +47,7 @@ class Ad9361FpgaSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
Ad9361FpgaSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
~Ad9361FpgaSignalSource();
|
||||
|
||||
@@ -112,7 +113,7 @@ private:
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
|
||||
std::shared_ptr<Fpga_Switch> switch_fpga;
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
// DUMP PARAMETERS
|
||||
std::string empty = "";
|
||||
|
||||
@@ -32,12 +32,13 @@
|
||||
#ifndef GNSS_SDR_CUSTOM_UDP_SIGNAL_SOURCE_H
|
||||
#define GNSS_SDR_CUSTOM_UDP_SIGNAL_SOURCE_H
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "gr_complex_ip_packet_source.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -54,7 +55,7 @@ class CustomUDPSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
CustomUDPSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~CustomUDPSignalSource();
|
||||
|
||||
@@ -98,7 +99,7 @@ private:
|
||||
std::vector<boost::shared_ptr<gr::block>> null_sinks_;
|
||||
Gr_Complex_Ip_Packet_Source::sptr udp_gnss_rx_source_;
|
||||
std::vector<boost::shared_ptr<gr::block>> file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_CUSTOM_UDP_SIGNAL_SOURCE_H */
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_filename = "./example_capture.dat";
|
||||
std::string default_item_type = "short";
|
||||
|
||||
@@ -35,13 +35,15 @@
|
||||
#ifndef GNSS_SDR_FILE_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_FILE_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/throttle.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -55,7 +57,7 @@ class FileSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
FileSignalSource(ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~FileSignalSource();
|
||||
|
||||
@@ -122,7 +124,7 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
size_t item_size_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <teleorbit/frontend.h>
|
||||
#include <utility>
|
||||
|
||||
@@ -43,10 +42,10 @@ FlexibandSignalSource::FlexibandSignalSource(ConfigurationInterface* configurati
|
||||
const std::string& role,
|
||||
unsigned int in_stream,
|
||||
unsigned int out_stream,
|
||||
gr::msg_queue::sptr queue) : role_(role),
|
||||
in_stream_(in_stream),
|
||||
out_stream_(out_stream),
|
||||
queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role),
|
||||
in_stream_(in_stream),
|
||||
out_stream_(out_stream),
|
||||
queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "byte";
|
||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||
|
||||
@@ -34,13 +34,14 @@
|
||||
#ifndef GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/char_to_float.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -56,7 +57,7 @@ class FlexibandSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
FlexibandSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, gr::msg_queue::sptr queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~FlexibandSignalSource();
|
||||
|
||||
@@ -109,7 +110,7 @@ private:
|
||||
std::vector<boost::shared_ptr<gr::block>> float_to_complex_;
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sinks_;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H_
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./data/signal_source.dat";
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
#else
|
||||
#include <iio/fmcomms2_source.h>
|
||||
#endif
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include "concurrent_queue.h"
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -51,7 +52,7 @@ class Fmcomms2SignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
Fmcomms2SignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~Fmcomms2SignalSource();
|
||||
|
||||
@@ -122,7 +123,7 @@ private:
|
||||
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H_*/
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
// Constructor
|
||||
GenSignalSource::GenSignalSource(GNSSBlockInterface *signal_generator, GNSSBlockInterface *filter,
|
||||
std::string role, boost::shared_ptr<gr::msg_queue> queue) : signal_generator_(signal_generator),
|
||||
std::string role, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : signal_generator_(signal_generator),
|
||||
filter_(filter),
|
||||
role_(std::move(role)),
|
||||
queue_(std::move(queue))
|
||||
|
||||
@@ -34,8 +34,9 @@
|
||||
#define GNSS_SDR_GEN_SIGNAL_SOURCE_H_
|
||||
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
|
||||
/*!
|
||||
@@ -47,7 +48,7 @@ class GenSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
//! Constructor
|
||||
GenSignalSource(GNSSBlockInterface *signal_generator, GNSSBlockInterface *filter,
|
||||
std::string role, boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::string role, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
//! Virtual destructor
|
||||
virtual ~GenSignalSource();
|
||||
@@ -58,20 +59,17 @@ public:
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
inline std::string role() override { return role_; }
|
||||
|
||||
//! Returns "Signal Source"
|
||||
inline std::string implementation() override { return "Signal Source"; }
|
||||
inline size_t item_size() override { return 0; }
|
||||
|
||||
inline GNSSBlockInterface *signal_generator() const { return signal_generator_; }
|
||||
|
||||
private:
|
||||
GNSSBlockInterface *signal_generator_;
|
||||
GNSSBlockInterface *filter_;
|
||||
std::string role_;
|
||||
std::string implementation_;
|
||||
bool connected_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_GEN_SIGNAL_SOURCE_H*/
|
||||
|
||||
@@ -32,12 +32,11 @@
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gn3s/gn3s_source_cc.h>
|
||||
|
||||
|
||||
Gn3sSignalSource::Gn3sSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
{
|
||||
std::string default_item_type = "short";
|
||||
std::string default_dump_file = "./data/gn3s_source.dat";
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
#ifndef GNSS_SDR_GN3S_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_GN3S_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -49,7 +50,7 @@ class Gn3sSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
Gn3sSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
unsigned int out_stream, gr::msg_queue::sptr queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~Gn3sSignalSource();
|
||||
|
||||
@@ -87,7 +88,7 @@ private:
|
||||
std::string dump_filename_;
|
||||
gr::block_sptr gn3s_source_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_GN3S_SIGNAL_SOURCE_H_*/
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
|
||||
LabsatSignalSource::LabsatSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./labsat_output.dat";
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
#ifndef GNSS_SDR_LABSAT_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_LABSAT_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -48,7 +49,7 @@ class LabsatSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
LabsatSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, gr::msg_queue::sptr queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~LabsatSignalSource();
|
||||
|
||||
@@ -86,7 +87,7 @@ private:
|
||||
std::string dump_filename_;
|
||||
gr::block_sptr labsat23_source_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_LABSAT_SIGNAL_SOURCE_H_*/
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
MultichannelFileSignalSource::MultichannelFileSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_filename = "./example_capture.dat";
|
||||
std::string default_item_type = "short";
|
||||
|
||||
@@ -35,12 +35,13 @@
|
||||
#ifndef GNSS_SDR_MULTICHANNEL_FILE_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_MULTICHANNEL_FILE_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/throttle.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -56,7 +57,7 @@ class MultichannelFileSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
MultichannelFileSignalSource(ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~MultichannelFileSignalSource();
|
||||
|
||||
@@ -122,7 +123,7 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
std::vector<gr::blocks::throttle::sptr> throttle_vec_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
size_t item_size_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_filename = "../data/my_capture.dat";
|
||||
std::string default_item_type = "byte";
|
||||
|
||||
@@ -35,13 +35,14 @@
|
||||
#ifndef GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "unpack_byte_2bit_samples.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/throttle.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -55,7 +56,7 @@ class NsrFileSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
NsrFileSignalSource(ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~NsrFileSignalSource();
|
||||
inline std::string role() override
|
||||
@@ -122,7 +123,7 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
size_t item_size_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
// DUMP PARAMETERS
|
||||
std::string empty = "";
|
||||
|
||||
@@ -33,10 +33,11 @@
|
||||
#ifndef GNSS_SDR_OSMOSDR_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_OSMOSDR_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <osmosdr/source.h>
|
||||
#include <stdexcept>
|
||||
@@ -54,7 +55,7 @@ class OsmosdrSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~OsmosdrSignalSource();
|
||||
|
||||
@@ -110,7 +111,7 @@ private:
|
||||
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_OSMOSDR_SIGNAL_SOURCE_H_*/
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./data/signal_source.dat";
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
#else
|
||||
#include <iio/pluto_source.h>
|
||||
#endif
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include "concurrent_queue.h"
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -53,7 +54,7 @@ class PlutosdrSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
PlutosdrSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~PlutosdrSignalSource();
|
||||
|
||||
@@ -109,7 +110,7 @@ private:
|
||||
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H_*/
|
||||
|
||||
@@ -29,15 +29,16 @@
|
||||
*/
|
||||
|
||||
#include "raw_array_signal_source.h"
|
||||
#include "concurrent_queue.h"
|
||||
#include "configuration_interface.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <dbfcttc/raw_array.h>
|
||||
|
||||
|
||||
RawArraySignalSource::RawArraySignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./data/raw_array_source.dat";
|
||||
|
||||
@@ -32,10 +32,11 @@
|
||||
#ifndef GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <string>
|
||||
|
||||
class ConfigurationInterface;
|
||||
@@ -48,7 +49,7 @@ class RawArraySignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
RawArraySignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
unsigned int out_stream, gr::msg_queue::sptr queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~RawArraySignalSource();
|
||||
|
||||
@@ -87,7 +88,7 @@ private:
|
||||
std::string eth_device_;
|
||||
gr::block_sptr raw_array_source_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H_*/
|
||||
|
||||
@@ -45,7 +45,7 @@ RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role,
|
||||
unsigned int in_stream,
|
||||
unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role),
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role),
|
||||
in_stream_(in_stream),
|
||||
out_stream_(out_stream),
|
||||
queue_(std::move(queue))
|
||||
|
||||
@@ -32,13 +32,14 @@
|
||||
#ifndef GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H
|
||||
#define GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "rtl_tcp_signal_source_c.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/blocks/deinterleave.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/float_to_complex.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
@@ -57,7 +58,7 @@ public:
|
||||
const std::string& role,
|
||||
unsigned int in_stream,
|
||||
unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~RtlTcpSignalSource();
|
||||
|
||||
@@ -113,7 +114,7 @@ private:
|
||||
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H */
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_filename = "../data/my_capture.dat";
|
||||
std::string default_item_type = "int";
|
||||
|
||||
@@ -32,13 +32,14 @@
|
||||
#ifndef GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "unpack_intspir_1bit_samples.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/blocks/file_source.h>
|
||||
#include <gnuradio/blocks/throttle.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -53,7 +54,7 @@ class SpirFileSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
SpirFileSignalSource(ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~SpirFileSignalSource();
|
||||
inline std::string role() override
|
||||
@@ -120,7 +121,7 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
size_t item_size_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, uint32_t in_streams, uint32_t out_streams, gr::msg_queue::sptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
const std::string& role, uint32_t in_streams, uint32_t out_streams, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_filename = "../data/my_capture.dat";
|
||||
std::string default_dump_filename = "../data/my_capture_dump.dat";
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#ifndef GNSS_SDR_SPIR_GSS6450_FILE_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_SPIR_GSS6450_FILE_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "gnss_sdr_valve.h"
|
||||
#include "unpack_spir_gss6450_samples.h"
|
||||
@@ -42,7 +43,7 @@
|
||||
#include <gnuradio/blocks/null_sink.h>
|
||||
#include <gnuradio/blocks/throttle.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -58,7 +59,7 @@ class SpirGSS6450FileSignalSource : public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
SpirGSS6450FileSignalSource(ConfigurationInterface* configuration, const std::string& role,
|
||||
uint32_t in_streams, uint32_t out_streams, gr::msg_queue::sptr queue);
|
||||
uint32_t in_streams, uint32_t out_streams, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~SpirGSS6450FileSignalSource();
|
||||
inline std::string role() override
|
||||
@@ -131,7 +132,7 @@ private:
|
||||
std::vector<boost::shared_ptr<gr::block>> valve_vec_;
|
||||
std::vector<gr::blocks::file_sink::sptr> sink_vec_;
|
||||
std::vector<gr::blocks::throttle::sptr> throttle_vec_;
|
||||
gr::msg_queue::sptr queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
size_t item_size_;
|
||||
};
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role),
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams),
|
||||
queue_(std::move(queue))
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#ifndef GNSS_SDR_TWO_BIT_CPX_FILE_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_TWO_BIT_CPX_FILE_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "unpack_byte_2bit_cpx_samples.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
@@ -41,7 +42,7 @@
|
||||
#include <gnuradio/blocks/interleaved_short_to_complex.h>
|
||||
#include <gnuradio/blocks/throttle.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~TwoBitCpxFileSignalSource();
|
||||
inline std::string role() override
|
||||
@@ -127,7 +128,7 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
size_t item_size_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
|
||||
@@ -47,7 +47,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role),
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role),
|
||||
in_streams_(in_streams),
|
||||
out_streams_(out_streams),
|
||||
queue_(std::move(queue))
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#ifndef GNSS_SDR_TWO_BIT_PACKED_FILE_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_TWO_BIT_PACKED_FILE_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include "unpack_2bit_samples.h"
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
@@ -42,7 +43,7 @@
|
||||
#include <gnuradio/blocks/interleaved_char_to_complex.h>
|
||||
#include <gnuradio/blocks/throttle.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -58,7 +59,7 @@ class TwoBitPackedFileSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
TwoBitPackedFileSignalSource(ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~TwoBitPackedFileSignalSource();
|
||||
inline std::string role() override
|
||||
@@ -146,7 +147,7 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
size_t item_size_;
|
||||
bool big_endian_items_;
|
||||
bool big_endian_bytes_;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
// DUMP PARAMETERS
|
||||
std::string empty = "";
|
||||
|
||||
@@ -31,12 +31,13 @@
|
||||
#ifndef GNSS_SDR_UHD_SIGNAL_SOURCE_H_
|
||||
#define GNSS_SDR_UHD_SIGNAL_SOURCE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include "gnss_block_interface.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <gnuradio/msg_queue.h>
|
||||
#include <gnuradio/uhd/usrp_source.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -52,7 +53,7 @@ class UhdSignalSource : public GNSSBlockInterface
|
||||
public:
|
||||
UhdSignalSource(ConfigurationInterface* configuration,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
unsigned int out_stream, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
virtual ~UhdSignalSource();
|
||||
|
||||
@@ -107,7 +108,7 @@ private:
|
||||
std::vector<boost::shared_ptr<gr::block>> valve_;
|
||||
std::vector<gr::blocks::file_sink::sptr> file_sink_;
|
||||
|
||||
boost::shared_ptr<gr::msg_queue> queue_;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue_;
|
||||
};
|
||||
|
||||
#endif /*GNSS_SDR_UHD_SIGNAL_SOURCE_H_*/
|
||||
|
||||
Reference in New Issue
Block a user