2012-02-18 17:45:37 +00:00
|
|
|
/*!
|
|
|
|
* \file direct_resampler_conditioner.h
|
|
|
|
* \brief Interface of an adapter of a direct resampler conditioner block
|
|
|
|
* to a SignalConditionerInterface
|
|
|
|
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2018-05-13 20:49:11 +00:00
|
|
|
* Copyright (C) 2010-2018 (see AUTHORS file for a list of contributors)
|
2012-02-18 17:45:37 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is a software defined Global Navigation
|
|
|
|
* Satellite Systems receiver
|
|
|
|
*
|
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
|
|
|
* GNSS-SDR is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2015-01-08 18:49:59 +00:00
|
|
|
* (at your option) any later version.
|
2012-02-18 17:45:37 +00:00
|
|
|
*
|
|
|
|
* GNSS-SDR is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-05-13 20:49:11 +00:00
|
|
|
* along with GNSS-SDR. If not, see <https://www.gnu.org/licenses/>.
|
2012-02-18 17:45:37 +00:00
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_H_
|
|
|
|
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_H_
|
|
|
|
|
|
|
|
#include "gnss_block_interface.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <gnuradio/hier_block2.h>
|
|
|
|
#include <string>
|
2012-02-18 17:45:37 +00:00
|
|
|
|
|
|
|
class ConfigurationInterface;
|
|
|
|
|
2013-01-28 23:50:09 +00:00
|
|
|
/*!
|
|
|
|
* \brief Interface of an adapter of a direct resampler conditioner block
|
|
|
|
* to a SignalConditionerInterface
|
|
|
|
*/
|
2018-03-03 01:03:39 +00:00
|
|
|
class DirectResamplerConditioner : public GNSSBlockInterface
|
2012-02-18 17:45:37 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
DirectResamplerConditioner(ConfigurationInterface* configuration,
|
2018-12-03 18:01:47 +00:00
|
|
|
const std::string& role, unsigned int in_stream,
|
2018-03-03 01:03:39 +00:00
|
|
|
unsigned int out_stream);
|
2012-02-18 17:45:37 +00:00
|
|
|
|
2019-07-21 17:32:52 +00:00
|
|
|
~DirectResamplerConditioner() = default;
|
2017-08-15 22:58:10 +00:00
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string role() override
|
2012-02-18 17:45:37 +00:00
|
|
|
{
|
|
|
|
return role_;
|
|
|
|
}
|
2017-08-15 22:58:10 +00:00
|
|
|
|
|
|
|
//! Returns "Direct_Resampler"
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string implementation() override
|
2012-02-18 17:45:37 +00:00
|
|
|
{
|
2012-06-22 14:17:28 +00:00
|
|
|
return "Direct_Resampler";
|
2012-02-18 17:45:37 +00:00
|
|
|
}
|
2017-08-15 22:58:10 +00:00
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline size_t item_size() override
|
2012-02-18 17:45:37 +00:00
|
|
|
{
|
|
|
|
return item_size_;
|
|
|
|
}
|
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-18 17:45:37 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string role_;
|
|
|
|
unsigned int in_stream_;
|
|
|
|
unsigned int out_stream_;
|
|
|
|
std::string item_type_;
|
|
|
|
size_t item_size_;
|
|
|
|
bool dump_;
|
|
|
|
std::string dump_filename_;
|
|
|
|
double sample_freq_in_;
|
|
|
|
double sample_freq_out_;
|
2013-07-04 13:47:40 +00:00
|
|
|
gr::block_sptr resampler_;
|
|
|
|
gr::block_sptr file_sink_;
|
2012-02-18 17:45:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /*GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_H_*/
|