summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
authorTom Rondeau2012-06-07 16:43:28 -0400
committerTom Rondeau2012-06-07 16:43:28 -0400
commitbfd0dfe00f107e00c0517790247fe723136a4c87 (patch)
treed0d97cf850dd5d157f74b2088e07728c55366b23 /grc
parent4f9556dc48da8d408994cb3aa84c7dfd716b34dc (diff)
parent9dc190127f3cc6f4688feaac514a0b887c531740 (diff)
downloadgnuradio-bfd0dfe00f107e00c0517790247fe723136a4c87.tar.gz
gnuradio-bfd0dfe00f107e00c0517790247fe723136a4c87.tar.bz2
gnuradio-bfd0dfe00f107e00c0517790247fe723136a4c87.zip
Merge branch 'master-mods'
Diffstat (limited to 'grc')
-rw-r--r--grc/blocks/block_tree.xml3
-rw-r--r--grc/blocks/gr_keep_m_in_n.xml74
-rw-r--r--grc/blocks/gr_pack_k_bits_bb.xml30
-rw-r--r--grc/blocks/gr_vector_insert_x.xml80
4 files changed, 187 insertions, 0 deletions
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 18bc050ba..0b0b6854e 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -61,6 +61,7 @@
<block>gr_fft_vxx</block>
<block>blks2_logpwrfft_x</block>
+ <block>gr_vector_insert_x</block>
</cat>
<cat>
<name>Type Conversions</name>
@@ -114,6 +115,7 @@
<block>gr_unpacked_to_packed_xx</block>
<block>gr_packed_to_unpacked_xx</block>
<block>gr_unpack_k_bits_bb</block>
+ <block>gr_pack_k_bits_bb</block>
<block>gr_chunks_to_symbols_xx</block>
<block>gr_map_bb</block>
</cat>
@@ -183,6 +185,7 @@
<block>blks2_rational_resampler_xxx</block>
<block>gr_fractional_interpolator_xx</block>
<block>gr_keep_one_in_n</block>
+ <block>gr_keep_m_in_n</block>
<block>gr_moving_average_xx</block>
<block>gr_iqcomp_cc</block>
<block>gr_dc_blocker</block>
diff --git a/grc/blocks/gr_keep_m_in_n.xml b/grc/blocks/gr_keep_m_in_n.xml
new file mode 100644
index 000000000..a63ef47a6
--- /dev/null
+++ b/grc/blocks/gr_keep_m_in_n.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Keep M in N
+###################################################
+ -->
+<block>
+ <name>Keep M in N</name>
+ <key>gr_keep_m_in_n</key>
+ <import>from gnuradio import gr</import>
+ <make>gr.keep_m_in_n($type.size, $m, $n, $offset)</make>
+ <callback>set_offset($offset)</callback>
+ <param>
+ <name>Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:gr.sizeof_gr_complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>size:gr.sizeof_int</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>size:gr.sizeof_short</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ </param>
+ <param>
+ <name>M</name>
+ <key>m</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>N</name>
+ <key>n</key>
+ <value>2</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>initial offset</name>
+ <key>offset</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+ <check>$n &gt; 0</check>
+ <check>$m &gt; 0</check>
+ <check>$m &lt; $n</check>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ <vlen>$n</vlen>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ <vlen>$m</vlen>
+ </source>
+</block>
diff --git a/grc/blocks/gr_pack_k_bits_bb.xml b/grc/blocks/gr_pack_k_bits_bb.xml
new file mode 100644
index 000000000..34e64a5d9
--- /dev/null
+++ b/grc/blocks/gr_pack_k_bits_bb.xml
@@ -0,0 +1,30 @@
+<?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_vector_insert_x.xml b/grc/blocks/gr_vector_insert_x.xml
new file mode 100644
index 000000000..f9ce1f654
--- /dev/null
+++ b/grc/blocks/gr_vector_insert_x.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Vector Source
+###################################################
+ -->
+<block>
+ <name>Vector Insert</name>
+ <key>gr_vector_insert_x</key>
+ <import>from gnuradio import gr</import>
+ <make>gr.vector_insert_$(type.fcn)($vector, $period, $offset)</make>
+ <param>
+ <name>Output Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>fcn:b</opt>
+ <opt>vec_type:int_vector</opt>
+ </option>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>fcn:c</opt>
+ <opt>vec_type:complex_vector</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>fcn:f</opt>
+ <opt>vec_type:real_vector</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>fcn:i</opt>
+ <opt>vec_type:int_vector</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>fcn:s</opt>
+ <opt>vec_type:int_vector</opt>
+ </option>
+ </param>
+ <param>
+ <name>Vector</name>
+ <key>vector</key>
+ <value>0, 0, 0</value>
+ <type>$type.vec_type</type>
+ </param>
+ <param>
+ <name>Periodicity</name>
+ <key>period</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Offset</name>
+ <key>offset</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ </source>
+
+ <doc>
+ Periodicity, the length of the periodicity at which the vector should be inserted at the output.
+ (i.e. one vector for every N output items)
+
+ Offset sepcifies where in the cycle period we should begin at.
+ </doc>
+</block>