Open Lighting Architecture: ola::plugin::usbdmx::WidgetFactory Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | List of all members
ola::plugin::usbdmx::WidgetFactory Class Referenceabstract

## Detailed Description

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.

Inheritance diagram for ola::plugin::usbdmx::WidgetFactory:

## 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 std::string | Name () const =0
| The name of this factory.

## Member Function Documentation

## ◆ DeviceAdded()

virtual bool ola::plugin::usbdmx::WidgetFactory::DeviceAdded | ( | WidgetObserver * | observer,
|  | libusb_device * | usb_device,
|  | const struct libusb_device_descriptor & | descriptor )
| pure virtual

Called when a new USB device is added.

Parameters

  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.

Returns
  True if this factory has claimed the usb_device, false otherwise.

Implemented in ola::plugin::usbdmx::AnymauDMXFactory, ola::plugin::usbdmx::DMXCProjectsNodleU1Factory, ola::plugin::usbdmx::EuroliteProFactory, ola::plugin::usbdmx::JaRuleFactory, ola::plugin::usbdmx::ScanlimeFadecandyFactory, ola::plugin::usbdmx::SunliteFactory, and ola::plugin::usbdmx::VellemanK8062Factory.

## ◆ Name()

virtual std::string ola::plugin::usbdmx::WidgetFactory::Name | ( |  | ) | const
| pure virtual

The name of this factory.

Returns
  The name of this factory.

Implemented in ola::plugin::usbdmx::BaseWidgetFactory< WidgetType >, ola::plugin::usbdmx::BaseWidgetFactory< class AnymauDMX >, ola::plugin::usbdmx::BaseWidgetFactory< class DMXCProjectsNodleU1 >, ola::plugin::usbdmx::BaseWidgetFactory< class EurolitePro >, ola::plugin::usbdmx::BaseWidgetFactory< class ScanlimeFadecandy >, ola::plugin::usbdmx::BaseWidgetFactory< class VellemanK8062 >, ola::plugin::usbdmx::BaseWidgetFactory< ola::usb::JaRuleWidget >, and ola::plugin::usbdmx::BaseWidgetFactory< Sunlite >.

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

- plugins/usbdmx/WidgetFactory.h