diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-27 15:24:47 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-27 15:24:47 -0800 |
commit | e16445483e1505942b7b1ddcd9fc575532fd93ba (patch) | |
tree | 9f08b9439e8ce46cb876396b32da138105348381 /host/lib/usrp/multi_usrp.cpp | |
parent | 8a62a20041605238320eae1f1a69221ef00b6bf1 (diff) | |
download | uhd-e16445483e1505942b7b1ddcd9fc575532fd93ba.tar.gz uhd-e16445483e1505942b7b1ddcd9fc575532fd93ba.tar.bz2 uhd-e16445483e1505942b7b1ddcd9fc575532fd93ba.zip |
uhd: remove single usrp (leave a typedef), multi-usrp is a superset now
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 48eec28c1..17458496b 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -55,9 +55,10 @@ public: ******************************************************************/ std::string get_pp_string(void){ std::string buff = str(boost::format( - "Multi USRP:\n" + "%s USRP:\n" " Device: %s\n" ) + % ((get_num_mboards() > 1)? "Multi" : "Single") % (*_dev)[DEVICE_PROP_NAME].as<std::string>() ); for (size_t m = 0; m < get_num_mboards(); m++){ @@ -121,6 +122,16 @@ public: return _mboard(0)[MBOARD_PROP_TIME_PPS].as<time_spec_t>(); } + void set_time_now(const time_spec_t &time_spec, size_t mboard){ + if (mboard != ALL_MBOARDS){ + _mboard(mboard)[MBOARD_PROP_TIME_NOW] = time_spec; + return; + } + for (size_t m = 0; m < get_num_mboards(); m++){ + set_time_now(time_spec, m); + } + } + void set_time_next_pps(const time_spec_t &time_spec){ for (size_t m = 0; m < get_num_mboards(); m++){ _mboard(m)[MBOARD_PROP_TIME_PPS] = time_spec; |