summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-27 10:45:15 -0700
committerJosh Blum <josh@joshknows.com>2010-10-27 10:45:15 -0700
commit211e190619652be145fdcd79cd54eda0e84d3313 (patch)
tree8bcf74b1086e166d3dbaf3ebfc3cf2a48c2fc3ec /host/lib/usrp
parenta7840ebb3f7d7f807d05059e2809eb45cff04899 (diff)
downloaduhd-211e190619652be145fdcd79cd54eda0e84d3313.tar.gz
uhd-211e190619652be145fdcd79cd54eda0e84d3313.tar.bz2
uhd-211e190619652be145fdcd79cd54eda0e84d3313.zip
usrp: added a time sync check for multi usrp
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/multi_usrp.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 024a6152d..876f1a3fc 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -154,6 +154,15 @@ public:
}
}
+ bool get_time_synchronized(void){
+ for (size_t m = 1; m < get_num_mboards(); m++){
+ time_spec_t time_0 = _mboard(0)[MBOARD_PROP_TIME_NOW].as<time_spec_t>();
+ time_spec_t time_i = _mboard(m)[MBOARD_PROP_TIME_NOW].as<time_spec_t>();
+ if (time_i < time_0 or (time_i - time_0) > time_spec_t(0.01)) return false;
+ }
+ return true;
+ }
+
void issue_stream_cmd(const stream_cmd_t &stream_cmd){
for (size_t m = 0; m < get_num_mboards(); m++){
_mboard(m)[MBOARD_PROP_STREAM_CMD] = stream_cmd;