GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
signal_conditioner.h
Go to the documentation of this file.
1/*!
2 * \file signal_conditioner.h
3 * \brief It wraps blocks to change data type, filter and resample input data.
4 * \author Luis Esteve, 2012. luis(at)epsilon-formacion.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#ifndef GNSS_SDR_SIGNAL_CONDITIONER_H
19#define GNSS_SDR_SIGNAL_CONDITIONER_H
20
22#include <gnuradio/block.h>
23#include <cstddef>
24#include <memory>
25#include <string>
26
27/** \addtogroup Signal_Conditioner Signal Conditioner
28 * Signal Conditioner wrapper block
29 * \{ */
30/** \addtogroup Signal_Conditioner_adapters conditioner_adapters
31 * Wrap a Signal Conditioner with a GNSSBlockInterface
32 * \{ */
33
34
35/*!
36 * \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
37 * to be applied to the input flow of sampled signal.
38 */
40{
41public:
42 //! Constructor
43 SignalConditioner(std::shared_ptr<GNSSBlockInterface> data_type_adapt,
44 std::shared_ptr<GNSSBlockInterface> in_filt,
45 std::shared_ptr<GNSSBlockInterface> res,
46 std::string role);
47
48 //! Destructor
49 ~SignalConditioner() = default;
50
51 void connect(gr::top_block_sptr top_block) override;
52 void disconnect(gr::top_block_sptr top_block) override;
53 gr::basic_block_sptr get_left_block() override;
54 gr::basic_block_sptr get_right_block() override;
55
56 inline std::string role() override { return role_; }
57
58 inline std::string implementation() override { return "Signal_Conditioner"; } //!< Returns "Signal_Conditioner"
59
60 inline size_t item_size() override { return data_type_adapt_->item_size(); }
61
62 inline std::shared_ptr<GNSSBlockInterface> data_type_adapter() { return data_type_adapt_; }
63 inline std::shared_ptr<GNSSBlockInterface> input_filter() { return in_filt_; }
64 inline std::shared_ptr<GNSSBlockInterface> resampler() { return res_; }
65
66private:
67 std::shared_ptr<GNSSBlockInterface> data_type_adapt_;
68 std::shared_ptr<GNSSBlockInterface> in_filt_;
69 std::shared_ptr<GNSSBlockInterface> res_;
70 std::string role_;
71 bool connected_;
72};
73
74
75/** \} */
76/** \} */
77#endif // GNSS_SDR_SIGNAL_CONDITIONER_H
This abstract class represents an interface to GNSS blocks.
SignalConditioner(std::shared_ptr< GNSSBlockInterface > data_type_adapt, std::shared_ptr< GNSSBlockInterface > in_filt, std::shared_ptr< GNSSBlockInterface > res, std::string role)
Constructor.
~SignalConditioner()=default
Destructor.
std::string implementation() override
Returns "Signal_Conditioner".
This interface represents a GNSS block.