diff options
author | Josh Blum <josh@joshknows.com> | 2010-06-03 19:30:00 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-06-03 19:30:00 +0000 |
commit | 551426b72672379faa56302eb3d3e19d12c41aec (patch) | |
tree | aad9a722c74b86f42e662ced1abd9b9409fa9868 /host/lib/usrp/usrp_e/usrp_e_impl.hpp | |
parent | f1529463174883f6c830acbfd52cd52ed4755971 (diff) | |
download | uhd-551426b72672379faa56302eb3d3e19d12c41aec.tar.gz uhd-551426b72672379faa56302eb3d3e19d12c41aec.tar.bz2 uhd-551426b72672379faa56302eb3d3e19d12c41aec.zip |
work on io impl for usrp-e using read/write
Diffstat (limited to 'host/lib/usrp/usrp_e/usrp_e_impl.hpp')
-rw-r--r-- | host/lib/usrp/usrp_e/usrp_e_impl.hpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/host/lib/usrp/usrp_e/usrp_e_impl.hpp b/host/lib/usrp/usrp_e/usrp_e_impl.hpp index a2cdbc31e..12d4c9d9e 100644 --- a/host/lib/usrp/usrp_e/usrp_e_impl.hpp +++ b/host/lib/usrp/usrp_e/usrp_e_impl.hpp @@ -18,6 +18,7 @@ #include "usrp_e_iface.hpp" #include "clock_ctrl.hpp" #include "codec_ctrl.hpp" +#include <uhd/utils/pimpl.hpp> #include <uhd/usrp/usrp_e.hpp> #include <uhd/usrp/dboard_eeprom.hpp> #include <uhd/types/clock_config.hpp> @@ -55,26 +56,11 @@ public: return sptr(new wax_obj_proxy(get, set)); } - ~wax_obj_proxy(void){ - /* NOP */ - } - private: - get_t _get; - set_t _set; - - wax_obj_proxy(const get_t &get, const set_t &set){ - _get = get; - _set = set; - }; - - void get(const wax::obj &key, wax::obj &val){ - return _get(key, val); - } - - void set(const wax::obj &key, const wax::obj &val){ - return _set(key, val); - } + get_t _get; set_t _set; + wax_obj_proxy(const get_t &get, const set_t &set): _get(get), _set(set){}; + void get(const wax::obj &key, wax::obj &val){return _get(key, val);} + void set(const wax::obj &key, const wax::obj &val){return _set(key, val);} }; /*! @@ -95,10 +81,19 @@ public: size_t get_max_recv_samps_per_packet(void) const{return _max_num_samples;} private: - static const size_t _max_num_samples = 2048/sizeof(boost::uint32_t); + //interface to ioctls and file descriptor usrp_e_iface::sptr _iface; + //FIXME fetch from ioctl? + static const size_t _max_num_samples = 2048/sizeof(boost::uint32_t); + + //handle io stuff + UHD_PIMPL_DECL(io_impl) _io_impl; + void io_init(void); + + //configuration shadows uhd::clock_config_t _clock_config; + //TODO otw type recv/send //ad9522 clock control clock_ctrl::sptr _clock_ctrl; |