GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
gnmax_signal_source.h
Go to the documentation of this file.
1/*!
2 * \file gnmax_signal_source.h
3 * \brief gnMAX2769 USB dongle GPS RF front-end signal sampler driver
4 * \author Wojciech Kazubski, wk(at)ire.pw.edu.pl
5 * \author Javier Arribas, jarribas(at)cttc.es
6 *
7 * -----------------------------------------------------------------------------
8 *
9 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
10 *
11 * GNSS-SDR is a software defined Global Navigation
12 * Satellite Systems receiver
13 *
14 * This file is part of GNSS-SDR.
15 *
16 * SPDX-License-Identifier: GPL-3.0-or-later
17 *
18 * -----------------------------------------------------------------------------
19 */
20
21#ifndef GNSS_SDR_GNMAX_SIGNAL_SOURCE_H_
22#define GNSS_SDR_GNMAX_SIGNAL_SOURCE_H_
23
24#include "concurrent_queue.h"
25#include "signal_source_base.h"
26#include <gnuradio/blocks/file_sink.h>
27#include <pmt/pmt.h>
28#include <cstdint>
29#include <memory>
30#include <stdexcept>
31#include <string>
32
33/** \addtogroup Signal_Source
34 * \{ */
35/** \addtogroup Signal_Source_adapters
36 * \{ */
37
38
40
41/*!
42 * \brief This class reads samples from a gnMAX2769 USB dongle, a RF front-end signal sampler
43 */
44class GnMaxSignalSource : public SignalSourceBase
45{
46public:
47 GnMaxSignalSource(const ConfigurationInterface* configuration,
48 const std::string& role, unsigned int in_stream,
49 unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
50
51 virtual ~GnMaxSignalSource();
52
53 inline size_t item_size() override
54 {
55 return item_size_;
56 }
57
58 void connect(gr::top_block_sptr top_block) override;
59 void disconnect(gr::top_block_sptr top_block) override;
60 gr::basic_block_sptr get_left_block() override;
61 gr::basic_block_sptr get_right_block() override;
62
63private:
64 gr::block_sptr gnmax_source_;
65 gnss_shared_ptr<gr::block> valve_;
66 gr::blocks::file_sink::sptr file_sink_;
67
68 std::string item_type_;
69 std::string dump_filename_;
70
71 // Front-end settings
72 bool bias_;
73 int bias__;
74 int ant_;
75 unsigned long freq_; // frequency of local oscilator
76 float freq__;
77 unsigned long bw_;
78 int bw__;
79 bool zeroif_;
80 int zeroif__;
81
82 size_t item_size_;
83 int64_t samples_;
84
85 unsigned int in_stream_;
86 unsigned int out_stream_;
87
88 bool dump_;
89};
90
91
92/** \} */
93/** \} */
94#endif /*GNSS_SDR_GNMAX_SIGNAL_SOURCE_H_*/
This class implements a thread-safe std::queue.
This abstract class represents an interface to configuration parameters.
SignalSourceBase(ConfigurationInterface const *configuration, std::string role, std::string impl)
Constructor.
Interface of a thread-safe std::queue.
Header file of the base class to signal_source GNSS blocks.