aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/multi_usrp.cpp
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2011-02-01 05:42:36 -0800
committerPhilip Balister <philip@opensdr.com>2011-02-01 05:42:36 -0800
commit781cddee31078e461202c2cf16f3de2f1f236a27 (patch)
treedcd8e1ff8e696dc00b91b425928a3367f05c9a25 /host/lib/usrp/multi_usrp.cpp
parentcd45fb6be615a6f133e2c62a46f7c5eba76f72c1 (diff)
parent52e9c8f8027d0bbe1e6b0f57e30f985613e48be2 (diff)
downloaduhd-781cddee31078e461202c2cf16f3de2f1f236a27.tar.gz
uhd-781cddee31078e461202c2cf16f3de2f1f236a27.tar.bz2
uhd-781cddee31078e461202c2cf16f3de2f1f236a27.zip
Merge branch 'usrp_e100_devel' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e100_devel
Conflicts: host/lib/usrp/usrp_e100/clock_ctrl.cpp
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp27
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;