GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
pass_through.h
Go to the documentation of this file.
1 /*!
2  * \file pass_through.h
3  * \brief Interface of a block that just puts its input in its
4  * output.
5  * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
6  *
7  *
8  * -----------------------------------------------------------------------------
9  *
10  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
11  * This file is part of GNSS-SDR.
12  *
13  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
14  * SPDX-License-Identifier: GPL-3.0-or-later
15  *
16  * -----------------------------------------------------------------------------
17  */
18 
19 #ifndef GNSS_SDR_PASS_THROUGH_H
20 #define GNSS_SDR_PASS_THROUGH_H
21 
22 #include "conjugate_cc.h"
23 #include "conjugate_ic.h"
24 #include "conjugate_sc.h"
25 #include "gnss_block_interface.h"
26 #include <gnuradio/blocks/copy.h>
27 #include <gnuradio/runtime_types.h>
28 #include <cstddef>
29 #include <string>
30 
31 /** \addtogroup Algorithms_Library
32  * \{ */
33 /** \addtogroup Algorithm_libs algorithms_libs
34  * \{ */
35 
36 
38 
39 /*!
40  * \brief This class implements a block that connects input and output (does nothing)
41  */
43 {
44 public:
45  Pass_Through(const ConfigurationInterface* configuration,
46  const std::string& role,
47  unsigned int in_stream,
48  unsigned int out_stream);
49 
50  ~Pass_Through() = default;
51 
52  inline std::string role() override
53  {
54  return role_;
55  }
56 
57  //! Returns "Pass_Through"
58  inline std::string implementation() override
59  {
60  return "Pass_Through";
61  }
62 
63  inline std::string item_type() const
64  {
65  return item_type_;
66  }
67 
68  inline size_t item_size() override
69  {
70  return item_size_;
71  }
72 
73  void connect(gr::top_block_sptr top_block) override;
74  void disconnect(gr::top_block_sptr top_block) override;
75  gr::basic_block_sptr get_left_block() override;
76  gr::basic_block_sptr get_right_block() override;
77 
78 private:
79  gr::blocks::copy::sptr kludge_copy_;
80  conjugate_cc_sptr conjugate_cc_;
81  conjugate_sc_sptr conjugate_sc_;
82  conjugate_ic_sptr conjugate_ic_;
83  std::string item_type_;
84  std::string role_;
85  size_t item_size_;
86  unsigned int in_streams_;
87  unsigned int out_streams_;
88  bool inverted_spectrum;
89 };
90 
91 
92 /** \} */
93 /** \} */
94 #endif // GNSS_SDR_PASS_THROUGH_H
std::string implementation() override
Returns "Pass_Through".
Definition: pass_through.h:58
This class implements a block that connects input and output (does nothing)
Definition: pass_through.h:42
This interface represents a GNSS block.
This abstract class represents an interface to configuration parameters.
Conjugate a stream of gr_complex.
Conjugate a stream of lv_8sc_t ( std::complex<char> )
This abstract class represents an interface to GNSS blocks.
Conjugate a stream of lv_16sc_t ( std::complex<short> )