Logo Search packages:      
Sourcecode: xboxdrv version File versions  Download package

Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

Xbox360UsbThread Class Reference

#include <xbox360_usb_thread.hpp>

Collaboration diagram for Xbox360UsbThread:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool has_msg () const
Xbox360Msg pop_msg ()
void set_led (uint8_t led_status)
void set_rumble (uint8_t big, uint8_t small)
void start ()
void stop ()
 Xbox360UsbThread (struct usb_device *dev)

Private Member Functions

Xbox360UsbThreadoperator= (const Xbox360UsbThread &)
void * thread_loop ()
 Xbox360UsbThread (const Xbox360UsbThread &)

Static Private Member Functions

static void * thread_loop_wrap (void *userdata)

Private Attributes

struct usb_device * dev
struct usb_dev_handle * handle
std::queue< Xbox360Msgmailbox
bool thread_quit

Detailed Description

A worker thread that reads from the USB device in a blocking fashion, so that the Xbox360Driver can stay non blocking.

Using the timeout value of usb_interrupt_read() should in theory allow that too, but it didn't work for some reason, events got lost, thus this seperate thread. A libusb alternative/fork called openusb might fix this propblem by providing asynchronous io.

Definition at line 35 of file xbox360_usb_thread.hpp.


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

Generated by  Doxygen 1.6.0   Back to index