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
|
|
|
|
*
|
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2011-10-01 18:45:20 +00:00
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
2011-10-01 18:45:20 +00:00
|
|
|
* This file is part of GNSS-SDR.
|
|
|
|
*
|
2020-12-30 12:35:06 +00:00
|
|
|
* Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
|
2020-02-08 00:20:02 +00:00
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2011-10-01 18:45:20 +00:00
|
|
|
*
|
2020-07-28 14:57:15 +00:00
|
|
|
* -----------------------------------------------------------------------------
|
2011-10-01 18:45:20 +00:00
|
|
|
*/
|
|
|
|
|
2020-02-08 09:10:46 +00:00
|
|
|
#ifndef GNSS_SDR_PASS_THROUGH_H
|
|
|
|
#define GNSS_SDR_PASS_THROUGH_H
|
2011-10-01 18:45:20 +00:00
|
|
|
|
2017-11-17 08:21:03 +00:00
|
|
|
#include "conjugate_cc.h"
|
|
|
|
#include "conjugate_ic.h"
|
2018-12-09 21:00:09 +00:00
|
|
|
#include "conjugate_sc.h"
|
2018-02-26 02:15:53 +00:00
|
|
|
#include "gnss_block_interface.h"
|
|
|
|
#include <gnuradio/blocks/copy.h>
|
2019-03-05 07:59:04 +00:00
|
|
|
#include <gnuradio/runtime_types.h>
|
|
|
|
#include <cstddef>
|
2018-02-26 02:15:53 +00:00
|
|
|
#include <string>
|
2017-11-17 08:21:03 +00:00
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
/** \addtogroup Algorithms_Library
|
|
|
|
* \{ */
|
|
|
|
/** \addtogroup Algorithm_libs algorithms_libs
|
|
|
|
* \{ */
|
|
|
|
|
2011-10-01 18:45:20 +00:00
|
|
|
|
|
|
|
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:
|
2020-06-29 07:07:41 +00:00
|
|
|
Pass_Through(const ConfigurationInterface* configuration,
|
2018-12-03 18:01:47 +00:00
|
|
|
const std::string& role,
|
2018-03-03 01:03:39 +00:00
|
|
|
unsigned int in_stream,
|
|
|
|
unsigned int out_stream);
|
2011-10-01 18:45:20 +00:00
|
|
|
|
2019-07-21 17:32:52 +00:00
|
|
|
~Pass_Through() = default;
|
2017-08-21 09:45:12 +00:00
|
|
|
|
|
|
|
inline std::string role() override
|
2011-10-01 18:45:20 +00:00
|
|
|
{
|
|
|
|
return role_;
|
|
|
|
}
|
2017-08-21 09:45:12 +00:00
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
//! Returns "Pass_Through"
|
2017-08-21 09:45:12 +00:00
|
|
|
inline std::string implementation() override
|
2011-10-01 18:45:20 +00:00
|
|
|
{
|
2012-06-22 14:17:28 +00:00
|
|
|
return "Pass_Through";
|
2011-10-01 18:45:20 +00:00
|
|
|
}
|
2017-08-21 09:45:12 +00:00
|
|
|
|
|
|
|
inline std::string item_type() const
|
2011-10-01 18:45:20 +00:00
|
|
|
{
|
|
|
|
return item_type_;
|
|
|
|
}
|
2017-08-21 09:45:12 +00:00
|
|
|
|
|
|
|
inline size_t item_size() override
|
2011-10-01 18:45:20 +00:00
|
|
|
{
|
|
|
|
return item_size_;
|
|
|
|
}
|
2018-03-03 01:03:39 +00:00
|
|
|
|
2017-08-21 09:45:12 +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;
|
2011-10-01 18:45:20 +00:00
|
|
|
|
|
|
|
private:
|
2013-07-04 13:47:40 +00:00
|
|
|
gr::blocks::copy::sptr kludge_copy_;
|
2017-11-17 08:21:03 +00:00
|
|
|
conjugate_cc_sptr conjugate_cc_;
|
|
|
|
conjugate_sc_sptr conjugate_sc_;
|
|
|
|
conjugate_ic_sptr conjugate_ic_;
|
2020-06-24 09:27:31 +00:00
|
|
|
std::string item_type_;
|
|
|
|
std::string role_;
|
|
|
|
size_t item_size_;
|
|
|
|
unsigned int in_streams_;
|
|
|
|
unsigned int out_streams_;
|
2017-11-17 08:21:03 +00:00
|
|
|
bool inverted_spectrum;
|
2011-10-01 18:45:20 +00:00
|
|
|
};
|
|
|
|
|
2020-11-01 12:37:19 +00:00
|
|
|
|
|
|
|
/** \} */
|
|
|
|
/** \} */
|
2020-02-08 09:10:46 +00:00
|
|
|
#endif // GNSS_SDR_PASS_THROUGH_H
|