diff options
author | Josh Blum <josh@joshknows.com> | 2010-03-01 16:13:30 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-03-01 16:13:30 -0800 |
commit | 451067295399e357d73c9bfdeef5f2ad040e0243 (patch) | |
tree | 02681d419362edd334e842e30416e1d353d74643 /host/lib/usrp/usrp2/usrp2_impl.cpp | |
parent | 6e8473e6eef84875e2c3babb35732f8c3b2a0247 (diff) | |
download | uhd-451067295399e357d73c9bfdeef5f2ad040e0243.tar.gz uhd-451067295399e357d73c9bfdeef5f2ad040e0243.tar.bz2 uhd-451067295399e357d73c9bfdeef5f2ad040e0243.zip |
Send the number of samples per datagram over the control.
Worked on the io impl for usrp2 (added loop unrolls and 32 bit buffers).
Added some vrt rx constants to the fw common used by host and fw.
Removed the MTU prop and added a general device prop for num samples.
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 06876d241..700f94ae1 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -133,9 +133,8 @@ usrp2_impl::usrp2_impl( //init the tx and rx dboards (do last) dboard_init(); - //send a small data packet so the usrp2 knows the udp source port - uint32_t zero_data = 0; - _data_transport->send(boost::asio::buffer(&zero_data, sizeof(zero_data))); + //init the send and recv io + io_init(); } @@ -197,12 +196,22 @@ void usrp2_impl::get(const wax::obj &key_, wax::obj &val){ return; case DEVICE_PROP_MBOARD: + ASSERT_THROW(_mboards.has_key(name)); val = _mboards[name].get_link(); return; case DEVICE_PROP_MBOARD_NAMES: val = prop_names_t(_mboards.get_keys()); return; + + case DEVICE_PROP_MAX_RX_SAMPLES: + val = size_t(_max_samples_per_packet); + return; + + case DEVICE_PROP_MAX_TX_SAMPLES: + val = size_t(_max_samples_per_packet); + return; + } } |