USRP Hardware Driver and USRP Manual  Version: 004.000.000.HEAD-0-g8773fb2c
UHD and USRP Manual
usb_device_handle.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2010-2013 Ettus Research LLC
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 //
17 
18 #ifndef INCLUDED_UHD_TRANSPORT_USB_DEVICE_HANDLE_HPP
19 #define INCLUDED_UHD_TRANSPORT_USB_DEVICE_HANDLE_HPP
20 
21 #include <uhd/config.hpp>
22 #include <boost/utility.hpp>
23 #include <boost/shared_ptr.hpp>
24 #include <boost/cstdint.hpp>
25 #include <vector>
26 
27 namespace uhd { namespace transport {
28 
41 class UHD_API usb_device_handle : boost::noncopyable {
42 public:
43  typedef boost::shared_ptr<usb_device_handle> sptr;
44  typedef std::pair<boost::uint16_t, boost::uint16_t> vid_pid_pair_t;
45 
46  virtual ~usb_device_handle(void);
47 
52  virtual std::string get_serial() const = 0;
53 
58  virtual std::string get_manufacturer() const = 0;
59 
64  virtual std::string get_product() const = 0;
65 
70  virtual boost::uint16_t get_vendor_id() const = 0;
71 
76  virtual boost::uint16_t get_product_id() const = 0;
77 
82  virtual bool firmware_loaded() = 0;
83 
88  static std::vector<usb_device_handle::sptr> get_device_list(boost::uint16_t vid, boost::uint16_t pid);
89  static std::vector<usb_device_handle::sptr> get_device_list(const std::vector<usb_device_handle::vid_pid_pair_t>& vid_pid_pair_list);
90 
91 
92 }; //namespace usb
93 
94 }} //namespace
95 
96 #endif /* INCLUDED_UHD_TRANSPORT_USB_DEVICE_HANDLE_HPP */
Definition: usb_device_handle.hpp:41
boost::shared_ptr< usb_device_handle > sptr
Definition: usb_device_handle.hpp:43
Definition: build_info.hpp:25
std::pair< boost::uint16_t, boost::uint16_t > vid_pid_pair_t
Definition: usb_device_handle.hpp:44
#define UHD_API
Definition: config.h:73