summaryrefslogtreecommitdiff
path: root/gr-uhd/include
diff options
context:
space:
mode:
authorThomas Tsou2011-08-19 14:50:55 -0700
committerThomas Tsou2011-08-19 18:30:38 -0700
commit893f946b7a652497994309092fe84fb33504852c (patch)
tree064fa60b78a04565ba559a29a2f7bf824b63473e /gr-uhd/include
parentdc16937c935f10a16de8969ca592b6019639d52b (diff)
downloadgnuradio-893f946b7a652497994309092fe84fb33504852c.tar.gz
gnuradio-893f946b7a652497994309092fe84fb33504852c.tar.bz2
gnuradio-893f946b7a652497994309092fe84fb33504852c.zip
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/include')
-rw-r--r--gr-uhd/include/Makefile.am3
-rw-r--r--gr-uhd/include/gr_uhd_amsg_source.h39
2 files changed, 41 insertions, 1 deletions
diff --git a/gr-uhd/include/Makefile.am b/gr-uhd/include/Makefile.am
index 4a04c98c1..70b80681b 100644
--- a/gr-uhd/include/Makefile.am
+++ b/gr-uhd/include/Makefile.am
@@ -24,4 +24,5 @@ include $(top_srcdir)/Makefile.common
grinclude_HEADERS = \
gr_uhd_api.h \
gr_uhd_usrp_source.h \
- gr_uhd_usrp_sink.h
+ gr_uhd_usrp_sink.h \
+ gr_uhd_amsg_source.h
diff --git a/gr-uhd/include/gr_uhd_amsg_source.h b/gr-uhd/include/gr_uhd_amsg_source.h
new file mode 100644
index 000000000..bc0feb438
--- /dev/null
+++ b/gr-uhd/include/gr_uhd_amsg_source.h
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+#ifndef INCLUDED_GR_UHD_AMSG_SOURCE_H
+#define INCLUDED_GR_UHD_AMSG_SOURCE_H
+
+#include <gr_uhd_api.h>
+#include <uhd/usrp/multi_usrp.hpp>
+#include <gr_msg_queue.h>
+
+class uhd_amsg_source;
+
+GR_UHD_API boost::shared_ptr<uhd_amsg_source> uhd_make_amsg_source(
+ const uhd::device_addr_t &device_addr,
+ gr_msg_queue_sptr msgq
+);
+
+class GR_UHD_API uhd_amsg_source{
+};
+
+#endif /* INCLUDED_GR_UHD_AMSG_SOURCE_H */