summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-05 11:59:10 -0700
committerJosh Blum <josh@joshknows.com>2011-11-03 20:37:10 -0700
commite89b20da1511f02d887435d093d8efef3e4df261 (patch)
tree3ae80dd1600ef9e85a94976e052d3c217a38ad68 /host/include
parentfbe2aefe299a4d3ddf8cceb0eb5866136f48744d (diff)
downloaduhd-e89b20da1511f02d887435d093d8efef3e4df261.tar.gz
uhd-e89b20da1511f02d887435d093d8efef3e4df261.tar.bz2
uhd-e89b20da1511f02d887435d093d8efef3e4df261.zip
uhd: tweaks to streamer interface and multi-usrp convenience interface
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/streamer.hpp28
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp10
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
******************************************************************/