GNSS-SDR  0.0.14
An Open Source GNSS Software Defined Receiver
raw_array_signal_source.h
Go to the documentation of this file.
1 /*!
2  * \file raw_array_signal_source.h
3  * \brief CTTC Experimental GNSS 8 channels array signal source
4  * \author Javier Arribas, jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9  * This file is part of GNSS-SDR.
10  *
11  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 
18 #ifndef GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
19 #define GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
20 
21 #include "concurrent_queue.h"
22 #include "gnss_block_interface.h"
23 #include <gnuradio/blocks/file_sink.h>
24 #include <gnuradio/hier_block2.h>
25 #include <pmt/pmt.h>
26 #include <cstdint>
27 #include <memory>
28 #include <string>
29 
30 
31 /** \addtogroup Signal_Source
32  * \{ */
33 /** \addtogroup Signal_Source_adapters
34  * \{ */
35 
36 
38 
39 /*!
40  * \brief This class reads samples from a GN3S USB dongle, a RF front-end signal sampler
41  */
43 {
44 public:
45  RawArraySignalSource(const ConfigurationInterface* configuration,
46  std::string role, unsigned int in_stream,
47  unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
48 
49  ~RawArraySignalSource() = default;
50 
51  inline std::string role() override
52  {
53  return role_;
54  }
55 
56  /*!
57  * \brief Returns "RawArraySignalSource".
58  */
59  inline std::string implementation() override
60  {
61  return "Raw_Array_Signal_Source";
62  }
63 
64  inline size_t item_size() override
65  {
66  return item_size_;
67  }
68 
69  void connect(gr::top_block_sptr top_block) override;
70  void disconnect(gr::top_block_sptr top_block) override;
71  gr::basic_block_sptr get_left_block() override;
72  gr::basic_block_sptr get_right_block() override;
73 
74 private:
75  gr::block_sptr raw_array_source_;
76  gr::blocks::file_sink::sptr file_sink_;
77  std::string role_;
78  std::string item_type_;
79  std::string dump_filename_;
80  std::string eth_device_;
81  size_t item_size_;
82  int64_t samples_;
83  unsigned int in_stream_;
84  unsigned int out_stream_;
85  bool dump_;
86 };
87 
88 
89 /** \} */
90 /** \} */
91 #endif // GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
Interface of a thread-safe std::queue.
This class reads samples from a GN3S USB dongle, a RF front-end signal sampler.
This interface represents a GNSS block.
This abstract class represents an interface to configuration parameters.
This abstract class represents an interface to GNSS blocks.
std::string implementation() override
Returns "RawArraySignalSource".