GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
ishort_to_complex.h
Go to the documentation of this file.
1 /*!
2  * \file ishort_to_complex.h
3  * \brief Adapts an I/Q interleaved short integer sample stream to a gr_complex (float) stream
4  * \author Javier Arribas, jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 #ifndef GNSS_SDR_ISHORT_TO_COMPLEX_H
21 #define GNSS_SDR_ISHORT_TO_COMPLEX_H
22 
23 #include "conjugate_cc.h"
24 #include "gnss_block_interface.h"
25 #include <gnuradio/blocks/file_sink.h>
26 #include <gnuradio/blocks/interleaved_short_to_complex.h>
27 #include <cstdint>
28 #include <string>
29 
31 
32 /*!
33  * \brief Adapts an I/Q interleaved short integer sample stream to a gr_complex (float) stream
34  *
35  */
37 {
38 public:
39  IshortToComplex(const ConfigurationInterface* configuration,
40  const std::string& role, unsigned int in_streams,
41  unsigned int out_streams);
42 
43  ~IshortToComplex() = default;
44 
45  inline std::string role() override
46  {
47  return role_;
48  }
49 
50  //! Returns "Ishort_To_Complex"
51  inline std::string implementation() override
52  {
53  return "Ishort_To_Complex";
54  }
55 
56  inline size_t item_size() override
57  {
58  return 2 * sizeof(int16_t);
59  }
60 
61  void connect(gr::top_block_sptr top_block) override;
62  void disconnect(gr::top_block_sptr top_block) override;
63  gr::basic_block_sptr get_left_block() override;
64  gr::basic_block_sptr get_right_block() override;
65 
66 private:
67  gr::blocks::interleaved_short_to_complex::sptr gr_interleaved_short_to_complex_;
68  conjugate_cc_sptr conjugate_cc_;
69  gr::blocks::file_sink::sptr file_sink_;
70  std::string dump_filename_;
71  std::string input_item_type_;
72  std::string output_item_type_;
73  std::string role_;
74  unsigned int in_streams_;
75  unsigned int out_streams_;
76  bool inverted_spectrum;
77  bool dump_;
78 };
79 
80 #endif
std::string implementation() override
Returns "Ishort_To_Complex".
This interface represents a GNSS block.
This abstract class represents an interface to configuration parameters.
Conjugate a stream of gr_complex.
This abstract class represents an interface to GNSS blocks.
Adapts an I/Q interleaved short integer sample stream to a gr_complex (float) stream.