GNSS-SDR  0.0.13
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 
21 #ifndef GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
22 #define GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
23 
24 #include "concurrent_queue.h"
25 #include "gnss_block_interface.h"
26 #include <gnuradio/blocks/file_sink.h>
27 #include <gnuradio/hier_block2.h>
28 #include <pmt/pmt.h>
29 #include <cstdint>
30 #include <memory>
31 #include <string>
32 
34 
35 /*!
36  * \brief This class reads samples from a GN3S USB dongle, a RF front-end signal sampler
37  */
39 {
40 public:
41  RawArraySignalSource(const ConfigurationInterface* configuration,
42  std::string role, unsigned int in_stream,
43  unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
44 
45  ~RawArraySignalSource() = default;
46 
47  inline std::string role() override
48  {
49  return role_;
50  }
51 
52  /*!
53  * \brief Returns "RawArraySignalSource".
54  */
55  inline std::string implementation() override
56  {
57  return "Raw_Array_Signal_Source";
58  }
59 
60  inline size_t item_size() override
61  {
62  return item_size_;
63  }
64 
65  void connect(gr::top_block_sptr top_block) override;
66  void disconnect(gr::top_block_sptr top_block) override;
67  gr::basic_block_sptr get_left_block() override;
68  gr::basic_block_sptr get_right_block() override;
69 
70 private:
71  gr::block_sptr raw_array_source_;
72  gr::blocks::file_sink::sptr file_sink_;
73  std::string role_;
74  std::string item_type_;
75  std::string dump_filename_;
76  std::string eth_device_;
77  size_t item_size_;
78  int64_t samples_;
79  unsigned int in_stream_;
80  unsigned int out_stream_;
81  bool dump_;
82 };
83 
84 #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".