diff options
author | Nick Foster | 2011-01-10 15:25:19 -0800 |
---|---|---|
committer | Nick Foster | 2011-01-10 15:25:19 -0800 |
commit | 70e978b7fdc0285b56ed3ec7be3f10dc3d922504 (patch) | |
tree | 75231113034c1ac75277fbe444c02e9b600b2a7a /gr-uhd/lib/uhd_single_usrp_source.cc | |
parent | 0e92b93f21fc9c324c379bc318120d414e7422cc (diff) | |
parent | bb438e7d12c5767123f8abed5810f284a5f18bf8 (diff) | |
download | gnuradio-70e978b7fdc0285b56ed3ec7be3f10dc3d922504.tar.gz gnuradio-70e978b7fdc0285b56ed3ec7be3f10dc3d922504.tar.bz2 gnuradio-70e978b7fdc0285b56ed3ec7be3f10dc3d922504.zip |
Merge branch 'next' of http://gnuradio.org/git/gnuradio into next
Diffstat (limited to 'gr-uhd/lib/uhd_single_usrp_source.cc')
-rw-r--r-- | gr-uhd/lib/uhd_single_usrp_source.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gr-uhd/lib/uhd_single_usrp_source.cc b/gr-uhd/lib/uhd_single_usrp_source.cc index 907e8be54..45f852a3e 100644 --- a/gr-uhd/lib/uhd_single_usrp_source.cc +++ b/gr-uhd/lib/uhd_single_usrp_source.cc @@ -49,6 +49,7 @@ public: _type(io_type) { _dev = uhd::usrp::single_usrp::make(device_addr); + d_tag_srcid = pmt::mp("uhd_single_usrp_source"); } void set_subdev_spec(const std::string &spec){ @@ -138,7 +139,16 @@ public: switch(metadata.error_code){ case uhd::rx_metadata_t::ERROR_CODE_NONE: - return num_samps; + if(metadata.has_time_spec) { + d_tstamp_pair = pmt::mp(pmt::mp(metadata.time_spec.get_full_secs()), + pmt::mp(metadata.time_spec.get_frac_secs())); + add_item_tag(0, nitems_written(0), + //gr_tags::key_time, + pmt::pmt_string_to_symbol("time"), + d_tstamp_pair, + d_tag_srcid); + } + return num_samps; case uhd::rx_metadata_t::ERROR_CODE_OVERFLOW: //ignore overflows and try work again @@ -165,6 +175,7 @@ public: private: uhd::usrp::single_usrp::sptr _dev; const uhd::io_type_t _type; + pmt::pmt_t d_tag_srcid; }; |