Open Lighting Architecture
0.10.4
|
Public Member Functions | |
DMXCProjectsNodleU1AsyncUsbReceiver (ola::usb::LibUsbAdaptor *adaptor, libusb_device *usb_device, PluginAdaptor *plugin_adaptor, unsigned int mode) | |
libusb_device_handle * | SetupHandle () |
Open the device handle. More... | |
bool | PerformTransfer () |
Start the request of data from the widget. More... | |
bool | TransferCompleted (DmxBuffer *buffer, int transferred_size) |
Called when the transfer completes. More... | |
Public Member Functions inherited from ola::plugin::usbdmx::AsyncUsbReceiver | |
AsyncUsbReceiver (ola::usb::LibUsbAdaptor *const adaptor, libusb_device *usb_device, PluginAdaptor *plugin_adaptor) | |
Create a new AsyncUsbReceiver. More... | |
virtual | ~AsyncUsbReceiver () |
Destructor. | |
bool | Init () |
Initialize the receiver. More... | |
bool | Init (libusb_device_handle *handle) |
Initialize the receiver with an already setup handle. More... | |
bool | Start () |
Start receiving DMX. More... | |
void | SetReceiveCallback (Callback0< void > *callback) |
Set the callback to be called when the receive buffer is updated. More... | |
void | GetDmx (DmxBuffer *buffer) |
Get DMX Buffer. More... | |
void | TransferComplete (struct libusb_transfer *transfer) |
Called from the libusb callback when the asynchronous transfer completes. More... | |
Public Member Functions inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase | |
AsyncUsbTransceiverBase (ola::usb::LibUsbAdaptor *const adaptor, libusb_device *usb_device) | |
Create a new AsyncUsbTransceiverBase. More... | |
virtual | ~AsyncUsbTransceiverBase () |
Destructor. | |
bool | Init () |
Initialize the transceiver. More... | |
libusb_device_handle * | GetHandle () |
Get the libusb_device_handle of an already opened widget. More... | |
Additional Inherited Members | |
Protected Types inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase | |
enum | TransferState { IDLE, IN_PROGRESS, DISCONNECTED } |
Protected Member Functions inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase | |
virtual void | PostTransferHook () |
Called when the transfer completes. More... | |
void | CancelTransfer () |
Cancel any pending transfers. | |
void | FillControlTransfer (unsigned char *buffer, unsigned int timeout) |
Fill a control transfer. More... | |
void | FillBulkTransfer (unsigned char endpoint, unsigned char *buffer, int length, unsigned int timeout) |
Fill a bulk transfer. | |
void | FillInterruptTransfer (unsigned char endpoint, unsigned char *buffer, int length, unsigned int timeout) |
Fill an interrupt transfer. | |
int | SubmitTransfer () |
Submit the transfer for tx. More... | |
Protected Attributes inherited from ola::plugin::usbdmx::AsyncUsbTransceiverBase | |
ola::usb::LibUsbAdaptor *const | m_adaptor |
The LibUsbAdaptor passed in the constructor. | |
libusb_device *const | m_usb_device |
The libusb_device passed in the constructor. | |
libusb_device_handle * | m_usb_handle |
bool | m_suppress_continuation |
struct libusb_transfer * | m_transfer |
TransferState | m_transfer_state |
ola::thread::Mutex | m_mutex |
|
virtual |
Start the request of data from the widget.
This method is implemented by the subclass. The subclass should call FillControlTransfer() / FillBulkTransfer() as appropriate and then call SubmitTransfer().
Implements ola::plugin::usbdmx::AsyncUsbReceiver.
|
inlinevirtual |
Open the device handle.
Implements ola::plugin::usbdmx::AsyncUsbTransceiverBase.
|
virtual |
Called when the transfer completes.
buffer | the DmxBuffer to receive into |
transferred_size | the number of bytes actually transferred returns true if the buffer was updated |
Implements ola::plugin::usbdmx::AsyncUsbReceiver.