2012-08-01 14:17:40 +00:00
|
|
|
/*!
|
|
|
|
* \file ishort_to_complex.h
|
|
|
|
* \brief Adapts an I/Q interleaved short integer sample stream to a gr_complex (float) stream
|
|
|
|
* \author Javier Arribas, jarribas(at)cttc.es
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2015-01-08 18:49:59 +00:00
|
|
|
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
2012-08-01 14:17:40 +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-08-01 14:17:40 +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
|
|
|
|
* along with GNSS-SDR. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GNSS_SDR_ISHORT_TO_COMPLEX_H_
|
|
|
|
#define GNSS_SDR_ISHORT_TO_COMPLEX_H_
|
|
|
|
|
2014-01-12 20:07:38 +00:00
|
|
|
#include <string>
|
2012-11-25 11:15:11 +00:00
|
|
|
#include <gnuradio/blocks/interleaved_short_to_complex.h>
|
2013-07-04 13:47:40 +00:00
|
|
|
#include <gnuradio/blocks/file_sink.h>
|
2014-01-12 20:07:38 +00:00
|
|
|
#include "gnss_block_interface.h"
|
|
|
|
|
2012-08-01 14:17:40 +00:00
|
|
|
|
|
|
|
class ConfigurationInterface;
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Adapts an I/Q interleaved short integer sample stream to a gr_complex (float) stream
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class IshortToComplex: public GNSSBlockInterface
|
|
|
|
{
|
|
|
|
public:
|
2012-10-28 10:56:04 +00:00
|
|
|
IshortToComplex(ConfigurationInterface* configuration,
|
2012-08-01 14:17:40 +00:00
|
|
|
std::string role, unsigned int in_streams,
|
2016-05-09 16:44:58 +00:00
|
|
|
unsigned int out_streams);
|
2012-08-01 14:17:40 +00:00
|
|
|
|
|
|
|
virtual ~IshortToComplex();
|
|
|
|
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string role() override
|
2012-08-01 14:17:40 +00:00
|
|
|
{
|
|
|
|
return role_;
|
|
|
|
}
|
2017-08-15 22:58:10 +00:00
|
|
|
|
2015-02-17 01:31:22 +00:00
|
|
|
//! Returns "Ishort_To_Complex"
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string implementation() override
|
2012-08-01 14:17:40 +00:00
|
|
|
{
|
2015-02-17 01:31:22 +00:00
|
|
|
return "Ishort_To_Complex";
|
2012-08-01 14:17:40 +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-08-01 14:17:40 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
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-08-01 14:17:40 +00:00
|
|
|
|
|
|
|
private:
|
2012-11-25 11:15:11 +00:00
|
|
|
gr::blocks::interleaved_short_to_complex::sptr gr_interleaved_short_to_complex_;
|
2012-08-01 14:17:40 +00:00
|
|
|
ConfigurationInterface* config_;
|
|
|
|
bool dump_;
|
|
|
|
std::string dump_filename_;
|
|
|
|
std::string input_item_type_;
|
|
|
|
std::string output_item_type_;
|
|
|
|
std::string role_;
|
|
|
|
unsigned int in_streams_;
|
|
|
|
unsigned int out_streams_;
|
2013-07-04 13:47:40 +00:00
|
|
|
gr::blocks::file_sink::sptr file_sink_;
|
2012-08-01 14:17:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|