diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/config.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/transport/zero_copy.hpp | 34 | ||||
-rw-r--r-- | host/include/uhd/types/ref_vector.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/usrp/dsp_props.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/usrp/mboard_props.hpp | 1 | ||||
-rw-r--r-- | host/include/uhd/usrp/multi_usrp.hpp | 26 |
6 files changed, 22 insertions, 45 deletions
diff --git a/host/include/uhd/config.hpp b/host/include/uhd/config.hpp index 912fbc204..1a04680e9 100644 --- a/host/include/uhd/config.hpp +++ b/host/include/uhd/config.hpp @@ -27,7 +27,7 @@ //# pragma warning(disable: 4512) // assignment operator can't not be generated //# pragma warning(disable: 4100) // unreferenced formal parameter //# pragma warning(disable: 4996) // <symbol> was declared deprecated -//# pragma warning(disable: 4355) // 'this' : used in base member initializer list +# pragma warning(disable: 4355) // 'this' : used in base member initializer list //# pragma warning(disable: 4706) // assignment within conditional expression # pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B' //# pragma warning(disable: 4127) // conditional expression is constant diff --git a/host/include/uhd/transport/zero_copy.hpp b/host/include/uhd/transport/zero_copy.hpp index d5a536b27..092028d09 100644 --- a/host/include/uhd/transport/zero_copy.hpp +++ b/host/include/uhd/transport/zero_copy.hpp @@ -21,7 +21,6 @@ #include <uhd/config.hpp> #include <boost/utility.hpp> #include <boost/shared_ptr.hpp> -#include <boost/function.hpp> namespace uhd{ namespace transport{ @@ -30,23 +29,9 @@ namespace uhd{ namespace transport{ * Contains a reference to transport-managed memory, * and a method to release the memory after reading. */ - class UHD_API managed_recv_buffer : boost::noncopyable{ + class UHD_API managed_recv_buffer{ public: typedef boost::shared_ptr<managed_recv_buffer> sptr; - typedef boost::function<void(void)> release_fcn_t; - - /*! - * Make a safe managed receive buffer: - * A safe managed buffer ensures that release is called once, - * either by the user or automatically upon deconstruction. - * \param buff a pointer into read-only memory - * \param size the length of the buffer in bytes - * \param release_fcn callback to release the memory - * \return a new managed receive buffer - */ - static sptr make_safe( - const void *buff, size_t size, const release_fcn_t &release_fcn - ); /*! * Signal to the transport that we are done with the buffer. @@ -81,24 +66,9 @@ namespace uhd{ namespace transport{ * Contains a reference to transport-managed memory, * and a method to commit the memory after writing. */ - class UHD_API managed_send_buffer : boost::noncopyable{ + class UHD_API managed_send_buffer{ public: typedef boost::shared_ptr<managed_send_buffer> sptr; - typedef boost::function<void(size_t)> commit_fcn_t; - - /*! - * Make a safe managed send buffer: - * A safe managed buffer ensures that commit is called once, - * either by the user or automatically upon deconstruction. - * In the later case, the deconstructor will call commit(0). - * \param buff a pointer into writable memory - * \param size the length of the buffer in bytes - * \param commit_fcn callback to commit the memory - * \return a new managed send buffer - */ - static sptr make_safe( - void *buff, size_t size, const commit_fcn_t &commit_fcn - ); /*! * Signal to the transport that we are done with the buffer. diff --git a/host/include/uhd/types/ref_vector.hpp b/host/include/uhd/types/ref_vector.hpp index 2928cb150..bbfb5434d 100644 --- a/host/include/uhd/types/ref_vector.hpp +++ b/host/include/uhd/types/ref_vector.hpp @@ -27,7 +27,7 @@ namespace uhd{ * - Provides a std::vector-like interface for an array. * - Statically sized, and does not manage the memory. */ -template <typename T> class ref_vector{ +template <typename T> class UHD_API ref_vector{ public: /*! * Create a reference vector of size 1 from a pointer. diff --git a/host/include/uhd/usrp/dsp_props.hpp b/host/include/uhd/usrp/dsp_props.hpp index 3e1690317..e68e11deb 100644 --- a/host/include/uhd/usrp/dsp_props.hpp +++ b/host/include/uhd/usrp/dsp_props.hpp @@ -39,8 +39,8 @@ namespace uhd{ namespace usrp{ enum dsp_prop_t{ DSP_PROP_NAME, //ro, std::string DSP_PROP_OTHERS, //ro, prop_names_t + DSP_PROP_STREAM_CMD, //wo, stream_cmd_t DSP_PROP_FREQ_SHIFT, //rw, double Hz - DSP_PROP_FREQ_SHIFT_NAMES, //ro, prop_names_t DSP_PROP_CODEC_RATE, //ro, double Sps DSP_PROP_HOST_RATE //rw, double Sps }; diff --git a/host/include/uhd/usrp/mboard_props.hpp b/host/include/uhd/usrp/mboard_props.hpp index 559c96ecb..2145ab446 100644 --- a/host/include/uhd/usrp/mboard_props.hpp +++ b/host/include/uhd/usrp/mboard_props.hpp @@ -47,7 +47,6 @@ namespace uhd{ namespace usrp{ MBOARD_PROP_CLOCK_CONFIG, //rw, clock_config_t MBOARD_PROP_TIME_NOW, //rw, time_spec_t MBOARD_PROP_TIME_PPS, //wo, time_spec_t - MBOARD_PROP_STREAM_CMD, //wo, stream_cmd_t MBOARD_PROP_EEPROM_MAP //wr, mboard_eeprom_t::sptr }; diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp index 3c8dd5fac..e2b26f5fb 100644 --- a/host/include/uhd/usrp/multi_usrp.hpp +++ b/host/include/uhd/usrp/multi_usrp.hpp @@ -87,6 +87,9 @@ public: //! A wildcard motherboard index static const size_t ALL_MBOARDS = size_t(~0); + //! A wildcard channel index + static const size_t ALL_CHANS = size_t(~0); + //! A wildcard gain element name static const std::string ALL_GAINS; @@ -215,8 +218,9 @@ public: * to ensure that the packets can be aligned by their time specs. * * \param stream_cmd the stream command to issue + * \param chan the channel index 0 to N-1 */ - virtual void issue_stream_cmd(const stream_cmd_t &stream_cmd) = 0; + virtual void issue_stream_cmd(const stream_cmd_t &stream_cmd, size_t chan = ALL_CHANS) = 0; /*! * Set the clock configuration for the usrp device. @@ -282,16 +286,18 @@ public: virtual std::string get_rx_subdev_name(size_t chan = 0) = 0; /*! - * Set the RX sample rate across all channels. + * Set the RX sample rate. * \param rate the rate in Sps + * \param chan the channel index 0 to N-1 */ - virtual void set_rx_rate(double rate) = 0; + virtual void set_rx_rate(double rate, size_t chan = ALL_CHANS) = 0; /*! - * Gets the RX sample rate for all channels. + * Gets the RX sample rate. + * \param chan the channel index 0 to N-1 * \return the rate in Sps */ - virtual double get_rx_rate(void) = 0; + virtual double get_rx_rate(size_t chan = 0) = 0; /*! * Set the RX center frequency. @@ -480,16 +486,18 @@ public: virtual std::string get_tx_subdev_name(size_t chan = 0) = 0; /*! - * Set the TX sample rate across all channels. + * Set the TX sample rate. * \param rate the rate in Sps + * \param chan the channel index 0 to N-1 */ - virtual void set_tx_rate(double rate) = 0; + virtual void set_tx_rate(double rate, size_t chan = ALL_CHANS) = 0; /*! - * Gets the TX sample rate for all channels. + * Gets the TX sample rate. + * \param chan the channel index 0 to N-1 * \return the rate in Sps */ - virtual double get_tx_rate(void) = 0; + virtual double get_tx_rate(size_t chan) = 0; /*! * Set the TX center frequency. |