summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
Diffstat (limited to 'grc')
-rw-r--r--grc/blocks/block_tree.xml1
-rw-r--r--grc/blocks/gr_random_pdu.xml35
2 files changed, 36 insertions, 0 deletions
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 183883959..dcd6c5448 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -45,6 +45,7 @@
<block>gr_tagged_stream_to_pdu</block>
<block>gr_tuntap_pdu</block>
<block>gr_socket_pdu</block>
+ <block>gr_random_pdu</block>
</cat>
<cat>
<name>Operators</name>
diff --git a/grc/blocks/gr_random_pdu.xml b/grc/blocks/gr_random_pdu.xml
new file mode 100644
index 000000000..ed5a79a92
--- /dev/null
+++ b/grc/blocks/gr_random_pdu.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## Random PDU
+###################################################
+ -->
+<block>
+ <name>Random PDU Generator</name>
+ <key>gr_random_pdu</key>
+ <import>from gnuradio import gr</import>
+ <import>from gruel import pmt</import>
+ <make>gr.random_pdu($minsize, $maxsize)</make>
+ <param>
+ <name>Min Bytes</name>
+ <key>minsize</key>
+ <value>50</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Max Bytes</name>
+ <key>maxsize</key>
+ <value>2000</value>
+ <type>int</type>
+ </param>
+ <sink>
+ <name>generate</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+ <source>
+ <name>pdus</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+</block>