diff options
author | Josh Blum <josh@joshknows.com> | 2010-10-27 10:45:15 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-10-27 10:45:15 -0700 |
commit | 211e190619652be145fdcd79cd54eda0e84d3313 (patch) | |
tree | 8bcf74b1086e166d3dbaf3ebfc3cf2a48c2fc3ec /host/lib/usrp | |
parent | a7840ebb3f7d7f807d05059e2809eb45cff04899 (diff) | |
download | uhd-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.cpp | 9 |
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; |