From 893f946b7a652497994309092fe84fb33504852c Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Fri, 19 Aug 2011 14:50:55 -0700 Subject: 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. --- gr-uhd/include/Makefile.am | 3 ++- gr-uhd/include/gr_uhd_amsg_source.h | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gr-uhd/include/gr_uhd_amsg_source.h (limited to 'gr-uhd/include') 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 +#include +#include + +class uhd_amsg_source; + +GR_UHD_API boost::shared_ptr 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 */ -- cgit