2011-10-01 18:45:20 +00:00
|
|
|
/*!
|
|
|
|
* \file pass_through.h
|
2011-12-28 21:36:45 +00:00
|
|
|
* \brief Interface of a block that just puts its input in its
|
2011-10-01 18:45:20 +00:00
|
|
|
* output.
|
|
|
|
* \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*
|
2015-01-08 18:49:59 +00:00
|
|
|
* Copyright (C) 2010-2015 (see AUTHORS file for a list of contributors)
|
2011-10-01 18:45:20 +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.
|
2011-10-01 18:45:20 +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/>.
|
|
|
|
*
|
|
|
|
* -------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
2011-12-28 21:36:45 +00:00
|
|
|
#ifndef GNSS_SDR_PASS_THROUGH_H_
|
|
|
|
#define GNSS_SDR_PASS_THROUGH_H_
|
2011-10-01 18:45:20 +00:00
|
|
|
|
2014-01-12 20:07:38 +00:00
|
|
|
#include <string>
|
2013-07-04 13:47:40 +00:00
|
|
|
#include <gnuradio/hier_block2.h>
|
|
|
|
#include <gnuradio/blocks/copy.h>
|
2011-10-01 18:45:20 +00:00
|
|
|
#include "gnss_block_interface.h"
|
|
|
|
|
|
|
|
class ConfigurationInterface;
|
|
|
|
|
2013-01-28 23:50:09 +00:00
|
|
|
/*!
|
|
|
|
* \brief This class implements a block that connects input and output (does nothing)
|
|
|
|
*/
|
2012-01-23 00:52:05 +00:00
|
|
|
class Pass_Through : public GNSSBlockInterface
|
2011-10-01 18:45:20 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-01-23 00:52:05 +00:00
|
|
|
Pass_Through(ConfigurationInterface* configuration,
|
2011-10-01 18:45:20 +00:00
|
|
|
std::string role,
|
|
|
|
unsigned int in_stream,
|
|
|
|
unsigned int out_stream);
|
|
|
|
|
2012-01-23 00:52:05 +00:00
|
|
|
virtual ~Pass_Through();
|
2011-10-01 18:45:20 +00:00
|
|
|
std::string role()
|
|
|
|
{
|
|
|
|
return role_;
|
|
|
|
}
|
2013-01-28 23:50:09 +00:00
|
|
|
//! returns "Pass_Through"
|
2011-10-01 18:45:20 +00:00
|
|
|
std::string implementation()
|
|
|
|
{
|
2012-06-22 14:17:28 +00:00
|
|
|
return "Pass_Through";
|
2011-10-01 18:45:20 +00:00
|
|
|
}
|
|
|
|
std::string item_type()
|
|
|
|
{
|
|
|
|
return item_type_;
|
|
|
|
}
|
|
|
|
size_t vector_size()
|
|
|
|
{
|
|
|
|
return vector_size_;
|
|
|
|
}
|
|
|
|
size_t item_size()
|
|
|
|
{
|
|
|
|
return item_size_;
|
|
|
|
}
|
2013-07-04 13:47:40 +00:00
|
|
|
void connect(gr::top_block_sptr top_block);
|
|
|
|
void disconnect(gr::top_block_sptr top_block);
|
|
|
|
gr::basic_block_sptr get_left_block();
|
|
|
|
gr::basic_block_sptr get_right_block();
|
2011-10-01 18:45:20 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string item_type_;
|
|
|
|
size_t vector_size_;
|
|
|
|
std::string role_;
|
|
|
|
unsigned int in_streams_;
|
|
|
|
unsigned int out_streams_;
|
2013-07-04 13:47:40 +00:00
|
|
|
//gr_kludge_copy_sptr kludge_copy_;
|
|
|
|
gr::blocks::copy::sptr kludge_copy_;
|
2011-10-01 18:45:20 +00:00
|
|
|
size_t item_size_;
|
|
|
|
};
|
|
|
|
|
2011-12-28 21:36:45 +00:00
|
|
|
#endif /*GNSS_SDR_PASS_THROUGH_H_*/
|