summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py2
-rw-r--r--gr-uhd/lib/uhd_single_usrp_sink.cc10
-rw-r--r--gr-uhd/lib/uhd_single_usrp_sink.h3
-rw-r--r--gr-uhd/lib/uhd_single_usrp_source.cc10
-rw-r--r--gr-uhd/lib/uhd_single_usrp_source.h3
5 files changed, 17 insertions, 11 deletions
diff --git a/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py b/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
index 1ad3c09273..5b3cb5b5aa 100755
--- a/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
+++ b/gr-uhd/grc/gen_uhd_single_usrp_blocks_xml.py
@@ -26,7 +26,7 @@ MAIN_TMPL = """\
<key>uhd_single_usrp_$(sourk)</key>
<category>UHD</category>
<import>from gnuradio import uhd</import>
- <make>uhd.single_usrp_$(sourk)(\$dev_addr, uhd.io_type_t.\$type.type)
+ <make>uhd.single_usrp_$(sourk)(\$dev_addr, uhd.io_type_t.\$type.type, \$nchan)
self.\$(id).set_subdev_spec(\$sd_spec)
self.\$(id).set_samp_rate(\$samp_rate)
#for $n in range($max_nchan)
diff --git a/gr-uhd/lib/uhd_single_usrp_sink.cc b/gr-uhd/lib/uhd_single_usrp_sink.cc
index 1cd5afc87e..8cb3726d1a 100644
--- a/gr-uhd/lib/uhd_single_usrp_sink.cc
+++ b/gr-uhd/lib/uhd_single_usrp_sink.cc
@@ -39,8 +39,9 @@ class uhd_single_usrp_sink_impl : public uhd_single_usrp_sink{
public:
uhd_single_usrp_sink_impl(
const std::string &args,
- const uhd::io_type_t &type
- ) : uhd_single_usrp_sink(gr_make_io_signature(1, 1, type.size)), _type(type)
+ const uhd::io_type_t &type,
+ size_t num_channels
+ ) : uhd_single_usrp_sink(gr_make_io_signature(num_channels, num_channels, type.size)), _type(type)
{
_dev = uhd::usrp::single_usrp::make(args);
}
@@ -143,9 +144,10 @@ protected:
**********************************************************************/
boost::shared_ptr<uhd_single_usrp_sink> uhd_make_single_usrp_sink(
const std::string &args,
- const uhd::io_type_t::tid_t &type
+ const uhd::io_type_t::tid_t &type,
+ size_t num_channels
){
return boost::shared_ptr<uhd_single_usrp_sink>(
- new uhd_single_usrp_sink_impl(args, type)
+ new uhd_single_usrp_sink_impl(args, type, num_channels)
);
}
diff --git a/gr-uhd/lib/uhd_single_usrp_sink.h b/gr-uhd/lib/uhd_single_usrp_sink.h
index 61417168a6..bec788193b 100644
--- a/gr-uhd/lib/uhd_single_usrp_sink.h
+++ b/gr-uhd/lib/uhd_single_usrp_sink.h
@@ -29,7 +29,8 @@ class uhd_single_usrp_sink;
boost::shared_ptr<uhd_single_usrp_sink> uhd_make_single_usrp_sink(
const std::string &args,
- const uhd::io_type_t::tid_t &type
+ const uhd::io_type_t::tid_t &type,
+ size_t num_channels = 1
);
class uhd_single_usrp_sink : public gr_sync_block{
diff --git a/gr-uhd/lib/uhd_single_usrp_source.cc b/gr-uhd/lib/uhd_single_usrp_source.cc
index 13e4d6d43c..5da4385b25 100644
--- a/gr-uhd/lib/uhd_single_usrp_source.cc
+++ b/gr-uhd/lib/uhd_single_usrp_source.cc
@@ -39,8 +39,9 @@ class uhd_single_usrp_source_impl : public uhd_single_usrp_source{
public:
uhd_single_usrp_source_impl(
const std::string &args,
- const uhd::io_type_t &type
- ) : uhd_single_usrp_source(gr_make_io_signature(1, 1, type.size)), _type(type)
+ const uhd::io_type_t &type,
+ size_t num_channels
+ ) : uhd_single_usrp_source(gr_make_io_signature(num_channels, num_channels, type.size)), _type(type)
{
_dev = uhd::usrp::single_usrp::make(args);
set_streaming(false);
@@ -157,9 +158,10 @@ private:
**********************************************************************/
boost::shared_ptr<uhd_single_usrp_source> uhd_make_single_usrp_source(
const std::string &args,
- const uhd::io_type_t::tid_t &type
+ const uhd::io_type_t::tid_t &type,
+ size_t num_channels
){
return boost::shared_ptr<uhd_single_usrp_source>(
- new uhd_single_usrp_source_impl(args, type)
+ new uhd_single_usrp_source_impl(args, type, num_channels)
);
}
diff --git a/gr-uhd/lib/uhd_single_usrp_source.h b/gr-uhd/lib/uhd_single_usrp_source.h
index 5da7e2b9ab..196b7c6759 100644
--- a/gr-uhd/lib/uhd_single_usrp_source.h
+++ b/gr-uhd/lib/uhd_single_usrp_source.h
@@ -29,7 +29,8 @@ class uhd_single_usrp_source;
boost::shared_ptr<uhd_single_usrp_source> uhd_make_single_usrp_source(
const std::string &args,
- const uhd::io_type_t::tid_t &type
+ const uhd::io_type_t::tid_t &type,
+ size_t num_channels = 1
);
class uhd_single_usrp_source : public gr_sync_block{