diff options
Diffstat (limited to 'grc/blocks')
-rw-r--r-- | grc/blocks/block_tree.xml | 9 | ||||
-rw-r--r-- | grc/blocks/gr_file_source.xml | 1 | ||||
-rw-r--r-- | grc/blocks/gr_message_debug.xml | 27 | ||||
-rw-r--r-- | grc/blocks/gr_message_strobe.xml | 35 | ||||
-rw-r--r-- | grc/blocks/gr_pdu_to_tagged_stream.xml | 40 | ||||
-rw-r--r-- | grc/blocks/gr_socket_pdu.xml | 62 | ||||
-rw-r--r-- | grc/blocks/gr_sub_xx.xml | 2 | ||||
-rw-r--r-- | grc/blocks/gr_tagged_stream_to_pdu.xml | 40 | ||||
-rw-r--r-- | grc/blocks/gr_tuntap_pdu.xml | 34 | ||||
-rw-r--r-- | grc/blocks/pad_sink.xml | 29 | ||||
-rw-r--r-- | grc/blocks/pad_source.xml | 29 |
11 files changed, 305 insertions, 3 deletions
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index d7ec82e4a..183883959 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -37,6 +37,15 @@ <block>virtual_sink</block> <block>gr_tag_debug</block> </cat> + <cat> + <name>Message Tools</name> + <block>gr_message_debug</block> + <block>gr_message_strobe</block> + <block>gr_pdu_to_tagged_stream</block> + <block>gr_tagged_stream_to_pdu</block> + <block>gr_tuntap_pdu</block> + <block>gr_socket_pdu</block> + </cat> <cat> <name>Operators</name> <block>gr_add_xx</block> diff --git a/grc/blocks/gr_file_source.xml b/grc/blocks/gr_file_source.xml index fcc7a7040..5f0e16b27 100644 --- a/grc/blocks/gr_file_source.xml +++ b/grc/blocks/gr_file_source.xml @@ -9,6 +9,7 @@ <key>gr_file_source</key> <import>from gnuradio import gr</import> <make>gr.file_source($type.size*$vlen, $file, $repeat)</make> + <callback>open($file, $repeat)</callback> <param> <name>File</name> <key>file</key> diff --git a/grc/blocks/gr_message_debug.xml b/grc/blocks/gr_message_debug.xml new file mode 100644 index 000000000..4d73fbd9c --- /dev/null +++ b/grc/blocks/gr_message_debug.xml @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Debug +################################################### + --> +<block> + <name>Message Debug</name> + <key>gr_message_debug</key> + <import>from gnuradio import gr</import> + <make>gr.message_debug()</make> + <sink> + <name>print</name> + <type>message</type> + <optional>1</optional> + </sink> + <sink> + <name>store</name> + <type>message</type> + <optional>1</optional> + </sink> + <sink> + <name>print_pdu_verbose</name> + <type>message</type> + <optional>1</optional> + </sink> +</block> diff --git a/grc/blocks/gr_message_strobe.xml b/grc/blocks/gr_message_strobe.xml new file mode 100644 index 000000000..60a7724df --- /dev/null +++ b/grc/blocks/gr_message_strobe.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Message Strobe +################################################### + --> +<block> + <name>Message Strobe</name> + <key>gr_message_strobe</key> + <import>from gnuradio import gr</import> + <import>from gruel import pmt</import> + <make>gr.message_strobe($msg, $period)</make> + <param> + <name>Message PMT</name> + <key>msg</key> + <value>pmt.pmt_intern("TEST")</value> + <type>raw</type> + </param> + <param> + <name>Period (ms)</name> + <key>period</key> + <value>1000</value> + <type>real</type> + </param> + <sink> + <name>set_msg</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>strobe</name> + <type>message</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_pdu_to_tagged_stream.xml b/grc/blocks/gr_pdu_to_tagged_stream.xml new file mode 100644 index 000000000..fc1c4d16a --- /dev/null +++ b/grc/blocks/gr_pdu_to_tagged_stream.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +################################################### +## PDU Message to Tagged Stream +################################################### + --> +<block> + <name>PDU to Tagged Stream</name> + <key>gr_pdu_to_tagged_stream</key> + <import>from gnuradio import gr</import> + <make>gr.pdu_to_tagged_stream($type.tv)</make> + <param> + <name>Item Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte</name> + <key>byte</key> + <opt>tv:gr.BYTE</opt> + </option> + <option> + <name>Complex</name> + <key>complex</key> + <opt>tv:gr.COMPLEX</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>tv:gr.FLOAT</opt> + </option> + </param> + <sink> + <name>pdus</name> + <type>message</type> + </sink> + <source> + <name>out</name> + <type>$type</type> + </source> +</block> diff --git a/grc/blocks/gr_socket_pdu.xml b/grc/blocks/gr_socket_pdu.xml new file mode 100644 index 000000000..a175c3699 --- /dev/null +++ b/grc/blocks/gr_socket_pdu.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Socket PDU Message source/sink +################################################### + --> +<block> + <name>Socket PDU</name> + <key>gr_socket_pdu</key> + <import>from gnuradio import gr</import> + <make>gr.socket_pdu($type, $host, $port, $mtu)</make> + <param> + <name>Type</name> + <key>type</key> + <value>TCP_SERVER</value> + <type>enum</type> + <option> + <name>TCP Server</name> + <key>"TCP_SERVER"</key> + </option> + <option> + <name>TCP Client</name> + <key>"TCP_CLIENT"</key> + </option> + <option> + <name>UDP Server</name> + <key>"UDP_SERVER"</key> + </option> + <option> + <name>UDP Client</name> + <key>"UDP_CLIENT"</key> + </option> + </param> + <param> + <name>Host</name> + <key>host</key> + <value></value> + <type>string</type> + </param> + <param> + <name>Port</name> + <key>port</key> + <value>52001</value> + <type>string</type> + </param> + <param> + <name>MTU</name> + <key>mtu</key> + <value>10000</value> + <type>int</type> + </param> + <sink> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/gr_sub_xx.xml b/grc/blocks/gr_sub_xx.xml index f1f4797e0..c677747da 100644 --- a/grc/blocks/gr_sub_xx.xml +++ b/grc/blocks/gr_sub_xx.xml @@ -48,7 +48,7 @@ <type>int</type> </param> <check>$vlen > 0</check> - <check>$num_inputs >= 2</check> + <check>$num_inputs >= 1</check> <sink> <name>in</name> <type>$type</type> diff --git a/grc/blocks/gr_tagged_stream_to_pdu.xml b/grc/blocks/gr_tagged_stream_to_pdu.xml new file mode 100644 index 000000000..e70a01608 --- /dev/null +++ b/grc/blocks/gr_tagged_stream_to_pdu.xml @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Tagged Stream to PDU Message +################################################### + --> +<block> + <name>Tagged Stream to PDU</name> + <key>gr_tagged_stream_to_pdu</key> + <import>from gnuradio import gr</import> + <make>gr.tagged_stream_to_pdu($type.tv)</make> + <param> + <name>Item Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte</name> + <key>byte</key> + <opt>tv:gr.BYTE</opt> + </option> + <option> + <name>Complex</name> + <key>complex</key> + <opt>tv:gr.COMPLEX</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>tv:gr.FLOAT</opt> + </option> + </param> + <sink> + <name>in</name> + <type>$type</type> + </sink> + <source> + <name>pdus</name> + <type>message</type> + </source> +</block> diff --git a/grc/blocks/gr_tuntap_pdu.xml b/grc/blocks/gr_tuntap_pdu.xml new file mode 100644 index 000000000..f169345af --- /dev/null +++ b/grc/blocks/gr_tuntap_pdu.xml @@ -0,0 +1,34 @@ +<?xml version="1.0"?> +<!-- +################################################### +## Tuntap PDU Message source/sink +################################################### + --> +<block> + <name>TunTap PDU</name> + <key>gr_tuntap_pdu</key> + <import>from gnuradio import gr</import> + <make>gr.tuntap_pdu($ifn, $mtu)</make> + <param> + <name>Interface Name</name> + <key>ifn</key> + <value>tun0</value> + <type>string</type> + </param> + <param> + <name>MTU</name> + <key>mtu</key> + <value>10000</value> + <type>int</type> + </param> + <sink> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </sink> + <source> + <name>pdus</name> + <type>message</type> + <optional>1</optional> + </source> +</block> diff --git a/grc/blocks/pad_sink.xml b/grc/blocks/pad_sink.xml index 2e9495260..f0e10a339 100644 --- a/grc/blocks/pad_sink.xml +++ b/grc/blocks/pad_sink.xml @@ -7,7 +7,9 @@ <block> <name>Pad Sink</name> <key>pad_sink</key> - <make></make> + <make>#if str($type) == "message" +None;self.message_port_register_hier_in($label) +#end if</make> <param> <name>Label</name> <key>label</key> @@ -43,6 +45,16 @@ <key>byte</key> <opt>size:gr.sizeof_char</opt> </option> + <option> + <name>Message</name> + <key>message</key> + <opt>size:0</opt> + </option> + <option> + <name>Wildcard</name> + <key></key> + <opt>size:0</opt> + </option> </param> <param> <name>Vec Length</name> @@ -50,6 +62,21 @@ <value>1</value> <type>int</type> </param> + <param> + <name>Optional</name> + <key>optional</key> + <value>False</value> + <type>bool</type> + <hide>part</hide> + <option> + <name>Optional</name> + <key>True</key> + </option> + <option> + <name>Required</name> + <key>False</key> + </option> + </param> <check>$vlen > 0</check> <sink> <name>in</name> diff --git a/grc/blocks/pad_source.xml b/grc/blocks/pad_source.xml index 7b2210cbb..a56a65dcc 100644 --- a/grc/blocks/pad_source.xml +++ b/grc/blocks/pad_source.xml @@ -7,7 +7,9 @@ <block> <name>Pad Source</name> <key>pad_source</key> - <make></make> + <make>#if str($type) == "message" +None;self.message_port_register_hier_out($label) +#end if</make> <param> <name>Label</name> <key>label</key> @@ -43,6 +45,16 @@ <key>byte</key> <opt>size:gr.sizeof_char</opt> </option> + <option> + <name>Message</name> + <key>message</key> + <opt>size:0</opt> + </option> + <option> + <name>Wildcard</name> + <key></key> + <opt>size:0</opt> + </option> </param> <param> <name>Vec Length</name> @@ -50,6 +62,21 @@ <value>1</value> <type>int</type> </param> + <param> + <name>Optional</name> + <key>optional</key> + <value>False</value> + <type>bool</type> + <hide>part</hide> + <option> + <name>Optional</name> + <key>True</key> + </option> + <option> + <name>Required</name> + <key>False</key> + </option> + </param> <check>$vlen > 0</check> <source> <name>out</name> |