[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/07: uhd: add command handler to add a ti
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/07: uhd: add command handler to add a time tag |
Date: |
Wed, 11 May 2016 17:41:07 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit f19ccc8159ee9e17eb22990dfb5834c8e6a99509
Author: Nathan West <address@hidden>
Date: Mon May 2 18:02:18 2016 -0400
uhd: add command handler to add a time tag
---
gr-uhd/lib/usrp_source_impl.cc | 9 +++++++++
gr-uhd/lib/usrp_source_impl.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc
index 7ad2280..0a09ed3 100644
--- a/gr-uhd/lib/usrp_source_impl.cc
+++ b/gr-uhd/lib/usrp_source_impl.cc
@@ -31,6 +31,8 @@
namespace gr {
namespace uhd {
+ const pmt::pmt_t CMD_TAG_KEY = pmt::mp("tag");
+
usrp_source::sptr
usrp_source::make(const ::uhd::device_addr_t &device_addr,
const ::uhd::io_type_t &io_type,
@@ -80,6 +82,7 @@ namespace gr {
#ifdef GR_UHD_USE_STREAM_API
_samps_per_packet = 1;
#endif
+ register_msg_cmd_handler(CMD_TAG_KEY,
boost::bind(&usrp_source_impl::_cmd_handler_tag, this, _1));
}
usrp_source_impl::~usrp_source_impl()
@@ -359,6 +362,12 @@ namespace gr {
}
void
+ usrp_source_impl::_cmd_handler_tag(const pmt::pmt_t &tag)
+ {
+ _tag_now = true;
+ }
+
+ void
usrp_source_impl::set_start_time(const ::uhd::time_spec_t &time)
{
_start_time = time;
diff --git a/gr-uhd/lib/usrp_source_impl.h b/gr-uhd/lib/usrp_source_impl.h
index b43df4d..78a8341 100644
--- a/gr-uhd/lib/usrp_source_impl.h
+++ b/gr-uhd/lib/usrp_source_impl.h
@@ -112,6 +112,7 @@ namespace gr {
private:
//! Like set_center_freq(), but uses _curr_freq and _curr_lo_offset
::uhd::tune_result_t _set_center_freq_from_internals(size_t chan);
+ void _cmd_handler_tag(const pmt::pmt_t &tag);
#ifdef GR_UHD_USE_STREAM_API
::uhd::rx_streamer::sptr _rx_stream;
- [Commit-gnuradio] [gnuradio] branch master updated (6c2851d -> 2aec2ff), git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 06/07: Merge branch 'maint', git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 04/07: grc: Added bits (unpacked bytes) as a data type, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 03/07: added options to query the full configuration as read by gr::prefs, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 05/07: Merge remote-tracking branch 'mmueller/gr-conf-info-add-config-queries', git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 02/07: added user settings directory as a gr::-accessible path, git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 07/07: Merge remote-tracking branch 'nwest/uhd-add-tag-cmd', git, 2016/05/11
- [Commit-gnuradio] [gnuradio] 01/07: uhd: add command handler to add a time tag,
git <=