GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
interleaved_byte_to_complex_byte.h
Go to the documentation of this file.
1 /*!
2  * \file interleaved_byte_to_complex_byte.h
3  * \brief Adapts an 8-bits interleaved sample stream into a 16-bits complex 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_BYTE_TO_COMPLEX_BYTE_H
21 #define GNSS_SDR_INTERLEAVED_BYTE_TO_COMPLEX_BYTE_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_byte_to_complex_byte_sptr = std::shared_ptr<interleaved_byte_to_complex_byte>;
34 #else
35 using interleaved_byte_to_complex_byte_sptr = boost::shared_ptr<interleaved_byte_to_complex_byte>;
36 #endif
37 
38 interleaved_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte();
39 
40 /*!
41  * \brief This class adapts an 8-bits interleaved sample stream
42  * into a 16-bits complex stream (std::complex<unsigned char>)
43  */
44 class interleaved_byte_to_complex_byte : 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_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte();
54 };
55 
56 #endif // GNSS_SDR_INTERLEAVED_BYTE_TO_COMPLEX_BYTE_H
This class adapts an 8-bits interleaved sample stream into a 16-bits complex stream (std::complex<uns...