GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
flexiband_signal_source.h
Go to the documentation of this file.
1 /*!
2  * \file flexiband_signal_source.h
3  * \brief ignal Source adapter for the Teleorbit Flexiband front-end device.
4  * This adapter requires a Flexiband GNU Radio driver
5  * installed (not included with GNSS-SDR)
6  * \author Javier Arribas, jarribas(at)cttc.es
7  *
8  * -----------------------------------------------------------------------------
9  *
10  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
11  * This file is part of GNSS-SDR.
12  *
13  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
14  * SPDX-License-Identifier: GPL-3.0-or-later
15  *
16  * -----------------------------------------------------------------------------
17  */
18 
19 
20 #ifndef GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
21 #define GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
22 
23 #include "concurrent_queue.h"
24 #include "signal_source_base.h"
25 #include <gnuradio/blocks/char_to_float.h>
26 #include <gnuradio/blocks/file_sink.h>
27 #include <gnuradio/blocks/float_to_complex.h>
28 #include <gnuradio/blocks/null_sink.h>
29 #include <gnuradio/hier_block2.h>
30 #include <pmt/pmt.h>
31 #include <memory>
32 #include <string>
33 #include <vector>
34 
35 
36 /** \addtogroup Signal_Source
37  * \{ */
38 /** \addtogroup Signal_Source_adapters
39  * \{ */
40 
41 
43 
44 /*!
45  * \brief This class configures and reads samples from Teleorbit Flexiband front-end.
46  * This software requires a Flexiband GNU Radio driver installed (not included with GNSS-SDR).
47  */
49 {
50 public:
51  FlexibandSignalSource(const ConfigurationInterface* configuration,
52  const std::string& role, unsigned int in_stream,
53  unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
54 
55  ~FlexibandSignalSource() = default;
56 
57  inline size_t item_size() override
58  {
59  return item_size_;
60  }
61 
62  void connect(gr::top_block_sptr top_block) override;
63  void disconnect(gr::top_block_sptr top_block) override;
64  gr::basic_block_sptr get_left_block() override;
65  gr::basic_block_sptr get_right_block() override;
66  gr::basic_block_sptr get_right_block(int RF_channel) override;
67 
68 private:
69  boost::shared_ptr<gr::block> flexiband_source_;
70 
71  std::vector<boost::shared_ptr<gr::block>> char_to_float;
72  std::vector<boost::shared_ptr<gr::block>> float_to_complex_;
73  std::vector<gr::blocks::null_sink::sptr> null_sinks_;
74 
75  std::string item_type_;
76  std::string firmware_filename_;
77  std::string signal_file;
78 
79  size_t item_size_;
80  unsigned int in_stream_;
81  unsigned int out_stream_;
82 
83  int gain1_;
84  int gain2_;
85  int gain3_;
86  int usb_packet_buffer_size_;
87  int n_channels_;
88  int sel_ch_;
89 
90  bool AGC_;
91  bool flag_read_file;
92 };
93 
94 
95 /** \} */
96 /** \} */
97 #endif // GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
Interface of a thread-safe std::queue.
Header file of the base class to signal_source GNSS blocks.
This class configures and reads samples from Teleorbit Flexiband front-end. This software requires a ...
This abstract class represents an interface to configuration parameters.