diff options
author | Josh Blum <josh@joshknows.com> | 2012-03-01 18:35:12 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-03-23 14:36:56 -0700 |
commit | b1d82758b0e98ab10c5ca2e65eed1ae90afd8d62 (patch) | |
tree | 8785ecaf8598c839fe15096f9dfad35f2eb11dd6 /host/lib/usrp/multi_usrp.cpp | |
parent | f59ef44a43d0d16655cb67a3d0334e8cacd76f09 (diff) | |
download | uhd-b1d82758b0e98ab10c5ca2e65eed1ae90afd8d62.tar.gz uhd-b1d82758b0e98ab10c5ca2e65eed1ae90afd8d62.tar.bz2 uhd-b1d82758b0e98ab10c5ca2e65eed1ae90afd8d62.zip |
usrp2: implementation of timed commands working
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 42c654e6b..fd556c9f8 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -356,12 +356,24 @@ public: return true; } - void set_command_time(const time_spec_t &, size_t){ - throw uhd::not_implemented_error("Not implemented yet, but we have a very good idea of how to do it."); + void set_command_time(const time_spec_t &time_spec, size_t mboard){ + if (mboard != ALL_MBOARDS){ + _tree->access<time_spec_t>(mb_root(mboard) / "time/cmd").set(time_spec); + return; + } + for (size_t m = 0; m < get_num_mboards(); m++){ + set_command_time(time_spec, m); + } } - void clear_command_time(size_t){ - throw uhd::not_implemented_error("Not implemented yet, but we have a very good idea of how to do it."); + void clear_command_time(size_t mboard){ + if (mboard != ALL_MBOARDS){ + _tree->access<time_spec_t>(mb_root(mboard) / "time/cmd").set(time_spec_t(0.0)); + return; + } + for (size_t m = 0; m < get_num_mboards(); m++){ + clear_command_time(m); + } } void issue_stream_cmd(const stream_cmd_t &stream_cmd, size_t chan){ |