21 #ifndef PLUGINS_USBDMX_USBDMXPLUGIN_H_
22 #define PLUGINS_USBDMX_USBDMXPLUGIN_H_
28 #include "ola/plugin_id.h"
29 #include "olad/Plugin.h"
41 m_anyma_devices_missing_serial_numbers(
false) {
44 std::string
Name()
const {
return PLUGIN_NAME; }
46 ola_plugin_id
Id()
const {
return OLA_PLUGIN_USBDMX; }
49 bool AddDeviceDescriptor(
int fd);
50 bool RemoveDeviceDescriptor(
int fd);
54 struct USBDeviceInformation {
55 std::string manufacturer;
60 bool m_anyma_devices_missing_serial_numbers;
61 std::vector<class UsbDevice*> m_devices;
62 std::vector<ola::io::DeviceDescriptor*> m_descriptors;
63 std::set<std::pair<uint8_t, uint8_t> > m_registered_devices;
69 bool SetDefaultPreferences();
70 class UsbDevice* NewAnymaDevice(
71 struct libusb_device *usb_device,
72 const struct libusb_device_descriptor &device_descriptor);
75 struct libusb_device_handle *usb_handle,
76 const struct libusb_device_descriptor &device_descriptor,
77 USBDeviceInformation *device_info);
78 bool MatchManufacturer(
const std::string &expected,
79 const std::string &actual);
80 bool MatchProduct(
const std::string &expected,
const std::string &actual);
82 static const char PLUGIN_NAME[];
83 static const char PLUGIN_PREFIX[];
84 static const char LIBUSB_DEBUG_LEVEL_KEY[];
85 static int LIBUSB_DEFAULT_DEBUG_LEVEL;
86 static int LIBUSB_MAX_DEBUG_LEVEL;
91 #endif // PLUGINS_USBDMX_USBDMXPLUGIN_H_