mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-07 02:33:03 +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_*/
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
|
||||
|
||||
#include "labsat23_source.h"
|
||||
#include "control_message_factory.h"
|
||||
#include "command_event.h"
|
||||
#include <boost/any.hpp>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <array>
|
||||
#include <exception>
|
||||
@@ -39,7 +40,7 @@
|
||||
#include <utility>
|
||||
|
||||
|
||||
labsat23_source_sptr labsat23_make_source_sptr(const char *signal_file_basename, int channel_selector, gr::msg_queue::sptr queue)
|
||||
labsat23_source_sptr labsat23_make_source_sptr(const char *signal_file_basename, int channel_selector, std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue)
|
||||
{
|
||||
return labsat23_source_sptr(new labsat23_source(signal_file_basename, channel_selector, std::move(queue)));
|
||||
}
|
||||
@@ -47,10 +48,10 @@ labsat23_source_sptr labsat23_make_source_sptr(const char *signal_file_basename,
|
||||
|
||||
labsat23_source::labsat23_source(const char *signal_file_basename,
|
||||
int channel_selector,
|
||||
gr::msg_queue::sptr queue) : gr::block("labsat23_source",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
d_queue(std::move(queue))
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue) : gr::block("labsat23_source",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
d_queue(std::move(queue))
|
||||
{
|
||||
if (channel_selector < 1 or channel_selector > 2)
|
||||
{
|
||||
@@ -467,9 +468,8 @@ int labsat23_source::general_work(int noutput_items,
|
||||
{
|
||||
std::cout << "End of file reached, LabSat source stop" << std::endl;
|
||||
}
|
||||
auto *cmf = new ControlMessageFactory();
|
||||
d_queue->handle(cmf->GetQueueMessage(200, 0));
|
||||
delete cmf;
|
||||
|
||||
d_queue->push(pmt::make_any(command_event_make(200, 0)));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -528,9 +528,7 @@ int labsat23_source::general_work(int noutput_items,
|
||||
{
|
||||
std::cout << "End of file reached, LabSat source stop" << std::endl;
|
||||
}
|
||||
auto *cmf = new ControlMessageFactory();
|
||||
d_queue->handle(cmf->GetQueueMessage(200, 0));
|
||||
delete cmf;
|
||||
d_queue->push(pmt::make_any(command_event_make(200, 0)));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#ifndef GNSS_SDR_LABSAT23_SOURCE_H
|
||||
#define GNSS_SDR_LABSAT23_SOURCE_H
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include <gnuradio/block.h>
|
||||
#include <gnuradio/msg_queue.h> // for msg_queue, msg_queue::sptr
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
@@ -45,7 +46,7 @@ using labsat23_source_sptr = boost::shared_ptr<labsat23_source>;
|
||||
labsat23_source_sptr labsat23_make_source_sptr(
|
||||
const char *signal_file_basename,
|
||||
int channel_selector,
|
||||
gr::msg_queue::sptr queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
/*!
|
||||
* \brief This class implements conversion between Labsat2 and 3 format byte packet samples to gr_complex
|
||||
@@ -64,11 +65,11 @@ private:
|
||||
friend labsat23_source_sptr labsat23_make_source_sptr(
|
||||
const char *signal_file_basename,
|
||||
int channel_selector,
|
||||
gr::msg_queue::sptr queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
labsat23_source(const char *signal_file_basename,
|
||||
int channel_selector,
|
||||
gr::msg_queue::sptr queue);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue);
|
||||
|
||||
std::string generate_filename();
|
||||
void decode_samples_one_channel(int16_t input_short, gr_complex *out, int type);
|
||||
@@ -82,7 +83,7 @@ private:
|
||||
std::ifstream *binary_input_file;
|
||||
uint8_t d_ref_clock;
|
||||
uint8_t d_bits_per_sample;
|
||||
gr::msg_queue::sptr d_queue;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> d_queue;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -71,10 +71,10 @@ target_link_libraries(signal_source_libs
|
||||
PUBLIC
|
||||
Boost::boost
|
||||
Gnuradio::runtime
|
||||
core_receiver
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
core_receiver
|
||||
)
|
||||
|
||||
if(ENABLE_PLUTOSDR OR ENABLE_FMCOMMS2)
|
||||
|
||||
@@ -32,17 +32,17 @@
|
||||
*/
|
||||
|
||||
#include "gnss_sdr_valve.h"
|
||||
#include "control_message_factory.h" // for ControlMessageFactory
|
||||
#include <glog/logging.h> // for LOG
|
||||
#include <gnuradio/io_signature.h> // for io_signature
|
||||
#include <algorithm> // for min
|
||||
#include <cstring> // for memcpy
|
||||
#include <unistd.h> // for usleep
|
||||
#include "command_event.h"
|
||||
#include <glog/logging.h> // for LOG
|
||||
#include <gnuradio/io_signature.h> // for io_signature
|
||||
#include <algorithm> // for min
|
||||
#include <cstring> // for memcpy
|
||||
#include <unistd.h> // for usleep
|
||||
#include <utility>
|
||||
|
||||
Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
|
||||
uint64_t nitems,
|
||||
gr::msg_queue::sptr queue,
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue,
|
||||
bool stop_flowgraph) : gr::sync_block("valve",
|
||||
gr::io_signature::make(1, 20, sizeof_stream_item),
|
||||
gr::io_signature::make(1, 20, sizeof_stream_item)),
|
||||
@@ -55,14 +55,14 @@ Gnss_Sdr_Valve::Gnss_Sdr_Valve(size_t sizeof_stream_item,
|
||||
}
|
||||
|
||||
|
||||
boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(size_t sizeof_stream_item, uint64_t nitems, gr::msg_queue::sptr queue, bool stop_flowgraph)
|
||||
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, gr::msg_queue::sptr 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)
|
||||
{
|
||||
boost::shared_ptr<Gnss_Sdr_Valve> valve_(new Gnss_Sdr_Valve(sizeof_stream_item, nitems, std::move(queue), true));
|
||||
return valve_;
|
||||
@@ -83,10 +83,8 @@ int Gnss_Sdr_Valve::work(int noutput_items,
|
||||
{
|
||||
if (d_ncopied_items >= d_nitems)
|
||||
{
|
||||
auto *cmf = new ControlMessageFactory();
|
||||
d_queue->handle(cmf->GetQueueMessage(200, 0));
|
||||
LOG(INFO) << "Stopping receiver, " << d_ncopied_items << " samples processed";
|
||||
delete cmf;
|
||||
d_queue->push(pmt::make_any(command_event_make(200, 0)));
|
||||
if (d_stop_flowgraph)
|
||||
{
|
||||
return -1; // Done!
|
||||
|
||||
@@ -34,11 +34,12 @@
|
||||
#ifndef GNSS_SDR_GNSS_SDR_VALVE_H_
|
||||
#define GNSS_SDR_GNSS_SDR_VALVE_H_
|
||||
|
||||
#include "concurrent_queue.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <gnuradio/msg_queue.h> // for msg_queue, msg_queue::sptr
|
||||
#include <gnuradio/sync_block.h> // for sync_block
|
||||
#include <gnuradio/types.h> // for gr_vector_const_void_star
|
||||
#include <cstddef> // for size_t
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstddef> // for size_t
|
||||
#include <cstdint>
|
||||
|
||||
class Gnss_Sdr_Valve;
|
||||
@@ -46,12 +47,12 @@ class Gnss_Sdr_Valve;
|
||||
boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
|
||||
size_t sizeof_stream_item,
|
||||
uint64_t nitems,
|
||||
gr::msg_queue::sptr queue);
|
||||
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,
|
||||
gr::msg_queue::sptr queue,
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue,
|
||||
bool stop_flowgraph);
|
||||
|
||||
/*!
|
||||
@@ -71,21 +72,21 @@ private:
|
||||
friend boost::shared_ptr<Gnss_Sdr_Valve> gnss_sdr_make_valve(
|
||||
size_t sizeof_stream_item,
|
||||
uint64_t nitems,
|
||||
gr::msg_queue::sptr queue);
|
||||
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,
|
||||
gr::msg_queue::sptr queue,
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue,
|
||||
bool stop_flowgraph);
|
||||
|
||||
Gnss_Sdr_Valve(size_t sizeof_stream_item,
|
||||
uint64_t nitems,
|
||||
gr::msg_queue::sptr queue, bool stop_flowgraph);
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> queue, bool stop_flowgraph);
|
||||
|
||||
uint64_t d_nitems;
|
||||
uint64_t d_ncopied_items;
|
||||
gr::msg_queue::sptr d_queue;
|
||||
std::shared_ptr<Concurrent_Queue<pmt::pmt_t>> d_queue;
|
||||
bool d_stop_flowgraph;
|
||||
bool d_open_valve;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user