GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
labsat_signal_source.h
Go to the documentation of this file.
1/*!
2 * \file labsat_signal_source.h
3 * \brief LabSat version 2, 3, and 3 Wideband format reader
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-2021 (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_LABSAT_SIGNAL_SOURCE_H
19#define GNSS_SDR_LABSAT_SIGNAL_SOURCE_H
20
21#include "concurrent_queue.h"
23#include "signal_source_base.h"
24#include <gnuradio/blocks/file_sink.h>
25#include <gnuradio/blocks/throttle.h>
26#include <gnuradio/hier_block2.h>
27#include <pmt/pmt.h>
28#include <memory>
29#include <string>
30#include <vector>
31
32/** \addtogroup Signal_Source
33 * \{ */
34/** \addtogroup Signal_Source_adapters
35 * \{ */
36
37
39
40/*!
41 * \brief This class reads samples stored in LabSat version 2, 3, and 3 Wideband
42 * format.
43 */
44class LabsatSignalSource : public SignalSourceBase
45{
46public:
47 LabsatSignalSource(const ConfigurationInterface* configuration,
48 const std::string& role, unsigned int in_stream,
49 unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
50
51 ~LabsatSignalSource() = default;
52
53 inline size_t item_size() override
54 {
55 return item_size_;
56 }
57
58 size_t getRfChannels() const override;
59 void connect(gr::top_block_sptr top_block) override;
60 void disconnect(gr::top_block_sptr top_block) override;
61 gr::basic_block_sptr get_left_block() override;
62 gr::basic_block_sptr get_right_block() override;
63 gr::basic_block_sptr get_right_block(int i) override;
64
65private:
66 gr::block_sptr labsat23_source_;
67 std::vector<gr::blocks::file_sink::sptr> file_sink_;
68 std::vector<gr::blocks::throttle::sptr> throttle_;
69 std::vector<int> channels_selector_vec_;
70
71 std::string item_type_;
72 std::string filename_;
73 std::string dump_filename_;
74
75 size_t item_size_;
76
77 unsigned int in_stream_;
78 unsigned int out_stream_;
79
80 bool enable_throttle_control_;
81 bool dump_;
82};
83
84/** \} */
85/** \} */
86#endif // GNSS_SDR_LABSAT_SIGNAL_SOURCE_H
This class implements a thread-safe std::queue.
This abstract class represents an interface to configuration parameters.
SignalSourceBase(ConfigurationInterface const *configuration, std::string role, std::string impl)
Constructor.
Interface of a thread-safe std::queue.
This interface represents a GNSS block.
Header file of the base class to signal_source GNSS blocks.