GNSS-SDR  0.0.13
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
11  *
12  * GNSS-SDR is a software defined Global Navigation
13  * Satellite Systems receiver
14  *
15  * This file is part of GNSS-SDR.
16  *
17  * SPDX-License-Identifier: GPL-3.0-or-later
18  *
19  * -----------------------------------------------------------------------------
20  */
21 
22 #ifndef GNSS_SDR_PASS_THROUGH_H
23 #define GNSS_SDR_PASS_THROUGH_H
24 
25 #include "conjugate_cc.h"
26 #include "conjugate_ic.h"
27 #include "conjugate_sc.h"
28 #include "gnss_block_interface.h"
29 #include <gnuradio/blocks/copy.h>
30 #include <gnuradio/runtime_types.h>
31 #include <cstddef>
32 #include <string>
33 
34 
36 
37 /*!
38  * \brief This class implements a block that connects input and output (does nothing)
39  */
41 {
42 public:
43  Pass_Through(const ConfigurationInterface* configuration,
44  const std::string& role,
45  unsigned int in_stream,
46  unsigned int out_stream);
47 
48  ~Pass_Through() = default;
49 
50  inline std::string role() override
51  {
52  return role_;
53  }
54 
55  //! returns "Pass_Through"
56  inline std::string implementation() override
57  {
58  return "Pass_Through";
59  }
60 
61  inline std::string item_type() const
62  {
63  return item_type_;
64  }
65 
66  inline size_t item_size() override
67  {
68  return item_size_;
69  }
70 
71  void connect(gr::top_block_sptr top_block) override;
72  void disconnect(gr::top_block_sptr top_block) override;
73  gr::basic_block_sptr get_left_block() override;
74  gr::basic_block_sptr get_right_block() override;
75 
76 private:
77  gr::blocks::copy::sptr kludge_copy_;
78  conjugate_cc_sptr conjugate_cc_;
79  conjugate_sc_sptr conjugate_sc_;
80  conjugate_ic_sptr conjugate_ic_;
81  std::string item_type_;
82  std::string role_;
83  size_t item_size_;
84  unsigned int in_streams_;
85  unsigned int out_streams_;
86  bool inverted_spectrum;
87 };
88 
89 #endif // GNSS_SDR_PASS_THROUGH_H
std::string implementation() override
returns "Pass_Through"
Definition: pass_through.h:56
This class implements a block that connects input and output (does nothing)
Definition: pass_through.h:40
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> )