summaryrefslogtreecommitdiff
path: root/gr-uhd/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-08 11:27:31 -0700
committerJosh Blum <josh@joshknows.com>2011-11-07 18:56:28 -0800
commit011e784e1e51ae8a99ade2c95a43a463ab6902a9 (patch)
tree00ef859552202507c4deb84708a4949ea2ecebb6 /gr-uhd/include
parent84c3e0e0fb2df99213ed238ac4f032411d003b30 (diff)
uhd: added convenience constructor to stream_args_t
Diffstat (limited to 'gr-uhd/include')
-rw-r--r--gr-uhd/include/gr_uhd_usrp_sink.h5
-rw-r--r--gr-uhd/include/gr_uhd_usrp_source.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/gr-uhd/include/gr_uhd_usrp_sink.h b/gr-uhd/include/gr_uhd_usrp_sink.h
index e3d21226a6..47e815c028 100644
--- a/gr-uhd/include/gr_uhd_usrp_sink.h
+++ b/gr-uhd/include/gr_uhd_usrp_sink.h
@@ -29,6 +29,11 @@
#ifndef INCLUDED_UHD_STREAM_HPP
namespace uhd{
struct GR_UHD_API stream_args_t{
+ stream_args_t(void){}
+ stream_args_t(const std::string &cpu, const std::string &otw="sc16"){
+ cpu_format = cpu;
+ otw_format = otw;
+ }
std::string cpu_format;
std::string otw_format;
std::string args;
diff --git a/gr-uhd/include/gr_uhd_usrp_source.h b/gr-uhd/include/gr_uhd_usrp_source.h
index c2b310e44b..2433d422df 100644
--- a/gr-uhd/include/gr_uhd_usrp_source.h
+++ b/gr-uhd/include/gr_uhd_usrp_source.h
@@ -29,6 +29,11 @@
#ifndef INCLUDED_UHD_STREAM_HPP
namespace uhd{
struct GR_UHD_API stream_args_t{
+ stream_args_t(void){}
+ stream_args_t(const std::string &cpu, const std::string &otw="sc16"){
+ cpu_format = cpu;
+ otw_format = otw;
+ }
std::string cpu_format;
std::string otw_format;
std::string args;