summaryrefslogtreecommitdiff
path: root/gr-uhd/lib
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-12-21 11:36:31 -0500
committerTom Rondeau <trondeau@vt.edu>2012-12-21 12:43:30 -0500
commit98da6e17aab67835fcd22c282ee70ad8ba050fcd (patch)
tree0506564edd7f17779de4606b9c648cbd32a0216a /gr-uhd/lib
parent275add3ae70d648dfb0ce14eb7df99b0e9adecbd (diff)
gruel: updating all GR blocks that use PMTs to use new naming.
Diffstat (limited to 'gr-uhd/lib')
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_sink.cc20
-rw-r--r--gr-uhd/lib/gr_uhd_usrp_source.cc18
2 files changed, 19 insertions, 19 deletions
diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc
index 6216c94a83..3b8fcea405 100644
--- a/gr-uhd/lib/gr_uhd_usrp_sink.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc
@@ -25,9 +25,9 @@
#include <boost/make_shared.hpp>
#include "gr_uhd_common.h"
-static const pmt::pmt_t SOB_KEY = pmt::pmt_string_to_symbol("tx_sob");
-static const pmt::pmt_t EOB_KEY = pmt::pmt_string_to_symbol("tx_eob");
-static const pmt::pmt_t TIME_KEY = pmt::pmt_string_to_symbol("tx_time");
+static const pmt::pmt_t SOB_KEY = pmt::string_to_symbol("tx_sob");
+static const pmt::pmt_t EOB_KEY = pmt::string_to_symbol("tx_eob");
+static const pmt::pmt_t TIME_KEY = pmt::string_to_symbol("tx_time");
#include <uhd/convert.hpp>
inline gr_io_signature_sptr args_to_io_sig(const uhd::stream_args_t &args){
@@ -374,23 +374,23 @@ public:
}
//handle end of burst with a mini end of burst packet
- else if (pmt::pmt_equal(key, EOB_KEY)){
- _metadata.end_of_burst = pmt::pmt_to_bool(value);
+ else if (pmt::equal(key, EOB_KEY)){
+ _metadata.end_of_burst = pmt::to_bool(value);
ninput_items = 1;
return;
}
//set the start of burst flag in the metadata
- else if (pmt::pmt_equal(key, SOB_KEY)){
- _metadata.start_of_burst = pmt::pmt_to_bool(value);
+ else if (pmt::equal(key, SOB_KEY)){
+ _metadata.start_of_burst = pmt::to_bool(value);
}
//set the time specification in the metadata
- else if (pmt::pmt_equal(key, TIME_KEY)){
+ else if (pmt::equal(key, TIME_KEY)){
_metadata.has_time_spec = true;
_metadata.time_spec = uhd::time_spec_t(
- pmt::pmt_to_uint64(pmt::pmt_tuple_ref(value, 0)),
- pmt::pmt_to_double(pmt::pmt_tuple_ref(value, 1))
+ pmt::to_uint64(pmt::tuple_ref(value, 0)),
+ pmt::to_double(pmt::tuple_ref(value, 1))
);
}
}
diff --git a/gr-uhd/lib/gr_uhd_usrp_source.cc b/gr-uhd/lib/gr_uhd_usrp_source.cc
index 3813673b4b..6403d3d913 100644
--- a/gr-uhd/lib/gr_uhd_usrp_source.cc
+++ b/gr-uhd/lib/gr_uhd_usrp_source.cc
@@ -28,9 +28,9 @@
#include <boost/make_shared.hpp>
#include "gr_uhd_common.h"
-static const pmt::pmt_t TIME_KEY = pmt::pmt_string_to_symbol("rx_time");
-static const pmt::pmt_t RATE_KEY = pmt::pmt_string_to_symbol("rx_rate");
-static const pmt::pmt_t FREQ_KEY = pmt::pmt_string_to_symbol("rx_freq");
+static const pmt::pmt_t TIME_KEY = pmt::string_to_symbol("rx_time");
+static const pmt::pmt_t RATE_KEY = pmt::string_to_symbol("rx_rate");
+static const pmt::pmt_t FREQ_KEY = pmt::string_to_symbol("rx_freq");
#include <uhd/convert.hpp>
inline gr_io_signature_sptr args_to_io_sig(const uhd::stream_args_t &args){
@@ -69,7 +69,7 @@ public:
if (stream_args.cpu_format == "sc16") _type = boost::make_shared<uhd::io_type_t>(uhd::io_type_t::COMPLEX_INT16);
std::stringstream str;
str << name() << unique_id();
- _id = pmt::pmt_string_to_symbol(str.str());
+ _id = pmt::string_to_symbol(str.str());
_dev = uhd::usrp::multi_usrp::make(device_addr);
}
@@ -363,15 +363,15 @@ public:
if (_tag_now){
_tag_now = false;
//create a timestamp pmt for the first sample
- const pmt::pmt_t val = pmt::pmt_make_tuple(
- pmt::pmt_from_uint64(_metadata.time_spec.get_full_secs()),
- pmt::pmt_from_double(_metadata.time_spec.get_frac_secs())
+ const pmt::pmt_t val = pmt::make_tuple(
+ pmt::from_uint64(_metadata.time_spec.get_full_secs()),
+ pmt::from_double(_metadata.time_spec.get_frac_secs())
);
//create a tag set for each channel
for (size_t i = 0; i < _nchan; i++){
this->add_item_tag(i, nitems_written(0), TIME_KEY, val, _id);
- this->add_item_tag(i, nitems_written(0), RATE_KEY, pmt::pmt_from_double(_samp_rate), _id);
- this->add_item_tag(i, nitems_written(0), FREQ_KEY, pmt::pmt_from_double(_center_freq), _id);
+ this->add_item_tag(i, nitems_written(0), RATE_KEY, pmt::from_double(_samp_rate), _id);
+ this->add_item_tag(i, nitems_written(0), FREQ_KEY, pmt::from_double(_center_freq), _id);
}
}
break;