GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
interleaved_short_to_complex_short.h
Go to the documentation of this file.
1 /*!
2  * \file interleaved_short_to_complex_short.h
3  * \brief Adapts a short (16-bits) interleaved sample stream into a std::complex<short> stream
4  * \author Carles Fernandez Prades, cfernandez(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_INTERLEAVED_SHORT_TO_COMPLEX_SHORT_H
21 #define GNSS_SDR_INTERLEAVED_SHORT_TO_COMPLEX_SHORT_H
22 
23 #include <gnuradio/sync_decimator.h>
24 #if GNURADIO_USES_STD_POINTERS
25 #include <memory>
26 #else
27 #include <boost/shared_ptr.hpp>
28 #endif
29 
31 
32 #if GNURADIO_USES_STD_POINTERS
33 using interleaved_short_to_complex_short_sptr = std::shared_ptr<interleaved_short_to_complex_short>;
34 #else
35 using interleaved_short_to_complex_short_sptr = boost::shared_ptr<interleaved_short_to_complex_short>;
36 #endif
37 
38 interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short();
39 
40 /*!
41  * \brief This class adapts a short (16-bits) interleaved sample stream
42  * into a std::complex<short> stream
43  */
44 class interleaved_short_to_complex_short : public gr::sync_decimator
45 {
46 public:
47  int work(int noutput_items,
48  gr_vector_const_void_star &input_items,
49  gr_vector_void_star &output_items);
50 
51 private:
52  friend interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short();
54 };
55 
56 #endif // GNSS_SDR_INTERLEAVED_SHORT_TO_COMPLEX_SHORT_H
This class adapts a short (16-bits) interleaved sample stream into a std::complex<short> stream...