diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-08 15:52:33 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-08 15:52:33 -0700 |
commit | 1190bc5c1a7bd0946bc55373eca58ec60a100f63 (patch) | |
tree | 1a5596bec1117270afba9f8327711e13201f767a /host/lib | |
parent | 4b5792d2a5c6d101f602b5854fb2e7cfb3acf602 (diff) | |
download | uhd-1190bc5c1a7bd0946bc55373eca58ec60a100f63.tar.gz uhd-1190bc5c1a7bd0946bc55373eca58ec60a100f63.tar.bz2 uhd-1190bc5c1a7bd0946bc55373eca58ec60a100f63.zip |
usrp: added calls to get subdev and mboard canonical names
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/single_usrp.cpp | 18 |
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; } |