USRP Hardware Driver and USRP Manual  Version: 003.008.002-0-ge9d11b35
UHD and USRP Manual
uhd::transport::usb_control Class Referenceabstract

#include <uhd/transport/usb_control.hpp>

Inheritance diagram for uhd::transport::usb_control:

Public Types

typedef boost::shared_ptr< usb_controlsptr
 

Public Member Functions

virtual ~usb_control (void)=0
 
virtual ssize_t submit (boost::uint8_t request_type, boost::uint8_t request, boost::uint16_t value, boost::uint16_t index, unsigned char *buff, boost::uint16_t length, boost::int32_t timeout=0)=0
 

Static Public Member Functions

static sptr make (usb_device_handle::sptr handle, const size_t interface)
 

Member Typedef Documentation

◆ sptr

typedef boost::shared_ptr<usb_control> uhd::transport::usb_control::sptr

Constructor & Destructor Documentation

◆ ~usb_control()

virtual uhd::transport::usb_control::~usb_control ( void  )
pure virtual

Member Function Documentation

◆ make()

static sptr uhd::transport::usb_control::make ( usb_device_handle::sptr  handle,
const size_t  interface 
)
static

Create a new usb control transport: This transport is for sending and receiving control information from the host to device using the Default Control Pipe.

Parameters
handlea device handle that uniquely identifies a USB device
interfacethe USB interface number for the control transport

◆ submit()

virtual ssize_t uhd::transport::usb_control::submit ( boost::uint8_t  request_type,
boost::uint8_t  request,
boost::uint16_t  value,
boost::uint16_t  index,
unsigned char *  buff,
boost::uint16_t  length,
boost::int32_t  timeout = 0 
)
pure virtual

Submit a USB device request: Blocks until the request returns

For format and corresponding USB request fields see USB Specification Revision 2.0 - 9.3 USB Device Requests

Usage is device specific

Parameters
request_type1-byte bitmask (bmRequestType)
request1-byte (bRequest)
value2-byte (wValue)
index2-byte (wIndex)
buffbuffer to hold send or receive data
length2-byte (wLength)
timeout4-byte (timeout, default is infinite wait)
Returns
number of bytes submitted or error code

The documentation for this class was generated from the following file: