diff options
-rw-r--r-- | docs/sphinx/source/gr/converter_blk.rst | 1 | ||||
-rw-r--r-- | docs/sphinx/source/gr/index.rst | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/general.i | 4 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_pack_k_bits_bb.cc | 69 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_pack_k_bits_bb.h | 56 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_pack_k_bits_bb.i | 34 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc | 70 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h | 56 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i | 34 | ||||
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_pack_k_bits.py | 67 | ||||
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py | 57 | ||||
-rwxr-xr-x | gr-digital/examples/berawgn.py | 2 | ||||
-rw-r--r-- | gr-digital/python/generic_mod_demod.py | 14 | ||||
-rwxr-xr-x | gr-digital/python/qa_constellation.py | 2 | ||||
-rw-r--r-- | grc/blocks/block_tree.xml | 5 | ||||
-rw-r--r-- | grc/blocks/gr_pack_k_bits_bb.xml | 30 | ||||
-rw-r--r-- | grc/blocks/gr_unpack_k_bits_bb.xml | 25 |
18 files changed, 9 insertions, 520 deletions
diff --git a/docs/sphinx/source/gr/converter_blk.rst b/docs/sphinx/source/gr/converter_blk.rst index 81d159ece0..be643d2cb1 100644 --- a/docs/sphinx/source/gr/converter_blk.rst +++ b/docs/sphinx/source/gr/converter_blk.rst @@ -8,4 +8,3 @@ gnuradio.gr: Type Conversions .. autooldblock:: gnuradio.gr.complex_to_mag .. autooldblock:: gnuradio.gr.complex_to_mag_squared .. autooldblock:: gnuradio.gr.complex_to_arg -.. autooldblock:: gnuradio.gr.unpack_k_bits_bb diff --git a/docs/sphinx/source/gr/index.rst b/docs/sphinx/source/gr/index.rst index 9c4f34f93c..9cba4089fd 100644 --- a/docs/sphinx/source/gr/index.rst +++ b/docs/sphinx/source/gr/index.rst @@ -132,7 +132,6 @@ Type Conversions gnuradio.gr.complex_to_mag gnuradio.gr.complex_to_mag_squared gnuradio.gr.complex_to_arg - gnuradio.gr.unpack_k_bits_bb Signal Level Control (AGC) ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/gnuradio-core/src/lib/general/CMakeLists.txt b/gnuradio-core/src/lib/general/CMakeLists.txt index d38d478e7d..b844cf302c 100644 --- a/gnuradio-core/src/lib/general/CMakeLists.txt +++ b/gnuradio-core/src/lib/general/CMakeLists.txt @@ -170,8 +170,6 @@ set(gr_core_general_triple_threats gr_test gr_vco_f gr_vector_map - gr_unpack_k_bits_bb - gr_pack_k_bits_bb gr_annotator_alltoall gr_annotator_1to1 gr_annotator_raw diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i index 1769c1e832..ff4c95631b 100644 --- a/gnuradio-core/src/lib/general/general.i +++ b/gnuradio-core/src/lib/general/general.i @@ -47,8 +47,6 @@ #include <gr_constants.h> #include <gr_test_types.h> #include <gr_test.h> -#include <gr_unpack_k_bits_bb.h> -#include <gr_pack_k_bits_bb.h> #include <gr_feval.h> #include <gr_bin_statistics_f.h> #include <gr_copy.h> @@ -87,8 +85,6 @@ %include "gr_constants.i" %include "gr_test_types.h" %include "gr_test.i" -%include "gr_unpack_k_bits_bb.i" -%include "gr_pack_k_bits_bb.i" %include "gr_feval.i" %include "gr_bin_statistics_f.i" %include "gr_copy.i" diff --git a/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.cc b/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.cc deleted file mode 100644 index 0ea0c9e388..0000000000 --- a/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.cc +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gr_pack_k_bits_bb.h> -#include <gr_io_signature.h> -#include <stdexcept> -#include <iostream> - -gr_pack_k_bits_bb_sptr gr_make_pack_k_bits_bb(unsigned k) -{ - return gnuradio::get_initial_sptr(new gr_pack_k_bits_bb(k)); -} - - -gr_pack_k_bits_bb::gr_pack_k_bits_bb (unsigned k) - : gr_sync_decimator("pack_k_bits_bb", - gr_make_io_signature (1, 1, sizeof(unsigned char)), - gr_make_io_signature (1, 1, sizeof(unsigned char)), - k), - d_k (k) -{ - if (d_k == 0) - throw std::out_of_range("interpolation must be > 0"); -} - -gr_pack_k_bits_bb::~gr_pack_k_bits_bb() -{ -} - -int -gr_pack_k_bits_bb::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const unsigned char *in = (const unsigned char *)input_items[0]; - unsigned char *out = (unsigned char *)output_items[0]; - - for(int i = 0; i < noutput_items; i++) { - out[i] = 0x00; - for(unsigned int j = 0; j < d_k; j++) { - out[i] |= (0x01 & in[i*d_k+j])<<(d_k-j-1); - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.h b/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.h deleted file mode 100644 index 8e1508c78b..0000000000 --- a/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_GR_PACK_K_BITS_BB_H -#define INCLUDED_GR_PACK_K_BITS_BB_H - -#include <gr_core_api.h> -#include <gr_sync_decimator.h> - -class gr_pack_k_bits_bb; -typedef boost::shared_ptr<gr_pack_k_bits_bb> gr_pack_k_bits_bb_sptr; -GR_CORE_API gr_pack_k_bits_bb_sptr gr_make_pack_k_bits_bb (unsigned k); - -class gr_pack_k_bits_bb; - -/*! - * \brief Converts a stream of bytes with 1 bit in the LSB to a byte with k relevent bits. - * \ingroup converter_blk - */ -class GR_CORE_API gr_pack_k_bits_bb : public gr_sync_decimator -{ - private: - friend GR_CORE_API gr_pack_k_bits_bb_sptr gr_make_pack_k_bits_bb (unsigned k); - - gr_pack_k_bits_bb (unsigned k); - - unsigned d_k; // number of relevent bits to pack from k input bytes - - public: - ~gr_pack_k_bits_bb (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.i b/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.i deleted file mode 100644 index 6ae2095ec7..0000000000 --- a/gnuradio-core/src/lib/general/gr_pack_k_bits_bb.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2012 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -GR_SWIG_BLOCK_MAGIC(gr,pack_k_bits_bb) - -gr_pack_k_bits_bb_sptr gr_make_pack_k_bits_bb (int k) throw(std::exception); - -class gr_pack_k_bits_bb : public gr_sync_decimator -{ - private: - gr_pack_k_bits_bb (int k); - - public: - ~gr_pack_k_bits_bb (); -}; diff --git a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc deleted file mode 100644 index 00b88e9724..0000000000 --- a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.cc +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005,2010 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gr_unpack_k_bits_bb.h> -#include <gr_io_signature.h> -#include <stdexcept> -#include <iostream> - -gr_unpack_k_bits_bb_sptr gr_make_unpack_k_bits_bb (unsigned k) -{ - return gnuradio::get_initial_sptr(new gr_unpack_k_bits_bb (k)); -} - - -gr_unpack_k_bits_bb::gr_unpack_k_bits_bb (unsigned k) - : gr_sync_interpolator ("unpack_k_bits_bb", - gr_make_io_signature (1, 1, sizeof (unsigned char)), - gr_make_io_signature (1, 1, sizeof (unsigned char)), - k), - d_k (k) -{ - if (d_k == 0) - throw std::out_of_range ("interpolation must be > 0"); -} - -gr_unpack_k_bits_bb::~gr_unpack_k_bits_bb () -{ -} - -int -gr_unpack_k_bits_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const unsigned char *in = (const unsigned char *) input_items[0]; - unsigned char *out = (unsigned char *) output_items[0]; - - int n = 0; - for (unsigned int i = 0; i < noutput_items/d_k; i++){ - unsigned int t = in[i]; - for (int j = d_k - 1; j >= 0; j--) - out[n++] = (t >> j) & 0x01; - } - - assert(n == noutput_items); - return noutput_items; -} diff --git a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h deleted file mode 100644 index c3ea28d3fa..0000000000 --- a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_GR_UNPACK_K_BITS_BB_H -#define INCLUDED_GR_UNPACK_K_BITS_BB_H - -#include <gr_core_api.h> -#include <gr_sync_interpolator.h> - -class gr_unpack_k_bits_bb; -typedef boost::shared_ptr<gr_unpack_k_bits_bb> gr_unpack_k_bits_bb_sptr; -GR_CORE_API gr_unpack_k_bits_bb_sptr gr_make_unpack_k_bits_bb (unsigned k); - -class gr_unpack_k_bits_bb; - -/*! - * \brief Converts a byte with k relevent bits to k output bytes with 1 bit in the LSB. - * \ingroup converter_blk - */ -class GR_CORE_API gr_unpack_k_bits_bb : public gr_sync_interpolator -{ - private: - friend GR_CORE_API gr_unpack_k_bits_bb_sptr gr_make_unpack_k_bits_bb (unsigned k); - - gr_unpack_k_bits_bb (unsigned k); - - unsigned d_k; // number of relevent bits to unpack into k output bytes - - public: - ~gr_unpack_k_bits_bb (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i b/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i deleted file mode 100644 index de0f4b33e7..0000000000 --- a/gnuradio-core/src/lib/general/gr_unpack_k_bits_bb.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -GR_SWIG_BLOCK_MAGIC(gr,unpack_k_bits_bb) - -gr_unpack_k_bits_bb_sptr gr_make_unpack_k_bits_bb (int k) throw(std::exception); - -class gr_unpack_k_bits_bb : public gr_sync_interpolator -{ - private: - gr_unpack_k_bits_bb (int k); - - public: - ~gr_unpack_k_bits_bb (); -}; diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pack_k_bits.py b/gnuradio-core/src/python/gnuradio/gr/qa_pack_k_bits.py deleted file mode 100755 index 25fc5e9fcc..0000000000 --- a/gnuradio-core/src/python/gnuradio/gr/qa_pack_k_bits.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -from gnuradio import gr, gr_unittest -import random - -class test_pack(gr_unittest.TestCase): - - def setUp(self): - self.tb = gr.top_block () - - def tearDown(self): - self.tb = None - - def test_001(self): - src_data = (1,0,1,1,0,1,1,0) - expected_results = (1,0,1,1,0,1,1,0) - src = gr.vector_source_b(src_data,False) - op = gr.pack_k_bits_bb(1) - dst = gr.vector_sink_b() - self.tb.connect(src, op, dst) - self.tb.run() - self.assertEqual(expected_results, dst.data()) - - def test_002(self): - src_data = (1,0,1,1,0,0,0,1) - expected_results = ( 2, 3, 0, 1) - src = gr.vector_source_b(src_data,False) - op = gr.pack_k_bits_bb(2) - dst = gr.vector_sink_b() - self.tb.connect(src, op, dst) - self.tb.run() - #self.assertEqual(expected_results, dst.data()) - self.assertEqual(expected_results, dst.data()) - - def test_003(self): - src_data = expected_results = map(lambda x: random.randint(0,3), range(10)); - src = gr.vector_source_b( src_data ); - pack = gr.pack_k_bits_bb(2); - unpack = gr.unpack_k_bits_bb(2); - snk = gr.vector_sink_b(); - self.tb.connect(src,unpack,pack,snk); - self.tb.run() - self.assertEqual(list(expected_results), list(snk.data())); - -if __name__ == '__main__': - gr_unittest.run(test_pack, "test_pack.xml") - diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py b/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py deleted file mode 100755 index bb4e7733d4..0000000000 --- a/gnuradio-core/src/python/gnuradio/gr/qa_unpack_k_bits.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -from gnuradio import gr, gr_unittest -import random - -class test_unpack(gr_unittest.TestCase): - - def setUp(self): - self.tb = gr.top_block () - - def tearDown(self): - self.tb = None - - def test_001(self): - src_data = (1,0,1,1,0,1,1,0) - expected_results = (1,0,1,1,0,1,1,0) - src = gr.vector_source_b(src_data,False) - op = gr.unpack_k_bits_bb(1) - dst = gr.vector_sink_b() - self.tb.connect(src, op, dst) - self.tb.run() - self.assertEqual(expected_results, dst.data()) - - def test_002(self): - src_data = ( 2, 3, 0, 1) - expected_results = (1,0,1,1,0,0,0,1) - src = gr.vector_source_b(src_data,False) - op = gr.unpack_k_bits_bb(2) - dst = gr.vector_sink_b() - self.tb.connect(src, op, dst) - self.tb.run() - self.assertEqual(expected_results, dst.data()) - - -if __name__ == '__main__': - gr_unittest.run(test_unpack, "test_unpack.xml") - diff --git a/gr-digital/examples/berawgn.py b/gr-digital/examples/berawgn.py index b20b17fd39..6f9679d555 100755 --- a/gr-digital/examples/berawgn.py +++ b/gr-digital/examples/berawgn.py @@ -77,7 +77,7 @@ class BitErrors(gr.hier_block2): intdump_decim = int(N_BITS) self.connect(self, comp, - gr.unpack_k_bits_bb(bits_per_byte), + blocks.unpack_k_bits_bb(bits_per_byte), blocks.uchar_to_float(), blocks.integrate_ff(intdump_decim), blocks.multiply_const_ff(1.0/N_BITS), diff --git a/gr-digital/python/generic_mod_demod.py b/gr-digital/python/generic_mod_demod.py index a5d1d9eb37..bc00646ccc 100644 --- a/gr-digital/python/generic_mod_demod.py +++ b/gr-digital/python/generic_mod_demod.py @@ -303,7 +303,7 @@ class generic_demod(gr.hier_block2): mod_codes.invert_code(self._constellation.pre_diff_code())) # unpack the k bit vector into a stream of bits - self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol()) + self.unpack = blocks.unpack_k_bits_bb(self.bits_per_symbol()) if verbose: self._print_verbage() @@ -312,14 +312,14 @@ class generic_demod(gr.hier_block2): self._setup_logging() # Connect and Initialize base class - blocks = [self, self.agc, self.freq_recov, - self.time_recov, self.receiver] + self._blocks = [self, self.agc, self.freq_recov, + self.time_recov, self.receiver] if differential: - blocks.append(self.diffdec) + self._blocks.append(self.diffdec) if self.pre_diff_code: - blocks.append(self.symbol_mapper) - blocks += [self.unpack, self] - self.connect(*blocks) + self._blocks.append(self.symbol_mapper) + self._blocks += [self.unpack, self] + self.connect(*self._blocks) def samples_per_symbol(self): return self._samples_per_symbol diff --git a/gr-digital/python/qa_constellation.py b/gr-digital/python/qa_constellation.py index 12dbca232f..37112f70a3 100755 --- a/gr-digital/python/qa_constellation.py +++ b/gr-digital/python/qa_constellation.py @@ -206,7 +206,7 @@ class mod_demod(gr.hier_block2): self.blocks.append(digital.map_bb( mod_codes.invert_code(self.constellation.pre_diff_code()))) # unpack the k bit vector into a stream of bits - self.blocks.append(gr.unpack_k_bits_bb( + self.blocks.append(blocks.unpack_k_bits_bb( self.constellation.bits_per_symbol())) # connect to block output check_index = len(self.blocks) diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index a78184dff1..8ddcaac61d 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -69,11 +69,6 @@ <block>gr_burst_tagger</block> </cat> <cat> - <name>Misc Conversions</name> - <block>gr_unpack_k_bits_bb</block> - <block>gr_pack_k_bits_bb</block> - </cat> - <cat> <name>Synchronizers</name> <block>gr_mpsk_sync_cc</block> diff --git a/grc/blocks/gr_pack_k_bits_bb.xml b/grc/blocks/gr_pack_k_bits_bb.xml deleted file mode 100644 index 34e64a5d96..0000000000 --- a/grc/blocks/gr_pack_k_bits_bb.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Pack K Bits -################################################### - --> -<block> - <name>Pack K Bits</name> - <key>gr_pack_k_bits_bb</key> - <import>from gnuradio import gr</import> - <make>gr.pack_k_bits_bb($k)</make> - <param> - <name>K</name> - <key>k</key> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> - - <doc> - Pack K unpacked bits (one bit per byte) into a single packed byte containing k bits and 8 - k zeros. - </doc> - -</block> diff --git a/grc/blocks/gr_unpack_k_bits_bb.xml b/grc/blocks/gr_unpack_k_bits_bb.xml deleted file mode 100644 index 9917644ab5..0000000000 --- a/grc/blocks/gr_unpack_k_bits_bb.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Unpack K Bits -################################################### - --> -<block> - <name>Unpack K Bits</name> - <key>gr_unpack_k_bits_bb</key> - <import>from gnuradio import gr</import> - <make>gr.unpack_k_bits_bb($k)</make> - <param> - <name>K</name> - <key>k</key> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> |