diff options
author | Josh Blum <josh@joshknows.com> | 2010-09-22 17:36:18 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-09-22 17:36:18 -0700 |
commit | 000578892e9cf8f0117b55dc5d770faad36740d0 (patch) | |
tree | f3f6bb81367ea9ff9e277e451ee9cecd63a6349e /host/lib/usrp/usrp1/usrp1_impl.hpp | |
parent | 887aab36a0618124c3f2dffa8df9e8d943dfb1ee (diff) | |
download | uhd-000578892e9cf8f0117b55dc5d770faad36740d0.tar.gz uhd-000578892e9cf8f0117b55dc5d770faad36740d0.tar.bz2 uhd-000578892e9cf8f0117b55dc5d770faad36740d0.zip |
usrp1: reworked the io_impl for usrp1 to use the vrt packet handler
used dummy packers and unpackets that have a header size of zero
created wrapper around the data transport to handle non-512 multiple sends
honor the eob flag on send to flush the send buffer
Diffstat (limited to 'host/lib/usrp/usrp1/usrp1_impl.hpp')
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_impl.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp index f5e423654..3ea35f970 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.hpp +++ b/host/lib/usrp/usrp1/usrp1_impl.hpp @@ -91,8 +91,16 @@ public: recv_mode_t, size_t timeout); - size_t get_max_send_samps_per_packet(void) const { return 0; } - size_t get_max_recv_samps_per_packet(void) const { return 0; } + static const size_t BYTES_PER_PACKET = 512*4; //under the transfer size + + size_t get_max_send_samps_per_packet(void) const { + return BYTES_PER_PACKET/_tx_otw_type.get_sample_size(); + } + + size_t get_max_recv_samps_per_packet(void) const { + return BYTES_PER_PACKET/_rx_otw_type.get_sample_size(); + } + bool recv_async_msg(uhd::async_metadata_t &, size_t); private: |