21 #ifndef PLUGINS_USBDMX_USBDMXPLUGIN_H_
22 #define PLUGINS_USBDMX_USBDMXPLUGIN_H_
28 #include "ola/plugin_id.h"
29 #include "olad/Plugin.h"
30 #include "ola/io/Descriptor.h"
43 m_anyma_devices_missing_serial_numbers(
false) {
46 string Name()
const {
return PLUGIN_NAME; }
47 string Description()
const;
48 ola_plugin_id Id()
const {
return OLA_PLUGIN_USBDMX; }
49 string PluginPrefix()
const {
return PLUGIN_PREFIX; }
51 bool AddDeviceDescriptor(
int fd);
52 bool RemoveDeviceDescriptor(
int fd);
56 struct USBDeviceInformation {
62 bool m_anyma_devices_missing_serial_numbers;
63 vector<class UsbDevice*> m_devices;
64 vector<ola::io::DeviceDescriptor*> m_descriptors;
65 set<std::pair<uint8_t, uint8_t> > m_registered_devices;
71 bool SetDefaultPreferences();
73 struct libusb_device *usb_device,
74 const struct libusb_device_descriptor &device_descriptor);
77 struct libusb_device_handle *usb_handle,
78 const struct libusb_device_descriptor &device_descriptor,
79 USBDeviceInformation *device_info);
80 bool MatchManufacturer(
const string &expected,
const string &actual);
81 bool MatchProduct(
const string &expected,
const string &actual);
82 bool GetDescriptorString(libusb_device_handle *usb_handle,
86 static const char PLUGIN_NAME[];
87 static const char PLUGIN_PREFIX[];
88 static const char LIBUSB_DEBUG_LEVEL_KEY[];
89 static int LIBUSB_DEFAULT_DEBUG_LEVEL;
90 static int LIBUSB_MAX_DEBUG_LEVEL;
95 #endif // PLUGINS_USBDMX_USBDMXPLUGIN_H_