diff options
author | Josh Blum <josh@joshknows.com> | 2010-08-04 16:33:49 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-08-04 16:33:49 -0700 |
commit | 8e1d51d628afb18dc9a36f268dda1e9f48a1c2ad (patch) | |
tree | 9aea9b125848fa7fc3ea45c96bff27dde2c1e8fb /host/include | |
parent | 702d5af8ca0bab8ef295c817017df5952f6aea51 (diff) | |
parent | 70abdef8f6c6d24a99caf8d3668f32094b159903 (diff) | |
download | uhd-8e1d51d628afb18dc9a36f268dda1e9f48a1c2ad.tar.gz uhd-8e1d51d628afb18dc9a36f268dda1e9f48a1c2ad.tar.bz2 uhd-8e1d51d628afb18dc9a36f268dda1e9f48a1c2ad.zip |
Merge branch 'master' into codec_gains
Conflicts:
host/lib/CMakeLists.txt
host/lib/utils/gain_handler.cpp
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/transport/alignment_buffer.ipp | 13 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_iface.hpp | 7 |
2 files changed, 17 insertions, 3 deletions
diff --git a/host/include/uhd/transport/alignment_buffer.ipp b/host/include/uhd/transport/alignment_buffer.ipp index ed7cfd26c..61b3b60f5 100644 --- a/host/include/uhd/transport/alignment_buffer.ipp +++ b/host/include/uhd/transport/alignment_buffer.ipp @@ -57,12 +57,15 @@ namespace uhd{ namespace transport{ namespace{ /*anon*/ std::vector<elem_type> &elems, const time_duration_t &time ){ + boost::system_time exit_time = boost::get_system_time() + time; buff_contents_type buff_contents_tmp; std::list<size_t> indexes_to_do(_all_indexes); //do an initial pop to load an initial sequence id size_t index = indexes_to_do.front(); - if (not _buffs[index]->pop_with_timed_wait(buff_contents_tmp, time)) return false; + if (not _buffs[index]->pop_with_timed_wait( + buff_contents_tmp, exit_time - boost::get_system_time() + )) return false; elems[index] = buff_contents_tmp.first; seq_type expected_seq_id = buff_contents_tmp.second; indexes_to_do.pop_front(); @@ -75,7 +78,9 @@ namespace uhd{ namespace transport{ namespace{ /*anon*/ _there_was_a_clear = false; indexes_to_do = _all_indexes; index = indexes_to_do.front(); - if (not _buffs[index]->pop_with_timed_wait(buff_contents_tmp, time)) return false; + if (not _buffs[index]->pop_with_timed_wait( + buff_contents_tmp, exit_time - boost::get_system_time() + )) return false; elems[index] = buff_contents_tmp.first; expected_seq_id = buff_contents_tmp.second; indexes_to_do.pop_front(); @@ -83,7 +88,9 @@ namespace uhd{ namespace transport{ namespace{ /*anon*/ //pop an element off for this index index = indexes_to_do.front(); - if (not _buffs[index]->pop_with_timed_wait(buff_contents_tmp, time)) return false; + if (not _buffs[index]->pop_with_timed_wait( + buff_contents_tmp, exit_time - boost::get_system_time() + )) return false; //if the sequence id matches: // store the popped element into the output, diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index caf1e6ee6..fc7ea3052 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -22,6 +22,7 @@ #include <uhd/types/serial.hpp> #include <boost/shared_ptr.hpp> #include <boost/cstdint.hpp> +#include <string> #include <vector> namespace uhd{ namespace usrp{ @@ -65,6 +66,12 @@ public: }; /*! + * Get the motherboard name of the form: usrp1, usrp2... + * \return string representing the motherboard name + */ + virtual std::string get_mboard_name(void) = 0; + + /*! * Write to an aux dac. * * \param unit which unit rx or tx |