summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
authorTim O'Shea2012-08-29 20:27:18 -0400
committerTom Rondeau2012-08-30 21:09:53 -0400
commit0e2f0c6473530ef6823a27f4f294826c777afe06 (patch)
treeedd7e671d08eeb1789685be9559a099432c69665 /grc
parent0a22fe1e6622ac083d8cef8a3b027035f2443c7f (diff)
downloadgnuradio-0e2f0c6473530ef6823a27f4f294826c777afe06.tar.gz
gnuradio-0e2f0c6473530ef6823a27f4f294826c777afe06.tar.bz2
gnuradio-0e2f0c6473530ef6823a27f4f294826c777afe06.zip
adding gr_endian_swap block
Diffstat (limited to 'grc')
-rw-r--r--grc/blocks/block_tree.xml2
-rw-r--r--grc/blocks/gr_endian_swap.xml41
2 files changed, 43 insertions, 0 deletions
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 3b5491a74..d7ec82e4a 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -64,6 +64,8 @@
<block>gr_fft_vxx</block>
<block>blks2_logpwrfft_x</block>
<block>gr_vector_insert_x</block>
+
+ <block>gr_endian_swap</block>
</cat>
<cat>
<name>Type Conversions</name>
diff --git a/grc/blocks/gr_endian_swap.xml b/grc/blocks/gr_endian_swap.xml
new file mode 100644
index 000000000..aa564026c
--- /dev/null
+++ b/grc/blocks/gr_endian_swap.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Add Block:
+## all types, 1 output, 2 to inf inputs
+###################################################
+ -->
+<block>
+ <name>Endian Swap</name>
+ <key>gr_endian_swap</key>
+ <import>from gnuradio import gr</import>
+ <make>gr.endian_swap($type.size)</make>
+ <param>
+ <name>IO Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:8</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>s32</key>
+ <opt>size:4</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>s16</key>
+ <opt>size:2</opt>
+ </option>
+ </param>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ </source>
+</block>