From 461ece56b36a44b2405282630157739c7f9a26ba Mon Sep 17 00:00:00 2001
From: Tom Rondeau
Date: Fri, 14 Dec 2012 16:10:30 -0500
Subject: blocks: moving file metadata sink/source to gr-blocks.
---
gr-blocks/examples/CMakeLists.txt | 20 +
gr-blocks/examples/metadata/CMakeLists.txt | 30 +
gr-blocks/examples/metadata/file_metadata_sink.grc | 951 +++++++++++++++++++++
.../examples/metadata/file_metadata_source.grc | 350 ++++++++
.../metadata/file_metadata_vector_sink.grc | 219 +++++
.../metadata/file_metadata_vector_source.grc | 338 ++++++++
6 files changed, 1908 insertions(+)
create mode 100644 gr-blocks/examples/CMakeLists.txt
create mode 100644 gr-blocks/examples/metadata/CMakeLists.txt
create mode 100644 gr-blocks/examples/metadata/file_metadata_sink.grc
create mode 100644 gr-blocks/examples/metadata/file_metadata_source.grc
create mode 100644 gr-blocks/examples/metadata/file_metadata_vector_sink.grc
create mode 100644 gr-blocks/examples/metadata/file_metadata_vector_source.grc
(limited to 'gr-blocks/examples')
diff --git a/gr-blocks/examples/CMakeLists.txt b/gr-blocks/examples/CMakeLists.txt
new file mode 100644
index 000000000..79535daa0
--- /dev/null
+++ b/gr-blocks/examples/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+add_subdirectory(metadata)
diff --git a/gr-blocks/examples/metadata/CMakeLists.txt b/gr-blocks/examples/metadata/CMakeLists.txt
new file mode 100644
index 000000000..53a54b9d5
--- /dev/null
+++ b/gr-blocks/examples/metadata/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Copyright 2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+include(GrPython)
+
+install(
+ FILES
+ file_metadata_sink.grc
+ file_metadata_source.grc
+ file_metadata_vector_sink.grc
+ file_metadata_vector_source.grc
+ DESTINATION ${GR_PKG_DATA_DIR}/examples/metadata
+ COMPONENT "core_python"
+)
diff --git a/gr-blocks/examples/metadata/file_metadata_sink.grc b/gr-blocks/examples/metadata/file_metadata_sink.grc
new file mode 100644
index 000000000..198b0725f
--- /dev/null
+++ b/gr-blocks/examples/metadata/file_metadata_sink.grc
@@ -0,0 +1,951 @@
+
+
+ Fri Dec 14 17:09:06 2012
+
+ options
+
+ id
+ file_metadata_sink
+
+
+ _enabled
+ True
+
+
+ title
+
+
+
+ author
+
+
+
+ description
+
+
+
+ window_size
+ 1280, 1024
+
+
+ generate_options
+ qt_gui
+
+
+ category
+ Custom
+
+
+ run_options
+ prompt
+
+
+ run
+ True
+
+
+ max_nouts
+ 0
+
+
+ realtime_scheduling
+
+
+
+ _coordinate
+ (10, 10)
+
+
+ _rotation
+ 0
+
+
+
+ gr_sig_source_x
+
+ id
+ gr_sig_source_x_0
+
+
+ _enabled
+ False
+
+
+ type
+ complex
+
+
+ samp_rate
+ samp_rate
+
+
+ waveform
+ gr.GR_COS_WAVE
+
+
+ freq
+ 1000
+
+
+ amp
+ 1
+
+
+ offset
+ 0
+
+
+ _coordinate
+ (57, 140)
+
+
+ _rotation
+ 0
+
+
+
+ variable_qtgui_range
+
+ id
+ qt_samp_rate
+
+
+ _enabled
+ True
+
+
+ label
+
+
+
+ value
+ samp_rate
+
+
+ start
+ 200000
+
+
+ stop
+ 5000000
+
+
+ step
+ 200000
+
+
+ widget
+ counter_slider
+
+
+ orient
+ Qt.Horizontal
+
+
+ min_len
+ 200
+
+
+ gui_hint
+
+
+
+ _coordinate
+ (330, 259)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ samp_rate
+
+
+ _enabled
+ True
+
+
+ value
+ 200000
+
+
+ _coordinate
+ (208, 11)
+
+
+ _rotation
+ 0
+
+
+
+ uhd_usrp_source
+
+ id
+ uhd_usrp_source_0
+
+
+ _enabled
+ True
+
+
+ type
+ fc32
+
+
+ otw
+
+
+
+ stream_args
+
+
+
+ dev_addr
+ addr=192.168.11.2
+
+
+ sync
+
+
+
+ clock_rate
+ 0.0
+
+
+ num_mboards
+ 1
+
+
+ clock_source0
+
+
+
+ time_source0
+
+
+
+ sd_spec0
+
+
+
+ clock_source1
+
+
+
+ time_source1
+
+
+
+ sd_spec1
+
+
+
+ clock_source2
+
+
+
+ time_source2
+
+
+
+ sd_spec2
+
+
+
+ clock_source3
+
+
+
+ time_source3
+
+
+
+ sd_spec3
+
+
+
+ clock_source4
+
+
+
+ time_source4
+
+
+
+ sd_spec4
+
+
+
+ clock_source5
+
+
+
+ time_source5
+
+
+
+ sd_spec5
+
+
+
+ clock_source6
+
+
+
+ time_source6
+
+
+
+ sd_spec6
+
+
+
+ clock_source7
+
+
+
+ time_source7
+
+
+
+ sd_spec7
+
+
+
+ nchan
+ 1
+
+
+ samp_rate
+ qt_samp_rate
+
+
+ center_freq0
+ 98.9e6
+
+
+ gain0
+ 30
+
+
+ ant0
+
+
+
+ bw0
+ 0
+
+
+ center_freq1
+ 0
+
+
+ gain1
+ 0
+
+
+ ant1
+
+
+
+ bw1
+ 0
+
+
+ center_freq2
+ 0
+
+
+ gain2
+ 0
+
+
+ ant2
+
+
+
+ bw2
+ 0
+
+
+ center_freq3
+ 0
+
+
+ gain3
+ 0
+
+
+ ant3
+
+
+
+ bw3
+ 0
+
+
+ center_freq4
+ 0
+
+
+ gain4
+ 0
+
+
+ ant4
+
+
+
+ bw4
+ 0
+
+
+ center_freq5
+ 0
+
+
+ gain5
+ 0
+
+
+ ant5
+
+
+
+ bw5
+ 0
+
+
+ center_freq6
+ 0
+
+
+ gain6
+ 0
+
+
+ ant6
+
+
+
+ bw6
+ 0
+
+
+ center_freq7
+ 0
+
+
+ gain7
+ 0
+
+
+ ant7
+
+
+
+ bw7
+ 0
+
+
+ center_freq8
+ 0
+
+
+ gain8
+ 0
+
+
+ ant8
+
+
+
+ bw8
+ 0
+
+
+ center_freq9
+ 0
+
+
+ gain9
+ 0
+
+
+ ant9
+
+
+
+ bw9
+ 0
+
+
+ center_freq10
+ 0
+
+
+ gain10
+ 0
+
+
+ ant10
+
+
+
+ bw10
+ 0
+
+
+ center_freq11
+ 0
+
+
+ gain11
+ 0
+
+
+ ant11
+
+
+
+ bw11
+ 0
+
+
+ center_freq12
+ 0
+
+
+ gain12
+ 0
+
+
+ ant12
+
+
+
+ bw12
+ 0
+
+
+ center_freq13
+ 0
+
+
+ gain13
+ 0
+
+
+ ant13
+
+
+
+ bw13
+ 0
+
+
+ center_freq14
+ 0
+
+
+ gain14
+ 0
+
+
+ ant14
+
+
+
+ bw14
+ 0
+
+
+ center_freq15
+ 0
+
+
+ gain15
+ 0
+
+
+ ant15
+
+
+
+ bw15
+ 0
+
+
+ center_freq16
+ 0
+
+
+ gain16
+ 0
+
+
+ ant16
+
+
+
+ bw16
+ 0
+
+
+ center_freq17
+ 0
+
+
+ gain17
+ 0
+
+
+ ant17
+
+
+
+ bw17
+ 0
+
+
+ center_freq18
+ 0
+
+
+ gain18
+ 0
+
+
+ ant18
+
+
+
+ bw18
+ 0
+
+
+ center_freq19
+ 0
+
+
+ gain19
+ 0
+
+
+ ant19
+
+
+
+ bw19
+ 0
+
+
+ center_freq20
+ 0
+
+
+ gain20
+ 0
+
+
+ ant20
+
+
+
+ bw20
+ 0
+
+
+ center_freq21
+ 0
+
+
+ gain21
+ 0
+
+
+ ant21
+
+
+
+ bw21
+ 0
+
+
+ center_freq22
+ 0
+
+
+ gain22
+ 0
+
+
+ ant22
+
+
+
+ bw22
+ 0
+
+
+ center_freq23
+ 0
+
+
+ gain23
+ 0
+
+
+ ant23
+
+
+
+ bw23
+ 0
+
+
+ center_freq24
+ 0
+
+
+ gain24
+ 0
+
+
+ ant24
+
+
+
+ bw24
+ 0
+
+
+ center_freq25
+ 0
+
+
+ gain25
+ 0
+
+
+ ant25
+
+
+
+ bw25
+ 0
+
+
+ center_freq26
+ 0
+
+
+ gain26
+ 0
+
+
+ ant26
+
+
+
+ bw26
+ 0
+
+
+ center_freq27
+ 0
+
+
+ gain27
+ 0
+
+
+ ant27
+
+
+
+ bw27
+ 0
+
+
+ center_freq28
+ 0
+
+
+ gain28
+ 0
+
+
+ ant28
+
+
+
+ bw28
+ 0
+
+
+ center_freq29
+ 0
+
+
+ gain29
+ 0
+
+
+ ant29
+
+
+
+ bw29
+ 0
+
+
+ center_freq30
+ 0
+
+
+ gain30
+ 0
+
+
+ ant30
+
+
+
+ bw30
+ 0
+
+
+ center_freq31
+ 0
+
+
+ gain31
+ 0
+
+
+ ant31
+
+
+
+ bw31
+ 0
+
+
+ _coordinate
+ (53, 269)
+
+
+ _rotation
+ 0
+
+
+
+ gr_head
+
+ id
+ gr_head_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ num_items
+ 20000000
+
+
+ vlen
+ 1
+
+
+ _coordinate
+ (309, 172)
+
+
+ _rotation
+ 0
+
+
+
+ blocks_file_meta_sink
+
+ id
+ blocks_file_meta_sink_0
+
+
+ _enabled
+ True
+
+
+ file
+ /tmp/metadat_file.out
+
+
+ type
+ complex
+
+
+ samp_rate
+ samp_rate
+
+
+ rel_rate
+ 1
+
+
+ vlen
+ 1
+
+
+ max_seg_size
+ 1000000
+
+
+ extra_dict
+ ""
+
+
+ detached
+ True
+
+
+ unbuffered
+ False
+
+
+ _coordinate
+ (569, 124)
+
+
+ _rotation
+ 0
+
+
+
+ gr_sig_source_x_0
+ gr_head_0
+ 0
+ 0
+
+
+ uhd_usrp_source_0
+ gr_head_0
+ 0
+ 0
+
+
+ gr_head_0
+ blocks_file_meta_sink_0
+ 0
+ 0
+
+
diff --git a/gr-blocks/examples/metadata/file_metadata_source.grc b/gr-blocks/examples/metadata/file_metadata_source.grc
new file mode 100644
index 000000000..23757881b
--- /dev/null
+++ b/gr-blocks/examples/metadata/file_metadata_source.grc
@@ -0,0 +1,350 @@
+
+
+ Fri Dec 14 17:08:09 2012
+
+ options
+
+ id
+ file_metadata_source
+
+
+ _enabled
+ True
+
+
+ title
+
+
+
+ author
+
+
+
+ description
+
+
+
+ window_size
+ 1280, 1024
+
+
+ generate_options
+ qt_gui
+
+
+ category
+ Custom
+
+
+ run_options
+ prompt
+
+
+ run
+ True
+
+
+ max_nouts
+ 0
+
+
+ realtime_scheduling
+
+
+
+ _coordinate
+ (10, 10)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ samp_rate
+
+
+ _enabled
+ True
+
+
+ value
+ 200000
+
+
+ _coordinate
+ (208, 11)
+
+
+ _rotation
+ 0
+
+
+
+ gr_tag_debug
+
+ id
+ gr_tag_debug_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ name
+ Test
+
+
+ num_inputs
+ 1
+
+
+ vlen
+ 1
+
+
+ display
+ True
+
+
+ _coordinate
+ (561, 290)
+
+
+ _rotation
+ 0
+
+
+
+ analog_agc2_xx
+
+ id
+ analog_agc2_xx_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ attack_rate
+ 1e-1
+
+
+ decay_rate
+ 1e-2
+
+
+ reference
+ 1.0
+
+
+ gain
+ 1.0
+
+
+ max_gain
+ 0.0
+
+
+ _coordinate
+ (561, 82)
+
+
+ _rotation
+ 0
+
+
+
+ qtgui_time_sink_x
+
+ id
+ qtgui_time_sink_x_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ name
+ QT GUI Plot
+
+
+ size
+ 1024
+
+
+ bw
+ samp_rate
+
+
+ nconnections
+ 1
+
+
+ gui_hint
+
+
+
+ _coordinate
+ (776, 98)
+
+
+ _rotation
+ 0
+
+
+
+ gr_file_sink
+
+ id
+ gr_file_sink_1
+
+
+ _enabled
+ True
+
+
+ file
+ /tmp/received_data.out
+
+
+ type
+ complex
+
+
+ vlen
+ 1
+
+
+ unbuffered
+ False
+
+
+ _coordinate
+ (564, 215)
+
+
+ _rotation
+ 0
+
+
+
+ gr_throttle
+
+ id
+ gr_throttle_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ samples_per_second
+ samp_rate
+
+
+ vlen
+ 1
+
+
+ _coordinate
+ (322, 222)
+
+
+ _rotation
+ 0
+
+
+
+ blocks_file_meta_source
+
+ id
+ blocks_file_meta_source_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ file
+ /tmp/metadat_file.out
+
+
+ repeat
+ False
+
+
+ detached
+ True
+
+
+ hdr_file
+
+
+
+ vlen
+ 1
+
+
+ _coordinate
+ (50, 198)
+
+
+ _rotation
+ 0
+
+
+
+ gr_throttle_0
+ gr_file_sink_1
+ 0
+ 0
+
+
+ gr_throttle_0
+ gr_tag_debug_0
+ 0
+ 0
+
+
+ gr_throttle_0
+ analog_agc2_xx_0
+ 0
+ 0
+
+
+ analog_agc2_xx_0
+ qtgui_time_sink_x_0
+ 0
+ 0
+
+
+ blocks_file_meta_source_0
+ gr_throttle_0
+ 0
+ 0
+
+
diff --git a/gr-blocks/examples/metadata/file_metadata_vector_sink.grc b/gr-blocks/examples/metadata/file_metadata_vector_sink.grc
new file mode 100644
index 000000000..05b7cbc92
--- /dev/null
+++ b/gr-blocks/examples/metadata/file_metadata_vector_sink.grc
@@ -0,0 +1,219 @@
+
+
+ Fri Dec 14 17:08:29 2012
+
+ options
+
+ id
+ file_metadata_vector_sink
+
+
+ _enabled
+ True
+
+
+ title
+
+
+
+ author
+
+
+
+ description
+
+
+
+ window_size
+ 1280, 1024
+
+
+ generate_options
+ no_gui
+
+
+ category
+ Custom
+
+
+ run_options
+ run
+
+
+ run
+ True
+
+
+ max_nouts
+ 0
+
+
+ realtime_scheduling
+
+
+
+ _coordinate
+ (10, 10)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ samp_rate
+
+
+ _enabled
+ True
+
+
+ value
+ 200000
+
+
+ _coordinate
+ (208, 11)
+
+
+ _rotation
+ 0
+
+
+
+ gr_vector_source_x
+
+ id
+ gr_vector_source_x_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ vector
+ 10*[0,1,2,3,4,5,6,7,8,9]
+
+
+ repeat
+ True
+
+
+ vlen
+ 10
+
+
+ _coordinate
+ (67, 100)
+
+
+ _rotation
+ 0
+
+
+
+ gr_head
+
+ id
+ gr_head_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ num_items
+ 10010000
+
+
+ vlen
+ 10
+
+
+ _coordinate
+ (325, 108)
+
+
+ _rotation
+ 0
+
+
+
+ blocks_file_meta_sink
+
+ id
+ blocks_file_meta_sink_0
+
+
+ _enabled
+ True
+
+
+ file
+ /tmp/metadat_vector.out
+
+
+ type
+ complex
+
+
+ samp_rate
+ samp_rate
+
+
+ rel_rate
+ 1
+
+
+ vlen
+ 10
+
+
+ max_seg_size
+ 1000000
+
+
+ extra_dict
+ ""
+
+
+ detached
+ True
+
+
+ unbuffered
+ False
+
+
+ _coordinate
+ (544, 60)
+
+
+ _rotation
+ 0
+
+
+
+ gr_vector_source_x_0
+ gr_head_0
+ 0
+ 0
+
+
+ gr_head_0
+ blocks_file_meta_sink_0
+ 0
+ 0
+
+
diff --git a/gr-blocks/examples/metadata/file_metadata_vector_source.grc b/gr-blocks/examples/metadata/file_metadata_vector_source.grc
new file mode 100644
index 000000000..d52257e06
--- /dev/null
+++ b/gr-blocks/examples/metadata/file_metadata_vector_source.grc
@@ -0,0 +1,338 @@
+
+
+ Fri Dec 14 17:11:02 2012
+
+ options
+
+ id
+ file_metadata_vector_source
+
+
+ _enabled
+ True
+
+
+ title
+
+
+
+ author
+
+
+
+ description
+
+
+
+ window_size
+ 1280, 1024
+
+
+ generate_options
+ qt_gui
+
+
+ category
+ Custom
+
+
+ run_options
+ prompt
+
+
+ run
+ True
+
+
+ max_nouts
+ 0
+
+
+ realtime_scheduling
+
+
+
+ _coordinate
+ (10, 10)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ samp_rate
+
+
+ _enabled
+ True
+
+
+ value
+ 200000
+
+
+ _coordinate
+ (208, 11)
+
+
+ _rotation
+ 0
+
+
+
+ gr_file_sink
+
+ id
+ gr_file_sink_1
+
+
+ _enabled
+ True
+
+
+ file
+ /tmp/received_data.out
+
+
+ type
+ complex
+
+
+ vlen
+ 10
+
+
+ unbuffered
+ False
+
+
+ _coordinate
+ (564, 215)
+
+
+ _rotation
+ 0
+
+
+
+ gr_tag_debug
+
+ id
+ gr_tag_debug_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ name
+ Test
+
+
+ num_inputs
+ 1
+
+
+ vlen
+ 10
+
+
+ display
+ True
+
+
+ _coordinate
+ (563, 298)
+
+
+ _rotation
+ 0
+
+
+
+ qtgui_time_sink_x
+
+ id
+ qtgui_time_sink_x_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ name
+ QT GUI Plot
+
+
+ size
+ 1024
+
+
+ bw
+ samp_rate
+
+
+ nconnections
+ 1
+
+
+ gui_hint
+
+
+
+ _coordinate
+ (746, 116)
+
+
+ _rotation
+ 0
+
+
+
+ blocks_vector_to_stream
+
+ id
+ blocks_vector_to_stream_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ num_items
+ 10
+
+
+ vlen
+ 1
+
+
+ _coordinate
+ (526, 132)
+
+
+ _rotation
+ 0
+
+
+
+ gr_throttle
+
+ id
+ gr_throttle_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ samples_per_second
+ samp_rate
+
+
+ vlen
+ 10
+
+
+ _coordinate
+ (322, 223)
+
+
+ _rotation
+ 0
+
+
+
+ blocks_file_meta_source
+
+ id
+ blocks_file_meta_source_0
+
+
+ _enabled
+ True
+
+
+ type
+ complex
+
+
+ file
+ /tmp/metadat_vector.out
+
+
+ repeat
+ False
+
+
+ detached
+ True
+
+
+ hdr_file
+
+
+
+ vlen
+ 10
+
+
+ _coordinate
+ (42, 199)
+
+
+ _rotation
+ 0
+
+
+
+ gr_throttle_0
+ gr_file_sink_1
+ 0
+ 0
+
+
+ gr_throttle_0
+ gr_tag_debug_0
+ 0
+ 0
+
+
+ blocks_vector_to_stream_0
+ qtgui_time_sink_x_0
+ 0
+ 0
+
+
+ gr_throttle_0
+ blocks_vector_to_stream_0
+ 0
+ 0
+
+
+ blocks_file_meta_source_0
+ gr_throttle_0
+ 0
+ 0
+
+
--
cgit