GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
cshort_to_float_x2.h
Go to the documentation of this file.
1 /*!
2  * \file cshort_to_float_x2.h
3  * \brief Adapts a std::complex<short> stream into two float streams
4  * \author Carles Fernandez Prades, cfernandez(at)cttc.es
5  *
6  *
7  * -----------------------------------------------------------------------------
8  *
9  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
10  *
11  * GNSS-SDR is a software defined Global Navigation
12  * Satellite Systems receiver
13  *
14  * This file is part of GNSS-SDR.
15  *
16  * SPDX-License-Identifier: GPL-3.0-or-later
17  *
18  * -----------------------------------------------------------------------------
19  */
20 
21 #ifndef GNSS_SDR_CSHORT_TO_FLOAT_X2_H
22 #define GNSS_SDR_CSHORT_TO_FLOAT_X2_H
23 
24 
25 #if GNURADIO_USES_STD_POINTERS
26 #include <memory>
27 #else
28 #include <boost/shared_ptr.hpp>
29 #endif
30 #include <gnuradio/sync_block.h>
31 #include <gnuradio/types.h> // for gr_vector_const_void_star
32 
33 class cshort_to_float_x2;
34 
35 #if GNURADIO_USES_STD_POINTERS
36 using cshort_to_float_x2_sptr = std::shared_ptr<cshort_to_float_x2>;
37 #else
38 using cshort_to_float_x2_sptr = boost::shared_ptr<cshort_to_float_x2>;
39 #endif
40 
41 cshort_to_float_x2_sptr make_cshort_to_float_x2();
42 
43 /*!
44  * \brief This class adapts a std::complex<short> stream
45  * into two 32-bits (float) streams
46  */
47 class cshort_to_float_x2 : public gr::sync_block
48 {
49 public:
50  int work(int noutput_items,
51  gr_vector_const_void_star &input_items,
52  gr_vector_void_star &output_items);
53 
54 private:
55  friend cshort_to_float_x2_sptr make_cshort_to_float_x2();
57 };
58 
59 #endif
This class adapts a std::complex<short> stream into two 32-bits (float) streams.