root / host / include / uhd / types / usb_descriptor.hpp @ 38746242
History | View | Annotate | Download (1.5 kB)
| 1 |
//
|
|---|---|
| 2 |
// Copyright 2010 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_TYPES_USB_DESCRIPTOR_HPP
|
| 19 |
#define INCLUDED_UHD_TYPES_USB_DESCRIPTOR_HPP
|
| 20 |
|
| 21 |
#include <uhd/config.hpp> |
| 22 |
#include <boost/cstdint.hpp> |
| 23 |
#include <vector> |
| 24 |
#include <string> |
| 25 |
|
| 26 |
namespace uhd{
|
| 27 |
|
| 28 |
/*!
|
| 29 |
* The USB descriptor struct holds identity information for a USB device
|
| 30 |
*/
|
| 31 |
struct UHD_API usb_descriptor_t{
|
| 32 |
std::string serial;
|
| 33 |
boost::uint16_t vendor_id; |
| 34 |
boost::uint16_t product_id; |
| 35 |
boost::uint16_t device_addr; |
| 36 |
|
| 37 |
/*!
|
| 38 |
* Create a pretty print string for this USB descriptor struct.
|
| 39 |
* \return the printable string
|
| 40 |
*/
|
| 41 |
std::string to_pp_string(void) const; |
| 42 |
}; |
| 43 |
|
| 44 |
//handy typde for a vector of usb descriptors
|
| 45 |
typedef std::vector<usb_descriptor_t> usb_descriptors_t;
|
| 46 |
|
| 47 |
} //namespace uhd
|
| 48 |
|
| 49 |
#endif /* INCLUDED_UHD_TYPES_USB_DESCRIPTOR_HPP */ |