GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
short_x2_to_cshort.h
Go to the documentation of this file.
1 /*!
2  * \file short_x2_to_cshort.h
3  * \brief Adapts two short streams 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_SHORT_X2_TO_CSHORT_H
21 #define GNSS_SDR_SHORT_X2_TO_CSHORT_H
22 
23 
24 #if GNURADIO_USES_STD_POINTERS
25 #include <memory>
26 #else
27 #include <boost/shared_ptr.hpp>
28 #endif
29 #include <gnuradio/sync_block.h>
30 #include <gnuradio/types.h> // for gr_vector_const_void_star
31 
32 class short_x2_to_cshort;
33 
34 #if GNURADIO_USES_STD_POINTERS
35 using short_x2_to_cshort_sptr = std::shared_ptr<short_x2_to_cshort>;
36 #else
37 using short_x2_to_cshort_sptr = boost::shared_ptr<short_x2_to_cshort>;
38 #endif
39 
40 short_x2_to_cshort_sptr make_short_x2_to_cshort();
41 
42 /*!
43  * \brief This class adapts two short streams into a std::complex<short> stream
44  */
45 class short_x2_to_cshort : public gr::sync_block
46 {
47 public:
48  int work(int noutput_items,
49  gr_vector_const_void_star &input_items,
50  gr_vector_void_star &output_items);
51 
52 private:
53  friend short_x2_to_cshort_sptr make_short_x2_to_cshort();
55 };
56 
57 #endif
This class adapts two short streams into a std::complex<short> stream.