GNSS-SDR  0.0.13
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
11  *
12  * GNSS-SDR is a software defined Global Navigation
13  * Satellite Systems receiver
14  *
15  * This file is part of GNSS-SDR.
16  *
17  * SPDX-License-Identifier: GPL-3.0-or-later
18  *
19  * -----------------------------------------------------------------------------
20  */
21 
22 
23 #ifndef GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
24 #define GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
25 
26 #include "concurrent_queue.h"
27 #include "gnss_block_interface.h"
28 #include <gnuradio/blocks/char_to_float.h>
29 #include <gnuradio/blocks/file_sink.h>
30 #include <gnuradio/blocks/float_to_complex.h>
31 #include <gnuradio/blocks/null_sink.h>
32 #include <gnuradio/hier_block2.h>
33 #include <pmt/pmt.h>
34 #include <memory>
35 #include <string>
36 #include <vector>
37 
38 
40 
41 /*!
42  * \brief This class configures and reads samples from Teleorbit Flexiband front-end.
43  * This software requires a Flexiband GNU Radio driver installed (not included with GNSS-SDR).
44  */
46 {
47 public:
48  FlexibandSignalSource(const ConfigurationInterface* configuration,
49  const std::string& role, unsigned int in_stream,
50  unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
51 
52  ~FlexibandSignalSource() = default;
53 
54  inline std::string role() override
55  {
56  return role_;
57  }
58 
59  /*!
60  * \brief Returns "Flexiband_Signal_Source".
61  */
62  inline std::string implementation() override
63  {
64  return "Flexiband_Signal_Source";
65  }
66 
67  inline size_t item_size() override
68  {
69  return item_size_;
70  }
71 
72  void connect(gr::top_block_sptr top_block) override;
73  void disconnect(gr::top_block_sptr top_block) override;
74  gr::basic_block_sptr get_left_block() override;
75  gr::basic_block_sptr get_right_block() override;
76  gr::basic_block_sptr get_right_block(int RF_channel) override;
77 
78 private:
79  boost::shared_ptr<gr::block> flexiband_source_;
80 
81  std::vector<boost::shared_ptr<gr::block>> char_to_float;
82  std::vector<boost::shared_ptr<gr::block>> float_to_complex_;
83  std::vector<gr::blocks::null_sink::sptr> null_sinks_;
84 
85  std::string role_;
86  std::string item_type_;
87  std::string firmware_filename_;
88  std::string signal_file;
89 
90  size_t item_size_;
91  unsigned int in_stream_;
92  unsigned int out_stream_;
93 
94  int gain1_;
95  int gain2_;
96  int gain3_;
97  int usb_packet_buffer_size_;
98  int n_channels_;
99  int sel_ch_;
100 
101  bool AGC_;
102  bool flag_read_file;
103 };
104 
105 #endif // GNSS_SDR_FLEXIBAND_SIGNAL_SOURCE_H
Interface of a thread-safe std::queue.
std::string implementation() override
Returns "Flexiband_Signal_Source".
This class configures and reads samples from Teleorbit Flexiband front-end. This software requires a ...
This interface represents a GNSS block.
This abstract class represents an interface to configuration parameters.
This abstract class represents an interface to GNSS blocks.