diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/config.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/transport/if_addrs.hpp | 1 | ||||
-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/dboard_eeprom.hpp | 35 | ||||
-rw-r--r-- | host/include/uhd/utils/algorithm.hpp | 14 |
6 files changed, 21 insertions, 67 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/if_addrs.hpp b/host/include/uhd/transport/if_addrs.hpp index c831750d7..689aff42c 100644 --- a/host/include/uhd/transport/if_addrs.hpp +++ b/host/include/uhd/transport/if_addrs.hpp @@ -31,7 +31,6 @@ namespace uhd{ namespace transport{ std::string inet; std::string mask; std::string bcast; - if_addrs_t(void); }; /*! 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/dboard_eeprom.hpp b/host/include/uhd/usrp/dboard_eeprom.hpp index 108027b46..394d71dd6 100644 --- a/host/include/uhd/usrp/dboard_eeprom.hpp +++ b/host/include/uhd/usrp/dboard_eeprom.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010 Ettus Research LLC +// Copyright 2010-2011 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -26,33 +26,32 @@ namespace uhd{ namespace usrp{ struct UHD_API dboard_eeprom_t{ - /*! - * The dboard id that was read from eeprom or will be set to eeprom. - */ + + //! The ID for the daughterboard type dboard_id_t id; + //! The unique serial number + std::string serial; + /*! - * Create a dboard eeprom struct from the bytes read out of eeprom. - * The constructor will parse out the dboard id from a vector of bytes. - * To be valid, the bytes vector should be at least num_bytes() long. - * If the parsing fails due to bad checksum or incomplete length, - * the dboard id in this struct will be set to dboard_id::NONE. - * \param bytes the vector of bytes + * Create an empty dboard eeprom struct. */ - dboard_eeprom_t(const uhd::byte_vector_t &bytes = uhd::byte_vector_t(0)); + dboard_eeprom_t(void); /*! - * Get the bytes that would be written to dboard eeprom. - * \return a vector of bytes + * Load the object with bytes from the eeprom. + * \param iface the serial interface with i2c + * \param addr the i2c address for the eeprom */ - uhd::byte_vector_t get_eeprom_bytes(void); + void load(i2c_iface &iface, boost::uint8_t addr); /*! - * Get the number of bytes in the dboard eeprom segment. - * Use this value when reading out of the dboard eeprom. - * \return the number of bytes used by dboard eeprom + * Store the object to bytes in the eeprom. + * \param iface the serial interface with i2c + * \param addr the i2c address for the eeprom */ - static size_t num_bytes(void); + void store(i2c_iface &iface, boost::uint8_t addr); + }; }} //namespace diff --git a/host/include/uhd/utils/algorithm.hpp b/host/include/uhd/utils/algorithm.hpp index 5e2230371..d3a07db96 100644 --- a/host/include/uhd/utils/algorithm.hpp +++ b/host/include/uhd/utils/algorithm.hpp @@ -30,20 +30,6 @@ namespace std{ /*! - * A wrapper around std::copy that takes ranges instead of iterators. - * - * Copy the elements of the source range into the destination range. - * The destination range should be at least as large as the source range. - * - * \param src the range of elements to copy from - * \param dst the range of elements to be filled - */ - template<typename RangeSrc, typename RangeDst> inline - void copy(const RangeSrc &src, RangeDst &dst){ - std::copy(boost::begin(src), boost::end(src), boost::begin(dst)); - } - - /*! * A wrapper around std::sort that takes a range instead of an iterator. * * The elements are sorted into ascending order using the less-than operator. |