diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-31 18:05:16 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-31 18:05:16 -0800 |
commit | 52e9c8f8027d0bbe1e6b0f57e30f985613e48be2 (patch) | |
tree | 44bb54695dfc8a0ba552085a1f9625d7d85d37ab /host/lib/usrp/multi_usrp.cpp | |
parent | 572a64f0acb459583abfccbc8288158822fa2f77 (diff) | |
parent | 67bba008255f98367cf19dba518dceb40f763c25 (diff) | |
download | uhd-52e9c8f8027d0bbe1e6b0f57e30f985613e48be2.tar.gz uhd-52e9c8f8027d0bbe1e6b0f57e30f985613e48be2.tar.bz2 uhd-52e9c8f8027d0bbe1e6b0f57e30f985613e48be2.zip |
Merge branch 'multi_usrp_only' into usrp_e100_devel
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 48eec28c1..817d7b085 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -53,11 +53,26 @@ public: /******************************************************************* * Mboard methods ******************************************************************/ + void set_master_clock_rate(double rate, size_t mboard){ + if (mboard != ALL_MBOARDS){ + _mboard(mboard)[MBOARD_PROP_CLOCK_RATE] = rate; + return; + } + for (size_t m = 0; m < get_num_mboards(); m++){ + set_master_clock_rate(rate, m); + } + } + + double get_master_clock_rate(size_t mboard){ + return _mboard(mboard)[MBOARD_PROP_CLOCK_RATE].as<double>(); + } + 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 +136,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; |