diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-05-23 08:19:41 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-05-23 08:19:41 -0400 |
commit | 8d73b019c43b747e0b6ae1a8a8ae8a8342202a33 (patch) | |
tree | 92909311b9618f025f7f8a40a99b5faba6e3c430 | |
parent | 7daef55cb11dfc05fdab9ee3f1f78ac2904dc300 (diff) | |
parent | 7ad4b69913cb43af9e6807078ef056034c97f8d2 (diff) |
Merge branch 'next' of git.gnuradio.org:gnuradio into next
-rw-r--r-- | cmake/Packaging/Fedora-17.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Fedora-18.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-12.04.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-12.10.cmake | 2 | ||||
-rw-r--r-- | cmake/Packaging/Ubuntu-13.04.cmake | 12 | ||||
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/top_block.py | 7 | ||||
-rw-r--r-- | gnuradio-runtime/swig/top_block.i | 30 | ||||
-rw-r--r-- | gr-blocks/lib/pdu_to_tagged_stream_impl.cc | 2 | ||||
-rw-r--r-- | gr-blocks/lib/udp_source_impl.cc | 4 | ||||
-rw-r--r-- | gr-blocks/python/qa_message_tags.py | 1 | ||||
-rw-r--r-- | gr-digital/lib/header_payload_demux_impl.cc | 1 | ||||
-rw-r--r-- | gr-filter/grc/filter_pfb_arb_resampler.xml | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | gr-uhd/python/qa_uhd.py | 12 | ||||
-rw-r--r-- | gr-uhd/swig/uhd_swig.i | 4 |
14 files changed, 68 insertions, 17 deletions
diff --git a/cmake/Packaging/Fedora-17.cmake b/cmake/Packaging/Fedora-17.cmake index 18836d871b..23e3334ab9 100644 --- a/cmake/Packaging/Fedora-17.cmake +++ b/cmake/Packaging/Fedora-17.cmake @@ -2,7 +2,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4" "PyQwt") SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy") +SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy" "PyOpenGL") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit") diff --git a/cmake/Packaging/Fedora-18.cmake b/cmake/Packaging/Fedora-18.cmake index 18836d871b..23e3334ab9 100644 --- a/cmake/Packaging/Fedora-18.cmake +++ b/cmake/Packaging/Fedora-18.cmake @@ -2,7 +2,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "fftw-libs") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "qt" "qwt") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "PyQt4" "PyQwt") SET(PACKAGE_DEPENDS_GRC "python" "numpy" "gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy") +SET(PACKAGE_DEPENDS_WXGUI "wxGTK" "python" "numpy" "PyOpenGL") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "SDL") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "pulseaudio" "alsa-lib" "jack-audio-connection-kit") diff --git a/cmake/Packaging/Ubuntu-12.04.cmake b/cmake/Packaging/Ubuntu-12.04.cmake index d27cdae532..f5ead83182 100644 --- a/cmake/Packaging/Ubuntu-12.04.cmake +++ b/cmake/Packaging/Ubuntu-12.04.cmake @@ -2,7 +2,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/Packaging/Ubuntu-12.10.cmake b/cmake/Packaging/Ubuntu-12.10.cmake index d27cdae532..f5ead83182 100644 --- a/cmake/Packaging/Ubuntu-12.10.cmake +++ b/cmake/Packaging/Ubuntu-12.10.cmake @@ -2,7 +2,7 @@ SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3") SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6") SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") -SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl") SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") diff --git a/cmake/Packaging/Ubuntu-13.04.cmake b/cmake/Packaging/Ubuntu-13.04.cmake new file mode 100644 index 0000000000..40f748fdff --- /dev/null +++ b/cmake/Packaging/Ubuntu-13.04.cmake @@ -0,0 +1,12 @@ +SET(PACKAGE_DEPENDS_GRUEL_RUNTIME "libboost-all-dev" "libc6") +SET(PACKAGE_DEPENDS_GRUEL_PYTHON "python" "python-numpy") +SET(PACKAGE_DEPENDS_CORE_RUNTIME "libfftw3-3") +SET(PACKAGE_DEPENDS_QTGUI_RUNTIME "libqtcore4" "libqwt6") +SET(PACKAGE_DEPENDS_QTGUI_PYTHON "python-qt4" "python-qwt5-qt4") +SET(PACKAGE_DEPENDS_GRC "python" "python-numpy" "python-gtk2" "python-lxml" "python-cheetah") +SET(PACKAGE_DEPENDS_WXGUI "python-wxgtk2.8" "python-opengl") +SET(PACKAGE_DEPENDS_VIDEO_SDL_RUNTIME "libsdl1.2debian") +SET(PACKAGE_DEPENDS_UHD_RUNTIME "uhd") +SET(PACKAGE_DEPENDS_AUDIO_RUNTIME "libpulse0" "alsa-base" "libjack0") +SET(PACKAGE_DEPENDS_WAVELET_RUNTIME "libgsl0ldbl") +SET(PACKAGE_DEPENDS_WAVELET_PYTHON "python" "python-numpy") diff --git a/gnuradio-runtime/python/gnuradio/gr/top_block.py b/gnuradio-runtime/python/gnuradio/gr/top_block.py index 944e95e5ae..e4d1f4194a 100644 --- a/gnuradio-runtime/python/gnuradio/gr/top_block.py +++ b/gnuradio-runtime/python/gnuradio/gr/top_block.py @@ -20,7 +20,8 @@ # from runtime_swig import top_block_swig, \ - top_block_wait_unlocked, top_block_run_unlocked + top_block_wait_unlocked, top_block_run_unlocked, \ + top_block_start_unlocked, top_block_stop_unlocked #import gnuradio.gr.gr_threading as _threading import gr_threading as _threading @@ -99,10 +100,10 @@ class top_block(object): return getattr(self._tb, name) def start(self, max_noutput_items=10000000): - self._tb.start(max_noutput_items) + top_block_start_unlocked(self._tb, max_noutput_items) def stop(self): - self._tb.stop() + top_block_stop_unlocked(self._tb) def run(self, max_noutput_items=10000000): self.start(max_noutput_items) diff --git a/gnuradio-runtime/swig/top_block.i b/gnuradio-runtime/swig/top_block.i index 7639403393..f5c5819ab9 100644 --- a/gnuradio-runtime/swig/top_block.i +++ b/gnuradio-runtime/swig/top_block.i @@ -58,16 +58,34 @@ namespace gr { %inline %{ void top_block_run_unlocked(gr::top_block_sptr r) throw (std::runtime_error) { - Py_BEGIN_ALLOW_THREADS; // release global interpreter lock - r->run(); - Py_END_ALLOW_THREADS; // acquire global interpreter lock + GR_PYTHON_BLOCKING_CODE + ( + r->run(); + ) +} + +void top_block_start_unlocked(gr::top_block_sptr r, int max_noutput_items) throw (std::runtime_error) +{ + GR_PYTHON_BLOCKING_CODE + ( + r->start(max_noutput_items); + ) } void top_block_wait_unlocked(gr::top_block_sptr r) throw (std::runtime_error) { - Py_BEGIN_ALLOW_THREADS; // release global interpreter lock - r->wait(); - Py_END_ALLOW_THREADS; // acquire global interpreter lock + GR_PYTHON_BLOCKING_CODE + ( + r->wait(); + ) +} + +void top_block_stop_unlocked(gr::top_block_sptr r) throw (std::runtime_error) +{ + GR_PYTHON_BLOCKING_CODE + ( + r->stop(); + ) } %} diff --git a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc index d6ad78cb97..f81d324547 100644 --- a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc +++ b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc @@ -68,7 +68,7 @@ namespace gr { if (noutput_items > 0) { // grab a message if one exists - pmt::pmt_t msg(delete_head_blocking(PDU_PORT_ID)); + pmt::pmt_t msg(delete_head_nowait(PDU_PORT_ID)); if (msg.get() == NULL) return nout; diff --git a/gr-blocks/lib/udp_source_impl.cc b/gr-blocks/lib/udp_source_impl.cc index e62c2b0df1..7f4a2af3d3 100644 --- a/gr-blocks/lib/udp_source_impl.cc +++ b/gr-blocks/lib/udp_source_impl.cc @@ -186,7 +186,9 @@ namespace gr { // because the conditional wait is interruptable while a // synchronous receive_from is not. boost::unique_lock<boost::mutex> lock(d_udp_mutex); - d_cond_wait.wait(lock); + + //use timed_wait to avoid permanent blocking in the work function + d_cond_wait.timed_wait(lock, boost::posix_time::milliseconds(10)); if(d_residual < 0) return -1; diff --git a/gr-blocks/python/qa_message_tags.py b/gr-blocks/python/qa_message_tags.py index 952c699455..ad4d2104e6 100644 --- a/gr-blocks/python/qa_message_tags.py +++ b/gr-blocks/python/qa_message_tags.py @@ -11,6 +11,7 @@ class test_message_tags (gr_unittest.TestCase): rx_msgq = gr.msg_queue() for d in data: tx_msgq.insert_tail(gr.message_from_string(d)) + tx_msgq.insert_tail(gr.message(1)) # send EOF tb = gr.top_block() src = blocks.message_source(gr.sizeof_char, tx_msgq, "packet_length") snk = blocks.message_sink(gr.sizeof_char, rx_msgq, False, "packet_length") diff --git a/gr-digital/lib/header_payload_demux_impl.cc b/gr-digital/lib/header_payload_demux_impl.cc index affbc92125..be1095d6cc 100644 --- a/gr-digital/lib/header_payload_demux_impl.cc +++ b/gr-digital/lib/header_payload_demux_impl.cc @@ -148,6 +148,7 @@ namespace gr { break; case STATE_WAIT_FOR_MSG: + if (empty_p(msg_port_id)) return 0; //no message available // If we're in this state, nread is zero (because previous state exits loop) // 1) Wait for msg (blocking call) // 2) set d_remaining_symbols diff --git a/gr-filter/grc/filter_pfb_arb_resampler.xml b/gr-filter/grc/filter_pfb_arb_resampler.xml index 6b127074fc..e163874205 100644 --- a/gr-filter/grc/filter_pfb_arb_resampler.xml +++ b/gr-filter/grc/filter_pfb_arb_resampler.xml @@ -63,10 +63,10 @@ </param> <sink> <name>in</name> - <type>complex</type> + <type>$type.input</type> </sink> <source> <name>out</name> - <type>complex</type> + <type>$type.output</type> </source> </block> diff --git a/gr-uhd/python/qa_uhd.py b/gr-uhd/python/qa_uhd.py index 00757369ff..dafae926c5 100755..100644 --- a/gr-uhd/python/qa_uhd.py +++ b/gr-uhd/python/qa_uhd.py @@ -36,5 +36,17 @@ class test_uhd(gr_unittest.TestCase): They may not have a UHD device connected, etc. Don't try to run anything""" pass + def test_stream_args_channel_foo(self): + """ + Try to manipulate the stream args channels for proper swig'ing checks. + """ + sa = uhd_swig.stream_args_t() + sa.channels.append(1) + sa.channels.append(0) + print sa.channels + self.assertEqual(len(sa.channels), 2) + self.assertEqual(sa.channels[0], 1) + self.assertEqual(sa.channels[1], 0) + if __name__ == '__main__': gr_unittest.run(test_uhd, "test_uhd.xml") diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i index 837d07fa58..de5b8c2dad 100644 --- a/gr-uhd/swig/uhd_swig.i +++ b/gr-uhd/swig/uhd_swig.i @@ -52,6 +52,10 @@ // used types //////////////////////////////////////////////////////////////////////// +%template(uhd_string_vector_t) std::vector<std::string>; + +%template(uhd_size_vector_t) std::vector<size_t>; + %include <uhd/config.hpp> %include <uhd/utils/pimpl.hpp> |