aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/single_usrp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/single_usrp.cpp')
-rw-r--r--host/lib/usrp/single_usrp.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/host/lib/usrp/single_usrp.cpp b/host/lib/usrp/single_usrp.cpp
index bb4af44b8..08dc3bb1d 100644
--- a/host/lib/usrp/single_usrp.cpp
+++ b/host/lib/usrp/single_usrp.cpp
@@ -54,6 +54,9 @@ public:
return _dev;
}
+ /*******************************************************************
+ * Mboard methods
+ ******************************************************************/
std::string get_pp_string(void){
std::string buff = str(boost::format(
"Single USRP:\n"
@@ -101,9 +104,10 @@ public:
return buff;
}
- /*******************************************************************
- * Misc
- ******************************************************************/
+ std::string get_mboard_name(void){
+ return _mboard()[MBOARD_PROP_NAME].as<std::string>();
+ }
+
time_spec_t get_time_now(void){
return _mboard()[MBOARD_PROP_TIME_NOW].as<time_spec_t>();
}
@@ -135,6 +139,10 @@ public:
return _mboard()[MBOARD_PROP_RX_SUBDEV_SPEC].as<subdev_spec_t>();
}
+ std::string get_rx_subdev_name(size_t chan){
+ return _rx_subdev(chan)[SUBDEV_PROP_NAME].as<std::string>();
+ }
+
void set_rx_rate(double rate){
_rx_dsp()[DSP_PROP_HOST_RATE] = rate;
}
@@ -206,6 +214,10 @@ public:
return _mboard()[MBOARD_PROP_TX_SUBDEV_SPEC].as<subdev_spec_t>();
}
+ std::string get_tx_subdev_name(size_t chan){
+ return _tx_subdev(chan)[SUBDEV_PROP_NAME].as<std::string>();
+ }
+
void set_tx_rate(double rate){
_tx_dsp()[DSP_PROP_HOST_RATE] = rate;
}