GNU Radio 3.7.2 C++ API
unpacked_to_packed_ss.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2006,2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 // WARNING: this file is machine generated. Edits will be overwritten
24 
25 #ifndef INCLUDED_BLOCKS_UNPACKED_TO_PACKED_SS_H
26 #define INCLUDED_BLOCKS_UNPACKED_TO_PACKED_SS_H
27 
28 #include <gnuradio/blocks/api.h>
29 #include <gnuradio/block.h>
30 #include <gnuradio/endianness.h>
31 
32 namespace gr {
33  namespace blocks {
34 
35  /*!
36  * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
37  * \ingroup byte_operators_blk
38  *
39  * \details
40  * input: stream of short; output: stream of short
41  *
42  * This is the inverse of gr::blocks::packed_to_unpacked_XX.
43  *
44  * The low \p bits_per_chunk bits are extracted from each input
45  * byte or short. These bits are then packed densely into the
46  * output bytes or shorts, such that all 8 or 16 bits of the
47  * output bytes or shorts are filled with valid input bits. The
48  * right thing is done if bits_per_chunk is not a power of two.
49  *
50  * The combination of gr::blocks::packed_to_unpacked_XX followed by
51  * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the
52  * general case of mapping from a stream of bytes or shorts into
53  * arbitrary float or complex symbols.
54  *
55  * \sa gr::blocks::packed_to_unpacked_bb, gr::blocks::unpacked_to_packed_bb,
56  * \sa gr::blocks::packed_to_unpacked_ss, gr::blocks::unpacked_to_packed_ss,
57  * \sa gr::blocks::chunks_to_symbols_bf, gr::blocks::chunks_to_symbols_bc.
58  * \sa gr::blocks::chunks_to_symbols_sf, gr::blocks::chunks_to_symbols_sc.
59  */
60  class BLOCKS_API unpacked_to_packed_ss : virtual public block
61  {
62  public:
63  // gr::blocks::unpacked_to_packed_ss::sptr
65 
66  static sptr make(unsigned int bits_per_chunk,
67  endianness_t endianness);
68  };
69 
70  } /* namespace blocks */
71 } /* namespace gr */
72 
73 #endif /* INCLUDED_BLOCKS_UNPACKED_TO_PACKED_SS_H */
endianness_t
Definition: endianness.h:28
boost::shared_ptr< unpacked_to_packed_ss > sptr
Definition: unpacked_to_packed_ss.h:64
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:30
Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts.
Definition: unpacked_to_packed_ss.h:60
The abstract base class for all 'terminal' processing blocks.A signal processing flow is constructed ...
Definition: block.h:60