GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
unpack_spir_gss6450_samples.h
Go to the documentation of this file.
1 /*!
2  * \file unpack_spir_gss6450_samples.h
3  *
4  * \brief Unpacks SPIR int samples
5  * \author Antonio Ramos, antonio.ramos(at)cttc.es
6  * \author Javier Arribas jarribas (at) cttc.es
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 not part of GNSS-SDR.
15  *
16  * SPDX-License-Identifier: GPL-3.0-or-later
17  *
18  * -----------------------------------------------------------------------------
19  */
20 
21 #ifndef GNSS_SDR_UNPACK_SPIR_GSS6450_SAMPLES_H
22 #define GNSS_SDR_UNPACK_SPIR_GSS6450_SAMPLES_H
23 
24 #include <gnuradio/sync_interpolator.h>
25 #if GNURADIO_USES_STD_POINTERS
26 #include <memory>
27 #else
28 #include <boost/shared_ptr.hpp>
29 #endif
30 
32 
33 #if GNURADIO_USES_STD_POINTERS
34 using unpack_spir_gss6450_samples_sptr = std::shared_ptr<unpack_spir_gss6450_samples>;
35 #else
36 using unpack_spir_gss6450_samples_sptr = boost::shared_ptr<unpack_spir_gss6450_samples>;
37 #endif
38 
39 unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples(int adc_nbit_);
40 
41 
42 class unpack_spir_gss6450_samples : public gr::sync_interpolator
43 {
44 public:
45  explicit unpack_spir_gss6450_samples(int adc_nbit);
46  ~unpack_spir_gss6450_samples() = default;
47  void decode_4bits_word(uint32_t input_uint32, gr_complex *out, int adc_bits_);
48  int work(int noutput_items,
49  gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
50 
51 private:
52  friend unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples_sptr(int adc_nbit);
53  int adc_bits;
54  int samples_per_int;
55 };
56 
57 #endif // GNSS_SDR_UNPACK_SPIR_GSS6450_SAMPLES_H