aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-09 15:16:07 -0700
committerJosh Blum <josh@joshknows.com>2010-08-09 15:16:07 -0700
commit55658336cf67810ab8cd7829b9a1fa86c8cd4539 (patch)
tree1cfecbb4ddfe785a7787a42be2f7df4b00983856 /host/lib/usrp
parent2a87970a9ca5bf98c555ad216c551263663fedcc (diff)
downloaduhd-55658336cf67810ab8cd7829b9a1fa86c8cd4539.tar.gz
uhd-55658336cf67810ab8cd7829b9a1fa86c8cd4539.tar.bz2
uhd-55658336cf67810ab8cd7829b9a1fa86c8cd4539.zip
usrp: added api call to get the subdev spec
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/mimo_usrp.cpp8
-rw-r--r--host/lib/usrp/simple_usrp.cpp8
2 files changed, 16 insertions, 0 deletions
diff --git a/host/lib/usrp/mimo_usrp.cpp b/host/lib/usrp/mimo_usrp.cpp
index 7965e4016..e78d38fc0 100644
--- a/host/lib/usrp/mimo_usrp.cpp
+++ b/host/lib/usrp/mimo_usrp.cpp
@@ -158,6 +158,10 @@ public:
_mboard(chan)[MBOARD_PROP_RX_SUBDEV_SPEC] = spec;
}
+ subdev_spec_t get_rx_subdev_spec(size_t chan){
+ return _mboard(chan)[MBOARD_PROP_RX_SUBDEV_SPEC].as<subdev_spec_t>();
+ }
+
void set_rx_rate_all(double rate){
std::vector<double> _actual_rates;
for (size_t chan = 0; chan < get_num_channels(); chan++){
@@ -230,6 +234,10 @@ public:
_mboard(chan)[MBOARD_PROP_TX_SUBDEV_SPEC] = spec;
}
+ subdev_spec_t get_tx_subdev_spec(size_t chan){
+ return _mboard(chan)[MBOARD_PROP_TX_SUBDEV_SPEC].as<subdev_spec_t>();
+ }
+
void set_tx_rate_all(double rate){
std::vector<double> _actual_rates;
for (size_t chan = 0; chan < get_num_channels(); chan++){
diff --git a/host/lib/usrp/simple_usrp.cpp b/host/lib/usrp/simple_usrp.cpp
index 40b71d355..60b25a647 100644
--- a/host/lib/usrp/simple_usrp.cpp
+++ b/host/lib/usrp/simple_usrp.cpp
@@ -108,6 +108,10 @@ public:
std::cout << "RX " << _mboard()[MBOARD_PROP_RX_SUBDEV_SPEC].as<subdev_spec_t>().to_pp_string() << std::endl;
}
+ subdev_spec_t get_rx_subdev_spec(void){
+ return _mboard()[MBOARD_PROP_RX_SUBDEV_SPEC].as<subdev_spec_t>();
+ }
+
void set_rx_rate(double rate){
_rx_dsp()[DSP_PROP_HOST_RATE] = rate;
}
@@ -172,6 +176,10 @@ public:
std::cout << "TX " << _mboard()[MBOARD_PROP_TX_SUBDEV_SPEC].as<subdev_spec_t>().to_pp_string() << std::endl;
}
+ subdev_spec_t get_tx_subdev_spec(void){
+ return _mboard()[MBOARD_PROP_TX_SUBDEV_SPEC].as<subdev_spec_t>();
+ }
+
void set_tx_rate(double rate){
_tx_dsp()[DSP_PROP_HOST_RATE] = rate;
}