GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
10  *
11  * GNSS-SDR is a software defined Global Navigation
12  * Satellite Systems receiver
13  *
14  * This file is part of GNSS-SDR.
15  *
16  * SPDX-License-Identifier: GPL-3.0-or-later
17  *
18  * -----------------------------------------------------------------------------
19  */
20 
21 #ifndef GNSS_SDR_SIGNAL_CONDITIONER_H
22 #define GNSS_SDR_SIGNAL_CONDITIONER_H
23 
24 #include "gnss_block_interface.h"
25 #include <gnuradio/block.h>
26 #include <cstddef>
27 #include <memory>
28 #include <string>
29 
31 
32 /*!
33  * \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
34  * to be applied to the input flow of sampled signal.
35  */
37 {
38 public:
39  //! Constructor
40  SignalConditioner(const ConfigurationInterface *configuration,
41  std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
42  std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation);
43 
44  //! Destructor
45  ~SignalConditioner() = default;
46 
47  void connect(gr::top_block_sptr top_block) override;
48  void disconnect(gr::top_block_sptr top_block) override;
49  gr::basic_block_sptr get_left_block() override;
50  gr::basic_block_sptr get_right_block() override;
51 
52  inline std::string role() override { return role_; }
53 
54  inline std::string implementation() override { return "Signal_Conditioner"; } //!< Returns "Signal_Conditioner"
55 
56  inline size_t item_size() override { return 0; }
57 
58  inline std::shared_ptr<GNSSBlockInterface> data_type_adapter() { return data_type_adapt_; }
59  inline std::shared_ptr<GNSSBlockInterface> input_filter() { return in_filt_; }
60  inline std::shared_ptr<GNSSBlockInterface> resampler() { return res_; }
61 
62 private:
63  std::shared_ptr<GNSSBlockInterface> data_type_adapt_;
64  std::shared_ptr<GNSSBlockInterface> in_filt_;
65  std::shared_ptr<GNSSBlockInterface> res_;
66  std::string role_;
67  std::string implementation_;
68  bool connected_;
69 };
70 
71 #endif // GNSS_SDR_SIGNAL_CONDITIONER_H
~SignalConditioner()=default
Destructor.
This class wraps blocks to change data_type_adapter, input_filter and resampler to be applied to the ...
This interface represents a GNSS block.
This abstract class represents an interface to configuration parameters.
This abstract class represents an interface to GNSS blocks.
SignalConditioner(const ConfigurationInterface *configuration, std::shared_ptr< GNSSBlockInterface > data_type_adapt, std::shared_ptr< GNSSBlockInterface > in_filt, std::shared_ptr< GNSSBlockInterface > res, std::string role, std::string implementation)
Constructor.
std::string implementation() override
Returns "Signal_Conditioner".