summaryrefslogtreecommitdiff
path: root/gr-digital/swig
diff options
context:
space:
mode:
Diffstat (limited to 'gr-digital/swig')
-rw-r--r--gr-digital/swig/CMakeLists.txt122
-rw-r--r--gr-digital/swig/digital_additive_scrambler_bb.i31
-rw-r--r--gr-digital/swig/digital_bytes_to_syms.i29
-rw-r--r--gr-digital/swig/digital_chunks_to_symbols_XX.i.t38
-rw-r--r--gr-digital/swig/digital_constellation_decoder_cb.i2
-rw-r--r--gr-digital/swig/digital_correlate_access_code_tag_bb.i35
-rw-r--r--gr-digital/swig/digital_descrambler_bb.i30
-rw-r--r--gr-digital/swig/digital_diff_decoder_bb.i30
-rw-r--r--gr-digital/swig/digital_diff_encoder_bb.i30
-rw-r--r--gr-digital/swig/digital_diff_phasor_cc.i30
-rw-r--r--gr-digital/swig/digital_framer_sink_1.i30
-rw-r--r--gr-digital/swig/digital_glfsr_source_b.i35
-rw-r--r--gr-digital/swig/digital_glfsr_source_f.i35
-rw-r--r--gr-digital/swig/digital_map_bb.i31
-rw-r--r--gr-digital/swig/digital_packet_sink.i34
-rw-r--r--gr-digital/swig/digital_pfb_clock_sync_ccf.i58
-rw-r--r--gr-digital/swig/digital_pfb_clock_sync_fff.i58
-rw-r--r--gr-digital/swig/digital_pn_correlator_cc.i32
-rw-r--r--gr-digital/swig/digital_probe_density_b.i33
-rw-r--r--gr-digital/swig/digital_scrambler_bb.i30
-rw-r--r--gr-digital/swig/digital_simple_framer.i30
-rw-r--r--gr-digital/swig/digital_swig.i47
22 files changed, 816 insertions, 14 deletions
diff --git a/gr-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt
index 6f2c2251a..0c129e181 100644
--- a/gr-digital/swig/CMakeLists.txt
+++ b/gr-digital/swig/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -18,23 +18,107 @@
# Boston, MA 02110-1301, USA.
########################################################################
-# Setup swig generation
+# generate helper scripts to expand templated files
########################################################################
include(GrPython)
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
+#!${PYTHON_EXECUTABLE}
+
+import sys, os, re
+sys.path.append('${GR_CORE_PYTHONPATH}')
+os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
+os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
+
+if __name__ == '__main__':
+ import build_utils
+ root, inp = sys.argv[1:3]
+ for sig in sys.argv[3:]:
+ name = re.sub ('X+', sig, root)
+ d = build_utils.standard_dict(name, sig, 'digital')
+ build_utils.expand_template(d, inp)
+
+")
+
+macro(expand_i root)
+ # make a list of the .i generated files
+ unset(expanded_files_i)
+ foreach(sig ${ARGN})
+ string(REGEX REPLACE "X+" ${sig} name ${root})
+ list(APPEND expanded_files_i ${CMAKE_CURRENT_BINARY_DIR}/${name}.i)
+ endforeach(sig)
+
+ #create a command to generate the .i files
+ add_custom_command(
+ OUTPUT ${expanded_files_i}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.i.t
+ COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
+ ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
+ ${root} ${root}.i.t ${ARGN}
+ )
+
+ # Lists of generated i files
+ list(APPEND generated_swigs ${expanded_files_i})
+endmacro(expand_i)
+
+
+########################################################################
+# Invoke macro to generate various sources
+########################################################################
+expand_i(digital_chunks_to_symbols_XX bf bc sf sc if ic)
+
+add_custom_target(digital_generated_swigs DEPENDS
+ ${generated_swigs}
+)
+
+########################################################################
+# Setup swig generation
+########################################################################
include(GrSwig)
-set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/digital_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include)
+########################################################################
+# Create the master gengen swig include files
+########################################################################
+set(generated_index ${CMAKE_CURRENT_BINARY_DIR}/digital_generated.i.in)
+file(WRITE ${generated_index} "
+//
+// This file is machine generated. All edits will be overwritten
+//
+")
+
+file(APPEND ${generated_index} "%include \"gnuradio.i\"\n\n")
+file(APPEND ${generated_index} "%{\n")
+
+foreach(swig_file ${generated_swigs})
+ get_filename_component(name ${swig_file} NAME_WE)
+ file(APPEND ${generated_index} "#include<${name}.h>\n")
+endforeach(swig_file)
+file(APPEND ${generated_index} "%}\n")
+
+foreach(swig_file ${generated_swigs})
+ get_filename_component(name ${swig_file} NAME)
+ file(APPEND ${generated_index} "%include<${name}>\n")
+endforeach(swig_file)
+
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${generated_index} ${CMAKE_CURRENT_BINARY_DIR}/digital_generated.i
+)
set(GR_SWIG_INCLUDE_DIRS
${GR_DIGITAL_INCLUDE_DIRS}
${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/../include
)
+# Setup swig docs to depend on includes and pull in from build directory
set(GR_SWIG_LIBRARIES gnuradio-digital)
-
+set(GR_SWIG_TARGET_DEPS digital_generated_includes)
+set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/digital_swig_doc.i)
+set(GR_SWIG_DOC_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+ ${CMAKE_CURRENT_BINARY_DIR}/../include)
GR_SWIG_MAKE(digital_swig digital_swig.i)
-
GR_SWIG_INSTALL(
TARGETS digital_swig
DESTINATION ${GR_PYTHON_DIR}/gnuradio/digital
@@ -45,19 +129,34 @@ install(
FILES
digital_swig.i
${CMAKE_CURRENT_BINARY_DIR}/digital_swig_doc.i
+ ${CMAKE_CURRENT_BINARY_DIR}/digital_generated.i
+ ${generated_swigs}
+ digital_additive_scrambler_bb.i
digital_binary_slicer_fb.i
+ digital_bytes_to_syms.i
digital_clock_recovery_mm_cc.i
digital_clock_recovery_mm_ff.i
+ digital_cma_equalizer_cc.i
digital_constellation.i
digital_constellation_receiver_cb.i
digital_constellation_decoder_cb.i
digital_correlate_access_code_bb.i
+ digital_correlate_access_code_tag_bb.i
digital_costas_loop_cc.i
- digital_cma_equalizer_cc.i
+ digital_cpmmod_bc.i
digital_crc32.i
+ digital_descrambler_bb.i
+ digital_diff_decoder_bb.i
+ digital_diff_encoder_bb.i
+ digital_diff_phasor_cc.i
digital_fll_band_edge_cc.i
+ digital_framer_sink_1.i
+ digital_glfsr_source_b.i
+ digital_glfsr_source_f.i
+ digital_gmskmod_bc.i
digital_lms_dd_equalizer_cc.i
digital_kurtotic_equalizer_cc.i
+ digital_map_bb.i
digital_mpsk_receiver_cc.i
digital_mpsk_snr_est_cc.i
digital_ofdm_cyclic_prefixer.i
@@ -66,9 +165,14 @@ install(
digital_ofdm_insert_preamble.i
digital_ofdm_mapper_bcv.i
digital_ofdm_sampler.i
+ digital_packet_sink.i
+ digital_pfb_clock_sync_ccf.i
+ digital_pfb_clock_sync_fff.i
+ digital_pn_correlator_cc.i
+ digital_probe_density_b.i
digital_probe_mpsk_snr_est_c.i
- digital_gmskmod_bc.i
- digital_cpmmod_bc.i
+ digital_scrambler_bb.i
+ digital_simple_framer.i
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
COMPONENT "digital_swig"
)
diff --git a/gr-digital/swig/digital_additive_scrambler_bb.i b/gr-digital/swig/digital_additive_scrambler_bb.i
new file mode 100644
index 000000000..b063f0672
--- /dev/null
+++ b/gr-digital/swig/digital_additive_scrambler_bb.i
@@ -0,0 +1,31 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,2010,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(digital,additive_scrambler_bb);
+
+digital_additive_scrambler_bb_sptr
+digital_make_additive_scrambler_bb(int mask, int seed,
+ int len, int count=0);
+
+class digital_additive_scrambler_bb : public gr_sync_block
+{
+};
diff --git a/gr-digital/swig/digital_bytes_to_syms.i b/gr-digital/swig/digital_bytes_to_syms.i
new file mode 100644
index 000000000..cf23f035c
--- /dev/null
+++ b/gr-digital/swig/digital_bytes_to_syms.i
@@ -0,0 +1,29 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,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(digital,bytes_to_syms);
+
+digital_bytes_to_syms_sptr digital_make_bytes_to_syms();
+
+class digital_bytes_to_syms : public gr_sync_interpolator
+{
+};
diff --git a/gr-digital/swig/digital_chunks_to_symbols_XX.i.t b/gr-digital/swig/digital_chunks_to_symbols_XX.i.t
new file mode 100644
index 000000000..a80ba2af1
--- /dev/null
+++ b/gr-digital/swig/digital_chunks_to_symbols_XX.i.t
@@ -0,0 +1,38 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,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.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(digital,@BASE_NAME@);
+
+@SPTR_NAME@ digital_make_@BASE_NAME@
+(const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
+
+class @NAME@ : public gr_sync_interpolator
+{
+private:
+ @NAME@ (const std::vector<@O_TYPE@> &symbol_table, const int D = 1);
+
+public:
+ int D () const { return d_D; }
+ std::vector<@O_TYPE@> symbol_table () const { return d_symbol_table; }
+};
diff --git a/gr-digital/swig/digital_constellation_decoder_cb.i b/gr-digital/swig/digital_constellation_decoder_cb.i
index 53d3fe8e0..547f57ee6 100644
--- a/gr-digital/swig/digital_constellation_decoder_cb.i
+++ b/gr-digital/swig/digital_constellation_decoder_cb.i
@@ -31,7 +31,7 @@ class digital_constellation_decoder_cb : public gr_sync_block
digital_constellation_decoder_cb (digital_constellation_sptr constellation);
friend digital_constellation_decoder_cb_sptr
- gr_make_constellation_decoder_cb (digital_constellation_sptr constellation);
+ digital_make_constellation_decoder_cb (digital_constellation_sptr constellation);
public:
~digital_constellation_decoder_cb();
diff --git a/gr-digital/swig/digital_correlate_access_code_tag_bb.i b/gr-digital/swig/digital_correlate_access_code_tag_bb.i
new file mode 100644
index 000000000..03f20148a
--- /dev/null
+++ b/gr-digital/swig/digital_correlate_access_code_tag_bb.i
@@ -0,0 +1,35 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,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(digital,correlate_access_code_tag_bb);
+
+digital_correlate_access_code_tag_bb_sptr
+digital_make_correlate_access_code_tag_bb(const std::string &access_code,
+ int threshold,
+ const std::string &tag_name)
+ throw(std::out_of_range);
+
+class digital_correlate_access_code_tag_bb : public gr_sync_block
+{
+ public:
+ bool set_access_code(const std::string &access_code);
+};
diff --git a/gr-digital/swig/digital_descrambler_bb.i b/gr-digital/swig/digital_descrambler_bb.i
new file mode 100644
index 000000000..59de806fb
--- /dev/null
+++ b/gr-digital/swig/digital_descrambler_bb.i
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,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(digital,descrambler_bb);
+
+digital_descrambler_bb_sptr
+digital_make_descrambler_bb(int mask, int seed, int len);
+
+class digital_descrambler_bb : public gr_sync_block
+{
+};
diff --git a/gr-digital/swig/digital_diff_decoder_bb.i b/gr-digital/swig/digital_diff_decoder_bb.i
new file mode 100644
index 000000000..f9741c771
--- /dev/null
+++ b/gr-digital/swig/digital_diff_decoder_bb.i
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,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(digital,diff_decoder_bb)
+
+digital_diff_decoder_bb_sptr
+digital_make_diff_decoder_bb(unsigned int modulus);
+
+class digital_diff_decoder_bb : public gr_sync_block
+{
+};
diff --git a/gr-digital/swig/digital_diff_encoder_bb.i b/gr-digital/swig/digital_diff_encoder_bb.i
new file mode 100644
index 000000000..45a4589bf
--- /dev/null
+++ b/gr-digital/swig/digital_diff_encoder_bb.i
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,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(digital,diff_encoder_bb)
+
+digital_diff_encoder_bb_sptr
+digital_make_diff_encoder_bb(unsigned int modulus);
+
+class digital_diff_encoder_bb : public gr_sync_block
+{
+};
diff --git a/gr-digital/swig/digital_diff_phasor_cc.i b/gr-digital/swig/digital_diff_phasor_cc.i
new file mode 100644
index 000000000..b1e20eb99
--- /dev/null
+++ b/gr-digital/swig/digital_diff_phasor_cc.i
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,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(digital,diff_phasor_cc)
+
+digital_diff_phasor_cc_sptr
+digital_make_diff_phasor_cc();
+
+class digital_diff_phasor_cc : public gr_sync_block
+{
+};
diff --git a/gr-digital/swig/digital_framer_sink_1.i b/gr-digital/swig/digital_framer_sink_1.i
new file mode 100644
index 000000000..a5c56560d
--- /dev/null
+++ b/gr-digital/swig/digital_framer_sink_1.i
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,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(digital,framer_sink_1);
+
+digital_framer_sink_1_sptr
+digital_make_framer_sink_1(gr_msg_queue_sptr target_queue);
+
+class digital_framer_sink_1 : public gr_sync_block
+{
+};
diff --git a/gr-digital/swig/digital_glfsr_source_b.i b/gr-digital/swig/digital_glfsr_source_b.i
new file mode 100644
index 000000000..b1c487209
--- /dev/null
+++ b/gr-digital/swig/digital_glfsr_source_b.i
@@ -0,0 +1,35 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,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(digital,glfsr_source_b);
+
+digital_glfsr_source_b_sptr
+digital_make_glfsr_source_b(int degree, bool repeat=true,
+ int mask=0, int seed=1)
+ throw (std::runtime_error);
+
+class digital_glfsr_source_b : public gr_sync_block
+{
+public:
+ unsigned int period() const;
+ int mask() const;
+};
diff --git a/gr-digital/swig/digital_glfsr_source_f.i b/gr-digital/swig/digital_glfsr_source_f.i
new file mode 100644
index 000000000..4d94d8cd4
--- /dev/null
+++ b/gr-digital/swig/digital_glfsr_source_f.i
@@ -0,0 +1,35 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,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(digital,glfsr_source_f);
+
+digital_glfsr_source_f_sptr
+digital_make_glfsr_source_f(int degree, bool repeat=true,
+ int mask=0, int seed=1)
+ throw (std::runtime_error);
+
+class digital_glfsr_source_f : public gr_sync_block
+{
+public:
+ unsigned int period() const;
+ int mask() const;
+};
diff --git a/gr-digital/swig/digital_map_bb.i b/gr-digital/swig/digital_map_bb.i
new file mode 100644
index 000000000..50117d4f5
--- /dev/null
+++ b/gr-digital/swig/digital_map_bb.i
@@ -0,0 +1,31 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,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(digital,map_bb);
+
+digital_map_bb_sptr
+digital_make_map_bb(const std::vector<int> &map);
+
+class digital_map_bb : public gr_sync_block
+{
+};
+
diff --git a/gr-digital/swig/digital_packet_sink.i b/gr-digital/swig/digital_packet_sink.i
new file mode 100644
index 000000000..84f81f75c
--- /dev/null
+++ b/gr-digital/swig/digital_packet_sink.i
@@ -0,0 +1,34 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,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(digital,packet_sink)
+
+digital_packet_sink_sptr
+digital_make_packet_sink(const std::vector<unsigned char>& sync_vector,
+ gr_msg_queue_sptr target_queue,
+ int threshold = -1); // -1 -> use default
+
+class digital_packet_sink : public gr_sync_block
+{
+ public:
+ bool carrier_sensed() const;
+};
diff --git a/gr-digital/swig/digital_pfb_clock_sync_ccf.i b/gr-digital/swig/digital_pfb_clock_sync_ccf.i
new file mode 100644
index 000000000..dbba614cc
--- /dev/null
+++ b/gr-digital/swig/digital_pfb_clock_sync_ccf.i
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,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(digital,pfb_clock_sync_ccf);
+
+digital_pfb_clock_sync_ccf_sptr
+digital_make_pfb_clock_sync_ccf(double sps, float loop_bw,
+ const std::vector<float> &taps,
+ unsigned int filter_size=32,
+ float init_phase=0,
+ float max_rate_deviation=1.5,
+ int osps=1);
+
+class digital_pfb_clock_sync_ccf : public gr_block
+{
+ public:
+ void set_taps(const std::vector<float> &taps,
+ std::vector< std::vector<float> > &ourtaps,
+ std::vector<gr_fir_ccf*> &ourfilter);
+
+ std::vector< std::vector<float> > get_taps();
+ std::vector< std::vector<float> > get_diff_taps();
+ std::vector<float> get_channel_taps(int channel);
+ std::vector<float> get_diff_channel_taps(int channel);
+ std::string get_taps_as_string();
+ std::string get_diff_taps_as_string();
+
+ void set_loop_bandwidth(float bw);
+ void set_damping_factor(float df);
+ void set_alpha(float alpha);
+ void set_beta(float beta);
+ void set_max_rate_deviation(float m);
+
+ float get_loop_bandwidth() const;
+ float get_damping_factor() const;
+ float get_alpha() const;
+ float get_beta() const;
+ float get_clock_rate() const;
+};
diff --git a/gr-digital/swig/digital_pfb_clock_sync_fff.i b/gr-digital/swig/digital_pfb_clock_sync_fff.i
new file mode 100644
index 000000000..956495e5d
--- /dev/null
+++ b/gr-digital/swig/digital_pfb_clock_sync_fff.i
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009,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(digital,pfb_clock_sync_fff);
+
+digital_pfb_clock_sync_fff_sptr
+digital_make_pfb_clock_sync_fff(double sps, float loop_bw,
+ const std::vector<float> &taps,
+ unsigned int filter_size=32,
+ float init_phase=0,
+ float max_rate_deviation=1.5,
+ int osps=1);
+
+class digital_pfb_clock_sync_fff : public gr_block
+{
+ public:
+ void set_taps (const std::vector<float> &taps,
+ std::vector< std::vector<float> > &ourtaps,
+ std::vector<gr_fir_fff*> &ourfilter);
+
+ std::vector< std::vector<float> > get_taps();
+ std::vector< std::vector<float> > get_diff_taps();
+ std::vector<float> get_channel_taps(int channel);
+ std::vector<float> get_diff_channel_taps(int channel);
+ std::string get_taps_as_string();
+ std::string get_diff_taps_as_string();
+
+ void set_loop_bandwidth(float bw);
+ void set_damping_factor(float df);
+ void set_alpha(float alpha);
+ void set_beta(float beta);
+ void set_max_rate_deviation(float m);
+
+ float get_loop_bandwidth() const;
+ float get_damping_factor() const;
+ float get_alpha() const;
+ float get_beta() const;
+ float get_clock_rate() const;
+};
diff --git a/gr-digital/swig/digital_pn_correlator_cc.i b/gr-digital/swig/digital_pn_correlator_cc.i
new file mode 100644
index 000000000..11ccf12c2
--- /dev/null
+++ b/gr-digital/swig/digital_pn_correlator_cc.i
@@ -0,0 +1,32 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,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(digital,pn_correlator_cc)
+
+digital_pn_correlator_cc_sptr
+digital_make_pn_correlator_cc(int degree, int mask=0, int seed=1);
+
+class digital_pn_correlator_cc : public gr_sync_decimator
+{
+ protected:
+ digital_pn_correlator_cc();
+};
diff --git a/gr-digital/swig/digital_probe_density_b.i b/gr-digital/swig/digital_probe_density_b.i
new file mode 100644
index 000000000..b0c8a119a
--- /dev/null
+++ b/gr-digital/swig/digital_probe_density_b.i
@@ -0,0 +1,33 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,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(digital,probe_density_b);
+
+digital_probe_density_b_sptr
+digital_make_probe_density_b(double alpha);
+
+class digital_probe_density_b : public gr_sync_block
+{
+public:
+ double density() const;
+ void set_alpha(double alpha);
+};
diff --git a/gr-digital/swig/digital_scrambler_bb.i b/gr-digital/swig/digital_scrambler_bb.i
new file mode 100644
index 000000000..ac9abef92
--- /dev/null
+++ b/gr-digital/swig/digital_scrambler_bb.i
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008,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(digital,scrambler_bb);
+
+digital_scrambler_bb_sptr
+digital_make_scrambler_bb(int mask, int seed, int len);
+
+class digital_scrambler_bb : public gr_sync_block
+{
+};
diff --git a/gr-digital/swig/digital_simple_framer.i b/gr-digital/swig/digital_simple_framer.i
new file mode 100644
index 000000000..a376317c5
--- /dev/null
+++ b/gr-digital/swig/digital_simple_framer.i
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,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(digital,simple_framer);
+
+digital_simple_framer_sptr
+digital_make_simple_framer(int payload_bytesize);
+
+class digital_simple_framer : public gr_block
+{
+};
diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i
index 4e9c660bc..191076d75 100644
--- a/gr-digital/swig/digital_swig.i
+++ b/gr-digital/swig/digital_swig.i
@@ -35,8 +35,13 @@ enum snr_est_type_t {
%include <gri_control_loop.i>
+// Bring in generated blocks
+%include "digital_generated.i"
+
%{
+#include "digital_additive_scrambler_bb.h"
#include "digital_binary_slicer_fb.h"
+#include "digital_bytes_to_syms.h"
#include "digital_clock_recovery_mm_cc.h"
#include "digital_clock_recovery_mm_ff.h"
#include "digital_cma_equalizer_cc.h"
@@ -44,11 +49,22 @@ enum snr_est_type_t {
#include "digital_constellation_decoder_cb.h"
#include "digital_constellation_receiver_cb.h"
#include "digital_correlate_access_code_bb.h"
+#include "digital_correlate_access_code_tag_bb.h"
#include "digital_costas_loop_cc.h"
+#include "digital_cpmmod_bc.h"
#include "digital_crc32.h"
+#include "digital_descrambler_bb.h"
+#include "digital_diff_decoder_bb.h"
+#include "digital_diff_encoder_bb.h"
+#include "digital_diff_phasor_cc.h"
#include "digital_fll_band_edge_cc.h"
+#include "digital_framer_sink_1.h"
+#include "digital_glfsr_source_b.h"
+#include "digital_glfsr_source_f.h"
+#include "digital_gmskmod_bc.h"
#include "digital_kurtotic_equalizer_cc.h"
#include "digital_lms_dd_equalizer_cc.h"
+#include "digital_map_bb.h"
#include "digital_mpsk_receiver_cc.h"
#include "digital_mpsk_snr_est_cc.h"
#include "digital_ofdm_cyclic_prefixer.h"
@@ -57,11 +73,18 @@ enum snr_est_type_t {
#include "digital_ofdm_insert_preamble.h"
#include "digital_ofdm_mapper_bcv.h"
#include "digital_ofdm_sampler.h"
+#include "digital_packet_sink.h"
+#include "digital_pfb_clock_sync_ccf.h"
+#include "digital_pfb_clock_sync_fff.h"
+#include "digital_pn_correlator_cc.h"
+#include "digital_probe_density_b.h"
#include "digital_probe_mpsk_snr_est_c.h"
-#include "digital_cpmmod_bc.h"
-#include "digital_gmskmod_bc.h"
+#include "digital_scrambler_bb.h"
+#include "digital_simple_framer.h"
%}
+%include "digital_additive_scrambler_bb.i"
+%include "digital_bytes_to_syms.i"
%include "digital_binary_slicer_fb.i"
%include "digital_clock_recovery_mm_cc.i"
%include "digital_clock_recovery_mm_ff.i"
@@ -70,11 +93,22 @@ enum snr_est_type_t {
%include "digital_constellation_decoder_cb.i"
%include "digital_constellation_receiver_cb.i"
%include "digital_correlate_access_code_bb.i"
+%include "digital_correlate_access_code_tag_bb.i"
%include "digital_costas_loop_cc.i"
+%include "digital_cpmmod_bc.i"
%include "digital_crc32.i"
+%include "digital_descrambler_bb.i"
+%include "digital_diff_decoder_bb.i"
+%include "digital_diff_encoder_bb.i"
+%include "digital_diff_phasor_cc.i"
%include "digital_fll_band_edge_cc.i"
+%include "digital_framer_sink_1.i"
+%include "digital_glfsr_source_b.i"
+%include "digital_glfsr_source_f.i"
+%include "digital_gmskmod_bc.i"
%include "digital_kurtotic_equalizer_cc.i"
%include "digital_lms_dd_equalizer_cc.i"
+%include "digital_map_bb.i"
%include "digital_mpsk_receiver_cc.i"
%include "digital_mpsk_snr_est_cc.i"
%include "digital_ofdm_cyclic_prefixer.i"
@@ -83,6 +117,11 @@ enum snr_est_type_t {
%include "digital_ofdm_insert_preamble.i"
%include "digital_ofdm_mapper_bcv.i"
%include "digital_ofdm_sampler.i"
+%include "digital_packet_sink.i"
+%include "digital_pfb_clock_sync_ccf.i"
+%include "digital_pfb_clock_sync_fff.i"
+%include "digital_pn_correlator_cc.i"
+%include "digital_probe_density_b.i"
%include "digital_probe_mpsk_snr_est_c.i"
-%include "digital_cpmmod_bc.i"
-%include "digital_gmskmod_bc.i"
+%include "digital_scrambler_bb.i"
+%include "digital_simple_framer.i"