GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
signal_generator.h
Go to the documentation of this file.
1/*!
2 * \file signal_generator.h
3 * \brief Adapter of a class that generates synthesized GNSS signal.
4 * \author Marc Molina, 2013. marc.molina.pena@gmail.com
5 *
6 *
7 * -----------------------------------------------------------------------------
8 *
9 * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
10 * This file is part of GNSS-SDR.
11 *
12 * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
13 * SPDX-License-Identifier: GPL-3.0-or-later
14 *
15 * -----------------------------------------------------------------------------
16 */
17
18
19#ifndef GNSS_SDR_SIGNAL_GENERATOR_H
20#define GNSS_SDR_SIGNAL_GENERATOR_H
21
22#include "concurrent_queue.h"
24#include "signal_generator_c.h"
25#include <gnuradio/blocks/file_sink.h>
26#include <gnuradio/blocks/vector_to_stream.h>
27#include <gnuradio/hier_block2.h>
28#include <pmt/pmt.h>
29#include <memory>
30#include <string>
31#include <vector>
32
34
35/*!
36 * \brief This class generates synthesized GNSS signal.
37 *
38 */
39class SignalGenerator : public GNSSBlockInterface
40{
41public:
42 SignalGenerator(const ConfigurationInterface* configuration,
43 const std::string& role, unsigned int in_stream,
44 unsigned int out_stream, Concurrent_Queue<pmt::pmt_t>* queue);
45
46 ~SignalGenerator() = default;
47
48 inline std::string role() override
49 {
50 return role_;
51 }
52
53 /*!
54 * \brief Returns "GNSSSignalGenerator".
55 */
56 inline std::string implementation() override
57 {
58 return "GNSSSignalGenerator";
59 }
60
61 inline size_t item_size() override
62 {
63 return item_size_;
64 }
65
66 void connect(gr::top_block_sptr top_block) override;
67 void disconnect(gr::top_block_sptr top_block) override;
68 gr::basic_block_sptr get_left_block() override;
69 gr::basic_block_sptr get_right_block() override;
70
71private:
72 gnss_shared_ptr<gr::block> gen_source_;
73 gr::blocks::vector_to_stream::sptr vector_to_stream_;
74 gr::blocks::file_sink::sptr file_sink_;
75 std::string role_;
76 std::string item_type_;
77 std::string dump_filename_;
78 size_t item_size_;
79 unsigned int in_stream_;
80 unsigned int out_stream_;
81 bool dump_;
82};
83
84#endif // GNSS_SDR_SIGNAL_GENERATOR_H
This class implements a thread-safe std::queue.
This abstract class represents an interface to configuration parameters.
This abstract class represents an interface to GNSS blocks.
std::string implementation() override
Returns "GNSSSignalGenerator".
Interface of a thread-safe std::queue.
This interface represents a GNSS block.
GNU Radio source block that generates synthesized GNSS signal.