From d4dd7b8a5e52212e472ae9a342fb46b47ec17b91 Mon Sep 17 00:00:00 2001 From: jblum Date: Wed, 20 May 2009 01:06:55 +0000 Subject: Added custom grc_blks2 tcp source and sink blocks + wrappers. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11063 221aa14e-8319-0410-a670-987f0aec2ac5 --- grc/data/platforms/python/block_tree.xml | 2 + grc/data/platforms/python/blocks/Makefile.am | 2 + .../platforms/python/blocks/blks2_tcp_sink.xml | 89 ++++++++++++++++++++++ .../platforms/python/blocks/blks2_tcp_source.xml | 89 ++++++++++++++++++++++ 4 files changed, 182 insertions(+) create mode 100644 grc/data/platforms/python/blocks/blks2_tcp_sink.xml create mode 100644 grc/data/platforms/python/blocks/blks2_tcp_source.xml (limited to 'grc/data') diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml index 37b27e569..074b7976a 100644 --- a/grc/data/platforms/python/block_tree.xml +++ b/grc/data/platforms/python/block_tree.xml @@ -16,6 +16,7 @@ gr_glfsr_source_x gr_null_source gr_file_source + blks2_tcp_source gr_udp_source audio_source gr_wavfile_source @@ -27,6 +28,7 @@ gr_vector_sink_x gr_null_sink gr_file_sink + blks2_tcp_sink gr_udp_sink audio_sink gr_wavfile_sink diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am index 179a5407a..a5ae57a73 100644 --- a/grc/data/platforms/python/blocks/Makefile.am +++ b/grc/data/platforms/python/blocks/Makefile.am @@ -52,6 +52,8 @@ dist_ourdata_DATA = \ blks2_standard_squelch.xml \ blks2_stream_to_vector_decimator.xml \ blks2_synthesis_filterbank.xml \ + blks2_tcp_sink.xml \ + blks2_tcp_source.xml \ blks2_valve.xml \ blks2_variable_sink_x.xml \ blks2_wfm_rcv.xml \ diff --git a/grc/data/platforms/python/blocks/blks2_tcp_sink.xml b/grc/data/platforms/python/blocks/blks2_tcp_sink.xml new file mode 100644 index 000000000..cfe7b42d8 --- /dev/null +++ b/grc/data/platforms/python/blocks/blks2_tcp_sink.xml @@ -0,0 +1,89 @@ + + + + TCP Sink + blks2_tcp_sink + from grc_gnuradio import blks2 as grc_blks2 + grc_blks2.tcp_sink( + itemsize=$type.size*$vlen, + addr=$addr, + port=$port, + server=$server, +) + + Input Type + type + enum + + + + + + + + Address + addr + 127.0.0.1 + string + + + Port + port + 0 + int + + + Mode + server + False + enum + + + + + Vec Length + vlen + 1 + int + + $vlen > 0 + + in + $type + $vlen + + +In client mode, we attempt to connect to a server at the given address and port. \ +In server mode, we bind a socket to the given address and port and accept the first client. + + diff --git a/grc/data/platforms/python/blocks/blks2_tcp_source.xml b/grc/data/platforms/python/blocks/blks2_tcp_source.xml new file mode 100644 index 000000000..6bf742aa0 --- /dev/null +++ b/grc/data/platforms/python/blocks/blks2_tcp_source.xml @@ -0,0 +1,89 @@ + + + + TCP Source + blks2_tcp_source + from grc_gnuradio import blks2 as grc_blks2 + grc_blks2.tcp_source( + itemsize=$type.size*$vlen, + addr=$addr, + port=$port, + server=$server, +) + + Output Type + type + enum + + + + + + + + Address + addr + 127.0.0.1 + string + + + Port + port + 0 + int + + + Mode + server + True + enum + + + + + Vec Length + vlen + 1 + int + + $vlen > 0 + + out + $type + $vlen + + +In client mode, we attempt to connect to a server at the given address and port. \ +In server mode, we bind a socket to the given address and port and accept the first client. + + -- cgit