GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
labsat_signal_source.h
Go to the documentation of this file.
1 /*!
2  * \file labsat_signal_source.h
3  * \brief Labsat 2 and 3 front-end signal sampler driver
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_LABSAT_SIGNAL_SOURCE_H
22 #define GNSS_SDR_LABSAT_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 <memory>
30 #include <string>
31 
33 
34 /*!
35  * \brief This class reads samples stored by a LabSat 2 or LabSat 3 device
36  */
38 {
39 public:
40  LabsatSignalSource(const ConfigurationInterface* configuration,
41  const std::string& role, unsigned int in_stream,
42  unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
43 
44  ~LabsatSignalSource() = default;
45 
46  inline std::string role() override
47  {
48  return role_;
49  }
50 
51  /*!
52  * \brief Returns "Labsat_Signal_Source".
53  */
54  inline std::string implementation() override
55  {
56  return "Labsat_Signal_Source";
57  }
58 
59  inline size_t item_size() override
60  {
61  return item_size_;
62  }
63 
64  void connect(gr::top_block_sptr top_block) override;
65  void disconnect(gr::top_block_sptr top_block) override;
66  gr::basic_block_sptr get_left_block() override;
67  gr::basic_block_sptr get_right_block() override;
68 
69 private:
70  gr::block_sptr labsat23_source_;
71  gr::blocks::file_sink::sptr file_sink_;
72  std::string role_;
73  std::string item_type_;
74  std::string filename_;
75  std::string dump_filename_;
76  unsigned int in_stream_;
77  unsigned int out_stream_;
78  size_t item_size_;
79  bool dump_;
80 };
81 
82 #endif // GNSS_SDR_LABSAT_SIGNAL_SOURCE_H
Interface of a thread-safe std::queue.
std::string implementation() override
Returns "Labsat_Signal_Source".
This class reads samples stored by a LabSat 2 or LabSat 3 device.
This interface represents a GNSS block.
This abstract class represents an interface to configuration parameters.
This abstract class represents an interface to GNSS blocks.