summaryrefslogtreecommitdiff
path: root/gr-blocks/grc
diff options
context:
space:
mode:
authorJohnathan Corgan2012-09-05 12:42:10 -0700
committerJohnathan Corgan2012-09-05 12:42:10 -0700
commit2d2afd3b387bd3426cc30239f679d48cefe9eb93 (patch)
treeb1349bad628a1f2ead493de8b9250bd99026dd86 /gr-blocks/grc
parent9efeb1c58201858b7b2e678294707ae0db20f002 (diff)
downloadgnuradio-2d2afd3b387bd3426cc30239f679d48cefe9eb93.tar.gz
gnuradio-2d2afd3b387bd3426cc30239f679d48cefe9eb93.tar.bz2
gnuradio-2d2afd3b387bd3426cc30239f679d48cefe9eb93.zip
blocks: added gr::blocks::file_source
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r--gr-blocks/grc/blocks_block_tree.xml4
-rw-r--r--gr-blocks/grc/blocks_file_source.xml74
2 files changed, 78 insertions, 0 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml
index 94d09e9eb..cceb6c802 100644
--- a/gr-blocks/grc/blocks_block_tree.xml
+++ b/gr-blocks/grc/blocks_block_tree.xml
@@ -29,6 +29,10 @@
<cat>
<name></name> <!-- Blank for Root Name -->
<cat>
+ <name>Sources (New)</name>
+ <block>blocks_file_source</block>
+ </cat>
+ <cat>
<name>Math Operations (New) </name>
<block>blocks_add_xx</block>
<block>blocks_add_const_vxx</block>
diff --git a/gr-blocks/grc/blocks_file_source.xml b/gr-blocks/grc/blocks_file_source.xml
new file mode 100644
index 000000000..753465bb3
--- /dev/null
+++ b/gr-blocks/grc/blocks_file_source.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##File Source
+###################################################
+ -->
+<block>
+ <name>File Source</name>
+ <key>blocks_file_source</key>
+ <import>from gnuradio import blocks</import>
+ <make>blocks.file_source($type.size*$vlen, $file, $repeat)</make>
+ <param>
+ <name>File</name>
+ <key>file</key>
+ <value></value>
+ <type>file_open</type>
+ </param>
+ <param>
+ <name>Output 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>Repeat</name>
+ <key>repeat</key>
+ <value>True</value>
+ <type>enum</type>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+ <param>
+ <name>Vec Length</name>
+ <key>vlen</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <check>$vlen &gt; 0</check>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ <vlen>$vlen</vlen>
+ </source>
+</block>