Open Lighting Architecture
0.9.6
|
Creates new Widget objects to represent DMX USB hardware.
WidgetFactories are called when new USB devices are located. By inspecting the device's vendor and product ID, they may choose to create a new Widget object. The WidgetFactory then calls the WidgetObserver object to indicate a new Widget has been added.
When a USB device is removed, the factory that created a Widget from the device has it's DeviceRemoved() method called. The factory should then invoke WidgetRemoved on the observer object.
Public Member Functions | |
virtual bool | DeviceAdded (WidgetObserver *observer, libusb_device *usb_device, const struct libusb_device_descriptor &descriptor)=0 |
Called when a new USB device is added. | |
virtual void | DeviceRemoved (WidgetObserver *observer, libusb_device *usb_device)=0 |
Called when a USB device is removed. |
|
pure virtual |
Called when a new USB device is added.
observer | The WidgetObserver to notify if this results in a new widget. |
usb_device | the libusb_device that was added. |
descriptor | the libusb_device_descriptor that corresponds to the usb_device. |
Implemented in ola::plugin::usbdmx::JaRuleFactory, ola::plugin::usbdmx::ScanlimeFadecandyFactory, ola::plugin::usbdmx::AnymauDMXFactory, ola::plugin::usbdmx::EuroliteProFactory, ola::plugin::usbdmx::SunliteFactory, and ola::plugin::usbdmx::VellemanK8062Factory.
|
pure virtual |
Called when a USB device is removed.
observer | The WidgetObserver to notify if this action results in a widget removal. |
usb_device | the libusb_device that was removed. |
Implemented in ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >, ola::plugin::usbdmx::BaseWidgetFactory< class JaRuleWidget >, ola::plugin::usbdmx::BaseWidgetFactory< class AnymauDMX >, ola::plugin::usbdmx::BaseWidgetFactory< class VellemanK8062 >, ola::plugin::usbdmx::BaseWidgetFactory< class ScanlimeFadecandy >, ola::plugin::usbdmx::BaseWidgetFactory< Sunlite >, ola::plugin::usbdmx::BaseWidgetFactory< class EurolitePro >, and ola::plugin::usbdmx::SunliteFactory.