1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

WIP: initial commit for collaboration

This commit is contained in:
Jim Melton 2021-01-13 21:40:44 -07:00
parent 10fc0eb62e
commit 8407acb7a7
21 changed files with 144 additions and 37 deletions

View File

@ -586,14 +586,14 @@ endif()
################################################################################
# Log4cpp - http://log4cpp.sourceforge.net/
################################################################################
find_package(LOG4CPP)
set_package_properties(LOG4CPP PROPERTIES
PURPOSE "Required by GNU Radio."
TYPE REQUIRED
)
if(NOT LOG4CPP_FOUND)
message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr")
endif()
#find_package(LOG4CPP)
#set_package_properties(LOG4CPP PROPERTIES
# PURPOSE "Required by GNU Radio."
# TYPE REQUIRED
#)
#if(NOT LOG4CPP_FOUND)
# message(FATAL_ERROR "*** Log4cpp is required to build gnss-sdr")
#endif()
@ -607,7 +607,7 @@ if(NOT ENABLE_OWN_GPSTK)
PURPOSE "Used in some Extra Tests."
)
endif()
if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
#if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
# Check if we have std::filesystem
if(NOT (CMAKE_VERSION VERSION_LESS 3.8))
if(NOT GPSTK_FOUND OR NOT (GPSTK_FOUND AND GPSTK_OLDER_THAN_8)) # Fix for GPSTk < 8.0.0
@ -628,7 +628,12 @@ if(NOT (GNURADIO_VERSION VERSION_LESS 3.8) AND LOG4CPP_READY_FOR_CXX17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
endif()
endif()
#endif()
message(ALERT " debugging CMake ..."
"\n GNURADIO_VERSION=${GNURADIO_VERSION}"
#"\n LOG4CPP_READY_FOR_CXX17=${LOG4CPP_READY_FOR_CXX17}"
"\n CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}"
)

View File

@ -18,6 +18,8 @@
#ifndef GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H
#define GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "fpga_dynamic_bit_selection.h"
#include "fpga_switch.h"
@ -38,7 +40,7 @@
class ConfigurationInterface;
class Ad9361FpgaSignalSource : public GNSSBlockInterface
class Ad9361FpgaSignalSource : public SignalSourceInterface
{
public:
Ad9361FpgaSignalSource(const ConfigurationInterface *configuration,

View File

@ -18,6 +18,8 @@
#ifndef GNSS_SDR_CUSTOM_UDP_SIGNAL_SOURCE_H
#define GNSS_SDR_CUSTOM_UDP_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "gr_complex_ip_packet_source.h"
@ -40,9 +42,10 @@ class ConfigurationInterface;
* \brief This class reads from UDP packets, which streams interleaved
* I/Q samples over a network.
*/
class CustomUDPSignalSource : public GNSSBlockInterface
class CustomUDPSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
CustomUDPSignalSource(const ConfigurationInterface* configuration,
const std::string& role, unsigned int in_stream,
unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);

View File

@ -21,6 +21,8 @@
#ifndef GNSS_SDR_FILE_SIGNAL_SOURCE_H
#define GNSS_SDR_FILE_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
@ -45,9 +47,10 @@ class ConfigurationInterface;
* \brief Class that reads signals samples from a file
* and adapts it to a SignalSourceInterface
*/
class FileSignalSource : public GNSSBlockInterface
class FileSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
FileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams,
Concurrent_Queue<pmt::pmt_t>* queue);

View File

@ -20,6 +20,8 @@
#ifndef GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
#define GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/char_to_float.h>
@ -45,7 +47,7 @@ class ConfigurationInterface;
* \brief This class configures and reads samples from Teleorbit Flexiband front-end.
* This software requires a Flexiband GNU Radio driver installed (not included with GNSS-SDR).
*/
class FlexibandSignalSource : public GNSSBlockInterface
class FlexibandSignalSource : public SignalSourceInterface
{
public:
FlexibandSignalSource(const ConfigurationInterface* configuration,

View File

@ -20,6 +20,8 @@
#ifndef GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H
#define GNSS_SDR_FMCOMMS2_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
#if GRIIO_INCLUDE_HAS_GNURADIO
@ -41,7 +43,7 @@
class ConfigurationInterface;
class Fmcomms2SignalSource : public GNSSBlockInterface
class Fmcomms2SignalSource : public SignalSourceInterface
{
public:
Fmcomms2SignalSource(const ConfigurationInterface* configuration,

View File

@ -20,6 +20,8 @@
#define GNSS_SDR_GEN_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <pmt/pmt.h>
@ -37,16 +39,13 @@
* \brief This class wraps blocks that generates synthesized GNSS signal and
* filters the signal.
*/
class GenSignalSource : public GNSSBlockInterface
class GenSignalSource : public SignalSourceInterface
{
public:
//! Constructor
GenSignalSource(std::shared_ptr<GNSSBlockInterface> signal_generator, std::shared_ptr<GNSSBlockInterface> filter,
std::string role, Concurrent_Queue<pmt::pmt_t> *queue);
//! Virtual destructor
virtual ~GenSignalSource() = default;
void connect(gr::top_block_sptr top_block) override;
void disconnect(gr::top_block_sptr top_block) override;
gr::basic_block_sptr get_left_block() override;

View File

@ -18,6 +18,8 @@
#ifndef GNSS_SDR_GN3S_SIGNAL_SOURCE_H
#define GNSS_SDR_GN3S_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
@ -38,7 +40,7 @@ class ConfigurationInterface;
/*!
* \brief This class reads samples from a GN3S USB dongle, a RF front-end signal sampler
*/
class Gn3sSignalSource : public GNSSBlockInterface
class Gn3sSignalSource : public SignalSourceInterface
{
public:
Gn3sSignalSource(const ConfigurationInterface* configuration,

View File

@ -18,6 +18,8 @@
#ifndef GNSS_SDR_LABSAT_SIGNAL_SOURCE_H
#define GNSS_SDR_LABSAT_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
@ -38,9 +40,10 @@ class ConfigurationInterface;
/*!
* \brief This class reads samples stored by a LabSat 2 or LabSat 3 device
*/
class LabsatSignalSource : public GNSSBlockInterface
class LabsatSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
LabsatSignalSource(const ConfigurationInterface* configuration,
const std::string& role, unsigned int in_stream,
unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);

View File

@ -21,6 +21,8 @@
#ifndef GNSS_SDR_MULTICHANNEL_FILE_SIGNAL_SOURCE_H
#define GNSS_SDR_MULTICHANNEL_FILE_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
@ -45,9 +47,10 @@ class ConfigurationInterface;
* \brief Class that reads signals samples from files at different frequency bands
* and adapts it to a SignalSourceInterface
*/
class MultichannelFileSignalSource : public GNSSBlockInterface
class MultichannelFileSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
MultichannelFileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams,
Concurrent_Queue<pmt::pmt_t>* queue);

View File

@ -21,6 +21,8 @@
#ifndef GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H
#define GNSS_SDR_NSR_FILE_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "unpack_byte_2bit_samples.h"
@ -42,9 +44,10 @@ class ConfigurationInterface;
* \brief Class that reads signals samples from a file
* and adapts it to a SignalSourceInterface
*/
class NsrFileSignalSource : public GNSSBlockInterface
class NsrFileSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
NsrFileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams,
Concurrent_Queue<pmt::pmt_t>* queue);

View File

@ -19,6 +19,8 @@
#ifndef GNSS_SDR_OSMOSDR_SIGNAL_SOURCE_H
#define GNSS_SDR_OSMOSDR_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
@ -42,7 +44,7 @@ class ConfigurationInterface;
* HackRF or Realtek's RTL2832U-based USB dongle DVB-T receivers
* (see https://osmocom.org/projects/rtl-sdr/wiki)
*/
class OsmosdrSignalSource : public GNSSBlockInterface
class OsmosdrSignalSource : public SignalSourceInterface
{
public:
OsmosdrSignalSource(const ConfigurationInterface* configuration,

View File

@ -19,6 +19,8 @@
#ifndef GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H
#define GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
#if GRIIO_INCLUDE_HAS_GNURADIO
@ -42,7 +44,7 @@ class ConfigurationInterface;
/*!
*/
class PlutosdrSignalSource : public GNSSBlockInterface
class PlutosdrSignalSource : public SignalSourceInterface
{
public:
PlutosdrSignalSource(const ConfigurationInterface* configuration,

View File

@ -18,6 +18,8 @@
#ifndef GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
#define GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
@ -39,7 +41,7 @@ class ConfigurationInterface;
/*!
* \brief This class reads samples from a GN3S USB dongle, a RF front-end signal sampler
*/
class RawArraySignalSource : public GNSSBlockInterface
class RawArraySignalSource : public SignalSourceInterface
{
public:
RawArraySignalSource(const ConfigurationInterface* configuration,

View File

@ -18,6 +18,8 @@
#ifndef GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H
#define GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "rtl_tcp_signal_source_c.h"
@ -42,9 +44,10 @@ class ConfigurationInterface;
* I/Q samples over TCP.
* (see https://osmocom.org/projects/rtl-sdr/wiki)
*/
class RtlTcpSignalSource : public GNSSBlockInterface
class RtlTcpSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
RtlTcpSignalSource(const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_stream,

View File

@ -21,6 +21,8 @@
#ifndef GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H
#define GNSS_SDR_SPIR_FILE_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "unpack_intspir_1bit_samples.h"
@ -45,9 +47,10 @@ class ConfigurationInterface;
* \brief Class that reads signals samples from a file
* and adapts it to a SignalSourceInterface
*/
class SpirFileSignalSource : public GNSSBlockInterface
class SpirFileSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
SpirFileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams,
Concurrent_Queue<pmt::pmt_t>* queue);

View File

@ -21,8 +21,9 @@
#ifndef GNSS_SDR_SPIR_GSS6450_FILE_SIGNAL_SOURCE_H
#define GNSS_SDR_SPIR_GSS6450_FILE_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "gnss_sdr_valve.h"
#include "unpack_spir_gss6450_samples.h"
#include <gnuradio/blocks/deinterleave.h>
@ -50,13 +51,13 @@ class ConfigurationInterface;
* \brief Class that reads signals samples from a file
* and adapts it to a SignalSourceInterface
*/
class SpirGSS6450FileSignalSource : public GNSSBlockInterface
class SpirGSS6450FileSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
SpirGSS6450FileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
uint32_t in_streams, uint32_t out_streams, Concurrent_Queue<pmt::pmt_t>* queue);
~SpirGSS6450FileSignalSource() = default;
inline std::string role() override
{
return role_;

View File

@ -20,8 +20,9 @@
#ifndef GNSS_SDR_TWO_BIT_CPX_FILE_SIGNAL_SOURCE_H
#define GNSS_SDR_TWO_BIT_CPX_FILE_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "unpack_byte_2bit_cpx_samples.h"
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/blocks/file_source.h>
@ -44,9 +45,10 @@ class ConfigurationInterface;
* \brief Class that reads signals samples from a file
* and adapts it to a SignalSourceInterface
*/
class TwoBitCpxFileSignalSource : public GNSSBlockInterface
class TwoBitCpxFileSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
TwoBitCpxFileSignalSource(const ConfigurationInterface* configuration,
const std::string& role,
unsigned int in_streams,

View File

@ -21,8 +21,9 @@
#ifndef GNSS_SDR_TWO_BIT_PACKED_FILE_SIGNAL_SOURCE_H
#define GNSS_SDR_TWO_BIT_PACKED_FILE_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include "unpack_2bit_samples.h"
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/blocks/file_source.h>
@ -46,9 +47,10 @@ class ConfigurationInterface;
* \brief Class that reads signals samples from a file
* and adapts it to a SignalSourceInterface
*/
class TwoBitPackedFileSignalSource : public GNSSBlockInterface
class TwoBitPackedFileSignalSource : public SignalSourceInterface
{
public:
void fixme() final {}
TwoBitPackedFileSignalSource(const ConfigurationInterface* configuration, const std::string& role,
unsigned int in_streams, unsigned int out_streams,
Concurrent_Queue<pmt::pmt_t>* queue);

View File

@ -17,8 +17,9 @@
#ifndef GNSS_SDR_UHD_SIGNAL_SOURCE_H
#define GNSS_SDR_UHD_SIGNAL_SOURCE_H
#include "signal_source_interface.h"
#include "concurrent_queue.h"
#include "gnss_block_interface.h"
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/hier_block2.h>
#include <gnuradio/uhd/usrp_source.h>
@ -38,7 +39,7 @@ class ConfigurationInterface;
/*!
* \brief This class reads samples from a UHD device (see http://code.ettus.com/redmine/ettus/projects/uhd/wiki)
*/
class UhdSignalSource : public GNSSBlockInterface
class UhdSignalSource : public SignalSourceInterface
{
public:
UhdSignalSource(const ConfigurationInterface* configuration,

View File

@ -0,0 +1,62 @@
/*!
* \signal_source_interface.h
* \brief Header file of the interface to a signal_source GNSS block.
* \author Jim Melton, 2020. jim.melton(at)sncorp.com
*
* This header file contains the interface to an abstract class for
* signal sources. Since all its methods are virtual, this class
* cannot be instantiated directly, and a subclass can only be
* instantiated directly if all inherited pure virtual methods have
* been implemented by that class or a parent class.
*
* -----------------------------------------------------------------------------
*
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
*
* GNSS-SDR is a software defined Global Navigation
* Satellite Systems receiver
*
* This file is part of GNSS-SDR.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* -----------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_SIGNAL_SOURCE_INTERFACE_H
#define GNSS_SDR_SIGNAL_SOURCE_INTERFACE_H
#include "gnss_block_interface.h"
/** \addtogroup Core
* \{ */
/** \addtogroup GNSS_Block_Interfaces GNSS block interfaces
* GNSS block interfaces.
* \{ */
/*! \brief This abstract class represents an interface to signal_source GNSS block.
*
* Abstract class for signal sources. Since all its methods are virtual,
* this class cannot be instantiated directly, and a subclass can only be
* instantiated directly if all inherited pure virtual methods have been
* implemented by that class or a parent class.
*/
class SignalSourceInterface : public GNSSBlockInterface
{
virtual std::string role() = 0;
virtual std::string implementation() = 0;
virtual size_t item_size() = 0;
virtual void connect(gr::top_block_sptr top_block) = 0;
virtual void disconnect(gr::top_block_sptr top_block) = 0;
virtual gr::basic_block_sptr get_left_block() = 0;
virtual gr::basic_block_sptr get_right_block() = 0;
virtual void fixme() = 0;
};
#endif