From 972bf4aea9f64da2e8b9b3cbc443190a44f55f19 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Thu, 13 Dec 2012 14:26:00 -0500 Subject: core: added examples to use metadata source and sink. --- gnuradio-core/src/examples/CMakeLists.txt | 1 + gnuradio-core/src/examples/metadata/CMakeLists.txt | 28 + .../src/examples/metadata/file_metadata_sink.grc | 951 +++++++++++++++++++++ .../src/examples/metadata/file_metadata_source.grc | 346 ++++++++ 4 files changed, 1326 insertions(+) create mode 100644 gnuradio-core/src/examples/metadata/CMakeLists.txt create mode 100644 gnuradio-core/src/examples/metadata/file_metadata_sink.grc create mode 100644 gnuradio-core/src/examples/metadata/file_metadata_source.grc diff --git a/gnuradio-core/src/examples/CMakeLists.txt b/gnuradio-core/src/examples/CMakeLists.txt index 01d9eb83e..36333425c 100644 --- a/gnuradio-core/src/examples/CMakeLists.txt +++ b/gnuradio-core/src/examples/CMakeLists.txt @@ -17,6 +17,7 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. +add_subdirectory(metadata) add_subdirectory(mp-sched) add_subdirectory(msg_passing) add_subdirectory(network) diff --git a/gnuradio-core/src/examples/metadata/CMakeLists.txt b/gnuradio-core/src/examples/metadata/CMakeLists.txt new file mode 100644 index 000000000..182d9c543 --- /dev/null +++ b/gnuradio-core/src/examples/metadata/CMakeLists.txt @@ -0,0 +1,28 @@ +# 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 + DESTINATION ${GR_PKG_DATA_DIR}/examples/metadata + COMPONENT "core_python" +) diff --git a/gnuradio-core/src/examples/metadata/file_metadata_sink.grc b/gnuradio-core/src/examples/metadata/file_metadata_sink.grc new file mode 100644 index 000000000..197ff5572 --- /dev/null +++ b/gnuradio-core/src/examples/metadata/file_metadata_sink.grc @@ -0,0 +1,951 @@ + + + Thu Dec 13 14:25:16 2012 + + 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 + + + + gr_head + + id + gr_head_0 + + + _enabled + True + + + type + complex + + + num_items + 20000000 + + + vlen + 1 + + + _coordinate + (309, 172) + + + _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_file_meta_sink + + id + gr_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 + False + + + unbuffered + False + + + _coordinate + (555, 148) + + + _rotation + 0 + + + + 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_head_0 + gr_file_meta_sink_0 + 0 + 0 + + + gr_sig_source_x_0 + gr_head_0 + 0 + 0 + + + uhd_usrp_source_0 + gr_head_0 + 0 + 0 + + diff --git a/gnuradio-core/src/examples/metadata/file_metadata_source.grc b/gnuradio-core/src/examples/metadata/file_metadata_source.grc new file mode 100644 index 000000000..cc1383ae1 --- /dev/null +++ b/gnuradio-core/src/examples/metadata/file_metadata_source.grc @@ -0,0 +1,346 @@ + + + Thu Dec 13 14:25:01 2012 + + 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 + + + + gr_throttle + + id + gr_throttle_0 + + + _enabled + True + + + type + complex + + + samples_per_second + samp_rate + + + vlen + 1 + + + _coordinate + (322, 223) + + + _rotation + 0 + + + + gr_file_meta_source + + id + gr_file_meta_source_0 + + + _enabled + True + + + type + complex + + + file + /tmp/metadat_file.out + + + repeat + False + + + detached + False + + + hdr_file + + + + _coordinate + (56, 199) + + + _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 + + + + 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 + + + + gr_throttle_0 + gr_file_sink_1 + 0 + 0 + + + gr_throttle_0 + gr_tag_debug_0 + 0 + 0 + + + gr_file_meta_source_0 + gr_throttle_0 + 0 + 0 + + + gr_throttle_0 + analog_agc2_xx_0 + 0 + 0 + + + analog_agc2_xx_0 + qtgui_time_sink_x_0 + 0 + 0 + + -- cgit