diff options
author | Josh Blum <josh@joshknows.com> | 2010-12-22 16:02:09 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-12-22 16:02:09 -0800 |
commit | de45f2234ca7ce8a1efd79525323bef55f1f9d44 (patch) | |
tree | 435dce2c2e8ff862f84cb47d0bc81f867d2fad1d /host/lib/usrp | |
parent | b6983381e46f5bb1156da2e40580a97fd09b9e37 (diff) | |
download | uhd-de45f2234ca7ce8a1efd79525323bef55f1f9d44.tar.gz uhd-de45f2234ca7ce8a1efd79525323bef55f1f9d44.tar.bz2 uhd-de45f2234ca7ce8a1efd79525323bef55f1f9d44.zip |
udp_ports: enable async recv in xport, set performance params in top level, things working
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index d11031f3c..5a6c0983c 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -356,7 +356,7 @@ static UHD_INLINE void extract_packet_info( time = extract_time_spec(next_info); clear = extract_time_spec(prev_info) > time; - msg = prev_info.packet_type != vrt::if_packet_info_t::PACKET_TYPE_DATA; + msg = next_info.packet_type != vrt::if_packet_info_t::PACKET_TYPE_DATA; prev_info = next_info; } diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 3f8da5fda..f910999d4 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -197,7 +197,14 @@ static device_addrs_t usrp2_find(const device_addr_t &hint_){ * Make **********************************************************************/ static device::sptr usrp2_make(const device_addr_t &device_addr){ -sep_indexed_dev_addrs(device_addr); + + //setup the dsp transport hints (default to a large recv buff) + device_addr_t dsp_xport_hints = device_addr; + if (not dsp_xport_hints.has_key("recv_buff_size")){ + //set to half-a-second of buffering at max rate + dsp_xport_hints["recv_buff_size"] = "50e6"; + } + //create a ctrl and data transport for each address std::vector<udp_simple::sptr> ctrl_transports; std::vector<zero_copy_if::sptr> data_transports; @@ -209,7 +216,7 @@ sep_indexed_dev_addrs(device_addr); dev_addr_i["addr"], num2str(USRP2_UDP_CTRL_PORT) )); data_transports.push_back(udp_zero_copy::make( - dev_addr_i["addr"], num2str(USRP2_UDP_DATA_PORT), device_addr + dev_addr_i["addr"], num2str(USRP2_UDP_DATA_PORT), dsp_xport_hints )); err0_transports.push_back(udp_zero_copy::make( dev_addr_i["addr"], num2str(USRP2_UDP_ERR0_PORT), device_addr_t() |