From 211e190619652be145fdcd79cd54eda0e84d3313 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 27 Oct 2010 10:45:15 -0700 Subject: usrp: added a time sync check for multi usrp --- host/lib/usrp/multi_usrp.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'host/lib') 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_i = _mboard(m)[MBOARD_PROP_TIME_NOW].as(); + 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; -- cgit v1.2.3