GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
unpack_byte_2bit_samples.h
Go to the documentation of this file.
1 /*!
2  * \file unpack_byte_2bit_samples.h
3  *
4  * \brief Unpacks byte samples to NSR 2 bits samples
5  * \author Javier Arribas jarribas (at) cttc.es
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_UNPACK_BYTE_2BIT_SAMPLES_H
21 #define GNSS_SDR_UNPACK_BYTE_2BIT_SAMPLES_H
22 
23 #include <gnuradio/sync_interpolator.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 unpack_byte_2bit_samples_sptr = std::shared_ptr<unpack_byte_2bit_samples>;
34 #else
35 using unpack_byte_2bit_samples_sptr = boost::shared_ptr<unpack_byte_2bit_samples>;
36 #endif
37 
38 unpack_byte_2bit_samples_sptr make_unpack_byte_2bit_samples();
39 
40 /*!
41  * \brief This class implements conversion between byte packet samples to 2bit samples
42  * 1 byte = 4 2bit samples
43  */
44 class unpack_byte_2bit_samples : public gr::sync_interpolator
45 {
46 public:
48  ~unpack_byte_2bit_samples() = default;
49  int work(int noutput_items,
50  gr_vector_const_void_star &input_items,
51  gr_vector_void_star &output_items);
52 
53 private:
54  friend unpack_byte_2bit_samples_sptr make_unpack_byte_2bit_samples_sptr();
55 };
56 
57 #endif // GNSS_SDR_UNPACK_BYTE_2BIT_SAMPLES_H
This class implements conversion between byte packet samples to 2bit samples 1 byte = 4 2bit samples...