summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
authorTom Rondeau2010-11-21 19:42:34 -0500
committerTom Rondeau2010-11-21 19:42:34 -0500
commit64bb45e9f5fc64b24c0d1119ba3e293240f6a8f1 (patch)
tree7dc661d79211037759e3c0898dd5fae25d884045 /gr-uhd
parent8e39df793623ed62a1d4f23a05548a81914ad959 (diff)
downloadgnuradio-64bb45e9f5fc64b24c0d1119ba3e293240f6a8f1.tar.gz
gnuradio-64bb45e9f5fc64b24c0d1119ba3e293240f6a8f1.tar.bz2
gnuradio-64bb45e9f5fc64b24c0d1119ba3e293240f6a8f1.zip
Slightly better handling of tags.
Diffstat (limited to 'gr-uhd')
-rw-r--r--gr-uhd/lib/uhd_single_usrp_source.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/gr-uhd/lib/uhd_single_usrp_source.cc b/gr-uhd/lib/uhd_single_usrp_source.cc
index cdb25919e..de4b5cc08 100644
--- a/gr-uhd/lib/uhd_single_usrp_source.cc
+++ b/gr-uhd/lib/uhd_single_usrp_source.cc
@@ -24,6 +24,7 @@
#include <stdexcept>
#include <iostream>
#include <boost/format.hpp>
+#include <gr_tag_info.h>
/***********************************************************************
* UHD Single USRP Source
@@ -51,6 +52,8 @@ 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){
@@ -159,13 +162,13 @@ public:
pmt::pmt_t nsamp_val = pmt::mp((int)d_num_packet_samps);
add_item_tag(0, nitems_written(0),
- pmt::mp("packet_time_stamp"),
+ gr_tags::key_time,
d_tstamp_pair,
- pmt::mp("uhd_single_usrp_source"));
+ d_tag_srcid);
add_item_tag(0, nitems_written(0),
pmt::mp("num_packet_samples"),
nsamp_val,
- pmt::mp("uhd_single_usrp_source"));
+ d_tag_srcid);
}
return num_samps;
@@ -196,6 +199,7 @@ public:
private:
uhd::usrp::single_usrp::sptr _dev;
const uhd::io_type_t _type;
+ pmt::pmt_t d_tag_srcid;
};