diff options
-rw-r--r-- | host/include/uhd/streamer.hpp | 28 | ||||
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 10 |
2 files changed, 27 insertions, 11 deletions
diff --git a/host/include/uhd/streamer.hpp b/host/include/uhd/streamer.hpp index 7a80d0f36..c9c6fef89 100644 --- a/host/include/uhd/streamer.hpp +++ b/host/include/uhd/streamer.hpp @@ -87,23 +87,19 @@ struct UHD_API streamer_args{ }; /*! - * A streamer is the host interface to RX or TX samples. + * The RX streamer is the host interface to receiving samples. * It represents the layer between the samples on the host - * and samples inside the device's DSP processing. + * and samples inside the device's receive DSP processing. */ -class UHD_API streamer : boost::noncopyable{ +class UHD_API rx_streamer : boost::noncopyable{ public: + typedef boost::shared_ptr<rx_streamer> sptr; + //! Get the number of channels associated with this streamer virtual size_t get_num_channels(void) const = 0; //! Get the max number of samples per buffer per packet virtual size_t get_max_num_samps(void) const = 0; -}; - -//! A receive streamer to receive host samples -class UHD_API rx_streamer : public streamer{ -public: - typedef boost::shared_ptr<rx_streamer> sptr; //! Typedef for a pointer to a single, or a collection of recv buffers typedef ref_vector<void *> buffs_type; @@ -141,11 +137,21 @@ public: ) = 0; }; -//! A transmit streamer to send host samples -class UHD_API tx_streamer : public streamer{ +/*! + * The TX streamer is the host interface to transmitting samples. + * It represents the layer between the samples on the host + * and samples inside the device's transmit DSP processing. + */ +class UHD_API tx_streamer : boost::noncopyable{ public: typedef boost::shared_ptr<tx_streamer> sptr; + //! Get the number of channels associated with this streamer + virtual size_t get_num_channels(void) const = 0; + + //! Get the max number of samples per buffer per packet + virtual size_t get_max_num_samps(void) const = 0; + //! Typedef for a pointer to a single, or a collection of send buffers typedef ref_vector<const void *> buffs_type; diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 00d5dfe7c..303af7ef9 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -108,6 +108,16 @@ public: */ virtual device::sptr get_device(void) = 0; + //! Convenience method to get a RX streamer + rx_streamer::sptr get_rx_streamer(const streamer_args &args){ + return this->get_device()->get_rx_streamer(args); + } + + //! Convenience method to get a TX streamer + tx_streamer::sptr get_tx_streamer(const streamer_args &args){ + return this->get_device()->get_tx_streamer(args); + } + /******************************************************************* * Mboard methods ******************************************************************/ |