2012-02-19 17:45:51 +00:00
|
|
|
/*!
|
|
|
|
* \file signal_conditioner.h
|
2012-07-02 11:54:24 +00:00
|
|
|
* \brief It wraps blocks to change data type, filter and resample input data.
|
2012-02-19 17:45:51 +00:00
|
|
|
* \author Luis Esteve, 2012. luis(at)epsilon-formacion.com
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2019-07-26 10:38:20 +00:00
|
|
|
* Copyright (C) 2010-2019 (see AUTHORS file for a list of contributors)
|
2012-02-19 17:45:51 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2012-02-19 17:45:51 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_SIGNAL_CONDITIONER_H
|
|
|
|
#define GNSS_SDR_SIGNAL_CONDITIONER_H
|
2012-02-19 17:45:51 +00:00
|
|
|
|
|
|
|
#include "gnss_block_interface.h"
|
2019-03-04 07:12:50 +00:00
|
|
|
#include <gnuradio/block.h>
|
|
|
|
#include <cstddef>
|
|
|
|
#include <memory>
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <string>
|
2012-02-19 17:45:51 +00:00
|
|
|
|
|
|
|
class ConfigurationInterface;
|
|
|
|
|
2012-07-02 11:54:24 +00:00
|
|
|
/*!
|
|
|
|
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
|
|
|
|
* to be applied to the input flow of sampled signal.
|
|
|
|
*/
|
2018-03-03 01:03:39 +00:00
|
|
|
class SignalConditioner : public GNSSBlockInterface
|
2012-02-19 17:45:51 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
//! Constructor
|
2020-06-29 07:07:41 +00:00
|
|
|
SignalConditioner(const ConfigurationInterface *configuration,
|
2018-03-03 01:03:39 +00:00
|
|
|
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
|
|
|
|
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation);
|
2012-02-19 17:45:51 +00:00
|
|
|
|
2019-07-21 17:32:52 +00:00
|
|
|
//! Destructor
|
|
|
|
~SignalConditioner() = default;
|
2012-02-19 17:45:51 +00:00
|
|
|
|
2017-08-15 22:58:10 +00:00
|
|
|
void connect(gr::top_block_sptr top_block) override;
|
|
|
|
void disconnect(gr::top_block_sptr top_block) override;
|
|
|
|
gr::basic_block_sptr get_left_block() override;
|
|
|
|
gr::basic_block_sptr get_right_block() override;
|
2012-02-19 17:45:51 +00:00
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string role() override { return role_; }
|
2017-08-15 22:58:10 +00:00
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string implementation() override { return "Signal_Conditioner"; } //!< Returns "Signal_Conditioner"
|
2017-08-15 22:58:10 +00:00
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline size_t item_size() override { return 0; }
|
2012-02-19 17:45:51 +00:00
|
|
|
|
2018-03-03 01:03:39 +00:00
|
|
|
inline std::shared_ptr<GNSSBlockInterface> data_type_adapter() { return data_type_adapt_; }
|
|
|
|
inline std::shared_ptr<GNSSBlockInterface> input_filter() { return in_filt_; }
|
|
|
|
inline std::shared_ptr<GNSSBlockInterface> resampler() { return res_; }
|
2012-02-19 17:45:51 +00:00
|
|
|
|
|
|
|
private:
|
2016-05-02 15:26:32 +00:00
|
|
|
std::shared_ptr<GNSSBlockInterface> data_type_adapt_;
|
|
|
|
std::shared_ptr<GNSSBlockInterface> in_filt_;
|
|
|
|
std::shared_ptr<GNSSBlockInterface> res_;
|
2012-02-19 17:45:51 +00:00
|
|
|
std::string role_;
|
|
|
|
std::string implementation_;
|
|
|
|
bool connected_;
|
|
|
|
};
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#endif // GNSS_SDR_SIGNAL_CONDITIONER_H
|