21#ifndef PLUGINS_USBDMX_THREADEDUSBRECEIVER_H_
22#define PLUGINS_USBDMX_THREADEDUSBRECEIVER_H_
29#include "ola/thread/Thread.h"
60 libusb_device_handle *usb_handle,
62 int interface_number = 0);
82 m_receive_callback.reset(callback);
106 bool *buffer_updated) = 0;
110 libusb_device*
const m_usb_device;
111 libusb_device_handle*
const m_usb_handle;
112 int const m_interface_number;
114 std::auto_ptr<Callback0<void> > m_receive_callback;
A class used to hold a single universe of DMX data.
Provides a wrapper for the DeviceManager and SelectServer objects so that the plugins can register de...
A 0 argument callback which can be called multiple times.
Definition Callback.h:129
Used to hold a single universe of DMX data.
Definition DmxBuffer.h:49
Definition PluginAdaptor.h:41
Receive DMX data using libusb, from a separate thread.
Definition ThreadedUsbReceiver.h:49
ThreadedUsbReceiver(libusb_device *usb_device, libusb_device_handle *usb_handle, PluginAdaptor *plugin_adaptor, int interface_number=0)
Create a new ThreadedUsbReceiver.
Definition ThreadedUsbReceiver.cpp:30
void SetReceiveCallback(Callback0< void > *callback)
Set the callback to be called when the receive buffer is updated.
Definition ThreadedUsbReceiver.h:81
const DmxBuffer & GetDmxInBuffer() const
Get DMX Buffer.
Definition ThreadedUsbReceiver.h:89
bool Start()
Start the new thread.
Definition ThreadedUsbReceiver.cpp:52
void * Run()
Entry point for the new thread.
Definition ThreadedUsbReceiver.cpp:63
virtual bool ReceiveBuffer(libusb_device_handle *handle, DmxBuffer *buffer, bool *buffer_updated)=0
Perform the DMX transfer.
The namespace containing all OLA symbols.
Definition Credentials.cpp:44