GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
unpack_byte_2bit_cpx_samples.h
Go to the documentation of this file.
1 /*!
2  * \file unpack_byte_2bit_cpx_samples.h
3  *
4  * \brief Unpacks byte samples to 2 bits complex samples.
5  * Packing Order
6  * Most Significant Nibble - Sample n
7  * Least Significant Nibble - Sample n+1
8  * Packing order in Nibble Q1 Q0 I1 I0
9  * \author Javier Arribas jarribas (at) cttc.es
10  * -----------------------------------------------------------------------------
11  *
12  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
13  *
14  * GNSS-SDR is a software defined Global Navigation
15  * Satellite Systems receiver
16  *
17  * This file is part of GNSS-SDR.
18  *
19  * SPDX-License-Identifier: GPL-3.0-or-later
20  *
21  * -----------------------------------------------------------------------------
22  */
23 
24 #ifndef GNSS_SDR_UNPACK_BYTE_2BIT_CPX_SAMPLES_H
25 #define GNSS_SDR_UNPACK_BYTE_2BIT_CPX_SAMPLES_H
26 
27 #include <gnuradio/sync_interpolator.h>
28 #if GNURADIO_USES_STD_POINTERS
29 #include <memory>
30 #else
31 #include <boost/shared_ptr.hpp>
32 #endif
33 
35 
36 #if GNURADIO_USES_STD_POINTERS
37 using unpack_byte_2bit_cpx_samples_sptr = std::shared_ptr<unpack_byte_2bit_cpx_samples>;
38 #else
39 using unpack_byte_2bit_cpx_samples_sptr = boost::shared_ptr<unpack_byte_2bit_cpx_samples>;
40 #endif
41 
42 unpack_byte_2bit_cpx_samples_sptr make_unpack_byte_2bit_cpx_samples();
43 
44 /*!
45  * \brief This class implements conversion between byte packet samples to 2bit_cpx samples
46  * 1 byte = 2 x complex 2bit I, + 2bit Q samples
47  */
48 class unpack_byte_2bit_cpx_samples : public gr::sync_interpolator
49 {
50 public:
52  ~unpack_byte_2bit_cpx_samples() = default;
53  int work(int noutput_items,
54  gr_vector_const_void_star &input_items,
55  gr_vector_void_star &output_items);
56 
57 private:
58  friend unpack_byte_2bit_cpx_samples_sptr make_unpack_byte_2bit_cpx_samples_sptr();
59 };
60 
61 #endif // GNSS_SDR_UNPACK_BYTE_2BIT_CPX_SAMPLES_H
This class implements conversion between byte packet samples to 2bit_cpx samples 1 byte = 2 x complex...