#include <uhd/transport/usb_zero_copy.hpp>
Public Types | |
typedef boost::shared_ptr< usb_zero_copy > | sptr |
Public Types inherited from uhd::transport::zero_copy_if | |
typedef boost::shared_ptr< zero_copy_if > | sptr |
Public Member Functions | |
virtual | ~usb_zero_copy (void) |
Public Member Functions inherited from uhd::transport::zero_copy_if | |
virtual | ~zero_copy_if () |
virtual managed_recv_buffer::sptr | get_recv_buff (double timeout=0.1)=0 |
virtual size_t | get_num_recv_frames (void) const =0 |
virtual size_t | get_recv_frame_size (void) const =0 |
virtual managed_send_buffer::sptr | get_send_buff (double timeout=0.1)=0 |
virtual size_t | get_num_send_frames (void) const =0 |
virtual size_t | get_send_frame_size (void) const =0 |
Static Public Member Functions | |
static sptr | make (usb_device_handle::sptr handle, const int recv_interface, const unsigned char recv_endpoint, const int send_interface, const unsigned char send_endpoint, const device_addr_t &hints=device_addr_t()) |
A zero copy USB transport provides an efficient way to handle data. by avoiding the extra copy when recv() or send() is called on the handle. Rather, the zero copy transport gives the caller memory references. The caller informs the transport when it is finished with the reference.
On Linux systems, the zero copy transport can use a kernel packet ring. If no platform specific solution is available, make returns a boost asio implementation that wraps functionality around standard send/recv calls.
typedef boost::shared_ptr<usb_zero_copy> uhd::transport::usb_zero_copy::sptr |
|
virtual |
|
static |
Make a new zero copy USB transport: This transport is for sending and receiving between the host and a pair of USB bulk transfer endpoints. The primary usage for this transport is data transactions. The underlying implementation may be platform specific.
handle | a device handle that uniquely identifying the device |
recv_interface | an integer specifying an IN interface number |
recv_endpoint | an integer specifying an IN endpoint number |
send_interface | an integer specifying an OUT interface number |
send_endpoint | an integer specifying an OUT endpoint number |
hints | optional parameters to pass to the underlying transport |