summaryrefslogtreecommitdiff
path: root/gr-uhd/swig
diff options
context:
space:
mode:
authorThomas Tsou <ttsou@vt.edu>2011-08-19 14:50:55 -0700
committerThomas Tsou <ttsou@vt.edu>2011-08-19 18:30:38 -0700
commit893f946b7a652497994309092fe84fb33504852c (patch)
tree064fa60b78a04565ba559a29a2f7bf824b63473e /gr-uhd/swig
parentdc16937c935f10a16de8969ca592b6019639d52b (diff)
gr-uhd: add async metadata source block
Add asynchronous message "block" that is independent of normal gnuradio scheduler. The block instantiates a thread to wait for asynchronous messages from UHD and encapsulates them in a gr_message posted into a message queue. The interface is empty because the block is internally driven and accessed through the the constructor specified message queue.
Diffstat (limited to 'gr-uhd/swig')
-rw-r--r--gr-uhd/swig/__init__.py3
-rw-r--r--gr-uhd/swig/uhd_swig.i4
2 files changed, 5 insertions, 2 deletions
diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py
index 7ed689ec04..6d4ecc7f06 100644
--- a/gr-uhd/swig/__init__.py
+++ b/gr-uhd/swig/__init__.py
@@ -60,7 +60,7 @@ def _prepare_uhd_swig():
if attr.endswith('_t'): setattr(uhd_swig, attr[:-2], myobj)
#Cast constructor args (FIXME swig handle overloads?)
- for attr in ('usrp_source', 'usrp_sink'):
+ for attr in ('usrp_source', 'usrp_sink', 'amsg_source'):
def constructor_factory(old_constructor):
def constructor_interceptor(*args, **kwargs):
args = list(args)
@@ -77,7 +77,6 @@ def _prepare_uhd_swig():
#Aliases for deprecated constructors
setattr(uhd_swig, 'single_usrp_source', uhd_swig.usrp_source)
- setattr(uhd_swig, 'single_usrp_sink', uhd_swig.usrp_sink)
setattr(uhd_swig, 'multi_usrp_source', uhd_swig.usrp_source)
setattr(uhd_swig, 'multi_usrp_sink', uhd_swig.usrp_sink)
diff --git a/gr-uhd/swig/uhd_swig.i b/gr-uhd/swig/uhd_swig.i
index 9bdb962c94..b58fe9e180 100644
--- a/gr-uhd/swig/uhd_swig.i
+++ b/gr-uhd/swig/uhd_swig.i
@@ -55,6 +55,7 @@
%{
#include <gr_uhd_usrp_source.h>
#include <gr_uhd_usrp_sink.h>
+#include <gr_uhd_amsg_source.h>
%}
////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,9 @@ GR_SWIG_BLOCK_MAGIC(uhd,usrp_source)
GR_SWIG_BLOCK_MAGIC(uhd,usrp_sink)
%include <gr_uhd_usrp_sink.h>
+GR_SWIG_BLOCK_MAGIC(uhd,amsg_source)
+%include <gr_uhd_amsg_source.h>
+
////////////////////////////////////////////////////////////////////////
// helpful constants
////////////////////////////////////////////////////////////////////////