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