GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
unpack_short_byte_samples.h
1 /*!
2  * \file unpack_short_byte_samples.cc
3  *
4  * \brief Unpacks shorts samples to byte samples (1 short = 2 byte samples).
5  * Packing Order
6  * Packing order in Nibble I0 I1
7  * \author Javier Arribas jarribas (at) cttc.es
8  * -----------------------------------------------------------------------------
9  *
10  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
11  * This file is part of GNSS-SDR.
12  *
13  * Copyright (C) 2010-2022 (see AUTHORS file for a list of contributors)
14  * SPDX-License-Identifier: GPL-3.0-or-later
15  *
16  * -----------------------------------------------------------------------------
17  */
18 
19 #ifndef GNSS_SDR_UNPACK_SHORT_BYTE_SAMPLES_H
20 #define GNSS_SDR_UNPACK_SHORT_BYTE_SAMPLES_H
21 
22 #include "gnss_block_interface.h"
23 #include <gnuradio/sync_interpolator.h>
24 
25 /** \addtogroup Signal_Source
26  * \{ */
27 /** \addtogroup Signal_Source_gnuradio_blocks
28  * \{ */
29 
30 
32 
33 using unpack_short_byte_samples_sptr = gnss_shared_ptr<unpack_short_byte_samples>;
34 
35 unpack_short_byte_samples_sptr make_unpack_short_byte_samples();
36 
37 /*!
38  * \brief This class implements conversion between short packet samples to byte samples
39  * 1 short = 2 byte samples
40  */
41 class unpack_short_byte_samples : public gr::sync_interpolator
42 {
43 public:
45  void forecast(int noutput_items, gr_vector_int &ninput_items_required);
46  ~unpack_short_byte_samples() = default;
47  int work(int noutput_items,
48  gr_vector_const_void_star &input_items,
49  gr_vector_void_star &output_items);
50 
51 private:
52  friend unpack_short_byte_samples_sptr make_unpack_short_byte_samples_sptr();
53 };
54 
55 
56 /** \} */
57 /** \} */
58 #endif // GNSS_SDR_UNPACK_SHORT_BYTE_SAMPLES_H
This class implements conversion between short packet samples to byte samples 1 short = 2 byte sample...
This interface represents a GNSS block.