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