summaryrefslogtreecommitdiff
path: root/gr-uhd/lib/usrp_source_impl.cc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-07-03 20:25:00 +0200
committerMartin Braun <martin.braun@ettus.com>2014-07-07 23:12:09 +0200
commitfe5853749e0cff54b04bdc06b47e996f1f4ffef2 (patch)
treef729c85ca94152d8598c3995b718502d6164483f /gr-uhd/lib/usrp_source_impl.cc
parent350d285a27ee6ea0f448a778551cdd3a5ffcedba (diff)
uhd: Refactored common stuff from usrp sink and source
Diffstat (limited to 'gr-uhd/lib/usrp_source_impl.cc')
-rw-r--r--gr-uhd/lib/usrp_source_impl.cc18
1 files changed, 5 insertions, 13 deletions
diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc
index 278bb3d652..b85b45b16b 100644
--- a/gr-uhd/lib/usrp_source_impl.cc
+++ b/gr-uhd/lib/usrp_source_impl.cc
@@ -67,25 +67,17 @@ namespace gr {
sync_block("gr uhd usrp source",
io_signature::make(0, 0, 0),
args_to_io_sig(stream_args)),
- _stream_args(stream_args),
- _nchan(stream_args.channels.size()),
- _stream_now(_nchan == 1),
- _tag_now(false),
- _start_time_set(false)
- {
- if(stream_args.cpu_format == "fc32")
- _type = boost::make_shared< ::uhd::io_type_t >(::uhd::io_type_t::COMPLEX_FLOAT32);
- if(stream_args.cpu_format == "sc16")
- _type = boost::make_shared< ::uhd::io_type_t >(::uhd::io_type_t::COMPLEX_INT16);
+ usrp_common_impl(device_addr, stream_args, ""),
+ _tag_now(false)
+ {
std::stringstream str;
str << name() << unique_id();
_id = pmt::string_to_symbol(str.str());
- _dev = ::uhd::usrp::multi_usrp::make(device_addr);
message_port_register_in(pmt::mp("command"));
set_msg_handler(
- pmt::mp("command"),
- boost::bind(&usrp_source_impl::msg_handler_command, this, _1)
+ pmt::mp("command"),
+ boost::bind(&usrp_source_impl::msg_handler_command, this, _1)
);
}