diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | docs/doxygen/other/build_guide.dox | 35 | ||||
-rw-r--r-- | gnuradio-core/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gnuradio-core/src/examples/CMakeLists.txt (renamed from gnuradio-examples/python/CMakeLists.txt) | 3 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/CMakeLists.txt (renamed from gnuradio-examples/python/mp-sched/CMakeLists.txt) | 4 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/README (renamed from gnuradio-examples/python/mp-sched/README) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/core-duo.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/core-duo.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/core2-duo.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/core2-duo.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/js21-altivec.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/js21-altivec.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/js21.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/js21.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/ps3-altivec.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/ps3-altivec.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/ps3.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/ps3.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/qs21-altivec.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/qs21-altivec.dat) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/mp-sched/perf-data/qs21.dat (renamed from gnuradio-examples/python/mp-sched/perf-data/qs21.dat) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/mp-sched/plot_flops.py (renamed from gnuradio-examples/python/mp-sched/plot_flops.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/mp-sched/run_synthetic.py (renamed from gnuradio-examples/python/mp-sched/run_synthetic.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/mp-sched/synthetic.py (renamed from gnuradio-examples/python/mp-sched/synthetic.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py (renamed from gnuradio-examples/python/mp-sched/wfm_rcv_pll_to_wav.py) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/network/CMakeLists.txt (renamed from gnuradio-examples/python/network/CMakeLists.txt) | 2 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/network/audio_sink.py (renamed from gnuradio-examples/python/network/audio_sink.py) | 9 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/network/audio_source.py (renamed from gnuradio-examples/python/network/audio_source.py) | 9 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/network/dial_tone_sink.py (renamed from gnuradio-examples/python/network/dial_tone_sink.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/network/dial_tone_source.py (renamed from gnuradio-examples/python/network/dial_tone_source.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/network/vector_sink.py (renamed from gnuradio-examples/python/network/vector_sink.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/network/vector_source.py (renamed from gnuradio-examples/python/network/vector_source.py) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/pfb/CMakeLists.txt (renamed from gnuradio-examples/python/pfb/CMakeLists.txt) | 2 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/channelize.py (renamed from gnuradio-examples/python/pfb/channelize.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/chirp_channelize.py (renamed from gnuradio-examples/python/pfb/chirp_channelize.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/decimate.py (renamed from gnuradio-examples/python/pfb/decimate.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/fmtest.py (renamed from gnuradio-examples/python/pfb/fmtest.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/interpolate.py (renamed from gnuradio-examples/python/pfb/interpolate.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/reconstruction.py (renamed from gnuradio-examples/python/pfb/reconstruction.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/resampler.py (renamed from gnuradio-examples/python/pfb/resampler.py) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/pfb/resampler_demo.grc (renamed from gnuradio-examples/python/pfb/resampler_demo.grc) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/synth_filter.py (renamed from gnuradio-examples/python/pfb/synth_filter.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/pfb/synth_to_chan.py (renamed from gnuradio-examples/python/pfb/synth_to_chan.py) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/tags/CMakeLists.txt (renamed from gnuradio-examples/python/tags/CMakeLists.txt) | 2 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/tags/test_file_tags.py (renamed from gnuradio-examples/python/tags/test_file_tags.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/tags/uhd_burst_detector.py (renamed from gnuradio-examples/python/tags/uhd_burst_detector.py) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/volk_benchmark/CMakeLists.txt | 35 | ||||
-rw-r--r-- | gnuradio-core/src/examples/volk_benchmark/README (renamed from gnuradio-examples/python/volk_benchmark/README) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/volk_benchmark/volk_math.py (renamed from gnuradio-examples/python/volk_benchmark/volk_math.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/volk_benchmark/volk_plot.py (renamed from gnuradio-examples/python/volk_benchmark/volk_plot.py) | 0 | ||||
-rw-r--r-- | gnuradio-core/src/examples/volk_benchmark/volk_test_funcs.py (renamed from gnuradio-examples/python/volk_benchmark/volk_test_funcs.py) | 0 | ||||
-rwxr-xr-x | gnuradio-core/src/examples/volk_benchmark/volk_types.py (renamed from gnuradio-examples/python/volk_benchmark/volk_types.py) | 0 | ||||
-rw-r--r-- | gnuradio-examples/grc/CMakeLists.txt | 86 | ||||
-rw-r--r-- | gr-audio/CMakeLists.txt | 12 | ||||
-rw-r--r-- | gr-audio/examples/c++/CMakeLists.txt | 6 | ||||
-rw-r--r-- | gr-audio/examples/grc/CMakeLists.txt | 27 | ||||
-rw-r--r-- | gr-audio/examples/grc/cvsd_sweep.grc (renamed from gnuradio-examples/grc/audio/cvsd_sweep.grc) | 0 | ||||
-rw-r--r-- | gr-audio/examples/grc/dial_tone.grc (renamed from gnuradio-examples/grc/audio/dial_tone.grc) | 0 | ||||
-rw-r--r-- | gr-audio/examples/python/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-digital/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-digital/examples/CMakeLists.txt | 22 | ||||
-rw-r--r-- | gr-digital/examples/demod/ber_simulation.grc (renamed from gnuradio-examples/grc/simple/ber_simulation.grc) | 329 | ||||
-rw-r--r-- | gr-digital/examples/demod/digital_freq_lock.grc (renamed from gnuradio-examples/grc/demod/digital_freq_lock.grc) | 0 | ||||
-rw-r--r-- | gr-digital/examples/demod/dpsk_loopback.grc (renamed from gnuradio-examples/grc/simple/dpsk_loopback.grc) | 298 | ||||
-rw-r--r-- | gr-digital/examples/demod/mpsk_demod.grc (renamed from gnuradio-examples/grc/demod/mpsk_demod.grc) | 338 | ||||
-rw-r--r-- | gr-digital/examples/demod/pam_sync.grc (renamed from gnuradio-examples/grc/demod/pam_sync.grc) | 0 | ||||
-rw-r--r-- | gr-digital/examples/demod/pam_timing.grc (renamed from gnuradio-examples/grc/demod/pam_timing.grc) | 0 | ||||
-rw-r--r-- | gr-fcd/CMakeLists.txt | 12 | ||||
-rw-r--r-- | gr-fcd/examples/c++/CMakeLists.txt (renamed from gr-fcd/examples/CMakeLists.txt) | 12 | ||||
-rw-r--r-- | gr-fcd/examples/c++/fcd_nfm_rx.cc (renamed from gr-fcd/examples/fcd_nfm_rx.cc) | 0 | ||||
-rw-r--r-- | gr-fcd/examples/grc/CMakeLists.txt | 26 | ||||
-rw-r--r-- | gr-fcd/examples/grc/fcd_apt_rx.grc (renamed from gr-fcd/examples/fcd_apt_rx.grc) | 0 | ||||
-rw-r--r-- | gr-fcd/examples/grc/fcd_fft_wx.grc (renamed from gr-fcd/examples/fcd_fft_wx.grc) | 0 | ||||
-rw-r--r-- | gr-fcd/examples/grc/fcd_nfm_rx.grc (renamed from gr-fcd/examples/fcd_nfm_rx.grc) | 0 | ||||
-rw-r--r-- | gr-noaa/CMakeLists.txt | 4 | ||||
-rwxr-xr-x | gr-noaa/apps/file_rx_hrpt.py | 239 | ||||
-rwxr-xr-x | gr-noaa/apps/hrpt_decode.py | 98 | ||||
-rwxr-xr-x | gr-noaa/apps/hrpt_demod.py | 161 | ||||
-rwxr-xr-x | gr-noaa/apps/usrp_rx_hrpt.py | 462 | ||||
-rwxr-xr-x | gr-noaa/apps/usrp_rx_hrpt_nogui.py | 268 | ||||
-rw-r--r-- | gr-noaa/examples/CMakeLists.txt (renamed from gr-noaa/apps/CMakeLists.txt) | 18 | ||||
-rw-r--r-- | gr-noaa/examples/file_rx_hrpt.grc (renamed from gr-noaa/apps/file_rx_hrpt.grc) | 0 | ||||
-rw-r--r-- | gr-noaa/examples/hrpt_decode.grc (renamed from gr-noaa/apps/hrpt_decode.grc) | 0 | ||||
-rw-r--r-- | gr-noaa/examples/hrpt_demod.grc (renamed from gr-noaa/apps/hrpt_demod.grc) | 0 | ||||
-rw-r--r-- | gr-noaa/examples/usrp_rx_hrpt.grc (renamed from gr-noaa/apps/usrp_rx_hrpt.grc) | 0 | ||||
-rw-r--r-- | gr-noaa/examples/usrp_rx_hrpt_nogui.grc (renamed from gr-noaa/apps/usrp_rx_hrpt_nogui.grc) | 0 | ||||
-rw-r--r-- | gr-pager/apps/CMakeLists.txt | 6 | ||||
-rwxr-xr-x | gr-pager/apps/usrp_flex (renamed from gr-pager/apps/usrp_flex.py) | 0 | ||||
-rwxr-xr-x | gr-pager/apps/usrp_flex_all (renamed from gr-pager/apps/usrp_flex_all.py) | 0 | ||||
-rwxr-xr-x | gr-pager/apps/usrp_flex_band (renamed from gr-pager/apps/usrp_flex_band.py) | 0 | ||||
-rw-r--r-- | gr-qtgui/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-qtgui/examples/CMakeLists.txt | 4 | ||||
-rw-r--r-- | gr-shd/apps/CMakeLists.txt | 6 | ||||
-rwxr-xr-x | gr-shd/apps/shd_fft (renamed from gr-shd/apps/shd_fft.py) | 0 | ||||
-rwxr-xr-x | gr-shd/apps/shd_rx_cfile (renamed from gr-shd/apps/shd_rx_cfile.py) | 0 | ||||
-rwxr-xr-x | gr-shd/apps/shd_siggen (renamed from gr-shd/apps/shd_siggen.py) | 0 | ||||
-rw-r--r-- | gr-trellis/CMakeLists.txt | 5 | ||||
-rw-r--r-- | gr-trellis/src/examples/grc/CMakeLists.txt | 30 | ||||
-rw-r--r-- | gr-trellis/src/examples/grc/interference_cancellation.grc (renamed from gnuradio-examples/grc/trellis/interference_cancellation.grc) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/grc/pccc.grc (renamed from gnuradio-examples/grc/trellis/pccc.grc) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/grc/pccc1.grc (renamed from gnuradio-examples/grc/trellis/pccc1.grc) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/grc/readme.txt (renamed from gnuradio-examples/grc/trellis/readme.txt) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/grc/sccc.grc (renamed from gnuradio-examples/grc/trellis/sccc.grc) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/grc/sccc1.grc (renamed from gnuradio-examples/grc/trellis/sccc1.grc) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/CMakeLists.txt (renamed from gr-trellis/src/examples/CMakeLists.txt) | 4 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/README (renamed from gr-trellis/src/examples/README) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn1o2_128.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn1o2_16.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn1o2_4.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn1o2_8.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn1o2_8.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn2o3_16.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn2o3_16.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn2o3_4.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn2o3_4_msb.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msbG.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn2o3_4_msbG.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn2o3_8.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn2o3_8.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/awgn2o4_4.fsm (renamed from gr-trellis/src/examples/fsm_files/awgn2o4_4.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/disconnected.fsm (renamed from gr-trellis/src/examples/fsm_files/disconnected.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/irregular.fsm (renamed from gr-trellis/src/examples/fsm_files/irregular.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm (renamed from gr-trellis/src/examples/fsm_files/joint_16_16.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm (renamed from gr-trellis/src/examples/fsm_files/joint_4_16.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/rep3.fsm (renamed from gr-trellis/src/examples/fsm_files/rep3.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/rep5.fsm (renamed from gr-trellis/src/examples/fsm_files/rep5.fsm) | 0 | ||||
-rw-r--r-- | gr-trellis/src/examples/python/fsm_files/simple.fsm (renamed from gr-trellis/src/examples/fsm_files/simple.fsm) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/fsm_utils.py (renamed from gr-trellis/src/examples/fsm_utils.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_cpm.py (renamed from gr-trellis/src/examples/test_cpm.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_pccc_turbo1.py (renamed from gr-trellis/src/examples/test_pccc_turbo1.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_sccc_hard.py (renamed from gr-trellis/src/examples/test_sccc_hard.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_sccc_soft.py (renamed from gr-trellis/src/examples/test_sccc_soft.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_sccc_turbo.py (renamed from gr-trellis/src/examples/test_sccc_turbo.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_sccc_turbo1.py (renamed from gr-trellis/src/examples/test_sccc_turbo1.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_sccc_turbo2.py (renamed from gr-trellis/src/examples/test_sccc_turbo2.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_tcm.py (renamed from gr-trellis/src/examples/test_tcm.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_tcm_bit.py (renamed from gr-trellis/src/examples/test_tcm_bit.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_tcm_combined.py (renamed from gr-trellis/src/examples/test_tcm_combined.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_tcm_parallel.py (renamed from gr-trellis/src/examples/test_tcm_parallel.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_turbo_equalization.py (renamed from gr-trellis/src/examples/test_turbo_equalization.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_turbo_equalization1.py (renamed from gr-trellis/src/examples/test_turbo_equalization1.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_turbo_equalization2.py (renamed from gr-trellis/src/examples/test_turbo_equalization2.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_viterbi_equalization.py (renamed from gr-trellis/src/examples/test_viterbi_equalization.py) | 0 | ||||
-rwxr-xr-x | gr-trellis/src/examples/python/test_viterbi_equalization1.py (renamed from gr-trellis/src/examples/test_viterbi_equalization1.py) | 0 | ||||
-rw-r--r-- | gr-uhd/CMakeLists.txt | 13 | ||||
-rw-r--r-- | gr-uhd/apps/CMakeLists.txt | 17 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_fft (renamed from gr-uhd/apps/uhd_fft.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_rx_cfile (renamed from gr-uhd/apps/uhd_rx_cfile.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_rx_nogui (renamed from gr-uhd/apps/uhd_rx_nogui.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_siggen | 51 | ||||
-rw-r--r--[-rwxr-xr-x] | gr-uhd/apps/uhd_siggen_base.py (renamed from gr-uhd/apps/uhd_siggen.py) | 4 | ||||
-rwxr-xr-x | gr-uhd/apps/uhd_siggen_gui (renamed from gr-uhd/apps/uhd_siggen_gui.py) | 2 | ||||
-rw-r--r-- | gr-uhd/examples/c++/CMakeLists.txt (renamed from gr-uhd/examples/CMakeLists.txt) | 30 | ||||
-rw-r--r-- | gr-uhd/examples/c++/tag_sink_demo.h (renamed from gr-uhd/examples/tag_sink_demo.h) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/c++/tag_source_demo.h (renamed from gr-uhd/examples/tag_source_demo.h) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/c++/tags_demo.cc (renamed from gr-uhd/examples/tags_demo.cc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/grc/CMakeLists.txt | 31 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_const_wave.grc (renamed from gnuradio-examples/grc/uhd/uhd_const_wave.grc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_dpsk_mod.grc (renamed from gnuradio-examples/grc/uhd/uhd_dpsk_mod.grc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_fft.grc (renamed from gnuradio-examples/grc/uhd/uhd_fft.grc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_rx_dpsk.grc (renamed from gnuradio-examples/grc/uhd/uhd_rx_dpsk.grc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_two_tone_loopback.grc (renamed from gnuradio-examples/grc/uhd/uhd_two_tone_loopback.grc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_tx_dpsk.grc (renamed from gnuradio-examples/grc/uhd/uhd_tx_dpsk.grc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/grc/uhd_wbfm_receive.grc (renamed from gnuradio-examples/grc/uhd/uhd_wbfm_receive.grc) | 0 | ||||
-rw-r--r-- | gr-uhd/examples/python/CMakeLists.txt | 42 | ||||
-rwxr-xr-x | gr-uhd/examples/python/fm_tx4.py (renamed from gr-uhd/examples/fm_tx4.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/fm_tx_2_daughterboards.py (renamed from gr-uhd/examples/fm_tx_2_daughterboards.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/max_power.py (renamed from gr-uhd/examples/max_power.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_am_mw_rcv.py (renamed from gr-uhd/examples/usrp_am_mw_rcv.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_nbfm_ptt.py (renamed from gr-uhd/examples/usrp_nbfm_ptt.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_nbfm_rcv.py (renamed from gr-uhd/examples/usrp_nbfm_rcv.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_spectrum_sense.py (renamed from gr-uhd/examples/usrp_spectrum_sense.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_tv_rcv.py (renamed from gr-uhd/examples/usrp_tv_rcv.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_tv_rcv_nogui.py (renamed from gr-uhd/examples/usrp_tv_rcv_nogui.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_wfm_rcv.py (renamed from gr-uhd/examples/usrp_wfm_rcv.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py (renamed from gr-uhd/examples/usrp_wfm_rcv2_nogui.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py (renamed from gr-uhd/examples/usrp_wfm_rcv_fmdet.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_wfm_rcv_nogui.py (renamed from gr-uhd/examples/usrp_wfm_rcv_nogui.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_wfm_rcv_pll.py (renamed from gr-uhd/examples/usrp_wfm_rcv_pll.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_wfm_rcv_sca.py (renamed from gr-uhd/examples/usrp_wfm_rcv_sca.py) | 0 | ||||
-rwxr-xr-x | gr-uhd/examples/python/usrp_wxapt_rcv.py (renamed from gr-uhd/examples/usrp_wxapt_rcv.py) | 0 | ||||
-rw-r--r-- | gr-utils/src/python/CMakeLists.txt | 30 | ||||
-rw-r--r-- | gr-utils/src/python/README.plot | 95 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_filter_design (renamed from gr-utils/src/python/gr_filter_design.py) | 0 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_char (renamed from gr-utils/src/python/gr_plot_char.py) | 0 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_const (renamed from gr-utils/src/python/gr_plot_const.py) | 0 | ||||
-rw-r--r-- | gr-utils/src/python/gr_plot_fft | 42 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_fft_c (renamed from gr-utils/src/python/gr_plot_fft_f.py) | 8 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_fft_f (renamed from gr-utils/src/python/gr_plot_fft_c.py) | 8 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_float (renamed from gr-utils/src/python/gr_plot_float.py) | 0 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_int (renamed from gr-utils/src/python/gr_plot_int.py) | 0 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_iq (renamed from gr-utils/src/python/gr_plot_iq.py) | 0 | ||||
-rw-r--r-- | gr-utils/src/python/gr_plot_psd | 42 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_psd_c (renamed from gr-utils/src/python/gr_plot_psd_c.py) | 8 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_psd_f (renamed from gr-utils/src/python/gr_plot_psd_f.py) | 6 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_qt (renamed from gr-utils/src/python/gr_plot_qt.py) | 2 | ||||
-rwxr-xr-x | gr-utils/src/python/gr_plot_short (renamed from gr-utils/src/python/gr_plot_short.py) | 0 | ||||
-rwxr-xr-x | gr-utils/src/python/plot_fft_base.py (renamed from gr-utils/src/python/gr_plot_fft.py) | 41 | ||||
-rwxr-xr-x | gr-utils/src/python/plot_psd_base.py (renamed from gr-utils/src/python/gr_plot_psd.py) | 53 | ||||
-rw-r--r-- | gr-vocoder/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-vocoder/examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | grc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | grc/examples/CMakeLists.txt | 37 | ||||
-rw-r--r-- | grc/examples/simple/variable_config.grc (renamed from gnuradio-examples/grc/simple/variable_config.grc) | 0 | ||||
-rw-r--r-- | grc/examples/xmlrpc/readme.txt (renamed from gnuradio-examples/grc/xmlrpc/readme.txt) | 0 | ||||
-rw-r--r-- | grc/examples/xmlrpc/xmlrpc_client.grc (renamed from gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc) | 0 | ||||
-rw-r--r-- | grc/examples/xmlrpc/xmlrpc_client_script.py (renamed from gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py) | 0 | ||||
-rw-r--r-- | grc/examples/xmlrpc/xmlrpc_server.grc (renamed from gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc) | 0 |
199 files changed, 1250 insertions, 1900 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 08a37db44..90f3c0b17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,8 +237,6 @@ add_subdirectory(gr-vocoder) add_subdirectory(gr-fcd) add_subdirectory(gr-wavelet) add_subdirectory(gr-wxgui) -add_subdirectory(gnuradio-examples/grc) -add_subdirectory(gnuradio-examples/python) #finalize cpack after subdirs processed include(GrPackage) diff --git a/docs/doxygen/other/build_guide.dox b/docs/doxygen/other/build_guide.dox index 207f553a1..734fb9e25 100644 --- a/docs/doxygen/other/build_guide.dox +++ b/docs/doxygen/other/build_guide.dox @@ -21,7 +21,7 @@ about building gr-comedi. \subsection dep_global Global Dependencies \li git http://code.google.com/p/msysgit -\li cmake http://www.cmake.org/cmake/resources/software.html +\li cmake (>= 2.6) http://www.cmake.org/cmake/resources/software.html \li boost (>= 1.35) http://www.boostpro.com/download \li cppunit (>= 1.9.14) http://gaiacrtn.free.fr/cppunit/index.html \li fftw3f (>= 3.0) http://www.fftw.org/install/windows.html @@ -89,6 +89,8 @@ The \$(builddir) is the directory in which the code is built. This <b>cannot</b> be the same path as where the source code resides. Often, \$(builddir) is \$(srcdir)/build. +\subsection Cmake Options + Options can be used to specify where to find various library or include file dependencies that are not automatically being found (-DCMAKE_PREFIX_PATH) or set the prefix @@ -101,6 +103,37 @@ cmake is not case sensitive about these options. Similarly, "true", "on", or "yes" will turn this component on. All components are enabled by default. +An example is -DENABLE_PYTHON=False turns off building any Python or +Swigging components. The result will be the GNU Radio libraries and +C++ programs/applications/examples. No Python or GRC files will be +built or installed. + +The -DENABLE_DEFAULT=False can be used to disable all +components. Individual components can then be selectively turned back +on. For example, just buidling the Volk and Gruel libraries can be +done with this: + +\code +cmake -DENABLE_DEFAULT=Off -DENABLE_VOLK=True -DENABLE_GRUEL=True <srcdir> +\endcode + + +The build type allows you to specify the build as a debug or release +version. Each type sets different flags for different purposes. To set +the build type, use: + +\code +-DCMAKE_BUILD_TYPE="Release"|"Debug" +\endcode + +If not specified, the "Release" mode is the defaulted to. + +"Release" mode sets the '-O3' optimization flag. + +"Debug" mode sets '-g -O2' flags to export debug symbols and reduce +the optimization to make the libraries easier to debug and step +through. + \subsection build_gr_cmake_e100 Building for the E100 diff --git a/gnuradio-core/CMakeLists.txt b/gnuradio-core/CMakeLists.txt index 699104499..13965f3db 100644 --- a/gnuradio-core/CMakeLists.txt +++ b/gnuradio-core/CMakeLists.txt @@ -123,6 +123,7 @@ endif(ENABLE_TESTING) if(ENABLE_PYTHON) add_subdirectory(src/lib/swig) add_subdirectory(src/python/gnuradio) + add_subdirectory(src/examples) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gnuradio-examples/python/CMakeLists.txt b/gnuradio-core/src/examples/CMakeLists.txt index 39b1fe806..4bdc463e4 100644 --- a/gnuradio-examples/python/CMakeLists.txt +++ b/gnuradio-core/src/examples/CMakeLists.txt @@ -20,4 +20,5 @@ add_subdirectory(mp-sched) add_subdirectory(network) add_subdirectory(pfb) -add_subdirectory(tags)
\ No newline at end of file +add_subdirectory(tags) +add_subdirectory(volk_benchmark)
\ No newline at end of file diff --git a/gnuradio-examples/python/mp-sched/CMakeLists.txt b/gnuradio-core/src/examples/mp-sched/CMakeLists.txt index ca090659d..2bf70d464 100644 --- a/gnuradio-examples/python/mp-sched/CMakeLists.txt +++ b/gnuradio-core/src/examples/mp-sched/CMakeLists.txt @@ -25,11 +25,11 @@ GR_PYTHON_INSTALL(PROGRAMS synthetic.py wfm_rcv_pll_to_wav.py DESTINATION ${GR_PKG_DATA_DIR}/examples/mp-sched - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) install( FILES README DESTINATION ${GR_PKG_DATA_DIR}/examples/mp-sched - COMPONENT "gnuadio-examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/mp-sched/README b/gnuradio-core/src/examples/mp-sched/README index ae575437a..ae575437a 100644 --- a/gnuradio-examples/python/mp-sched/README +++ b/gnuradio-core/src/examples/mp-sched/README diff --git a/gnuradio-examples/python/mp-sched/perf-data/core-duo.dat b/gnuradio-core/src/examples/mp-sched/perf-data/core-duo.dat index 064d1e128..064d1e128 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/core-duo.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/core-duo.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/core2-duo.dat b/gnuradio-core/src/examples/mp-sched/perf-data/core2-duo.dat index d67dee8e5..d67dee8e5 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/core2-duo.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/core2-duo.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat index fa182c69a..fa182c69a 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-2.33-clovertown.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat index 57d49ed33..57d49ed33 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/dual-quad-core-3.00-penryn.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/js21-altivec.dat b/gnuradio-core/src/examples/mp-sched/perf-data/js21-altivec.dat index d0b8148f0..d0b8148f0 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/js21-altivec.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/js21-altivec.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/js21.dat b/gnuradio-core/src/examples/mp-sched/perf-data/js21.dat index a23bcebe7..a23bcebe7 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/js21.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/js21.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/ps3-altivec.dat b/gnuradio-core/src/examples/mp-sched/perf-data/ps3-altivec.dat index dd01b31bd..dd01b31bd 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/ps3-altivec.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/ps3-altivec.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/ps3.dat b/gnuradio-core/src/examples/mp-sched/perf-data/ps3.dat index c9bac37cc..c9bac37cc 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/ps3.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/ps3.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/qs21-altivec.dat b/gnuradio-core/src/examples/mp-sched/perf-data/qs21-altivec.dat index 8364be363..8364be363 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/qs21-altivec.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/qs21-altivec.dat diff --git a/gnuradio-examples/python/mp-sched/perf-data/qs21.dat b/gnuradio-core/src/examples/mp-sched/perf-data/qs21.dat index cc628740a..cc628740a 100644 --- a/gnuradio-examples/python/mp-sched/perf-data/qs21.dat +++ b/gnuradio-core/src/examples/mp-sched/perf-data/qs21.dat diff --git a/gnuradio-examples/python/mp-sched/plot_flops.py b/gnuradio-core/src/examples/mp-sched/plot_flops.py index b3f819397..b3f819397 100755 --- a/gnuradio-examples/python/mp-sched/plot_flops.py +++ b/gnuradio-core/src/examples/mp-sched/plot_flops.py diff --git a/gnuradio-examples/python/mp-sched/run_synthetic.py b/gnuradio-core/src/examples/mp-sched/run_synthetic.py index 565e6c5c7..565e6c5c7 100755 --- a/gnuradio-examples/python/mp-sched/run_synthetic.py +++ b/gnuradio-core/src/examples/mp-sched/run_synthetic.py diff --git a/gnuradio-examples/python/mp-sched/synthetic.py b/gnuradio-core/src/examples/mp-sched/synthetic.py index e1fcb20bd..e1fcb20bd 100755 --- a/gnuradio-examples/python/mp-sched/synthetic.py +++ b/gnuradio-core/src/examples/mp-sched/synthetic.py diff --git a/gnuradio-examples/python/mp-sched/wfm_rcv_pll_to_wav.py b/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py index 3971d8b73..3971d8b73 100755 --- a/gnuradio-examples/python/mp-sched/wfm_rcv_pll_to_wav.py +++ b/gnuradio-core/src/examples/mp-sched/wfm_rcv_pll_to_wav.py diff --git a/gnuradio-examples/python/network/CMakeLists.txt b/gnuradio-core/src/examples/network/CMakeLists.txt index e70403ba0..33e7cb7d0 100644 --- a/gnuradio-examples/python/network/CMakeLists.txt +++ b/gnuradio-core/src/examples/network/CMakeLists.txt @@ -25,6 +25,6 @@ GR_PYTHON_INSTALL(PROGRAMS vector_sink.py vector_source.py DESTINATION ${GR_PKG_DATA_DIR}/examples/network - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/network/audio_sink.py b/gnuradio-core/src/examples/network/audio_sink.py index eb18a75aa..48b643578 100755 --- a/gnuradio-examples/python/network/audio_sink.py +++ b/gnuradio-core/src/examples/network/audio_sink.py @@ -20,9 +20,16 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, audio +from gnuradio import gr from gnuradio.eng_option import eng_option from optparse import OptionParser +import sys + +try: + from gnuradio import audio +except ImportError: + sys.stderr.write("Failed to import gnuradio.audio. Make sure gr-audio component is installed.\n") + sys.exit(1) class audio_sink(gr.top_block): def __init__(self, host, port, pkt_size, sample_rate, eof, wait): diff --git a/gnuradio-examples/python/network/audio_source.py b/gnuradio-core/src/examples/network/audio_source.py index 5818ccbd8..ef0dc13ba 100755 --- a/gnuradio-examples/python/network/audio_source.py +++ b/gnuradio-core/src/examples/network/audio_source.py @@ -20,9 +20,16 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, audio +from gnuradio import gr from gnuradio.eng_option import eng_option from optparse import OptionParser +import sys + +try: + from gnuradio import audio +except ImportError: + sys.stderr.write("Failed to import gnuradio.audio. Make sure gr-audio component is installed.\n") + sys.exit(1) class audio_source(gr.top_block): def __init__(self, host, port, pkt_size, sample_rate, eof): diff --git a/gnuradio-examples/python/network/dial_tone_sink.py b/gnuradio-core/src/examples/network/dial_tone_sink.py index 1b9009552..1b9009552 100755 --- a/gnuradio-examples/python/network/dial_tone_sink.py +++ b/gnuradio-core/src/examples/network/dial_tone_sink.py diff --git a/gnuradio-examples/python/network/dial_tone_source.py b/gnuradio-core/src/examples/network/dial_tone_source.py index 766ecf16d..766ecf16d 100755 --- a/gnuradio-examples/python/network/dial_tone_source.py +++ b/gnuradio-core/src/examples/network/dial_tone_source.py diff --git a/gnuradio-examples/python/network/vector_sink.py b/gnuradio-core/src/examples/network/vector_sink.py index 5d73858a3..5d73858a3 100755 --- a/gnuradio-examples/python/network/vector_sink.py +++ b/gnuradio-core/src/examples/network/vector_sink.py diff --git a/gnuradio-examples/python/network/vector_source.py b/gnuradio-core/src/examples/network/vector_source.py index 0e7d67844..0e7d67844 100755 --- a/gnuradio-examples/python/network/vector_source.py +++ b/gnuradio-core/src/examples/network/vector_source.py diff --git a/gnuradio-examples/python/pfb/CMakeLists.txt b/gnuradio-core/src/examples/pfb/CMakeLists.txt index 88fdf2ead..899c47b90 100644 --- a/gnuradio-examples/python/pfb/CMakeLists.txt +++ b/gnuradio-core/src/examples/pfb/CMakeLists.txt @@ -31,6 +31,6 @@ GR_PYTHON_INSTALL(PROGRAMS synth_to_chan.py reconstruction.py DESTINATION ${GR_PKG_DATA_DIR}/examples/pfb - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/pfb/channelize.py b/gnuradio-core/src/examples/pfb/channelize.py index 2fcb14a36..2fcb14a36 100755 --- a/gnuradio-examples/python/pfb/channelize.py +++ b/gnuradio-core/src/examples/pfb/channelize.py diff --git a/gnuradio-examples/python/pfb/chirp_channelize.py b/gnuradio-core/src/examples/pfb/chirp_channelize.py index 951255d3b..951255d3b 100755 --- a/gnuradio-examples/python/pfb/chirp_channelize.py +++ b/gnuradio-core/src/examples/pfb/chirp_channelize.py diff --git a/gnuradio-examples/python/pfb/decimate.py b/gnuradio-core/src/examples/pfb/decimate.py index 643a2c241..643a2c241 100755 --- a/gnuradio-examples/python/pfb/decimate.py +++ b/gnuradio-core/src/examples/pfb/decimate.py diff --git a/gnuradio-examples/python/pfb/fmtest.py b/gnuradio-core/src/examples/pfb/fmtest.py index 635ee4e9e..635ee4e9e 100755 --- a/gnuradio-examples/python/pfb/fmtest.py +++ b/gnuradio-core/src/examples/pfb/fmtest.py diff --git a/gnuradio-examples/python/pfb/interpolate.py b/gnuradio-core/src/examples/pfb/interpolate.py index 370cf26a7..370cf26a7 100755 --- a/gnuradio-examples/python/pfb/interpolate.py +++ b/gnuradio-core/src/examples/pfb/interpolate.py diff --git a/gnuradio-examples/python/pfb/reconstruction.py b/gnuradio-core/src/examples/pfb/reconstruction.py index c7909f7a5..c7909f7a5 100755 --- a/gnuradio-examples/python/pfb/reconstruction.py +++ b/gnuradio-core/src/examples/pfb/reconstruction.py diff --git a/gnuradio-examples/python/pfb/resampler.py b/gnuradio-core/src/examples/pfb/resampler.py index 7b296ca71..7b296ca71 100755 --- a/gnuradio-examples/python/pfb/resampler.py +++ b/gnuradio-core/src/examples/pfb/resampler.py diff --git a/gnuradio-examples/python/pfb/resampler_demo.grc b/gnuradio-core/src/examples/pfb/resampler_demo.grc index 468636a5c..468636a5c 100644 --- a/gnuradio-examples/python/pfb/resampler_demo.grc +++ b/gnuradio-core/src/examples/pfb/resampler_demo.grc diff --git a/gnuradio-examples/python/pfb/synth_filter.py b/gnuradio-core/src/examples/pfb/synth_filter.py index a91edfebf..a91edfebf 100755 --- a/gnuradio-examples/python/pfb/synth_filter.py +++ b/gnuradio-core/src/examples/pfb/synth_filter.py diff --git a/gnuradio-examples/python/pfb/synth_to_chan.py b/gnuradio-core/src/examples/pfb/synth_to_chan.py index c6c80b2f8..c6c80b2f8 100755 --- a/gnuradio-examples/python/pfb/synth_to_chan.py +++ b/gnuradio-core/src/examples/pfb/synth_to_chan.py diff --git a/gnuradio-examples/python/tags/CMakeLists.txt b/gnuradio-core/src/examples/tags/CMakeLists.txt index d2cd7b793..0ba1a4dd9 100644 --- a/gnuradio-examples/python/tags/CMakeLists.txt +++ b/gnuradio-core/src/examples/tags/CMakeLists.txt @@ -23,6 +23,6 @@ GR_PYTHON_INSTALL(PROGRAMS test_file_tags.py uhd_burst_detector.py DESTINATION ${GR_PKG_DATA_DIR}/examples/tags - COMPONENT "gnuradio_examples" + COMPONENT "core_python" ) diff --git a/gnuradio-examples/python/tags/test_file_tags.py b/gnuradio-core/src/examples/tags/test_file_tags.py index 446986cd7..446986cd7 100755 --- a/gnuradio-examples/python/tags/test_file_tags.py +++ b/gnuradio-core/src/examples/tags/test_file_tags.py diff --git a/gnuradio-examples/python/tags/uhd_burst_detector.py b/gnuradio-core/src/examples/tags/uhd_burst_detector.py index 7411ab06e..7411ab06e 100755 --- a/gnuradio-examples/python/tags/uhd_burst_detector.py +++ b/gnuradio-core/src/examples/tags/uhd_burst_detector.py diff --git a/gnuradio-core/src/examples/volk_benchmark/CMakeLists.txt b/gnuradio-core/src/examples/volk_benchmark/CMakeLists.txt new file mode 100644 index 000000000..dfae03f83 --- /dev/null +++ b/gnuradio-core/src/examples/volk_benchmark/CMakeLists.txt @@ -0,0 +1,35 @@ +# 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) + +GR_PYTHON_INSTALL(PROGRAMS + volk_math.py + volk_plot.py + volk_test_funcs.py + volk_types.py + DESTINATION ${GR_PKG_DATA_DIR}/examples/volk_benchmark + COMPONENT "core_python" +) + +install( + FILES README + DESTINATION ${GR_PKG_DATA_DIR}/examples/volk_benchmark + COMPONENT "core_python" +) diff --git a/gnuradio-examples/python/volk_benchmark/README b/gnuradio-core/src/examples/volk_benchmark/README index 516fc15bd..516fc15bd 100644 --- a/gnuradio-examples/python/volk_benchmark/README +++ b/gnuradio-core/src/examples/volk_benchmark/README diff --git a/gnuradio-examples/python/volk_benchmark/volk_math.py b/gnuradio-core/src/examples/volk_benchmark/volk_math.py index 8bf9ed6f3..8bf9ed6f3 100755 --- a/gnuradio-examples/python/volk_benchmark/volk_math.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_math.py diff --git a/gnuradio-examples/python/volk_benchmark/volk_plot.py b/gnuradio-core/src/examples/volk_benchmark/volk_plot.py index 823dfbf64..823dfbf64 100755 --- a/gnuradio-examples/python/volk_benchmark/volk_plot.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_plot.py diff --git a/gnuradio-examples/python/volk_benchmark/volk_test_funcs.py b/gnuradio-core/src/examples/volk_benchmark/volk_test_funcs.py index 4f4e4afd3..4f4e4afd3 100644 --- a/gnuradio-examples/python/volk_benchmark/volk_test_funcs.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_test_funcs.py diff --git a/gnuradio-examples/python/volk_benchmark/volk_types.py b/gnuradio-core/src/examples/volk_benchmark/volk_types.py index 3bc5a22ae..3bc5a22ae 100755 --- a/gnuradio-examples/python/volk_benchmark/volk_types.py +++ b/gnuradio-core/src/examples/volk_benchmark/volk_types.py diff --git a/gnuradio-examples/grc/CMakeLists.txt b/gnuradio-examples/grc/CMakeLists.txt deleted file mode 100644 index 75f10d86a..000000000 --- a/gnuradio-examples/grc/CMakeLists.txt +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2011 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. - -# AUDIO -install( - FILES - audio/cvsd_sweep.grc - audio/dial_tone.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/audio - COMPONENT "gnuadio-examples" -) - -# DEMOD -install( - FILES - demod/digital_freq_lock.grc - demod/mpsk_demod.grc - demod/pam_sync.grc - demod/pam_timing.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/demod - COMPONENT "gnuadio-examples" -) - -# SIMPLE -install( - FILES - simple/ber_simulation.grc - simple/dpsk_loopback.grc - simple/variable_config.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/simple - COMPONENT "gnuadio-examples" -) - -# TRELLIS -install( - FILES - trellis/interference_cancellation.grc - trellis/pccc1.grc - trellis/pccc.grc - trellis/sccc1.grc - trellis/sccc.grc - trellis/readme.txt - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/trellis - COMPONENT "gnuadio-examples" -) - -# UHD -install( - FILES - uhd/uhd_const_wave.grc - uhd/uhd_dpsk_mod.grc - uhd/uhd_fft.grc - uhd/uhd_rx_dpsk.grc - uhd/uhd_two_tone_loopback.grc - uhd/uhd_tx_dpsk.grc - uhd/uhd_wbfm_receive.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/uhd - COMPONENT "gnuadio-examples" -) - -# XMLRPC -install( - FILES - xmlrpc/readme.txt - xmlrpc/xmlrpc_client.grc - xmlrpc/xmlrpc_client_script.py - xmlrpc/xmlrpc_server.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/xmlrpc - COMPONENT "gnuadio-examples" -) diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt index 7038b9b0f..f9975cf08 100644 --- a/gr-audio/CMakeLists.txt +++ b/gr-audio/CMakeLists.txt @@ -33,6 +33,8 @@ GR_REGISTER_COMPONENT("gr-audio" ENABLE_GR_AUDIO GR_SET_GLOBAL(GR_AUDIO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include) +SET(GR_PKG_AUDIO_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/audio) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -65,6 +67,13 @@ CPACK_COMPONENT("audio_python" DEPENDS "core_python;audio_runtime" ) +CPACK_COMPONENT("audio_examples" + GROUP "Audio" + DISPLAY_NAME "Examples" + DESCRIPTION "Example programs" + DEPENDS "audio_runtime" +) + CPACK_COMPONENT("audio_swig" GROUP "Audio" DISPLAY_NAME "SWIG" @@ -77,12 +86,13 @@ CPACK_COMPONENT("audio_swig" ######################################################################## add_subdirectory(include) add_subdirectory(lib) -add_subdirectory(examples/c++) add_subdirectory(doc) +add_subdirectory(examples/c++) if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(grc) add_subdirectory(examples/python) + add_subdirectory(examples/grc) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-audio/examples/c++/CMakeLists.txt b/gr-audio/examples/c++/CMakeLists.txt index 38490cce8..28bbc52a5 100644 --- a/gr-audio/examples/c++/CMakeLists.txt +++ b/gr-audio/examples/c++/CMakeLists.txt @@ -21,3 +21,9 @@ include_directories(${GR_AUDIO_INCLUDE_DIRS}) include_directories(${GNURADIO_CORE_INCLUDE_DIRS}) add_executable(dial_tone dial_tone.cc) target_link_libraries(dial_tone gnuradio-audio) + +INSTALL(TARGETS + dial_tone + DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR} + COMPONENT "audio_examples" +) diff --git a/gr-audio/examples/grc/CMakeLists.txt b/gr-audio/examples/grc/CMakeLists.txt new file mode 100644 index 000000000..179b42fcc --- /dev/null +++ b/gr-audio/examples/grc/CMakeLists.txt @@ -0,0 +1,27 @@ +# 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. + +install( + FILES + cvsd_sweep.grc + dial_tone.grc + DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR} + COMPONENT "audio_python" +) + diff --git a/gnuradio-examples/grc/audio/cvsd_sweep.grc b/gr-audio/examples/grc/cvsd_sweep.grc index b645b747a..b645b747a 100644 --- a/gnuradio-examples/grc/audio/cvsd_sweep.grc +++ b/gr-audio/examples/grc/cvsd_sweep.grc diff --git a/gnuradio-examples/grc/audio/dial_tone.grc b/gr-audio/examples/grc/dial_tone.grc index ac8cbef27..ac8cbef27 100644 --- a/gnuradio-examples/grc/audio/dial_tone.grc +++ b/gr-audio/examples/grc/dial_tone.grc diff --git a/gr-audio/examples/python/CMakeLists.txt b/gr-audio/examples/python/CMakeLists.txt index 86ba86ac0..24e29e234 100644 --- a/gr-audio/examples/python/CMakeLists.txt +++ b/gr-audio/examples/python/CMakeLists.txt @@ -32,6 +32,6 @@ GR_PYTHON_INSTALL(PROGRAMS noise.py spectrum_inversion.py test_resampler.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/audio + DESTINATION ${GR_PKG_AUDIO_EXAMPLES_DIR} COMPONENT "audio_python" ) diff --git a/gr-digital/CMakeLists.txt b/gr-digital/CMakeLists.txt index 099af0869..eb7ed67e1 100644 --- a/gr-digital/CMakeLists.txt +++ b/gr-digital/CMakeLists.txt @@ -39,6 +39,8 @@ GR_SET_GLOBAL(GR_DIGITAL_SWIG_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/swig ) +SET(GR_PKG_DIGITAL_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/digital) + ######################################################################## # Begin conditional configuration ######################################################################## diff --git a/gr-digital/examples/CMakeLists.txt b/gr-digital/examples/CMakeLists.txt index 5c652fc83..33d257e59 100644 --- a/gr-digital/examples/CMakeLists.txt +++ b/gr-digital/examples/CMakeLists.txt @@ -19,6 +19,7 @@ include(GrPython) +# Base stuff GR_PYTHON_INSTALL(PROGRAMS example_costas.py example_fll.py @@ -26,10 +27,11 @@ GR_PYTHON_INSTALL(PROGRAMS run_length.py gen_whitener.py snr_estimators.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/digital + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR} COMPONENT "digital_python" ) +# Narrowband GR_PYTHON_INSTALL(PROGRAMS narrowband/transmit_path.py narrowband/receive_path.py @@ -41,10 +43,11 @@ GR_PYTHON_INSTALL(PROGRAMS narrowband/digital_bert_rx.py narrowband/digital_bert_tx.py narrowband/tunnel.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/digital/narrowband + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/narrowband COMPONENT "digital_python" ) +# OFDM GR_PYTHON_INSTALL(PROGRAMS ofdm/benchmark_add_channel.py ofdm/benchmark_rx.py @@ -55,6 +58,19 @@ GR_PYTHON_INSTALL(PROGRAMS ofdm/transmit_path.py ofdm/tunnel.py ofdm/uhd_interface.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/digital/ofdm + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/ofdm + COMPONENT "digital_python" +) + +# DEMOD +install( + FILES + demod/digital_freq_lock.grc + demod/mpsk_demod.grc + demod/pam_sync.grc + demod/pam_timing.grc + demod/ber_simulation.grc + demod/dpsk_loopback.grc + DESTINATION ${GR_PKG_DIGITAL_EXAMPLES_DIR}/demod COMPONENT "digital_python" ) diff --git a/gnuradio-examples/grc/simple/ber_simulation.grc b/gr-digital/examples/demod/ber_simulation.grc index 618add29c..6a9361ed1 100644 --- a/gnuradio-examples/grc/simple/ber_simulation.grc +++ b/gr-digital/examples/demod/ber_simulation.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Thu Mar 19 11:08:59 2009</timestamp> + <timestamp>Tue Apr 3 18:11:51 2012</timestamp> <block> <key>options</key> <param> @@ -36,6 +36,14 @@ <value>Custom</value> </param> <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -84,41 +92,6 @@ </param> </block> <block> - <key>gr_chunks_to_symbols_xx</key> - <param> - <key>id</key> - <value>gr_chunks_to_symbols_xx</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>in_type</key> - <value>byte</value> - </param> - <param> - <key>out_type</key> - <value>complex</value> - </param> - <param> - <key>symbol_table</key> - <value>const</value> - </param> - <param> - <key>dimension</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(360, 237)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>wxgui_numbersink2</key> <param> <key>id</key> @@ -145,10 +118,6 @@ <value>samp_rate</value> </param> <param> - <key>base_value</key> - <value>0.0</value> - </param> - <param> <key>min_value</key> <value>0.0</value> </param> @@ -189,10 +158,18 @@ <value>False</value> </param> <param> + <key>win_size</key> + <value></value> + </param> + <param> <key>grid_pos</key> <value>1, 0, 1, 1</value> </param> <param> + <key>notebook</key> + <value></value> + </param> + <param> <key>_coordinate</key> <value>(1062, 11)</value> </param> @@ -233,30 +210,22 @@ </param> </block> <block> - <key>blks2_error_rate</key> + <key>variable</key> <param> <key>id</key> - <value>blks2_error_rate</value> + <value>samp_rate</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>'BER'</value> - </param> - <param> - <key>win_size</key> - <value>1000000</value> - </param> - <param> - <key>bits_per_symbol</key> - <value>int(math.log(len(const))/math.log(2))</value> + <key>value</key> + <value>50e3</value> </param> <param> <key>_coordinate</key> - <value>(670, 41)</value> + <value>(20, 168)</value> </param> <param> <key>_rotation</key> @@ -264,26 +233,22 @@ </param> </block> <block> - <key>gr_constellation_decoder_cb</key> + <key>import</key> <param> <key>id</key> - <value>gr_constellation_decoder_cb</value> + <value>import</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>sym_position</key> - <value>const</value> - </param> - <param> - <key>sym_value_out</key> - <value>range(len(const))</value> + <key>import</key> + <value>import math</value> </param> <param> <key>_coordinate</key> - <value>(708, 224)</value> + <value>(138, 168)</value> </param> <param> <key>_rotation</key> @@ -291,10 +256,10 @@ </param> </block> <block> - <key>random_source_x</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>random_source_x</value> + <value>wxgui_scopesink2_0</value> </param> <param> <key>_enabled</key> @@ -302,27 +267,63 @@ </param> <param> <key>type</key> - <value>byte</value> + <value>complex</value> </param> <param> - <key>min</key> + <key>title</key> + <value>"Constellation: "+str(const)</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>v_scale</key> <value>0</value> </param> <param> - <key>max</key> - <value>len(const)</value> + <key>v_offset</key> + <value>0</value> </param> <param> - <key>num_samps</key> - <value>1000000</value> + <key>t_scale</key> + <value>0</value> </param> <param> - <key>repeat</key> + <key>ac_couple</key> <value>False</value> </param> <param> + <key>xy_mode</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>2, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> <key>_coordinate</key> - <value>(15, 244)</value> + <value>(828, 368)</value> </param> <param> <key>_rotation</key> @@ -330,22 +331,53 @@ </param> </block> <block> - <key>variable</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>noise</value> + <value>gr_add_xx</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>.25</value> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(18, 386)</value> + <value>(652, 395)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_constellation_decoder_cb</key> + <param> + <key>id</key> + <value>digital_constellation_decoder_cb_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>constellation</key> + <value>const.base()</value> + </param> + <param> + <key>_coordinate</key> + <value>(693, 205)</value> </param> <param> <key>_rotation</key> @@ -364,7 +396,7 @@ </param> <param> <key>value</key> - <value>1+1j, 1-1j, -1-1j, -1+1j</value> + <value>digital.qpsk_constellation()</value> </param> <param> <key>_coordinate</key> @@ -379,7 +411,7 @@ <key>variable</key> <param> <key>id</key> - <value>samp_rate</value> + <value>const_points</value> </param> <param> <key>_enabled</key> @@ -387,11 +419,11 @@ </param> <param> <key>value</key> - <value>50e3</value> + <value>const.points()</value> </param> <param> <key>_coordinate</key> - <value>(20, 168)</value> + <value>(17, 532)</value> </param> <param> <key>_rotation</key> @@ -399,22 +431,38 @@ </param> </block> <block> - <key>import</key> + <key>random_source_x</key> <param> <key>id</key> - <value>import</value> + <value>random_source_x</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>import</key> - <value>import math</value> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>len(const_points)</value> + </param> + <param> + <key>num_samps</key> + <value>1000000</value> + </param> + <param> + <key>repeat</key> + <value>False</value> </param> <param> <key>_coordinate</key> - <value>(138, 168)</value> + <value>(15, 244)</value> </param> <param> <key>_rotation</key> @@ -422,30 +470,38 @@ </param> </block> <block> - <key>gr_add_xx</key> + <key>gr_chunks_to_symbols_xx</key> <param> <key>id</key> - <value>gr_add_xx</value> + <value>gr_chunks_to_symbols_xx</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> + <key>in_type</key> + <value>byte</value> + </param> + <param> + <key>out_type</key> <value>complex</value> </param> <param> - <key>num_inputs</key> - <value>2</value> + <key>symbol_table</key> + <value>const_points</value> </param> <param> - <key>vlen</key> + <key>dimension</key> + <value>1</value> + </param> + <param> + <key>num_ports</key> <value>1</value> </param> <param> <key>_coordinate</key> - <value>(652, 395)</value> + <value>(367, 260)</value> </param> <param> <key>_rotation</key> @@ -453,10 +509,10 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>blks2_error_rate</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>blks2_error_rate</value> </param> <param> <key>_enabled</key> @@ -464,43 +520,74 @@ </param> <param> <key>type</key> - <value>complex</value> + <value>'BER'</value> </param> <param> - <key>title</key> - <value>"Constellation: "+str(const)</value> + <key>win_size</key> + <value>1000000</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>bits_per_symbol</key> + <value>int(math.log(len(const_points))/math.log(2))</value> </param> <param> - <key>v_scale</key> - <value>0</value> + <key>_coordinate</key> + <value>(670, 41)</value> </param> <param> - <key>t_scale</key> + <key>_rotation</key> <value>0</value> </param> + </block> + <block> + <key>variable_slider</key> <param> - <key>ac_couple</key> - <value>False</value> + <key>id</key> + <value>noise</value> </param> <param> - <key>xy_mode</key> + <key>_enabled</key> <value>True</value> </param> <param> - <key>num_inputs</key> + <key>label</key> + <value>AWGN Noise</value> + </param> + <param> + <key>value</key> + <value>0.10</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> <value>1</value> </param> <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> <key>grid_pos</key> - <value>2, 0, 1, 1</value> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(828, 368)</value> + <value>(268, 481)</value> </param> <param> <key>_rotation</key> @@ -520,18 +607,6 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_constellation_decoder_cb</source_block_id> - <sink_block_id>blks2_error_rate</sink_block_id> - <source_key>0</source_key> - <sink_key>1</sink_key> - </connection> - <connection> - <source_block_id>gr_add_xx</source_block_id> - <sink_block_id>gr_constellation_decoder_cb</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> <source_block_id>gr_chunks_to_symbols_xx</source_block_id> <sink_block_id>gr_add_xx</sink_block_id> <source_key>0</source_key> @@ -561,4 +636,16 @@ <source_key>0</source_key> <sink_key>0</sink_key> </connection> + <connection> + <source_block_id>digital_constellation_decoder_cb_0</source_block_id> + <sink_block_id>blks2_error_rate</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx</source_block_id> + <sink_block_id>digital_constellation_decoder_cb_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> </flow_graph> diff --git a/gnuradio-examples/grc/demod/digital_freq_lock.grc b/gr-digital/examples/demod/digital_freq_lock.grc index 36037febb..36037febb 100644 --- a/gnuradio-examples/grc/demod/digital_freq_lock.grc +++ b/gr-digital/examples/demod/digital_freq_lock.grc diff --git a/gnuradio-examples/grc/simple/dpsk_loopback.grc b/gr-digital/examples/demod/dpsk_loopback.grc index 6a507c98d..aef6a7738 100644 --- a/gnuradio-examples/grc/simple/dpsk_loopback.grc +++ b/gr-digital/examples/demod/dpsk_loopback.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Tue Mar 17 12:53:37 2009</timestamp> + <timestamp>Tue Apr 3 18:03:52 2012</timestamp> <block> <key>options</key> <param> @@ -36,47 +36,20 @@ <value>Custom</value> </param> <param> - <key>realtime_scheduling</key> - <value></value> - </param> - <param> - <key>_coordinate</key> - <value>(10, 10)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>blks2_dxpsk_mod</key> - <param> - <key>id</key> - <value>blks2_dxpsk_mod_0</value> + <key>run_options</key> + <value>prompt</value> </param> <param> - <key>_enabled</key> + <key>run</key> <value>True</value> </param> <param> - <key>type</key> - <value>dbpsk</value> - </param> - <param> - <key>samples_per_symbol</key> - <value>2</value> - </param> - <param> - <key>excess_bw</key> - <value>0.35</value> - </param> - <param> - <key>gray_code</key> - <value>True</value> + <key>realtime_scheduling</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(426, 295)</value> + <value>(10, 10)</value> </param> <param> <key>_rotation</key> @@ -137,63 +110,24 @@ <value>100</value> </param> <param> - <key>slider_length</key> - <value>200</value> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> </param> <param> - <key>slider_type</key> - <value>horizontal</value> + <key>converver</key> + <value>float_converter</value> </param> <param> <key>grid_pos</key> <value></value> </param> <param> - <key>_coordinate</key> - <value>(12, 257)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>blks2_packet_encoder</key> - <param> - <key>id</key> - <value>blks2_packet_encoder_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>samples_per_symbol</key> - <value>2</value> - </param> - <param> - <key>bits_per_symbol</key> - <value>1</value> - </param> - <param> - <key>access_code</key> + <key>notebook</key> <value></value> </param> <param> - <key>pad_for_usrp</key> - <value>True</value> - </param> - <param> - <key>payload_length</key> - <value>0</value> - </param> - <param> <key>_coordinate</key> - <value>(216, 260)</value> + <value>(12, 257)</value> </param> <param> <key>_rotation</key> @@ -306,10 +240,10 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>digital_dxpsk_demod</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>digital_dxpsk_demod_0</value> </param> <param> <key>_enabled</key> @@ -317,43 +251,51 @@ </param> <param> <key>type</key> - <value>float</value> + <value>dbpsk</value> </param> <param> - <key>title</key> - <value>Scope Plot</value> + <key>samples_per_symbol</key> + <value>2</value> </param> <param> - <key>samp_rate</key> - <value>samp_rate</value> + <key>excess_bw</key> + <value>0.35</value> </param> <param> - <key>frame_decim</key> - <value>15</value> + <key>freq_bw</key> + <value>6.28/100.0</value> </param> <param> - <key>v_scale</key> - <value>0</value> + <key>phase_bw</key> + <value>6.28/100.0</value> </param> <param> - <key>t_scale</key> - <value>1./freq</value> + <key>timing_bw</key> + <value>6.28/100.0</value> </param> <param> - <key>marker</key> - <value>set_format_line</value> + <key>omega_relative_limit</key> + <value>0.005</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>gray_coded</key> + <value>True</value> </param> <param> - <key>grid_pos</key> - <value></value> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> + </param> + <param> + <key>sync_out</key> + <value>False</value> </param> <param> <key>_coordinate</key> - <value>(769, 12)</value> + <value>(639, 254)</value> </param> <param> <key>_rotation</key> @@ -361,10 +303,10 @@ </param> </block> <block> - <key>blks2_dxpsk_demod</key> + <key>digital_dxpsk_mod</key> <param> <key>id</key> - <value>blks2_dxpsk_demod_0</value> + <value>digital_dxpsk_mod_0</value> </param> <param> <key>_enabled</key> @@ -383,28 +325,138 @@ <value>0.35</value> </param> <param> - <key>costas_alpha</key> - <value>0.175</value> + <key>gray_coded</key> + <value>True</value> </param> <param> - <key>gain_mu</key> - <value>0.175</value> + <key>verbose</key> + <value>False</value> </param> <param> - <key>mu</key> - <value>0.5</value> + <key>log</key> + <value>False</value> </param> <param> - <key>omega_relative_limit</key> - <value>0.005</value> + <key>_coordinate</key> + <value>(421, 294)</value> </param> <param> - <key>gray_code</key> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_packet_encoder</key> + <param> + <key>id</key> + <value>blks2_packet_encoder_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>samples_per_symbol</key> + <value>2</value> + </param> + <param> + <key>bits_per_symbol</key> + <value>1</value> + </param> + <param> + <key>access_code</key> + <value></value> + </param> + <param> + <key>pad_for_usrp</key> <value>True</value> </param> <param> + <key>payload_length</key> + <value>0</value> + </param> + <param> <key>_coordinate</key> - <value>(691, 219)</value> + <value>(216, 286)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>wxgui_scopesink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Scope Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>samp_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>1./freq</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> + <key>_coordinate</key> + <value>(760, 41)</value> </param> <param> <key>_rotation</key> @@ -412,38 +464,38 @@ </param> </block> <connection> - <source_block_id>blks2_dxpsk_mod_0</source_block_id> - <sink_block_id>blks2_dxpsk_demod_0</sink_block_id> + <source_block_id>gr_sig_source_x_0</source_block_id> + <sink_block_id>gr_throttle_0_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_dxpsk_demod_0</source_block_id> - <sink_block_id>blks2_packet_decoder_0</sink_block_id> + <source_block_id>gr_throttle_0_0</source_block_id> + <sink_block_id>blks2_packet_encoder_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_packet_encoder_0</source_block_id> - <sink_block_id>blks2_dxpsk_mod_0</sink_block_id> + <source_block_id>blks2_packet_decoder_0</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_sig_source_x_0</source_block_id> - <sink_block_id>gr_throttle_0_0</sink_block_id> + <source_block_id>digital_dxpsk_demod_0</source_block_id> + <sink_block_id>blks2_packet_decoder_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_throttle_0_0</source_block_id> - <sink_block_id>blks2_packet_encoder_0</sink_block_id> + <source_block_id>digital_dxpsk_mod_0</source_block_id> + <sink_block_id>digital_dxpsk_demod_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_packet_decoder_0</source_block_id> - <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_block_id>blks2_packet_encoder_0</source_block_id> + <sink_block_id>digital_dxpsk_mod_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gnuradio-examples/grc/demod/mpsk_demod.grc b/gr-digital/examples/demod/mpsk_demod.grc index 08108dcba..d7cca9661 100644 --- a/gnuradio-examples/grc/demod/mpsk_demod.grc +++ b/gr-digital/examples/demod/mpsk_demod.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Mon Oct 5 18:34:52 2009</timestamp> + <timestamp>Tue Apr 3 18:01:57 2012</timestamp> <block> <key>options</key> <param> @@ -80,119 +80,6 @@ </param> </block> <block> - <key>random_source_x</key> - <param> - <key>id</key> - <value>random_source_x_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>byte</value> - </param> - <param> - <key>min</key> - <value>0</value> - </param> - <param> - <key>max</key> - <value>2**8</value> - </param> - <param> - <key>num_samps</key> - <value>10000</value> - </param> - <param> - <key>repeat</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(155, 160)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>blks2_dxpsk_mod</key> - <param> - <key>id</key> - <value>blks2_dxpsk_mod_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>dqpsk</value> - </param> - <param> - <key>samples_per_symbol</key> - <value>samps_per_sym</value> - </param> - <param> - <key>excess_bw</key> - <value>0.35</value> - </param> - <param> - <key>gray_code</key> - <value>True</value> - </param> - <param> - <key>verbose</key> - <value>False</value> - </param> - <param> - <key>log</key> - <value>False</value> - </param> - <param> - <key>_coordinate</key> - <value>(391, 54)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_throttle</key> - <param> - <key>id</key> - <value>gr_throttle_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>samples_per_second</key> - <value>samp_rate</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(654, 142)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>variable</key> <param> <key>id</key> @@ -216,45 +103,6 @@ </param> </block> <block> - <key>gr_channel_model</key> - <param> - <key>id</key> - <value>gr_channel_model_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>noise_voltage</key> - <value>noise</value> - </param> - <param> - <key>freq_offset</key> - <value>freq_off</value> - </param> - <param> - <key>epsilon</key> - <value>1.0</value> - </param> - <param> - <key>taps</key> - <value>1.0</value> - </param> - <param> - <key>seed</key> - <value>42</value> - </param> - <param> - <key>_coordinate</key> - <value>(487, 282)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>variable_slider</key> <param> <key>id</key> @@ -434,8 +282,8 @@ <value>0</value> </param> <param> - <key>alpha</key> - <value>0.005</value> + <key>loop_bw</key> + <value>6.28/100.0</value> </param> <param> <key>fmax</key> @@ -458,6 +306,10 @@ <value>0.005</value> </param> <param> + <key>win_size</key> + <value></value> + </param> + <param> <key>grid_pos</key> <value></value> </param> @@ -537,6 +389,14 @@ <value>0</value> </param> <param> + <key>win</key> + <value>None</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> <key>grid_pos</key> <value></value> </param> @@ -553,33 +413,185 @@ <value>0</value> </param> </block> + <block> + <key>gr_channel_model</key> + <param> + <key>id</key> + <value>gr_channel_model_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>noise_voltage</key> + <value>noise</value> + </param> + <param> + <key>freq_offset</key> + <value>freq_off</value> + </param> + <param> + <key>epsilon</key> + <value>1.0</value> + </param> + <param> + <key>taps</key> + <value>1.0</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(487, 282)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>samples_per_second</key> + <value>samp_rate</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(633, 82)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>2**8</value> + </param> + <param> + <key>num_samps</key> + <value>10000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(161, 119)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_dxpsk_mod</key> + <param> + <key>id</key> + <value>digital_dxpsk_mod_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>dqpsk</value> + </param> + <param> + <key>samples_per_symbol</key> + <value>samps_per_sym</value> + </param> + <param> + <key>excess_bw</key> + <value>0.35</value> + </param> + <param> + <key>gray_coded</key> + <value>True</value> + </param> + <param> + <key>verbose</key> + <value>False</value> + </param> + <param> + <key>log</key> + <value>False</value> + </param> + <param> + <key>_coordinate</key> + <value>(361, 119)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> <connection> - <source_block_id>random_source_x_0</source_block_id> - <sink_block_id>blks2_dxpsk_mod_0</sink_block_id> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>wxgui_constellationsink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> <source_block_id>gr_throttle_0</source_block_id> - <sink_block_id>wxgui_constellationsink2_0</sink_block_id> + <sink_block_id>wxgui_fftsink2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_throttle_0</source_block_id> - <sink_block_id>wxgui_fftsink2_0</sink_block_id> + <source_block_id>gr_channel_model_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>blks2_dxpsk_mod_0</source_block_id> + <source_block_id>digital_dxpsk_mod_0</source_block_id> <sink_block_id>gr_channel_model_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> <connection> - <source_block_id>gr_channel_model_0</source_block_id> - <sink_block_id>gr_throttle_0</sink_block_id> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>digital_dxpsk_mod_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gnuradio-examples/grc/demod/pam_sync.grc b/gr-digital/examples/demod/pam_sync.grc index 8571995a5..8571995a5 100644 --- a/gnuradio-examples/grc/demod/pam_sync.grc +++ b/gr-digital/examples/demod/pam_sync.grc diff --git a/gnuradio-examples/grc/demod/pam_timing.grc b/gr-digital/examples/demod/pam_timing.grc index 02130f481..02130f481 100644 --- a/gnuradio-examples/grc/demod/pam_timing.grc +++ b/gr-digital/examples/demod/pam_timing.grc diff --git a/gr-fcd/CMakeLists.txt b/gr-fcd/CMakeLists.txt index e454c01fa..10dd8b8cd 100644 --- a/gr-fcd/CMakeLists.txt +++ b/gr-fcd/CMakeLists.txt @@ -51,6 +51,8 @@ GR_SET_GLOBAL(GR_FCD_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include/fcd ) +SET(GR_PKG_FCD_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/fcd) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -83,6 +85,13 @@ CPACK_COMPONENT("fcd_python" DEPENDS "core_python;fcd_runtime" ) +CPACK_COMPONENT("fcd_examples" + GROUP "FCD" + DISPLAY_NAME "Examples" + DESCRIPTION "Example programs" + DEPENDS "fcd_runtime" +) + CPACK_COMPONENT("fcd_swig" GROUP "FCD" DISPLAY_NAME "SWIG" @@ -99,8 +108,9 @@ if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(python) add_subdirectory(grc) + add_subdirectory(examples/grc) endif(ENABLE_PYTHON) -add_subdirectory(examples) +add_subdirectory(examples/c++) add_subdirectory(doc) ######################################################################## diff --git a/gr-fcd/examples/CMakeLists.txt b/gr-fcd/examples/c++/CMakeLists.txt index 477a6311b..05574f4a8 100644 --- a/gr-fcd/examples/CMakeLists.txt +++ b/gr-fcd/examples/c++/CMakeLists.txt @@ -26,16 +26,6 @@ target_link_libraries(fcd_nfm_rx gnuradio-fcd) INSTALL(TARGETS fcd_nfm_rx - DESTINATION ${GR_PKG_DATA_DIR}/examples/fcd + DESTINATION ${GR_PKG_FCD_EXAMPLES_DIR} COMPONENT "fcd_examples" ) - -if(ENABLE_PYTHON) - INSTALL(FILES - fcd_apt_rx.grc - fcd_fft_wx.grc - fcd_nfm_rx.grc - DESTINATION ${GR_PKG_DATA_DIR}/examples/fcd - COMPONENT "fcd_examples" - ) -endif() diff --git a/gr-fcd/examples/fcd_nfm_rx.cc b/gr-fcd/examples/c++/fcd_nfm_rx.cc index 97ef7cf19..97ef7cf19 100644 --- a/gr-fcd/examples/fcd_nfm_rx.cc +++ b/gr-fcd/examples/c++/fcd_nfm_rx.cc diff --git a/gr-fcd/examples/grc/CMakeLists.txt b/gr-fcd/examples/grc/CMakeLists.txt new file mode 100644 index 000000000..e33fdf182 --- /dev/null +++ b/gr-fcd/examples/grc/CMakeLists.txt @@ -0,0 +1,26 @@ +# 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. + +INSTALL(FILES + fcd_apt_rx.grc + fcd_fft_wx.grc + fcd_nfm_rx.grc + DESTINATION ${GR_PKG_FCD_EXAMPLES_DIR} + COMPONENT "fcd_examples" +)
\ No newline at end of file diff --git a/gr-fcd/examples/fcd_apt_rx.grc b/gr-fcd/examples/grc/fcd_apt_rx.grc index c4d3e64d1..c4d3e64d1 100644 --- a/gr-fcd/examples/fcd_apt_rx.grc +++ b/gr-fcd/examples/grc/fcd_apt_rx.grc diff --git a/gr-fcd/examples/fcd_fft_wx.grc b/gr-fcd/examples/grc/fcd_fft_wx.grc index c045bbfa2..c045bbfa2 100644 --- a/gr-fcd/examples/fcd_fft_wx.grc +++ b/gr-fcd/examples/grc/fcd_fft_wx.grc diff --git a/gr-fcd/examples/fcd_nfm_rx.grc b/gr-fcd/examples/grc/fcd_nfm_rx.grc index 9dac3fcb8..9dac3fcb8 100644 --- a/gr-fcd/examples/fcd_nfm_rx.grc +++ b/gr-fcd/examples/grc/fcd_nfm_rx.grc diff --git a/gr-noaa/CMakeLists.txt b/gr-noaa/CMakeLists.txt index a3a5d56db..fc10caff4 100644 --- a/gr-noaa/CMakeLists.txt +++ b/gr-noaa/CMakeLists.txt @@ -35,6 +35,8 @@ GR_SET_GLOBAL(GR_NOAA_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/lib ) +SET(GR_PKG_NOAA_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/noaa) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -81,7 +83,7 @@ add_subdirectory(lib) if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(grc) - add_subdirectory(apps) + add_subdirectory(examples) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-noaa/apps/file_rx_hrpt.py b/gr-noaa/apps/file_rx_hrpt.py deleted file mode 100755 index fcd1832f6..000000000 --- a/gr-noaa/apps/file_rx_hrpt.py +++ /dev/null @@ -1,239 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: USRP HRPT Receiver -# Generated: Thu Oct 27 13:48:25 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import ConfigParser -import math, os - -class file_rx_hrpt(gr.top_block): - - def __init__(self): - gr.top_block.__init__(self, "USRP HRPT Receiver") - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.sps = sps = sample_rate/sym_rate - self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(config_filename) - try: pll_alpha = self._pll_alpha_config.getfloat('usrp_rx_hrpt', 'pll_alpha') - except: pll_alpha = 0.01 - self.pll_alpha = pll_alpha - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(config_filename) - try: output_filename = self._output_filename_config.get('usrp_rx_hrpt', 'filename') - except: output_filename = 'frames.hrpt' - self.output_filename = output_filename - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(config_filename) - try: gain = self._gain_config.getfloat('usrp_rx_hrpt', 'gain') - except: gain = 35 - self.gain = gain - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(config_filename) - try: freq = self._freq_config.getfloat('usrp_rx_hrpt', 'freq') - except: freq = 1698e6 - self.freq = freq - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(config_filename) - try: clock_alpha = self._clock_alpha_config.getfloat('usrp_rx_hrpt', 'clock_alpha') - except: clock_alpha = 0.01 - self.clock_alpha = clock_alpha - - ################################################## - # Blocks - ################################################## - self.throttle = gr.throttle(gr.sizeof_short*1, 2*sample_rate) - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - self.gr_interleaved_short_to_complex_0 = gr.interleaved_short_to_complex() - self.gr_file_source_0 = gr.file_source(gr.sizeof_short*1, "input_filename", False) - self.frame_sink = gr.file_sink(gr.sizeof_short*1, output_filename) - self.frame_sink.set_unbuffered(False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.deframer = noaa.hrpt_deframer() - self.decoder = noaa.hrpt_decoder(True,True) - self.agc = gr.agc_cc(1e-6, 1.0, 1.0, 1.0) - - ################################################## - # Connections - ################################################## - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.deframer, 0), (self.decoder, 0)) - self.connect((self.deframer, 0), (self.frame_sink, 0)) - self.connect((self.gr_interleaved_short_to_complex_0, 0), (self.agc, 0)) - self.connect((self.throttle, 0), (self.gr_interleaved_short_to_complex_0, 0)) - self.connect((self.gr_file_source_0, 0), (self.throttle, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.deframer, 0)) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_config_filename(self): - return self.config_filename - - def set_config_filename(self, config_filename): - self.config_filename = config_filename - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - - def get_gain(self): - return self.gain - - def set_gain(self, gain): - self.gain = gain - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - - def get_freq(self): - return self.freq - - def set_freq(self, freq): - self.freq = freq - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - (options, args) = parser.parse_args() - tb = file_rx_hrpt() - tb.start() - raw_input('Press Enter to quit: ') - tb.stop() - diff --git a/gr-noaa/apps/hrpt_decode.py b/gr-noaa/apps/hrpt_decode.py deleted file mode 100755 index 158780b17..000000000 --- a/gr-noaa/apps/hrpt_decode.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: Hrpt Decode -# Generated: Sun Nov 8 10:49:01 2009 -################################################## - -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import math, os - -class hrpt_decode(gr.top_block): - - def __init__(self, decim=32, pll_alpha=0.01, clock_alpha=0.01, input_filename="frames.hrpt"): - gr.top_block.__init__(self, "Hrpt Decode") - - ################################################## - # Parameters - ################################################## - self.decim = decim - self.pll_alpha = pll_alpha - self.clock_alpha = clock_alpha - self.input_filename = input_filename - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 64e6/decim - self.sps = sps = sample_rate/sym_rate - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - - ################################################## - # Blocks - ################################################## - self.decoder = noaa.hrpt_decoder(True,True) - self.file_source = gr.file_source(gr.sizeof_short*1, input_filename, False) - - ################################################## - # Connections - ################################################## - self.connect((self.file_source, 0), (self.decoder, 0)) - - def set_decim(self, decim): - self.decim = decim - self.set_sample_rate(64e6/self.decim) - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - - def set_input_filename(self, input_filename): - self.input_filename = input_filename - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - - def set_hs(self, hs): - self.hs = hs - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - parser.add_option("-d", "--decim", dest="decim", type="intx", default=32, - help="Set decim [default=%default]") - parser.add_option("-p", "--pll-alpha", dest="pll_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set pll_alpha [default=%default]") - parser.add_option("-s", "--clock-alpha", dest="clock_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set clock_alpha [default=%default]") - parser.add_option("-F", "--input-filename", dest="input_filename", type="string", default="frames.hrpt", - help="Set frames.hrpt [default=%default]") - (options, args) = parser.parse_args() - tb = hrpt_decode(decim=options.decim, pll_alpha=options.pll_alpha, clock_alpha=options.clock_alpha, input_filename=options.input_filename) - tb.run() - diff --git a/gr-noaa/apps/hrpt_demod.py b/gr-noaa/apps/hrpt_demod.py deleted file mode 100755 index 38b4b2fe3..000000000 --- a/gr-noaa/apps/hrpt_demod.py +++ /dev/null @@ -1,161 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: Hrpt Demod -# Generated: Thu Oct 27 13:51:59 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import math, os - -class hrpt_demod(gr.top_block): - - def __init__(self, input_filename="usrp.dat", output_filename="frames.dat", decim=32, pll_alpha=0.01, clock_alpha=0.01): - gr.top_block.__init__(self, "Hrpt Demod") - - ################################################## - # Parameters - ################################################## - self.input_filename = input_filename - self.output_filename = output_filename - self.decim = decim - self.pll_alpha = pll_alpha - self.clock_alpha = clock_alpha - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.sps = sps = sample_rate/sym_rate - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - - ################################################## - # Blocks - ################################################## - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.noaa_hrpt_deframer_0 = noaa.hrpt_deframer() - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - self.gr_file_sink_0 = gr.file_sink(gr.sizeof_short*1, output_filename) - self.gr_file_sink_0.set_unbuffered(False) - self.file_source = gr.file_source(gr.sizeof_short*1, input_filename, False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.decoder = noaa.hrpt_decoder(True,False) - self.cs2cf = gr.interleaved_short_to_complex() - self.agc = gr.agc_cc(1e-5, 1.0, 1.0/32768.0, 1.0) - - ################################################## - # Connections - ################################################## - self.connect((self.file_source, 0), (self.cs2cf, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.cs2cf, 0), (self.agc, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.noaa_hrpt_deframer_0, 0), (self.gr_file_sink_0, 0)) - self.connect((self.noaa_hrpt_deframer_0, 0), (self.decoder, 0)) - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.noaa_hrpt_deframer_0, 0)) - - def get_input_filename(self): - return self.input_filename - - def set_input_filename(self, input_filename): - self.input_filename = input_filename - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - - def get_decim(self): - return self.decim - - def set_decim(self, decim): - self.decim = decim - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - parser.add_option("-F", "--input-filename", dest="input_filename", type="string", default="usrp.dat", - help="Set usrp.dat [default=%default]") - parser.add_option("-o", "--output-filename", dest="output_filename", type="string", default="frames.dat", - help="Set frames.dat [default=%default]") - parser.add_option("-d", "--decim", dest="decim", type="intx", default=32, - help="Set None [default=%default]") - parser.add_option("-p", "--pll-alpha", dest="pll_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set None [default=%default]") - parser.add_option("-s", "--clock-alpha", dest="clock_alpha", type="eng_float", default=eng_notation.num_to_str(0.01), - help="Set None [default=%default]") - (options, args) = parser.parse_args() - tb = hrpt_demod(input_filename=options.input_filename, output_filename=options.output_filename, decim=options.decim, pll_alpha=options.pll_alpha, clock_alpha=options.clock_alpha) - tb.run() - diff --git a/gr-noaa/apps/usrp_rx_hrpt.py b/gr-noaa/apps/usrp_rx_hrpt.py deleted file mode 100755 index e603e768e..000000000 --- a/gr-noaa/apps/usrp_rx_hrpt.py +++ /dev/null @@ -1,462 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: USRP HRPT Receiver -# Generated: Thu Oct 27 13:26:42 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio import uhd -from gnuradio import window -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from gnuradio.wxgui import fftsink2 -from gnuradio.wxgui import forms -from gnuradio.wxgui import scopesink2 -from grc_gnuradio import wxgui as grc_wxgui -from optparse import OptionParser -import ConfigParser -import math, os -import wx - -class usrp_rx_hrpt(grc_wxgui.top_block_gui): - - def __init__(self): - grc_wxgui.top_block_gui.__init__(self, title="USRP HRPT Receiver") - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' - self.sps = sps = sample_rate/sym_rate - self._saved_pll_alpha_config = ConfigParser.ConfigParser() - self._saved_pll_alpha_config.read(config_filename) - try: saved_pll_alpha = self._saved_pll_alpha_config.getfloat('usrp_rx_hrpt', 'pll_alpha') - except: saved_pll_alpha = 0.01 - self.saved_pll_alpha = saved_pll_alpha - self._saved_gain_config = ConfigParser.ConfigParser() - self._saved_gain_config.read(config_filename) - try: saved_gain = self._saved_gain_config.getfloat('usrp_rx_hrpt', 'gain') - except: saved_gain = 35 - self.saved_gain = saved_gain - self._saved_freq_config = ConfigParser.ConfigParser() - self._saved_freq_config.read(config_filename) - try: saved_freq = self._saved_freq_config.getfloat('usrp_rx_hrpt', 'freq') - except: saved_freq = 1698e6 - self.saved_freq = saved_freq - self._saved_clock_alpha_config = ConfigParser.ConfigParser() - self._saved_clock_alpha_config.read(config_filename) - try: saved_clock_alpha = self._saved_clock_alpha_config.getfloat('usrp_rx_hrpt', 'clock_alpha') - except: saved_clock_alpha = 0.01 - self.saved_clock_alpha = saved_clock_alpha - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(config_filename) - try: addr = self._addr_config.get('usrp_rx_hrpt', 'addr') - except: addr = "" - self.addr = addr - self.rate_text = rate_text = sample_rate - self.pll_alpha = pll_alpha = saved_pll_alpha - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(config_filename) - try: output_filename = self._output_filename_config.get('usrp_rx_hrpt', 'filename') - except: output_filename = 'frames.hrpt' - self.output_filename = output_filename - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - self.gain = gain = saved_gain - self.freq = freq = saved_freq - self.clock_alpha = clock_alpha = saved_clock_alpha - self.addr_text = addr_text = addr - - ################################################## - # Blocks - ################################################## - self._freq_text_box = forms.text_box( - parent=self.GetWin(), - value=self.freq, - callback=self.set_freq, - label="Frequency", - converter=forms.float_converter(), - ) - self.GridAdd(self._freq_text_box, 0, 0, 1, 1) - self.displays = self.displays = wx.Notebook(self.GetWin(), style=wx.NB_TOP) - self.displays.AddPage(grc_wxgui.Panel(self.displays), "Spectrum") - self.displays.AddPage(grc_wxgui.Panel(self.displays), "Demod") - self.GridAdd(self.displays, 2, 0, 1, 4) - _clock_alpha_sizer = wx.BoxSizer(wx.VERTICAL) - self._clock_alpha_text_box = forms.text_box( - parent=self.GetWin(), - sizer=_clock_alpha_sizer, - value=self.clock_alpha, - callback=self.set_clock_alpha, - label="Clock Alpha", - converter=forms.float_converter(), - proportion=0, - ) - self._clock_alpha_slider = forms.slider( - parent=self.GetWin(), - sizer=_clock_alpha_sizer, - value=self.clock_alpha, - callback=self.set_clock_alpha, - minimum=0.0, - maximum=0.5, - num_steps=100, - style=wx.SL_HORIZONTAL, - cast=float, - proportion=1, - ) - self.GridAdd(_clock_alpha_sizer, 0, 3, 1, 1) - self.uhd_usrp_source_0 = uhd.usrp_source( - device_addr=addr, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1, - ) - self.uhd_usrp_source_0.set_samp_rate(sample_rate) - self.uhd_usrp_source_0.set_center_freq(freq, 0) - self.uhd_usrp_source_0.set_gain(0, 0) - self.rx_fft = fftsink2.fft_sink_c( - self.displays.GetPage(0).GetWin(), - baseband_freq=freq, - y_per_div=5, - y_divs=8, - ref_level=-5, - ref_scale=2.0, - sample_rate=sample_rate, - fft_size=1024, - fft_rate=15, - average=True, - avg_alpha=0.1, - title="RX Spectrum", - peak_hold=False, - size=(640, 360), - ) - self.displays.GetPage(0).GridAdd(self.rx_fft.win, 0, 0, 1, 1) - self._rate_text_static_text = forms.static_text( - parent=self.GetWin(), - value=self.rate_text, - callback=self.set_rate_text, - label="Baseband Rate", - converter=forms.float_converter(), - ) - self.GridAdd(self._rate_text_static_text, 1, 1, 1, 1) - _pll_alpha_sizer = wx.BoxSizer(wx.VERTICAL) - self._pll_alpha_text_box = forms.text_box( - parent=self.GetWin(), - sizer=_pll_alpha_sizer, - value=self.pll_alpha, - callback=self.set_pll_alpha, - label="PLL Alpha", - converter=forms.float_converter(), - proportion=0, - ) - self._pll_alpha_slider = forms.slider( - parent=self.GetWin(), - sizer=_pll_alpha_sizer, - value=self.pll_alpha, - callback=self.set_pll_alpha, - minimum=0.0, - maximum=0.5, - num_steps=100, - style=wx.SL_HORIZONTAL, - cast=float, - proportion=1, - ) - self.GridAdd(_pll_alpha_sizer, 0, 2, 1, 1) - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - _gain_sizer = wx.BoxSizer(wx.VERTICAL) - self._gain_text_box = forms.text_box( - parent=self.GetWin(), - sizer=_gain_sizer, - value=self.gain, - callback=self.set_gain, - label="RX Gain", - converter=forms.float_converter(), - proportion=0, - ) - self._gain_slider = forms.slider( - parent=self.GetWin(), - sizer=_gain_sizer, - value=self.gain, - callback=self.set_gain, - minimum=0, - maximum=100, - num_steps=100, - style=wx.SL_HORIZONTAL, - cast=float, - proportion=1, - ) - self.GridAdd(_gain_sizer, 0, 1, 1, 1) - self.frame_sink = gr.file_sink(gr.sizeof_short*1, output_filename) - self.frame_sink.set_unbuffered(False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.demod_scope = scopesink2.scope_sink_f( - self.displays.GetPage(1).GetWin(), - title="Post-Demod", - sample_rate=sym_rate*2.0, - v_scale=0.5, - v_offset=0, - t_scale=10.0/sym_rate, - ac_couple=False, - xy_mode=False, - num_inputs=1, - trig_mode=gr.gr_TRIG_MODE_AUTO, - y_axis_label="Counts", - ) - self.displays.GetPage(1).GridAdd(self.demod_scope.win, 0, 0, 1, 1) - self.deframer = noaa.hrpt_deframer() - self.decoder = noaa.hrpt_decoder(True,True) - self.agc = gr.agc_cc(1e-6, 1.0, 1.0, 1.0) - self._addr_text_static_text = forms.static_text( - parent=self.GetWin(), - value=self.addr_text, - callback=self.set_addr_text, - label="USRP Addr", - converter=forms.str_converter(), - ) - self.GridAdd(self._addr_text_static_text, 1, 0, 1, 1) - - ################################################## - # Connections - ################################################## - self.connect((self.deframer, 0), (self.frame_sink, 0)) - self.connect((self.deframer, 0), (self.decoder, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.agc, 0), (self.rx_fft, 0)) - self.connect((self.uhd_usrp_source_0, 0), (self.agc, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.gr_moving_average_xx_0, 0), (self.demod_scope, 0)) - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.deframer, 0)) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - self.demod_scope.set_sample_rate(self.sym_rate*2.0) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - self.rx_fft.set_sample_rate(self.sample_rate) - self.uhd_usrp_source_0.set_samp_rate(self.sample_rate) - self.set_rate_text(self.sample_rate) - - def get_config_filename(self): - return self.config_filename - - def set_config_filename(self, config_filename): - self.config_filename = config_filename - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - self._saved_clock_alpha_config = ConfigParser.ConfigParser() - self._saved_clock_alpha_config.read(self.config_filename) - if not self._saved_clock_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_clock_alpha_config.add_section('usrp_rx_hrpt') - self._saved_clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._saved_clock_alpha_config.write(open(self.config_filename, 'w')) - self._saved_pll_alpha_config = ConfigParser.ConfigParser() - self._saved_pll_alpha_config.read(self.config_filename) - if not self._saved_pll_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_pll_alpha_config.add_section('usrp_rx_hrpt') - self._saved_pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._saved_pll_alpha_config.write(open(self.config_filename, 'w')) - self._saved_gain_config = ConfigParser.ConfigParser() - self._saved_gain_config.read(self.config_filename) - if not self._saved_gain_config.has_section('usrp_rx_hrpt'): - self._saved_gain_config.add_section('usrp_rx_hrpt') - self._saved_gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._saved_gain_config.write(open(self.config_filename, 'w')) - self._saved_freq_config = ConfigParser.ConfigParser() - self._saved_freq_config.read(self.config_filename) - if not self._saved_freq_config.has_section('usrp_rx_hrpt'): - self._saved_freq_config.add_section('usrp_rx_hrpt') - self._saved_freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._saved_freq_config.write(open(self.config_filename, 'w')) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_saved_pll_alpha(self): - return self.saved_pll_alpha - - def set_saved_pll_alpha(self, saved_pll_alpha): - self.saved_pll_alpha = saved_pll_alpha - self.set_pll_alpha(self.saved_pll_alpha) - - def get_saved_gain(self): - return self.saved_gain - - def set_saved_gain(self, saved_gain): - self.saved_gain = saved_gain - self.set_gain(self.saved_gain) - - def get_saved_freq(self): - return self.saved_freq - - def set_saved_freq(self, saved_freq): - self.saved_freq = saved_freq - self.set_freq(self.saved_freq) - - def get_saved_clock_alpha(self): - return self.saved_clock_alpha - - def set_saved_clock_alpha(self, saved_clock_alpha): - self.saved_clock_alpha = saved_clock_alpha - self.set_clock_alpha(self.saved_clock_alpha) - - def get_addr(self): - return self.addr - - def set_addr(self, addr): - self.addr = addr - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - self.set_addr_text(self.addr) - - def get_rate_text(self): - return self.rate_text - - def set_rate_text(self, rate_text): - self.rate_text = rate_text - self._rate_text_static_text.set_value(self.rate_text) - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self._pll_alpha_slider.set_value(self.pll_alpha) - self._pll_alpha_text_box.set_value(self.pll_alpha) - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - self._saved_pll_alpha_config = ConfigParser.ConfigParser() - self._saved_pll_alpha_config.read(self.config_filename) - if not self._saved_pll_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_pll_alpha_config.add_section('usrp_rx_hrpt') - self._saved_pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._saved_pll_alpha_config.write(open(self.config_filename, 'w')) - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - - def get_gain(self): - return self.gain - - def set_gain(self, gain): - self.gain = gain - self._gain_slider.set_value(self.gain) - self._gain_text_box.set_value(self.gain) - self._saved_gain_config = ConfigParser.ConfigParser() - self._saved_gain_config.read(self.config_filename) - if not self._saved_gain_config.has_section('usrp_rx_hrpt'): - self._saved_gain_config.add_section('usrp_rx_hrpt') - self._saved_gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._saved_gain_config.write(open(self.config_filename, 'w')) - - def get_freq(self): - return self.freq - - def set_freq(self, freq): - self.freq = freq - self._freq_text_box.set_value(self.freq) - self.rx_fft.set_baseband_freq(self.freq) - self.uhd_usrp_source_0.set_center_freq(self.freq, 0) - self._saved_freq_config = ConfigParser.ConfigParser() - self._saved_freq_config.read(self.config_filename) - if not self._saved_freq_config.has_section('usrp_rx_hrpt'): - self._saved_freq_config.add_section('usrp_rx_hrpt') - self._saved_freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._saved_freq_config.write(open(self.config_filename, 'w')) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self._clock_alpha_slider.set_value(self.clock_alpha) - self._clock_alpha_text_box.set_value(self.clock_alpha) - self._saved_clock_alpha_config = ConfigParser.ConfigParser() - self._saved_clock_alpha_config.read(self.config_filename) - if not self._saved_clock_alpha_config.has_section('usrp_rx_hrpt'): - self._saved_clock_alpha_config.add_section('usrp_rx_hrpt') - self._saved_clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._saved_clock_alpha_config.write(open(self.config_filename, 'w')) - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - - def get_addr_text(self): - return self.addr_text - - def set_addr_text(self, addr_text): - self.addr_text = addr_text - self._addr_text_static_text.set_value(self.addr_text) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - (options, args) = parser.parse_args() - tb = usrp_rx_hrpt() - tb.Run(True) - diff --git a/gr-noaa/apps/usrp_rx_hrpt_nogui.py b/gr-noaa/apps/usrp_rx_hrpt_nogui.py deleted file mode 100755 index 4fc5642ff..000000000 --- a/gr-noaa/apps/usrp_rx_hrpt_nogui.py +++ /dev/null @@ -1,268 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: USRP HRPT Receiver -# Generated: Thu Oct 27 13:49:01 2011 -################################################## - -from gnuradio import digital -from gnuradio import eng_notation -from gnuradio import gr -from gnuradio import noaa -from gnuradio import uhd -from gnuradio.eng_option import eng_option -from gnuradio.gr import firdes -from optparse import OptionParser -import ConfigParser -import math, os - -class usrp_rx_hrpt_nogui(gr.top_block): - - def __init__(self): - gr.top_block.__init__(self, "USRP HRPT Receiver") - - ################################################## - # Variables - ################################################## - self.sym_rate = sym_rate = 600*1109 - self.sample_rate = sample_rate = 4e6 - self.sps = sps = sample_rate/sym_rate - self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf' - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(config_filename) - try: pll_alpha = self._pll_alpha_config.getfloat('usrp_rx_hrpt', 'pll_alpha') - except: pll_alpha = 0.01 - self.pll_alpha = pll_alpha - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(config_filename) - try: output_filename = self._output_filename_config.get('usrp_rx_hrpt', 'filename') - except: output_filename = 'frames.hrpt' - self.output_filename = output_filename - self.max_clock_offset = max_clock_offset = 100e-6 - self.max_carrier_offset = max_carrier_offset = 2*math.pi*100e3/sample_rate - self.hs = hs = int(sps/2.0) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(config_filename) - try: gain = self._gain_config.getfloat('usrp_rx_hrpt', 'gain') - except: gain = 35 - self.gain = gain - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(config_filename) - try: freq = self._freq_config.getfloat('usrp_rx_hrpt', 'freq') - except: freq = 1698e6 - self.freq = freq - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(config_filename) - try: clock_alpha = self._clock_alpha_config.getfloat('usrp_rx_hrpt', 'clock_alpha') - except: clock_alpha = 0.01 - self.clock_alpha = clock_alpha - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(config_filename) - try: addr = self._addr_config.get('usrp_rx_hrpt', 'addr') - except: addr = "" - self.addr = addr - - ################################################## - # Blocks - ################################################## - self.uhd_usrp_source_0 = uhd.usrp_source( - device_addr=addr, - io_type=uhd.io_type.COMPLEX_FLOAT32, - num_channels=1, - ) - self.uhd_usrp_source_0.set_samp_rate(sample_rate) - self.uhd_usrp_source_0.set_center_freq(freq, 0) - self.uhd_usrp_source_0.set_gain(0, 0) - self.pll = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset) - self.gr_moving_average_xx_0 = gr.moving_average_ff(hs, 1.0/hs, 4000) - self.frame_sink = gr.file_sink(gr.sizeof_short*1, output_filename) - self.frame_sink.set_unbuffered(False) - self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(sps/2.0, clock_alpha**2/4.0, 0.5, clock_alpha, max_clock_offset) - self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() - self.deframer = noaa.hrpt_deframer() - self.decoder = noaa.hrpt_decoder(True,True) - self.agc = gr.agc_cc(1e-6, 1.0, 1.0, 1.0) - - ################################################## - # Connections - ################################################## - self.connect((self.gr_moving_average_xx_0, 0), (self.digital_clock_recovery_mm_xx_0, 0)) - self.connect((self.pll, 0), (self.gr_moving_average_xx_0, 0)) - self.connect((self.uhd_usrp_source_0, 0), (self.agc, 0)) - self.connect((self.agc, 0), (self.pll, 0)) - self.connect((self.digital_binary_slicer_fb_0, 0), (self.deframer, 0)) - self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) - self.connect((self.deframer, 0), (self.decoder, 0)) - self.connect((self.deframer, 0), (self.frame_sink, 0)) - - def get_sym_rate(self): - return self.sym_rate - - def set_sym_rate(self, sym_rate): - self.sym_rate = sym_rate - self.set_sps(self.sample_rate/self.sym_rate) - - def get_sample_rate(self): - return self.sample_rate - - def set_sample_rate(self, sample_rate): - self.sample_rate = sample_rate - self.set_max_carrier_offset(2*math.pi*100e3/self.sample_rate) - self.set_sps(self.sample_rate/self.sym_rate) - self.uhd_usrp_source_0.set_samp_rate(self.sample_rate) - - def get_sps(self): - return self.sps - - def set_sps(self, sps): - self.sps = sps - self.set_hs(int(self.sps/2.0)) - self.digital_clock_recovery_mm_xx_0.set_omega(self.sps/2.0) - - def get_config_filename(self): - return self.config_filename - - def set_config_filename(self, config_filename): - self.config_filename = config_filename - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - - def get_pll_alpha(self): - return self.pll_alpha - - def set_pll_alpha(self, pll_alpha): - self.pll_alpha = pll_alpha - self._pll_alpha_config = ConfigParser.ConfigParser() - self._pll_alpha_config.read(self.config_filename) - if not self._pll_alpha_config.has_section('usrp_rx_hrpt'): - self._pll_alpha_config.add_section('usrp_rx_hrpt') - self._pll_alpha_config.set('usrp_rx_hrpt', 'pll_alpha', str(self.pll_alpha)) - self._pll_alpha_config.write(open(self.config_filename, 'w')) - self.pll.set_alpha(self.pll_alpha) - self.pll.set_beta(self.pll_alpha**2/4.0) - - def get_output_filename(self): - return self.output_filename - - def set_output_filename(self, output_filename): - self.output_filename = output_filename - self._output_filename_config = ConfigParser.ConfigParser() - self._output_filename_config.read(self.config_filename) - if not self._output_filename_config.has_section('usrp_rx_hrpt'): - self._output_filename_config.add_section('usrp_rx_hrpt') - self._output_filename_config.set('usrp_rx_hrpt', 'filename', str(self.output_filename)) - self._output_filename_config.write(open(self.config_filename, 'w')) - - def get_max_clock_offset(self): - return self.max_clock_offset - - def set_max_clock_offset(self, max_clock_offset): - self.max_clock_offset = max_clock_offset - - def get_max_carrier_offset(self): - return self.max_carrier_offset - - def set_max_carrier_offset(self, max_carrier_offset): - self.max_carrier_offset = max_carrier_offset - self.pll.set_max_offset(self.max_carrier_offset) - - def get_hs(self): - return self.hs - - def set_hs(self, hs): - self.hs = hs - self.gr_moving_average_xx_0.set_length_and_scale(self.hs, 1.0/self.hs) - - def get_gain(self): - return self.gain - - def set_gain(self, gain): - self.gain = gain - self._gain_config = ConfigParser.ConfigParser() - self._gain_config.read(self.config_filename) - if not self._gain_config.has_section('usrp_rx_hrpt'): - self._gain_config.add_section('usrp_rx_hrpt') - self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain)) - self._gain_config.write(open(self.config_filename, 'w')) - - def get_freq(self): - return self.freq - - def set_freq(self, freq): - self.freq = freq - self._freq_config = ConfigParser.ConfigParser() - self._freq_config.read(self.config_filename) - if not self._freq_config.has_section('usrp_rx_hrpt'): - self._freq_config.add_section('usrp_rx_hrpt') - self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq)) - self._freq_config.write(open(self.config_filename, 'w')) - self.uhd_usrp_source_0.set_center_freq(self.freq, 0) - - def get_clock_alpha(self): - return self.clock_alpha - - def set_clock_alpha(self, clock_alpha): - self.clock_alpha = clock_alpha - self._clock_alpha_config = ConfigParser.ConfigParser() - self._clock_alpha_config.read(self.config_filename) - if not self._clock_alpha_config.has_section('usrp_rx_hrpt'): - self._clock_alpha_config.add_section('usrp_rx_hrpt') - self._clock_alpha_config.set('usrp_rx_hrpt', 'clock_alpha', str(self.clock_alpha)) - self._clock_alpha_config.write(open(self.config_filename, 'w')) - self.digital_clock_recovery_mm_xx_0.set_gain_omega(self.clock_alpha**2/4.0) - self.digital_clock_recovery_mm_xx_0.set_gain_mu(self.clock_alpha) - - def get_addr(self): - return self.addr - - def set_addr(self, addr): - self.addr = addr - self._addr_config = ConfigParser.ConfigParser() - self._addr_config.read(self.config_filename) - if not self._addr_config.has_section('usrp_rx_hrpt'): - self._addr_config.add_section('usrp_rx_hrpt') - self._addr_config.set('usrp_rx_hrpt', 'addr', str(self.addr)) - self._addr_config.write(open(self.config_filename, 'w')) - -if __name__ == '__main__': - parser = OptionParser(option_class=eng_option, usage="%prog: [options]") - (options, args) = parser.parse_args() - tb = usrp_rx_hrpt_nogui() - tb.start() - raw_input('Press Enter to quit: ') - tb.stop() - diff --git a/gr-noaa/apps/CMakeLists.txt b/gr-noaa/examples/CMakeLists.txt index 233f0ee5f..6994148df 100644 --- a/gr-noaa/apps/CMakeLists.txt +++ b/gr-noaa/examples/CMakeLists.txt @@ -17,15 +17,13 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. -include(GrPython) - -GR_PYTHON_INSTALL( - PROGRAMS - hrpt_decode.py - hrpt_demod.py - file_rx_hrpt.py - usrp_rx_hrpt.py - usrp_rx_hrpt_nogui.py - DESTINATION ${GR_RUNTIME_DIR} +INSTALL( + FILES + hrpt_decode.grc + hrpt_demod.grc + file_rx_hrpt.grc + usrp_rx_hrpt.grc + usrp_rx_hrpt_nogui.grc + DESTINATION ${GR_PKG_NOAA_EXAMPLES_DIR} COMPONENT "noaa_python" ) diff --git a/gr-noaa/apps/file_rx_hrpt.grc b/gr-noaa/examples/file_rx_hrpt.grc index 4097e83d3..4097e83d3 100644 --- a/gr-noaa/apps/file_rx_hrpt.grc +++ b/gr-noaa/examples/file_rx_hrpt.grc diff --git a/gr-noaa/apps/hrpt_decode.grc b/gr-noaa/examples/hrpt_decode.grc index 39fe195d1..39fe195d1 100644 --- a/gr-noaa/apps/hrpt_decode.grc +++ b/gr-noaa/examples/hrpt_decode.grc diff --git a/gr-noaa/apps/hrpt_demod.grc b/gr-noaa/examples/hrpt_demod.grc index f5833b864..f5833b864 100644 --- a/gr-noaa/apps/hrpt_demod.grc +++ b/gr-noaa/examples/hrpt_demod.grc diff --git a/gr-noaa/apps/usrp_rx_hrpt.grc b/gr-noaa/examples/usrp_rx_hrpt.grc index 26af48ff0..26af48ff0 100644 --- a/gr-noaa/apps/usrp_rx_hrpt.grc +++ b/gr-noaa/examples/usrp_rx_hrpt.grc diff --git a/gr-noaa/apps/usrp_rx_hrpt_nogui.grc b/gr-noaa/examples/usrp_rx_hrpt_nogui.grc index 5936c94c8..5936c94c8 100644 --- a/gr-noaa/apps/usrp_rx_hrpt_nogui.grc +++ b/gr-noaa/examples/usrp_rx_hrpt_nogui.grc diff --git a/gr-pager/apps/CMakeLists.txt b/gr-pager/apps/CMakeLists.txt index 1965c6e66..5fa926031 100644 --- a/gr-pager/apps/CMakeLists.txt +++ b/gr-pager/apps/CMakeLists.txt @@ -21,9 +21,9 @@ include(GrPython) GR_PYTHON_INSTALL( PROGRAMS - usrp_flex.py - usrp_flex_all.py - usrp_flex_band.py + usrp_flex + usrp_flex_all + usrp_flex_band DESTINATION ${GR_RUNTIME_DIR} COMPONENT "pager_python" ) diff --git a/gr-pager/apps/usrp_flex.py b/gr-pager/apps/usrp_flex index 7d0d66a95..7d0d66a95 100755 --- a/gr-pager/apps/usrp_flex.py +++ b/gr-pager/apps/usrp_flex diff --git a/gr-pager/apps/usrp_flex_all.py b/gr-pager/apps/usrp_flex_all index 36bd90034..36bd90034 100755 --- a/gr-pager/apps/usrp_flex_all.py +++ b/gr-pager/apps/usrp_flex_all diff --git a/gr-pager/apps/usrp_flex_band.py b/gr-pager/apps/usrp_flex_band index 63fb93fa1..63fb93fa1 100755 --- a/gr-pager/apps/usrp_flex_band.py +++ b/gr-pager/apps/usrp_flex_band diff --git a/gr-qtgui/CMakeLists.txt b/gr-qtgui/CMakeLists.txt index a8fead401..32bf5bfcb 100644 --- a/gr-qtgui/CMakeLists.txt +++ b/gr-qtgui/CMakeLists.txt @@ -57,6 +57,8 @@ GR_SET_GLOBAL(GR_QTGUI_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/lib ) +SET(GR_PKG_QTGUI_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/qt-gui) + ######################################################################## # Begin conditional configuration ######################################################################## diff --git a/gr-qtgui/examples/CMakeLists.txt b/gr-qtgui/examples/CMakeLists.txt index 30fdc5e75..4622bec29 100644 --- a/gr-qtgui/examples/CMakeLists.txt +++ b/gr-qtgui/examples/CMakeLists.txt @@ -24,6 +24,6 @@ GR_PYTHON_INSTALL(PROGRAMS pyqt_example_f.py pyqt_time_c.py pyqt_time_f.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/qt-gui - COMPONENT "gnuradio_examples" + DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR} + COMPONENT "qtgui_python" ) diff --git a/gr-shd/apps/CMakeLists.txt b/gr-shd/apps/CMakeLists.txt index 3930abb57..d36121da1 100644 --- a/gr-shd/apps/CMakeLists.txt +++ b/gr-shd/apps/CMakeLists.txt @@ -24,9 +24,9 @@ include(GrPython) ######################################################################## GR_PYTHON_INSTALL( PROGRAMS - shd_fft.py - shd_rx_cfile.py - shd_siggen.py + shd_fft + shd_rx_cfile + shd_siggen DESTINATION ${GR_RUNTIME_DIR} COMPONENT "shd_python" ) diff --git a/gr-shd/apps/shd_fft.py b/gr-shd/apps/shd_fft index 46832784d..46832784d 100755 --- a/gr-shd/apps/shd_fft.py +++ b/gr-shd/apps/shd_fft diff --git a/gr-shd/apps/shd_rx_cfile.py b/gr-shd/apps/shd_rx_cfile index 007bc809f..007bc809f 100755 --- a/gr-shd/apps/shd_rx_cfile.py +++ b/gr-shd/apps/shd_rx_cfile diff --git a/gr-shd/apps/shd_siggen.py b/gr-shd/apps/shd_siggen index 112eeea15..112eeea15 100755 --- a/gr-shd/apps/shd_siggen.py +++ b/gr-shd/apps/shd_siggen diff --git a/gr-trellis/CMakeLists.txt b/gr-trellis/CMakeLists.txt index dc077571c..4e0ddc4eb 100644 --- a/gr-trellis/CMakeLists.txt +++ b/gr-trellis/CMakeLists.txt @@ -37,6 +37,8 @@ GR_SET_GLOBAL(GR_TRELLIS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/lib ) +SET(GR_PKG_TRELLIS_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/trellis) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -97,7 +99,8 @@ add_subdirectory(doc) if(ENABLE_PYTHON) add_subdirectory(grc) add_subdirectory(src/python) - add_subdirectory(src/examples) + add_subdirectory(src/examples/python) + add_subdirectory(src/examples/grc) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-trellis/src/examples/grc/CMakeLists.txt b/gr-trellis/src/examples/grc/CMakeLists.txt new file mode 100644 index 000000000..51197a9f4 --- /dev/null +++ b/gr-trellis/src/examples/grc/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. + +install( + FILES + interference_cancellation.grc + pccc1.grc + pccc.grc + sccc1.grc + sccc.grc + readme.txt + DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR} + COMPONENT "trellis-examples" +) diff --git a/gnuradio-examples/grc/trellis/interference_cancellation.grc b/gr-trellis/src/examples/grc/interference_cancellation.grc index 7674b4bf1..7674b4bf1 100644 --- a/gnuradio-examples/grc/trellis/interference_cancellation.grc +++ b/gr-trellis/src/examples/grc/interference_cancellation.grc diff --git a/gnuradio-examples/grc/trellis/pccc.grc b/gr-trellis/src/examples/grc/pccc.grc index c3111c321..c3111c321 100644 --- a/gnuradio-examples/grc/trellis/pccc.grc +++ b/gr-trellis/src/examples/grc/pccc.grc diff --git a/gnuradio-examples/grc/trellis/pccc1.grc b/gr-trellis/src/examples/grc/pccc1.grc index 15a63707e..15a63707e 100644 --- a/gnuradio-examples/grc/trellis/pccc1.grc +++ b/gr-trellis/src/examples/grc/pccc1.grc diff --git a/gnuradio-examples/grc/trellis/readme.txt b/gr-trellis/src/examples/grc/readme.txt index 9c7363af8..9c7363af8 100644 --- a/gnuradio-examples/grc/trellis/readme.txt +++ b/gr-trellis/src/examples/grc/readme.txt diff --git a/gnuradio-examples/grc/trellis/sccc.grc b/gr-trellis/src/examples/grc/sccc.grc index e8f656f63..e8f656f63 100644 --- a/gnuradio-examples/grc/trellis/sccc.grc +++ b/gr-trellis/src/examples/grc/sccc.grc diff --git a/gnuradio-examples/grc/trellis/sccc1.grc b/gr-trellis/src/examples/grc/sccc1.grc index 0be59d0c4..0be59d0c4 100644 --- a/gnuradio-examples/grc/trellis/sccc1.grc +++ b/gr-trellis/src/examples/grc/sccc1.grc diff --git a/gr-trellis/src/examples/CMakeLists.txt b/gr-trellis/src/examples/python/CMakeLists.txt index 0d9589908..e2c7e70ff 100644 --- a/gr-trellis/src/examples/CMakeLists.txt +++ b/gr-trellis/src/examples/python/CMakeLists.txt @@ -33,7 +33,7 @@ GR_PYTHON_INSTALL( test_turbo_equalization.py test_turbo_equalization1.py test_turbo_equalization2.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis + DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR} COMPONENT "trellis_examples" ) @@ -59,6 +59,6 @@ install( fsm_files/rep3.fsm fsm_files/rep5.fsm fsm_files/simple.fsm - DESTINATION ${GR_PKG_DATA_DIR}/examples/trellis/fsm_files + DESTINATION ${GR_PKG_TRELLIS_EXAMPLES_DIR}/fsm_files COMPONENT "trellis_examples" ) diff --git a/gr-trellis/src/examples/README b/gr-trellis/src/examples/python/README index bd28e3d61..bd28e3d61 100644 --- a/gr-trellis/src/examples/README +++ b/gr-trellis/src/examples/python/README diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_128.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm index bb79c59da..bb79c59da 100644 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_128.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_128.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_16.fsm index cdab41359..cdab41359 100644 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_16.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_4.fsm index fb316b5ef..fb316b5ef 100644 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_4.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn1o2_8.fsm b/gr-trellis/src/examples/python/fsm_files/awgn1o2_8.fsm index 604bac6c2..604bac6c2 100644 --- a/gr-trellis/src/examples/fsm_files/awgn1o2_8.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn1o2_8.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_16.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_16.fsm index 9630cd9af..9630cd9af 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_16.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_16.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4.fsm index 3ac57be18..3ac57be18 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msb.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm index 551b71101..551b71101 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msb.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msb.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msbG.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msbG.fsm index 8956c53da..8956c53da 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_4_msbG.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_4_msbG.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o3_8.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o3_8.fsm index 34deeb68c..34deeb68c 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o3_8.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o3_8.fsm diff --git a/gr-trellis/src/examples/fsm_files/awgn2o4_4.fsm b/gr-trellis/src/examples/python/fsm_files/awgn2o4_4.fsm index a895be896..a895be896 100644 --- a/gr-trellis/src/examples/fsm_files/awgn2o4_4.fsm +++ b/gr-trellis/src/examples/python/fsm_files/awgn2o4_4.fsm diff --git a/gr-trellis/src/examples/fsm_files/disconnected.fsm b/gr-trellis/src/examples/python/fsm_files/disconnected.fsm index 847963e7b..847963e7b 100644 --- a/gr-trellis/src/examples/fsm_files/disconnected.fsm +++ b/gr-trellis/src/examples/python/fsm_files/disconnected.fsm diff --git a/gr-trellis/src/examples/fsm_files/irregular.fsm b/gr-trellis/src/examples/python/fsm_files/irregular.fsm index 80b82b889..80b82b889 100644 --- a/gr-trellis/src/examples/fsm_files/irregular.fsm +++ b/gr-trellis/src/examples/python/fsm_files/irregular.fsm diff --git a/gr-trellis/src/examples/fsm_files/joint_16_16.fsm b/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm index 3dae314b6..3dae314b6 100644 --- a/gr-trellis/src/examples/fsm_files/joint_16_16.fsm +++ b/gr-trellis/src/examples/python/fsm_files/joint_16_16.fsm diff --git a/gr-trellis/src/examples/fsm_files/joint_4_16.fsm b/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm index 8f2cdab81..8f2cdab81 100644 --- a/gr-trellis/src/examples/fsm_files/joint_4_16.fsm +++ b/gr-trellis/src/examples/python/fsm_files/joint_4_16.fsm diff --git a/gr-trellis/src/examples/fsm_files/rep3.fsm b/gr-trellis/src/examples/python/fsm_files/rep3.fsm index ef1bd1f02..ef1bd1f02 100644 --- a/gr-trellis/src/examples/fsm_files/rep3.fsm +++ b/gr-trellis/src/examples/python/fsm_files/rep3.fsm diff --git a/gr-trellis/src/examples/fsm_files/rep5.fsm b/gr-trellis/src/examples/python/fsm_files/rep5.fsm index 2aa5d77cf..2aa5d77cf 100644 --- a/gr-trellis/src/examples/fsm_files/rep5.fsm +++ b/gr-trellis/src/examples/python/fsm_files/rep5.fsm diff --git a/gr-trellis/src/examples/fsm_files/simple.fsm b/gr-trellis/src/examples/python/fsm_files/simple.fsm index f27f6b4b0..f27f6b4b0 100644 --- a/gr-trellis/src/examples/fsm_files/simple.fsm +++ b/gr-trellis/src/examples/python/fsm_files/simple.fsm diff --git a/gr-trellis/src/examples/fsm_utils.py b/gr-trellis/src/examples/python/fsm_utils.py index e9243f899..e9243f899 100755 --- a/gr-trellis/src/examples/fsm_utils.py +++ b/gr-trellis/src/examples/python/fsm_utils.py diff --git a/gr-trellis/src/examples/test_cpm.py b/gr-trellis/src/examples/python/test_cpm.py index 06d54b1a6..06d54b1a6 100755 --- a/gr-trellis/src/examples/test_cpm.py +++ b/gr-trellis/src/examples/python/test_cpm.py diff --git a/gr-trellis/src/examples/test_pccc_turbo1.py b/gr-trellis/src/examples/python/test_pccc_turbo1.py index 7f1ea26ae..7f1ea26ae 100755 --- a/gr-trellis/src/examples/test_pccc_turbo1.py +++ b/gr-trellis/src/examples/python/test_pccc_turbo1.py diff --git a/gr-trellis/src/examples/test_sccc_hard.py b/gr-trellis/src/examples/python/test_sccc_hard.py index e732ac2c0..e732ac2c0 100755 --- a/gr-trellis/src/examples/test_sccc_hard.py +++ b/gr-trellis/src/examples/python/test_sccc_hard.py diff --git a/gr-trellis/src/examples/test_sccc_soft.py b/gr-trellis/src/examples/python/test_sccc_soft.py index 1c71e4ca7..1c71e4ca7 100755 --- a/gr-trellis/src/examples/test_sccc_soft.py +++ b/gr-trellis/src/examples/python/test_sccc_soft.py diff --git a/gr-trellis/src/examples/test_sccc_turbo.py b/gr-trellis/src/examples/python/test_sccc_turbo.py index b1007a864..b1007a864 100755 --- a/gr-trellis/src/examples/test_sccc_turbo.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo.py diff --git a/gr-trellis/src/examples/test_sccc_turbo1.py b/gr-trellis/src/examples/python/test_sccc_turbo1.py index ad2ed6bf9..ad2ed6bf9 100755 --- a/gr-trellis/src/examples/test_sccc_turbo1.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo1.py diff --git a/gr-trellis/src/examples/test_sccc_turbo2.py b/gr-trellis/src/examples/python/test_sccc_turbo2.py index fdb92adc8..fdb92adc8 100755 --- a/gr-trellis/src/examples/test_sccc_turbo2.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo2.py diff --git a/gr-trellis/src/examples/test_tcm.py b/gr-trellis/src/examples/python/test_tcm.py index 62fd5135e..62fd5135e 100755 --- a/gr-trellis/src/examples/test_tcm.py +++ b/gr-trellis/src/examples/python/test_tcm.py diff --git a/gr-trellis/src/examples/test_tcm_bit.py b/gr-trellis/src/examples/python/test_tcm_bit.py index cc5caefbc..cc5caefbc 100755 --- a/gr-trellis/src/examples/test_tcm_bit.py +++ b/gr-trellis/src/examples/python/test_tcm_bit.py diff --git a/gr-trellis/src/examples/test_tcm_combined.py b/gr-trellis/src/examples/python/test_tcm_combined.py index 55a3043b8..55a3043b8 100755 --- a/gr-trellis/src/examples/test_tcm_combined.py +++ b/gr-trellis/src/examples/python/test_tcm_combined.py diff --git a/gr-trellis/src/examples/test_tcm_parallel.py b/gr-trellis/src/examples/python/test_tcm_parallel.py index 2b722c09e..2b722c09e 100755 --- a/gr-trellis/src/examples/test_tcm_parallel.py +++ b/gr-trellis/src/examples/python/test_tcm_parallel.py diff --git a/gr-trellis/src/examples/test_turbo_equalization.py b/gr-trellis/src/examples/python/test_turbo_equalization.py index 6fa6749f0..6fa6749f0 100755 --- a/gr-trellis/src/examples/test_turbo_equalization.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization.py diff --git a/gr-trellis/src/examples/test_turbo_equalization1.py b/gr-trellis/src/examples/python/test_turbo_equalization1.py index 15a8f6809..15a8f6809 100755 --- a/gr-trellis/src/examples/test_turbo_equalization1.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization1.py diff --git a/gr-trellis/src/examples/test_turbo_equalization2.py b/gr-trellis/src/examples/python/test_turbo_equalization2.py index 7e4341cba..7e4341cba 100755 --- a/gr-trellis/src/examples/test_turbo_equalization2.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization2.py diff --git a/gr-trellis/src/examples/test_viterbi_equalization.py b/gr-trellis/src/examples/python/test_viterbi_equalization.py index d290a0d0a..d290a0d0a 100755 --- a/gr-trellis/src/examples/test_viterbi_equalization.py +++ b/gr-trellis/src/examples/python/test_viterbi_equalization.py diff --git a/gr-trellis/src/examples/test_viterbi_equalization1.py b/gr-trellis/src/examples/python/test_viterbi_equalization1.py index 41f777551..41f777551 100755 --- a/gr-trellis/src/examples/test_viterbi_equalization1.py +++ b/gr-trellis/src/examples/python/test_viterbi_equalization1.py diff --git a/gr-uhd/CMakeLists.txt b/gr-uhd/CMakeLists.txt index 4f4503234..3ba4f5342 100644 --- a/gr-uhd/CMakeLists.txt +++ b/gr-uhd/CMakeLists.txt @@ -39,6 +39,8 @@ GR_SET_GLOBAL(GR_UHD_INCLUDE_DIRS ${UHD_INCLUDE_DIRS} ) +SET(GR_PKG_UHD_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/uhd) + ######################################################################## # Begin conditional configuration ######################################################################## @@ -71,6 +73,13 @@ CPACK_COMPONENT("uhd_python" DEPENDS "core_python;uhd_runtime" ) +CPACK_COMPONENT("uhd_examples" + GROUP "UHD" + DISPLAY_NAME "Examples" + DESCRIPTION "Example programs" + DEPENDS "uhd_runtime" +) + CPACK_COMPONENT("uhd_swig" GROUP "UHD" DISPLAY_NAME "SWIG" @@ -83,12 +92,14 @@ CPACK_COMPONENT("uhd_swig" ######################################################################## add_subdirectory(include) add_subdirectory(lib) -add_subdirectory(examples) add_subdirectory(doc) +add_subdirectory(examples/c++) if(ENABLE_PYTHON) add_subdirectory(swig) add_subdirectory(grc) add_subdirectory(apps) + add_subdirectory(examples/python) + add_subdirectory(examples/grc) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-uhd/apps/CMakeLists.txt b/gr-uhd/apps/CMakeLists.txt index 20ae8993f..1d68c00ac 100644 --- a/gr-uhd/apps/CMakeLists.txt +++ b/gr-uhd/apps/CMakeLists.txt @@ -23,12 +23,19 @@ include(GrPython) # Install some uhd apps ######################################################################## GR_PYTHON_INSTALL( + FILES + uhd_siggen_base.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/uhd + COMPONENT "uhd_python" +) + +GR_PYTHON_INSTALL( PROGRAMS - uhd_fft.py - uhd_rx_cfile.py - uhd_siggen.py - uhd_siggen_gui.py - uhd_rx_nogui.py + uhd_fft + uhd_rx_cfile + uhd_siggen + uhd_siggen_gui + uhd_rx_nogui DESTINATION ${GR_RUNTIME_DIR} COMPONENT "uhd_python" ) diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft index 9e2554768..9e2554768 100755 --- a/gr-uhd/apps/uhd_fft.py +++ b/gr-uhd/apps/uhd_fft diff --git a/gr-uhd/apps/uhd_rx_cfile.py b/gr-uhd/apps/uhd_rx_cfile index a61361e43..a61361e43 100755 --- a/gr-uhd/apps/uhd_rx_cfile.py +++ b/gr-uhd/apps/uhd_rx_cfile diff --git a/gr-uhd/apps/uhd_rx_nogui.py b/gr-uhd/apps/uhd_rx_nogui index bcb52c619..bcb52c619 100755 --- a/gr-uhd/apps/uhd_rx_nogui.py +++ b/gr-uhd/apps/uhd_rx_nogui diff --git a/gr-uhd/apps/uhd_siggen b/gr-uhd/apps/uhd_siggen new file mode 100755 index 000000000..26e0d79a4 --- /dev/null +++ b/gr-uhd/apps/uhd_siggen @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# +# Copyright 2008,2009,2011,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. +# + +from gnuradio import gr +from gnuradio.uhd import uhd_siggen_base as uhd_siggen +import sys + +def main(): + if gr.enable_realtime_scheduling() != gr.RT_OK: + print "Note: failed to enable realtime scheduling, continuing" + + # Grab command line options and create top block + try: + (options, args) = uhd_siggen.get_options() + tb = uhd_siggen.top_block(options, args) + + except RuntimeError, e: + print e + sys.exit(1) + + tb.start() + raw_input('Press Enter to quit: ') + tb.stop() + tb.wait() + +# Make sure to create the top block (tb) within a function: +# That code in main will allow tb to go out of scope on return, +# which will call the decontructor on usrp and stop transmit. +# Whats odd is that grc works fine with tb in the __main__, +# perhaps its because the try/except clauses around tb. +if __name__ == "__main__": + main() diff --git a/gr-uhd/apps/uhd_siggen.py b/gr-uhd/apps/uhd_siggen_base.py index ff36b4f4d..02f98facf 100755..100644 --- a/gr-uhd/apps/uhd_siggen.py +++ b/gr-uhd/apps/uhd_siggen_base.py @@ -364,7 +364,7 @@ def get_options(): # If this script is executed, the following runs. If it is imported, # the below does not run. -def main(): +def test_main(): if gr.enable_realtime_scheduling() != gr.RT_OK: print "Note: failed to enable realtime scheduling, continuing" @@ -388,4 +388,4 @@ def main(): # Whats odd is that grc works fine with tb in the __main__, # perhaps its because the try/except clauses around tb. if __name__ == "__main__": - main() + test_main() diff --git a/gr-uhd/apps/uhd_siggen_gui.py b/gr-uhd/apps/uhd_siggen_gui index 1f6a73c2c..7e0fdc041 100755 --- a/gr-uhd/apps/uhd_siggen_gui.py +++ b/gr-uhd/apps/uhd_siggen_gui @@ -24,7 +24,7 @@ import wx from gnuradio import gr, uhd from gnuradio.gr.pubsub import pubsub from gnuradio.wxgui import gui, forms -import uhd_siggen +from gnuradio.uhd import uhd_siggen_base as uhd_siggen import sys, math class app_gui(pubsub): diff --git a/gr-uhd/examples/CMakeLists.txt b/gr-uhd/examples/c++/CMakeLists.txt index 91e2dfdaf..25645117c 100644 --- a/gr-uhd/examples/CMakeLists.txt +++ b/gr-uhd/examples/c++/CMakeLists.txt @@ -38,30 +38,8 @@ link_directories(${Boost_LIBRARY_DIRS}) add_executable(tags_demo tags_demo.cc) target_link_libraries(tags_demo gnuradio-uhd) -######################################################################## -# Python examples -######################################################################## -if(ENABLE_PYTHON) -GR_PYTHON_INSTALL( - PROGRAMS - fm_tx4.py - fm_tx_2_daughterboards.py - max_power.py - usrp_am_mw_rcv.py - usrp_nbfm_ptt.py - usrp_nbfm_rcv.py - usrp_spectrum_sense.py - usrp_tv_rcv_nogui.py - usrp_tv_rcv.py - usrp_wfm_rcv2_nogui.py - usrp_wfm_rcv_fmdet.py - usrp_wfm_rcv_nogui.py - usrp_wfm_rcv_pll.py - usrp_wfm_rcv.py - usrp_wfm_rcv_sca.py - usrp_wxapt_rcv.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/uhd - COMPONENT "uhd_python" +INSTALL(TARGETS + tags_demo + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_examples" ) - -endif(ENABLE_PYTHON) diff --git a/gr-uhd/examples/tag_sink_demo.h b/gr-uhd/examples/c++/tag_sink_demo.h index 7d49bd971..7d49bd971 100644 --- a/gr-uhd/examples/tag_sink_demo.h +++ b/gr-uhd/examples/c++/tag_sink_demo.h diff --git a/gr-uhd/examples/tag_source_demo.h b/gr-uhd/examples/c++/tag_source_demo.h index 9743c3407..9743c3407 100644 --- a/gr-uhd/examples/tag_source_demo.h +++ b/gr-uhd/examples/c++/tag_source_demo.h diff --git a/gr-uhd/examples/tags_demo.cc b/gr-uhd/examples/c++/tags_demo.cc index f7442f098..f7442f098 100644 --- a/gr-uhd/examples/tags_demo.cc +++ b/gr-uhd/examples/c++/tags_demo.cc diff --git a/gr-uhd/examples/grc/CMakeLists.txt b/gr-uhd/examples/grc/CMakeLists.txt new file mode 100644 index 000000000..06c233d45 --- /dev/null +++ b/gr-uhd/examples/grc/CMakeLists.txt @@ -0,0 +1,31 @@ +# 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. + +install( + FILES + uhd_const_wave.grc + uhd_dpsk_mod.grc + uhd_fft.grc + uhd_rx_dpsk.grc + uhd_two_tone_loopback.grc + uhd_tx_dpsk.grc + uhd_wbfm_receive.grc + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_python" +) diff --git a/gnuradio-examples/grc/uhd/uhd_const_wave.grc b/gr-uhd/examples/grc/uhd_const_wave.grc index c64721c83..c64721c83 100644 --- a/gnuradio-examples/grc/uhd/uhd_const_wave.grc +++ b/gr-uhd/examples/grc/uhd_const_wave.grc diff --git a/gnuradio-examples/grc/uhd/uhd_dpsk_mod.grc b/gr-uhd/examples/grc/uhd_dpsk_mod.grc index 18ae9c3db..18ae9c3db 100644 --- a/gnuradio-examples/grc/uhd/uhd_dpsk_mod.grc +++ b/gr-uhd/examples/grc/uhd_dpsk_mod.grc diff --git a/gnuradio-examples/grc/uhd/uhd_fft.grc b/gr-uhd/examples/grc/uhd_fft.grc index 29c375065..29c375065 100644 --- a/gnuradio-examples/grc/uhd/uhd_fft.grc +++ b/gr-uhd/examples/grc/uhd_fft.grc diff --git a/gnuradio-examples/grc/uhd/uhd_rx_dpsk.grc b/gr-uhd/examples/grc/uhd_rx_dpsk.grc index 73848ff3c..73848ff3c 100644 --- a/gnuradio-examples/grc/uhd/uhd_rx_dpsk.grc +++ b/gr-uhd/examples/grc/uhd_rx_dpsk.grc diff --git a/gnuradio-examples/grc/uhd/uhd_two_tone_loopback.grc b/gr-uhd/examples/grc/uhd_two_tone_loopback.grc index 8bcbc0792..8bcbc0792 100644 --- a/gnuradio-examples/grc/uhd/uhd_two_tone_loopback.grc +++ b/gr-uhd/examples/grc/uhd_two_tone_loopback.grc diff --git a/gnuradio-examples/grc/uhd/uhd_tx_dpsk.grc b/gr-uhd/examples/grc/uhd_tx_dpsk.grc index 281ba8429..281ba8429 100644 --- a/gnuradio-examples/grc/uhd/uhd_tx_dpsk.grc +++ b/gr-uhd/examples/grc/uhd_tx_dpsk.grc diff --git a/gnuradio-examples/grc/uhd/uhd_wbfm_receive.grc b/gr-uhd/examples/grc/uhd_wbfm_receive.grc index 62658a2eb..62658a2eb 100644 --- a/gnuradio-examples/grc/uhd/uhd_wbfm_receive.grc +++ b/gr-uhd/examples/grc/uhd_wbfm_receive.grc diff --git a/gr-uhd/examples/python/CMakeLists.txt b/gr-uhd/examples/python/CMakeLists.txt new file mode 100644 index 000000000..7642b536b --- /dev/null +++ b/gr-uhd/examples/python/CMakeLists.txt @@ -0,0 +1,42 @@ +# Copyright 2011 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) + +GR_PYTHON_INSTALL( + PROGRAMS + fm_tx4.py + fm_tx_2_daughterboards.py + max_power.py + usrp_am_mw_rcv.py + usrp_nbfm_ptt.py + usrp_nbfm_rcv.py + usrp_spectrum_sense.py + usrp_tv_rcv_nogui.py + usrp_tv_rcv.py + usrp_wfm_rcv2_nogui.py + usrp_wfm_rcv_fmdet.py + usrp_wfm_rcv_nogui.py + usrp_wfm_rcv_pll.py + usrp_wfm_rcv.py + usrp_wfm_rcv_sca.py + usrp_wxapt_rcv.py + DESTINATION ${GR_PKG_UHD_EXAMPLES_DIR} + COMPONENT "uhd_python" +) diff --git a/gr-uhd/examples/fm_tx4.py b/gr-uhd/examples/python/fm_tx4.py index aecb35b54..aecb35b54 100755 --- a/gr-uhd/examples/fm_tx4.py +++ b/gr-uhd/examples/python/fm_tx4.py diff --git a/gr-uhd/examples/fm_tx_2_daughterboards.py b/gr-uhd/examples/python/fm_tx_2_daughterboards.py index c0a7112de..c0a7112de 100755 --- a/gr-uhd/examples/fm_tx_2_daughterboards.py +++ b/gr-uhd/examples/python/fm_tx_2_daughterboards.py diff --git a/gr-uhd/examples/max_power.py b/gr-uhd/examples/python/max_power.py index a849432ee..a849432ee 100755 --- a/gr-uhd/examples/max_power.py +++ b/gr-uhd/examples/python/max_power.py diff --git a/gr-uhd/examples/usrp_am_mw_rcv.py b/gr-uhd/examples/python/usrp_am_mw_rcv.py index 85ffd7632..85ffd7632 100755 --- a/gr-uhd/examples/usrp_am_mw_rcv.py +++ b/gr-uhd/examples/python/usrp_am_mw_rcv.py diff --git a/gr-uhd/examples/usrp_nbfm_ptt.py b/gr-uhd/examples/python/usrp_nbfm_ptt.py index 075604af3..075604af3 100755 --- a/gr-uhd/examples/usrp_nbfm_ptt.py +++ b/gr-uhd/examples/python/usrp_nbfm_ptt.py diff --git a/gr-uhd/examples/usrp_nbfm_rcv.py b/gr-uhd/examples/python/usrp_nbfm_rcv.py index 6fdf95a30..6fdf95a30 100755 --- a/gr-uhd/examples/usrp_nbfm_rcv.py +++ b/gr-uhd/examples/python/usrp_nbfm_rcv.py diff --git a/gr-uhd/examples/usrp_spectrum_sense.py b/gr-uhd/examples/python/usrp_spectrum_sense.py index 355a55a98..355a55a98 100755 --- a/gr-uhd/examples/usrp_spectrum_sense.py +++ b/gr-uhd/examples/python/usrp_spectrum_sense.py diff --git a/gr-uhd/examples/usrp_tv_rcv.py b/gr-uhd/examples/python/usrp_tv_rcv.py index 700915bf8..700915bf8 100755 --- a/gr-uhd/examples/usrp_tv_rcv.py +++ b/gr-uhd/examples/python/usrp_tv_rcv.py diff --git a/gr-uhd/examples/usrp_tv_rcv_nogui.py b/gr-uhd/examples/python/usrp_tv_rcv_nogui.py index 870e65b27..870e65b27 100755 --- a/gr-uhd/examples/usrp_tv_rcv_nogui.py +++ b/gr-uhd/examples/python/usrp_tv_rcv_nogui.py diff --git a/gr-uhd/examples/usrp_wfm_rcv.py b/gr-uhd/examples/python/usrp_wfm_rcv.py index f6c5cf853..f6c5cf853 100755 --- a/gr-uhd/examples/usrp_wfm_rcv.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv.py diff --git a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py index b70334f30..b70334f30 100755 --- a/gr-uhd/examples/usrp_wfm_rcv2_nogui.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv2_nogui.py diff --git a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py index 9649857c0..9649857c0 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_fmdet.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py diff --git a/gr-uhd/examples/usrp_wfm_rcv_nogui.py b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py index f0195bcb5..f0195bcb5 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_nogui.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_nogui.py diff --git a/gr-uhd/examples/usrp_wfm_rcv_pll.py b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py index b0744b00b..b0744b00b 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_pll.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_pll.py diff --git a/gr-uhd/examples/usrp_wfm_rcv_sca.py b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py index 224f30cf8..224f30cf8 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_sca.py +++ b/gr-uhd/examples/python/usrp_wfm_rcv_sca.py diff --git a/gr-uhd/examples/usrp_wxapt_rcv.py b/gr-uhd/examples/python/usrp_wxapt_rcv.py index d9b1a0188..d9b1a0188 100755 --- a/gr-uhd/examples/usrp_wxapt_rcv.py +++ b/gr-uhd/examples/python/usrp_wxapt_rcv.py diff --git a/gr-utils/src/python/CMakeLists.txt b/gr-utils/src/python/CMakeLists.txt index fba0d57a5..90caeb234 100644 --- a/gr-utils/src/python/CMakeLists.txt +++ b/gr-utils/src/python/CMakeLists.txt @@ -25,6 +25,8 @@ include(GrPython) GR_PYTHON_INSTALL( FILES plot_data.py + plot_fft_base.py + plot_psd_base.py pyqt_plot.py pyqt_filter.py DESTINATION ${GR_PYTHON_DIR}/gnuradio @@ -34,20 +36,20 @@ GR_PYTHON_INSTALL( GR_PYTHON_INSTALL( PROGRAMS create-gnuradio-out-of-tree-project - gr_plot_char.py - gr_plot_const.py - gr_plot_fft.py - gr_plot_fft_c.py - gr_plot_fft_f.py - gr_plot_psd.py - gr_plot_psd_c.py - gr_plot_psd_f.py - gr_plot_float.py - gr_plot_int.py - gr_plot_iq.py - gr_plot_short.py - gr_plot_qt.py - gr_filter_design.py + gr_plot_char + gr_plot_const + gr_plot_fft + gr_plot_fft_c + gr_plot_fft_f + gr_plot_psd + gr_plot_psd_c + gr_plot_psd_f + gr_plot_float + gr_plot_int + gr_plot_iq + gr_plot_short + gr_plot_qt + gr_filter_design DESTINATION ${GR_RUNTIME_DIR} COMPONENT "utils" ) diff --git a/gr-utils/src/python/README.plot b/gr-utils/src/python/README.plot index 0c4657ba9..60f14c669 100644 --- a/gr-utils/src/python/README.plot +++ b/gr-utils/src/python/README.plot @@ -1,40 +1,97 @@ -* gr_plot_*.py: -These are a collection of Python scripts to enable viewing and analysis of files produced by GNU Radio flow graphs. Most of them work off complex data produced by digital waveforms. +* gr_plot_*: +These are a collection of Python scripts to enable viewing and +analysis of files produced by GNU Radio flow graphs. Most of them work +off complex data produced by digital waveforms. -** gr_plot_float.py: -Takes a GNU Radio floating point binary file and displays the samples versus time. You can set the block size to specify how many points to read in at a time and the start position in the file. +** gr_plot_float: +Takes a GNU Radio floating point binary file and displays the samples +versus time. You can set the block size to specify how many points to +read in at a time and the start position in the file. -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time axis, +set the sample rate (-R or --sample-rate) to the sample rate used when +capturing the samples. -** gr_plot_iq.py: -Takes a GNU Radio complex binary file and displays the I&Q data versus time. You can set the block size to specify how many points to read in at a time and the start position in the file. +** gr_plot_iq: +Takes a GNU Radio complex binary file and displays the I&Q data versus +time. You can set the block size to specify how many points to read in +at a time and the start position in the file. -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time axis, +set the sample rate (-R or --sample-rate) to the sample rate used when +capturing the samples. -** gr_plot_const.py: -Takes a GNU Radio complex binary file and displays the I&Q data versus time and the constellation plot (I vs. Q). You can set the block size to specify how many points to read in at a time and the start position in the file. +** gr_plot_const: +Takes a GNU Radio complex binary file and displays the I&Q data versus +time and the constellation plot (I vs. Q). You can set the block size +to specify how many points to read in at a time and the start position +in the file. -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time axis, +set the sample rate (-R or --sample-rate) to the sample rate used when +capturing the samples. -** gr_plot_fft_c.py: -Takes a GNU Radio complex binary file and displays the I&Q data versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). +** gr_plot_fft_c: +Takes a GNU Radio complex binary file and displays the I&Q data versus +time as well as the frequency domain (FFT) plot. The y-axis values are +plotted assuming volts as the amplitude of the I&Q streams and +converted into dBm in the frequency domain (the 1/N power adjustment +out of the FFT is performed internally). -The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). +The script plots a certain block of data at a time, specified on the +command line as -B or --block. This value defaults to 1000. The start +position in the file can be set by specifying -s or --start and +defaults to 0 (the start of the file). -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time and +frequency axis, set the sample rate (-R or --sample-rate) to the +sample rate used when capturing the samples. -** gr_plot_fft_f.py: -Takes a GNU Radio floating point binary file and displays the samples versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). +** gr_plot_fft_f: +Takes a GNU Radio floating point binary file and displays the samples +versus time as well as the frequency domain (FFT) plot. The y-axis +values are plotted assuming volts as the amplitude of the I&Q streams +and converted into dBm in the frequency domain (the 1/N power +adjustment out of the FFT is performed internally). -The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). +The script plots a certain block of data at a time, specified on the +command line as -B or --block. This value defaults to 1000. The start +position in the file can be set by specifying -s or --start and +defaults to 0 (the start of the file). -By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time and +frequency axis, set the sample rate (-R or --sample-rate) to the +sample rate used when capturing the samples. + + +** gr_plot_fft: +Takes a GNU Radio binary file (the datatype is specified using the -d +option and defaults to complex64) and displays the samples versus time +as well as the frequency domain (FFT) plot. The y-axis values are +plotted assuming volts as the amplitude of the I&Q streams and +converted into dBm in the frequency domain (the 1/N power adjustment +out of the FFT is performed internally). + +The script plots a certain block of data at a time, specified on the +command line as -B or --block. This value defaults to 1000. The start +position in the file can be set by specifying -s or --start and +defaults to 0 (the start of the file). + +By default, the system assumes a sample rate of 1, so in time, each +sample is plotted versus the sample number. To set a true time and +frequency axis, set the sample rate (-R or --sample-rate) to the +sample rate used when capturing the samples. diff --git a/gr-utils/src/python/gr_filter_design.py b/gr-utils/src/python/gr_filter_design index e8703db4f..e8703db4f 100755 --- a/gr-utils/src/python/gr_filter_design.py +++ b/gr-utils/src/python/gr_filter_design diff --git a/gr-utils/src/python/gr_plot_char.py b/gr-utils/src/python/gr_plot_char index 87a323c9c..87a323c9c 100755 --- a/gr-utils/src/python/gr_plot_char.py +++ b/gr-utils/src/python/gr_plot_char diff --git a/gr-utils/src/python/gr_plot_const.py b/gr-utils/src/python/gr_plot_const index 8873e5b7e..8873e5b7e 100755 --- a/gr-utils/src/python/gr_plot_const.py +++ b/gr-utils/src/python/gr_plot_const diff --git a/gr-utils/src/python/gr_plot_fft b/gr-utils/src/python/gr_plot_fft new file mode 100644 index 000000000..6859ea471 --- /dev/null +++ b/gr-utils/src/python/gr_plot_fft @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# 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. +# + +from gnuradio.plot_fft_base import plot_fft_base + +# This is a wrapper program for plot_fft_base. It handles any data +# type and defaults to complex64. + +def main(): + parser = plot_fft_base.setup_options() + (options, args) = parser.parse_args () + if len(args) != 1: + parser.print_help() + raise SystemExit, 1 + filename = args[0] + + dc = plot_fft_base(options.data_type, filename, options) + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + pass diff --git a/gr-utils/src/python/gr_plot_fft_f.py b/gr-utils/src/python/gr_plot_fft_c index f50358f01..e4ee9c5a9 100755 --- a/gr-utils/src/python/gr_plot_fft_f.py +++ b/gr-utils/src/python/gr_plot_fft_c @@ -20,10 +20,12 @@ # Boston, MA 02110-1301, USA. # -import gr_plot_fft +from gnuradio.plot_fft_base import plot_fft_base + +# This is a wrapper program for plot_fft_base specifically for complex data def main(): - parser = gr_plot_fft.setup_options() + parser = plot_fft_base.setup_options() parser.remove_option("--data-type") (options, args) = parser.parse_args () @@ -32,7 +34,7 @@ def main(): raise SystemExit, 1 filename = args[0] - dc = gr_plot_fft.gr_plot_fft("float32", filename, options) + dc = plot_fft_base("complex64", filename, options) if __name__ == "__main__": try: diff --git a/gr-utils/src/python/gr_plot_fft_c.py b/gr-utils/src/python/gr_plot_fft_f index de59b36c9..66c75a8ff 100755 --- a/gr-utils/src/python/gr_plot_fft_c.py +++ b/gr-utils/src/python/gr_plot_fft_f @@ -20,10 +20,12 @@ # Boston, MA 02110-1301, USA. # -import gr_plot_fft +from gnuradio.plot_fft_base import plot_fft_base + +# This is a wrapper program for plot_fft_base specifically for float data def main(): - parser = gr_plot_fft.setup_options() + parser = plot_fft_base.setup_options() parser.remove_option("--data-type") (options, args) = parser.parse_args () @@ -32,7 +34,7 @@ def main(): raise SystemExit, 1 filename = args[0] - dc = gr_plot_fft.gr_plot_fft("complex64", filename, options) + dc = plot_fft_base("float32", filename, options) if __name__ == "__main__": try: diff --git a/gr-utils/src/python/gr_plot_float.py b/gr-utils/src/python/gr_plot_float index e5c22a315..e5c22a315 100755 --- a/gr-utils/src/python/gr_plot_float.py +++ b/gr-utils/src/python/gr_plot_float diff --git a/gr-utils/src/python/gr_plot_int.py b/gr-utils/src/python/gr_plot_int index b44d4360a..b44d4360a 100755 --- a/gr-utils/src/python/gr_plot_int.py +++ b/gr-utils/src/python/gr_plot_int diff --git a/gr-utils/src/python/gr_plot_iq.py b/gr-utils/src/python/gr_plot_iq index 316e60a75..316e60a75 100755 --- a/gr-utils/src/python/gr_plot_iq.py +++ b/gr-utils/src/python/gr_plot_iq diff --git a/gr-utils/src/python/gr_plot_psd b/gr-utils/src/python/gr_plot_psd new file mode 100644 index 000000000..658e7b297 --- /dev/null +++ b/gr-utils/src/python/gr_plot_psd @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# 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. +# + +from gnuradio.plot_psd_base import plot_psd_base + +# This is a wrapper program for plot_psd_base. It handles any data +# type and defaults to complex64. + +def main(): + parser = plot_psd_base.setup_options() + (options, args) = parser.parse_args () + if len(args) != 1: + parser.print_help() + raise SystemExit, 1 + filename = args[0] + + dc = plot_psd_base(options.data_type, filename, options) + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + pass diff --git a/gr-utils/src/python/gr_plot_psd_c.py b/gr-utils/src/python/gr_plot_psd_c index 1edc04c2b..192f263ec 100755 --- a/gr-utils/src/python/gr_plot_psd_c.py +++ b/gr-utils/src/python/gr_plot_psd_c @@ -21,12 +21,12 @@ # from optparse import OptionParser -import gr_plot_psd +from gnuradio.plot_psd_base import plot_psd_base -# This is a wrapper program for gr_plot_psd specifically for complex data +# This is a wrapper program for plot_psd_base specifically for complex data def main(): - parser = gr_plot_psd.setup_options() + parser = plot_psd_base.setup_options() parser.remove_option("--data-type") (options, args) = parser.parse_args () @@ -35,7 +35,7 @@ def main(): raise SystemExit, 1 filename = args[0] - dc = gr_plot_psd.gr_plot_psd("complex64", filename, options) + dc = plot_psd_base("complex64", filename, options) if __name__ == "__main__": try: diff --git a/gr-utils/src/python/gr_plot_psd_f.py b/gr-utils/src/python/gr_plot_psd_f index bad6788c3..fab312645 100755 --- a/gr-utils/src/python/gr_plot_psd_f.py +++ b/gr-utils/src/python/gr_plot_psd_f @@ -21,12 +21,12 @@ # from optparse import OptionParser -import gr_plot_psd +from gnuradio.plot_psd_base import plot_psd_base # This is a wrapper program for gr_plot_psd specifically for floating point data def main(): - parser = gr_plot_psd.setup_options() + parser = plot_psd_base.setup_options() parser.remove_option("--data-type") (options, args) = parser.parse_args () @@ -35,7 +35,7 @@ def main(): raise SystemExit, 1 filename = args[0] - dc = gr_plot_psd.gr_plot_psd("float32", filename, options) + dc = plot_psd_base("float32", filename, options) if __name__ == "__main__": try: diff --git a/gr-utils/src/python/gr_plot_qt.py b/gr-utils/src/python/gr_plot_qt index f3dc472f5..937d0014b 100755 --- a/gr-utils/src/python/gr_plot_qt.py +++ b/gr-utils/src/python/gr_plot_qt @@ -28,7 +28,7 @@ except ImportError: try: # FIXME: reenable this before committing #from gnuradio.pyqt_plot import Ui_MainWindow - from pyqt_plot import Ui_MainWindow + from gnuradio.pyqt_plot import Ui_MainWindow except ImportError: print "Could not import from pyqt_plot. Please build with \"pyuic4 pyqt_plot.ui -o pyqt_plot.py\"" raise SystemExit, 1 diff --git a/gr-utils/src/python/gr_plot_short.py b/gr-utils/src/python/gr_plot_short index 3466e0b7d..3466e0b7d 100755 --- a/gr-utils/src/python/gr_plot_short.py +++ b/gr-utils/src/python/gr_plot_short diff --git a/gr-utils/src/python/gr_plot_fft.py b/gr-utils/src/python/plot_fft_base.py index ba3901e03..0b5df504b 100755 --- a/gr-utils/src/python/gr_plot_fft.py +++ b/gr-utils/src/python/plot_fft_base.py @@ -35,7 +35,7 @@ except ImportError: from optparse import OptionParser -class gr_plot_fft: +class plot_fft_base: def __init__(self, datatype, filename, options): self.hfile = open(filename, "r") self.block_length = options.block @@ -96,7 +96,7 @@ class gr_plot_fft: def dofft(self, iq): N = len(iq) - iq_fft = fftpack.fftshift(scipy.fft(iq)) # fft and shift axis + iq_fft = scipy.fftpack.fftshift(scipy.fft(iq)) # fft and shift axis iq_fft = 20*scipy.log10(abs((iq_fft+1e-15)/N)) # convert to decibels, adjust power # adding 1e-15 (-300 dB) to protect against value errors if an item in iq_fft is 0 return iq_fft @@ -206,37 +206,38 @@ class gr_plot_fft: self.hfile.seek(-self.hfile.tell(),1) self.get_data() self.update_plots() - + + @staticmethod + def setup_options(): + usage="%prog: [options] input_filename" + description = "Takes a GNU Radio complex binary file and displays the I&Q data versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples." + + parser = OptionParser(conflict_handler="resolve", usage=usage, description=description) + parser.add_option("-d", "--data-type", type="string", default="complex64", + help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") + parser.add_option("-B", "--block", type="int", default=1000, + help="Specify the block size [default=%default]") + parser.add_option("-s", "--start", type="int", default=0, + help="Specify where to start in the file [default=%default]") + parser.add_option("-R", "--sample-rate", type="float", default=1.0, + help="Set the sampler rate of the data [default=%default]") + return parser + def find(item_in, list_search): try: return list_search.index(item_in) != None except ValueError: return False -def setup_options(): - usage="%prog: [options] input_filename" - description = "Takes a GNU Radio complex binary file and displays the I&Q data versus time as well as the frequency domain (FFT) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. This value defaults to 1000. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples." - - parser = OptionParser(conflict_handler="resolve", usage=usage, description=description) - parser.add_option("-d", "--data-type", type="string", default="complex64", - help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") - parser.add_option("-B", "--block", type="int", default=1000, - help="Specify the block size [default=%default]") - parser.add_option("-s", "--start", type="int", default=0, - help="Specify where to start in the file [default=%default]") - parser.add_option("-R", "--sample-rate", type="float", default=1.0, - help="Set the sampler rate of the data [default=%default]") - return parser - def main(): - parser = setup_options() + parser = plot_fft_base.setup_options() (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() raise SystemExit, 1 filename = args[0] - dc = gr_plot_fft(options.data_type, filename, options) + dc = plot_fft_base(options.data_type, filename, options) if __name__ == "__main__": try: diff --git a/gr-utils/src/python/gr_plot_psd.py b/gr-utils/src/python/plot_psd_base.py index 3dab0535a..78eed5f71 100755 --- a/gr-utils/src/python/gr_plot_psd.py +++ b/gr-utils/src/python/plot_psd_base.py @@ -37,7 +37,7 @@ from optparse import OptionParser from scipy import log10 from gnuradio.eng_option import eng_option -class gr_plot_psd: +class plot_psd_base: def __init__(self, datatype, filename, options): self.hfile = open(filename, "r") self.block_length = options.block @@ -242,44 +242,45 @@ class gr_plot_psd: if(r): self.update_plots() + @staticmethod + def setup_options(): + usage="%prog: [options] input_filename" + description = "Takes a GNU Radio binary file (with specified data type using --data-type) and displays the I&Q data versus time as well as the power spectral density (PSD) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. Finally, the size of the FFT to use for the PSD and spectrogram plots can be set independently with --psd-size and --spec-size, respectively. The spectrogram plot does not display by default and is turned on with -S or --enable-spec." + + parser = OptionParser(option_class=eng_option, conflict_handler="resolve", + usage=usage, description=description) + parser.add_option("-d", "--data-type", type="string", default="complex64", + help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") + parser.add_option("-B", "--block", type="int", default=8192, + help="Specify the block size [default=%default]") + parser.add_option("-s", "--start", type="int", default=0, + help="Specify where to start in the file [default=%default]") + parser.add_option("-R", "--sample-rate", type="eng_float", default=1.0, + help="Set the sampler rate of the data [default=%default]") + parser.add_option("", "--psd-size", type="int", default=1024, + help="Set the size of the PSD FFT [default=%default]") + parser.add_option("", "--spec-size", type="int", default=256, + help="Set the size of the spectrogram FFT [default=%default]") + parser.add_option("-S", "--enable-spec", action="store_true", default=False, + help="Turn on plotting the spectrogram [default=%default]") + + return parser + def find(item_in, list_search): try: return list_search.index(item_in) != None except ValueError: return False -def setup_options(): - usage="%prog: [options] input_filename" - description = "Takes a GNU Radio binary file (with specified data type using --data-type) and displays the I&Q data versus time as well as the power spectral density (PSD) plot. The y-axis values are plotted assuming volts as the amplitude of the I&Q streams and converted into dBm in the frequency domain (the 1/N power adjustment out of the FFT is performed internally). The script plots a certain block of data at a time, specified on the command line as -B or --block. The start position in the file can be set by specifying -s or --start and defaults to 0 (the start of the file). By default, the system assumes a sample rate of 1, so in time, each sample is plotted versus the sample number. To set a true time and frequency axis, set the sample rate (-R or --sample-rate) to the sample rate used when capturing the samples. Finally, the size of the FFT to use for the PSD and spectrogram plots can be set independently with --psd-size and --spec-size, respectively. The spectrogram plot does not display by default and is turned on with -S or --enable-spec." - - parser = OptionParser(option_class=eng_option, conflict_handler="resolve", - usage=usage, description=description) - parser.add_option("-d", "--data-type", type="string", default="complex64", - help="Specify the data type (complex64, float32, (u)int32, (u)int16, (u)int8) [default=%default]") - parser.add_option("-B", "--block", type="int", default=8192, - help="Specify the block size [default=%default]") - parser.add_option("-s", "--start", type="int", default=0, - help="Specify where to start in the file [default=%default]") - parser.add_option("-R", "--sample-rate", type="eng_float", default=1.0, - help="Set the sampler rate of the data [default=%default]") - parser.add_option("", "--psd-size", type="int", default=1024, - help="Set the size of the PSD FFT [default=%default]") - parser.add_option("", "--spec-size", type="int", default=256, - help="Set the size of the spectrogram FFT [default=%default]") - parser.add_option("-S", "--enable-spec", action="store_true", default=False, - help="Turn on plotting the spectrogram [default=%default]") - - return parser - def main(): - parser = setup_options() + parser = plot_psd_base.setup_options() (options, args) = parser.parse_args () if len(args) != 1: parser.print_help() raise SystemExit, 1 filename = args[0] - dc = gr_plot_psd(options.data_type, filename, options) + dc = plot_psd_base(options.data_type, filename, options) if __name__ == "__main__": try: diff --git a/gr-vocoder/CMakeLists.txt b/gr-vocoder/CMakeLists.txt index e800cff00..19f0dbec9 100644 --- a/gr-vocoder/CMakeLists.txt +++ b/gr-vocoder/CMakeLists.txt @@ -35,6 +35,8 @@ GR_SET_GLOBAL(GR_VOCODER_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include ) +SET(GR_PKG_VOCODER_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/vocoder) + ######################################################################## # Begin conditional configuration ######################################################################## diff --git a/gr-vocoder/examples/CMakeLists.txt b/gr-vocoder/examples/CMakeLists.txt index 76a757826..769ddf602 100644 --- a/gr-vocoder/examples/CMakeLists.txt +++ b/gr-vocoder/examples/CMakeLists.txt @@ -32,6 +32,6 @@ GR_PYTHON_INSTALL( g723_40_audio_loopback.py gsm_audio_loopback.py ulaw_audio_loopback.py - DESTINATION ${GR_PKG_DATA_DIR}/examples/vocoder + DESTINATION ${GR_PKG_VOCODER_EXAMPLES_DIR} COMPONENT "vocoder_examples" ) diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 997aa56b1..8be5d7fbc 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -121,5 +121,6 @@ add_subdirectory(grc_gnuradio) add_subdirectory(gui) add_subdirectory(python) add_subdirectory(scripts) +add_subdirectory(examples) endif(ENABLE_GRC) diff --git a/grc/examples/CMakeLists.txt b/grc/examples/CMakeLists.txt new file mode 100644 index 000000000..acb65dbdc --- /dev/null +++ b/grc/examples/CMakeLists.txt @@ -0,0 +1,37 @@ +# Copyright 2011 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. + +# SIMPLE +install( + FILES + simple/variable_config.grc + DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/simple + COMPONENT "grc" +) + +# XMLRPC +install( + FILES + xmlrpc/readme.txt + xmlrpc/xmlrpc_client.grc + xmlrpc/xmlrpc_client_script.py + xmlrpc/xmlrpc_server.grc + DESTINATION ${GR_PKG_DATA_DIR}/examples/grc/xmlrpc + COMPONENT "grc" +) diff --git a/gnuradio-examples/grc/simple/variable_config.grc b/grc/examples/simple/variable_config.grc index 95c287cce..95c287cce 100644 --- a/gnuradio-examples/grc/simple/variable_config.grc +++ b/grc/examples/simple/variable_config.grc diff --git a/gnuradio-examples/grc/xmlrpc/readme.txt b/grc/examples/xmlrpc/readme.txt index c1f87c1cb..c1f87c1cb 100644 --- a/gnuradio-examples/grc/xmlrpc/readme.txt +++ b/grc/examples/xmlrpc/readme.txt diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc b/grc/examples/xmlrpc/xmlrpc_client.grc index 3bb4e7ed3..3bb4e7ed3 100644 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc +++ b/grc/examples/xmlrpc/xmlrpc_client.grc diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py b/grc/examples/xmlrpc/xmlrpc_client_script.py index 956fa07fb..956fa07fb 100644 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py +++ b/grc/examples/xmlrpc/xmlrpc_client_script.py diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc b/grc/examples/xmlrpc/xmlrpc_server.grc index dc539ef1b..dc539ef1b 100644 --- a/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc +++ b/grc/examples/xmlrpc/xmlrpc_server.grc |