diff options
author | Josh Blum <josh@joshknows.com> | 2011-10-04 18:08:47 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-11-03 20:37:10 -0700 |
commit | 66c95c12a1d2f7b79bdf5b9b871d1b957c56606f (patch) | |
tree | 120f3106559b856c7ab64579663b962f5827f6f1 /host/lib/transport | |
parent | abed04b3c6d70c260d8725831b8aa6e944f52749 (diff) | |
download | uhd-66c95c12a1d2f7b79bdf5b9b871d1b957c56606f.tar.gz uhd-66c95c12a1d2f7b79bdf5b9b871d1b957c56606f.tar.bz2 uhd-66c95c12a1d2f7b79bdf5b9b871d1b957c56606f.zip |
uhd: lots of work releated to streamer work and usrp2 implementation
Diffstat (limited to 'host/lib/transport')
-rw-r--r-- | host/lib/transport/super_recv_packet_handler.hpp | 27 | ||||
-rw-r--r-- | host/lib/transport/super_send_packet_handler.hpp | 27 |
2 files changed, 54 insertions, 0 deletions
diff --git a/host/lib/transport/super_recv_packet_handler.hpp b/host/lib/transport/super_recv_packet_handler.hpp index 4ae51e146..f0b053473 100644 --- a/host/lib/transport/super_recv_packet_handler.hpp +++ b/host/lib/transport/super_recv_packet_handler.hpp @@ -562,6 +562,33 @@ private: } }; +class recv_packet_streamer : public recv_packet_handler, public rx_streamer{ +public: + recv_packet_streamer(const size_t max_num_samps){ + _max_num_samps = max_num_samps; + } + + size_t get_num_channels(void) const{ + return this->size(); + } + + size_t get_max_num_samps(void) const{ + return _max_num_samps; + } + + size_t recv( + const rx_streamer::buffs_type &buffs, + const size_t nsamps_per_buff, + uhd::rx_metadata_t &metadata, + double timeout + ){ + return recv_packet_handler::recv(buffs, nsamps_per_buff, metadata, timeout); + } + +private: + size_t _max_num_samps; +}; + }}} //namespace #endif /* INCLUDED_LIBUHD_TRANSPORT_SUPER_RECV_PACKET_HANDLER_HPP */ diff --git a/host/lib/transport/super_send_packet_handler.hpp b/host/lib/transport/super_send_packet_handler.hpp index 6950abb73..edfe9bd13 100644 --- a/host/lib/transport/super_send_packet_handler.hpp +++ b/host/lib/transport/super_send_packet_handler.hpp @@ -259,6 +259,33 @@ private: } }; +class send_packet_streamer : public send_packet_handler, public tx_streamer{ +public: + send_packet_streamer(const size_t max_num_samps){ + _max_num_samps = max_num_samps; + } + + size_t get_num_channels(void) const{ + return this->size(); + } + + size_t get_max_num_samps(void) const{ + return _max_num_samps; + } + + size_t send( + const tx_streamer::buffs_type &buffs, + const size_t nsamps_per_buff, + const uhd::tx_metadata_t &metadata, + double timeout + ){ + return send_packet_handler::send(buffs, nsamps_per_buff, metadata, timeout); + } + +private: + size_t _max_num_samps; +}; + }}} //namespace #endif /* INCLUDED_LIBUHD_TRANSPORT_SUPER_SEND_PACKET_HANDLER_HPP */ |