diff options
author | Josh Blum <josh@joshknows.com> | 2010-11-18 15:43:50 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-11-18 15:43:50 -0800 |
commit | dd03a2a0dff2d34e7ffca95531eaa42c85fd756c (patch) | |
tree | 7ea89df802af80caed907d18173f990689662764 /host/lib | |
parent | 28d49657a959feeec9142094735fb4e184c3e9a4 (diff) | |
parent | 89ae5f3f651cff22226e2b2c0ce0ed796dad4c71 (diff) | |
download | uhd-dd03a2a0dff2d34e7ffca95531eaa42c85fd756c.tar.gz uhd-dd03a2a0dff2d34e7ffca95531eaa42c85fd756c.tar.bz2 uhd-dd03a2a0dff2d34e7ffca95531eaa42c85fd756c.zip |
Merge branches 'master' and 'master' of ettus.sourcerepo.com:ettus/uhdpriv
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/transport/udp_simple.cpp | 13 | ||||
-rw-r--r-- | host/lib/types.cpp | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index 5829b462b..6799ac7b2 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -35,6 +35,8 @@ using namespace uhd::transport; static bool wait_available( boost::asio::ip::udp::socket &socket, double timeout ){ + #if defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32) + //setup timeval for timeout timeval tv; tv.tv_sec = 0; @@ -46,6 +48,17 @@ static bool wait_available( FD_SET(socket.native(), &rset); return ::select(socket.native()+1, &rset, NULL, NULL, &tv) > 0; + + #else /*defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32)*/ + + //FIXME: why does select fail on macintosh? + for (size_t i = 0; i < size_t(timeout*1e3); i++){ + if (socket.available()) return true; + boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + } + return false; + + #endif /*defined(UHD_PLATFORM_LINUX) || defined(UHD_PLATFORM_WIN32)*/ } /*********************************************************************** diff --git a/host/lib/types.cpp b/host/lib/types.cpp index 8ccb664d5..bea20a4aa 100644 --- a/host/lib/types.cpp +++ b/host/lib/types.cpp @@ -21,6 +21,7 @@ #include <uhd/types/clock_config.hpp> #include <uhd/types/stream_cmd.hpp> #include <uhd/types/metadata.hpp> +#include <uhd/types/ranges.hpp> #include <uhd/types/time_spec.hpp> #include <uhd/types/device_addr.hpp> #include <uhd/types/mac_addr.hpp> @@ -40,6 +41,12 @@ using namespace uhd; /*********************************************************************** + * ranges template instantiation + **********************************************************************/ +template struct uhd::meta_range_t<float>; +template struct uhd::meta_range_t<double>; + +/*********************************************************************** * tune request **********************************************************************/ tune_request_t::tune_request_t(double target_freq): |